0x-mesh icon indicating copy to clipboard operation
0x-mesh copied to clipboard

core: Validation of new orders occurring at `latest` block

Open fabioberger opened this issue 5 years ago • 2 comments

Currently, Mesh validates incoming orders at the latest block height. Since eth_call's can take some time to complete, it is possible that Mesh has already processed higher block number before the order was inserted to the DB. This could lead to events being missed and the fillableTakerAmount stored in the DB being incorrect.

The solution is to block the processing of new block events while validating incoming orders and to validate them at the latest block processed by the Mesh node. We then add it to Mesh before unblocking the block event processing.

fabioberger avatar Dec 13 '19 02:12 fabioberger

Addressed in #566

fabioberger avatar Dec 20 '19 12:12 fabioberger

After #793, this became an issue again. Rather than reverting to the old solution of using a database lock, a new solution will be implemented in #863.

jalextowle avatar Jul 20 '20 22:07 jalextowle