-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: delay buffer #160
feat: delay buffer #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so far it looks good, i need to explore the non happy sync
path further though.
i just have some very small suggestions for now, feel free to ignore them if you don't agree with namings and things :)
looks good! |
* docs: add deprecation notice * fix: deprecate sendL2MessageFromOrigin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some nit about naming and documentation
Great work!
eefaa3a
to
7ed6725
Compare
this will be merged as part of bold |
Shipped with #193 |
Introduces a delay buffer to limit repeated sequencer censorship enabling optimistic mechanisms (eg interactive L3 fraud proofs) on L2s without unreasonable delay. The delay buffer is represented by a struct stored in the SequencerInbox, and managed with the internal DelayBuffer library.
There are 2 ways to post batches.
No changes to existing batch posting function selectors. This method of batch posting is permissible when the sequencer inbox is in a synced state OR if no new delayed messages are read. In the former case, when the sequencer is including delay messages without unexpected delay, there is a minimum amount of time during which no unexpected delays are possible, and hence the sequencer can post batches without additional delay buffer related logic. Eg. if the delay threshold is 2 hours, and the sequencer proves the most recent sequenced delayed message is delayed 30 min, then the margin of 1 hr 30 min defines a sync period during which it is not possible to have unexpectedly delayed messages. In the later case, when no new delayed messages are read, no buffer state updates can be calculated since the elapsed time in the delayed message queue is zero.
When the sequencer reads atleast one new delayed message, it can include a pre-image of the first delayed message read in the batch of the following form
in order to calculate any delays and apply buffer updates as well as establish a sync state.
The batch posting strategy should include delayProofs if new delayed messages are read, otherwise, the original batch posting method without delay proof is sufficient.