Expected Behavior
Drive should throw a error and do not add any invalid platform state transitions in the mempool.
Current Behavior
There is a race condition in identity registration state with chain lock asset lock proof state transitions. When you receive the block's chain lock event (by DAPI or ZMQ), it is not yet fully processed in the platform, and if user tries to create a identity create state transition, drive returns a error:
Error: Asset Lock proof core chain height 1459620 is higher than the current consensus core height 1459619.
This occurs because you receive chainlock event almost in the same time as the platform nodes, and its just not enough time for platform quorum to finish processing, the platform has to produce a new block first that will lock to that new coreChainLockHeight.
Usually, a small timeout solves that issue, however such transactions successfully propogate to the Tenderdash nodes, and even when platform receives a proper chain lock height lock, it fails to execute on rebroadcast, the next tries on DAPI broadcastStateTransition returns an Internal Server Error:
tx%20already%20exists%20in%20cache
Possible Solution
Drive should correctly reject such transaction and do not add that transaction to mempool.
Steps to Reproduce (for bugs)
- Subscribe to chainlock events
- Create an assetlock transaction
- Wait for an chainlock event
- Create an identity registration state transition with chainlock asset lock proof
- Try to broadcast it through the network
- Transaction fails to broadcast because platform is not yet processed and locked to that chainlock height
- Transaction fails to broadcast on that node, even when platform actually process that chain lock height
Context
Your Environment
- Version used:
- Environment name and version (e.g. Chrome 39, node.js 5.4):
- Operating System and version (desktop, server, or mobile):
- Link to your project:
Expected Behavior
Drive should throw a error and do not add any invalid platform state transitions in the mempool.
Current Behavior
There is a race condition in identity registration state with chain lock asset lock proof state transitions. When you receive the block's chain lock event (by DAPI or ZMQ), it is not yet fully processed in the platform, and if user tries to create a identity create state transition, drive returns a error:
This occurs because you receive chainlock event almost in the same time as the platform nodes, and its just not enough time for platform quorum to finish processing, the platform has to produce a new block first that will lock to that new coreChainLockHeight.
Usually, a small timeout solves that issue, however such transactions successfully propogate to the Tenderdash nodes, and even when platform receives a proper chain lock height lock, it fails to execute on rebroadcast, the next tries on DAPI broadcastStateTransition returns an Internal Server Error:
tx%20already%20exists%20in%20cachePossible Solution
Drive should correctly reject such transaction and do not add that transaction to mempool.
Steps to Reproduce (for bugs)
Context
Your Environment