-
Notifications
You must be signed in to change notification settings - Fork 278
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
Generate L1Blocks system tx #738
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.
looks reasonable at first pass.
Let me think a bit and do another pass later tonight, but i dont see anything wrong with it.
I'll merge this PR first to test it out. We can make changes or fixes in the subsequent prs. |
@@ -273,6 +273,18 @@ func (st *StateTransition) buyGas() error { | |||
|
|||
func (st *StateTransition) preCheck() error { | |||
if st.msg.IsSystemTx() { | |||
// Make sure this transaction's nonce is correct. |
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.
These checks are not needed since the nonce field was removed.
return s.scope.Track(s.l1BlocksPool.l1BlocksFeed.Subscribe(ch)) | ||
} | ||
|
||
func (s *SyncService) CollectL1BlocksTxs(latestL1BlockNumberOnL2, maxNumTxs uint64) []*types.SystemTx { |
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.
Will this method be able to handle L2 reorgs? E.g. when we've marked some L1 blocks as included (removed from pendingL1BlocksTxs
) but then some blocks are reorged.
1. Purpose or design rationale of this PR
Generate L1Blocks system tx
2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?