EYBlockchain / timber

Construct a Merkle Tree database from Ethereum logs.
Other
67 stars 19 forks source link

Westlad/fast blocks #52

Closed Westlad closed 3 years ago

Westlad commented 3 years ago

This PR enables the block assembler to create multiple blocks, even though they have not been added to the blockchain yet. This is needed so we don't have to wait while each block is added and Timber updated before we can make the next one. It does this by caching data about the state updates locally, and using those until Timber catches up.

It also fixes some race conditions that occur as Timber updates non-atomically and it also ensures that Timber updates each time the blockchain state changes, so as not to miss a historic root.

It should be tested and merged along with similarly named PRs in nightfall-optimist and nightfall-client. Nightfall-deployer is unaffected.