You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sequencer currently uses two db forks when assembling a block: one for the public processor, one for the block builder itself. This was introduced in #9634 to fix a bug and ensure that we have the correct state when starting a new tx in a block. From @MirandaWood:
Ah yep - the reason there are two is because the block builder is 'back in time' so that it can reconstruct inputs and then adds to its own db. If there was one shared db, at the time it wasn't possible to get the correct state for tx 0 to get the correct inputs for base rollup circuit 0. In other words, back then the public processor and block builder both needed to know the state at each tx at different times. A lot has changed since then so it may no longer be required.
This was done to avoid making changes to the public processor, due to a limitation introduced by blobs: we need to know the size of all tx effects before we start proving.
#9302 (comment)
Here ^ so unfortunately we need to know the number of elements a blob will have before we start proving, to initialise the poseidon sponge. This means we have to process the block's txs then start proving them. So the public processor can't go process -> add to block builder for each tx. I think because of this, and to remove messy additional code, the 'tx handler' optional input was removed.
Since we only need this info for proving and not for block building, we can fix this by having the archiver store the size of tx effects along with the rest of the block, and injecting that into the epoch proving job.
The text was updated successfully, but these errors were encountered:
The sequencer currently uses two db forks when assembling a block: one for the public processor, one for the block builder itself. This was introduced in #9634 to fix a bug and ensure that we have the correct state when starting a new tx in a block. From @MirandaWood:
This was done to avoid making changes to the public processor, due to a limitation introduced by blobs: we need to know the size of all tx effects before we start proving.
Since we only need this info for proving and not for block building, we can fix this by having the archiver store the size of tx effects along with the rest of the block, and injecting that into the epoch proving job.
The text was updated successfully, but these errors were encountered: