-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Update Span batch specs to allow overlapping batches #7259
Update Span batch specs to allow overlapping batches #7259
Conversation
48ec1c1
to
0233631
Compare
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
@protolambda Please review this PR when you get a chance |
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.
This overlapped case is pretty weird, but we need to pay very careful attention to it.
Starting from normal operation, my assumption is that when we have a span batch which contains first a string of valid batches & then an invalid batch & then valid batches again, we will process all the valid batches, reject the invalid batch, and then wait for a sequence window timeout before discarding the span batch & processing more.
Looking at the implementation, we actually just pop all of the batches out of the span batch regardless of if a batch was successfully applied or not. It will get to the attributes queue & will reset the entire pipeline.
@trianglesphere Thanks for the comment. It seems to be a very critical point.
@protolambda what do you think? |
@ImTei, yep, we do need to consider the atomicity. I would also take a step back & think about what behavior we want if there is an invalid batch inside a span batch. The other thing is that we need to think about this in the context of re-orgs & also other singular batches which have been included. |
I have specified the problematic scenario and what to implement. I'll implement those things in the next follow-up PR. let me know if there are any concerns or suggestions! :)
|
I commented in #7621 about the atomicity issues being detected here. If we're delaying the update of the finalized block until the end of the span batch I think we should also consider delaying the update of safe head - that's another step towards actually applying span batches atomically. We'd still have changes to the l1 origin and things like batch queue Whichever we go technically, I'd encourage having a really strong focus on simplifying things so rather than trying to handle interesting corner cases like span batches being partially applied, we try to find approaches that reduce the number of corner cases and simplify the way we need to reason about the protocol. |
f48526b
to
81cbf88
Compare
5d79b40
Context
Changes