-
Notifications
You must be signed in to change notification settings - Fork 607
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(sender): nonce update #1570
base: develop
Are you sure you want to change the base?
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for "scroll-tech/rollup/mock_bridge"" WalkthroughThe changes in this pull request involve updating the version tag in the Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🔇 Additional comments (6)rollup/internal/controller/sender/sender.go (3)Line range hint The nonce is now only incremented after successful transaction sending, which is the correct approach. This prevents nonce gaps when transactions fail to send.
The method signature change from pointer to direct uint64 value improves clarity and safety by making the nonce parameter more explicit. Line range hint The nonce handling is consistent with the new approach, properly passing the nonce directly to createTx. rollup/internal/controller/sender/sender_test.go (3)
Test properly reflects the new nonce handling approach in zero gas price transaction test.
Test correctly uses the new direct nonce parameter approach.
Test properly implements the new nonce handling pattern. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -247,19 +247,13 @@ func (s *Sender) SendTransaction(contextID string, target *common.Address, data | |||
return common.Hash{}, fmt.Errorf("failed to send transaction, err: %w", err) | |||
} | |||
|
|||
s.transactionSigner.SetNonce(s.transactionSigner.GetNonce() + 1) |
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.
why not use signedTx.Nonce()+1
here.
Purpose or design rationale of this PR
Only updating nonce when sending transaction success.
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:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit
New Features
Bug Fixes
Tests