-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(taiko-client): make sure the length of txLists is not bigger than the maxBlocksPerBatch. #18855
Conversation
if err := p.ProposeTxListPacaya(ctx, txLists); err != nil { | ||
return err | ||
// Make sure the tx list is not bigger than the maxBlocksPerBatch. | ||
maxBlocksPerBatch, _ := p.protocolConfigs.MaxBlocksPerBatch() |
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.
Let's check the error here, or u don't need to make this function return an error.
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.
Don't need to return error, and removed.
maxBlocksPerBatch, _ := p.protocolConfigs.MaxBlocksPerBatch() | ||
for ; len(txLists) > 0; txLists = txLists[min(maxBlocksPerBatch, len(txLists)):] { | ||
// If the current L2 chain is after ontake fork, batch propose all L2 transactions lists. | ||
if err := p.ProposeTxListPacaya(ctx, txLists[:min(maxBlocksPerBatch, len(txLists))]); err != nil { |
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.
We need to pass the whole txLists
to ProposeTxListPacaya
, let's check the count inside ProposeTxListPacaya
.
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.
Added check inside the ProposeTxListPacaya
.
No description provided.