-
Notifications
You must be signed in to change notification settings - Fork 33
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
Submitter: don't bump transactions without sufficient gas #2664
Conversation
Deploying sanguine-fe with
|
Latest commit: |
6db0af4
|
Status: | ✅ Deploy successful! |
Preview URL: | https://3ceecd90.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-submitter-no-bump.sanguine-fe.pages.dev |
WalkthroughThe recent changes add a Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant ParentCtx as Parent Context
participant TxSubmitter as txSubmitterImpl
participant ChainQueue as chainQueue
participant Config as Config
ParentCtx->>TxSubmitter: chainPendingQueue(chainID, txes)
TxSubmitter->>ChainQueue: hasSufficientGas()
ChainQueue->>Config: GetMinGasBalance()
Config-->>ChainQueue: MinGasBalance
ChainQueue-->>TxSubmitter: sufficient/insufficient
alt sufficient gas
TxSubmitter->>ChainQueue: bump transactions
else insufficient gas
TxSubmitter-->>ParentCtx: no bump
end
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2664 +/- ##
===================================================
+ Coverage 39.80451% 40.56510% +0.76059%
===================================================
Files 180 197 +17
Lines 14732 16068 +1336
Branches 80 80
===================================================
+ Hits 5864 6518 +654
- Misses 8102 8717 +615
- Partials 766 833 +67
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- ethergo/submitter/chain_queue.go (3 hunks)
- ethergo/submitter/config/config.go (2 hunks)
- ethergo/submitter/config/iconfig_generated.go (1 hunks)
Additional context used
golangci-lint
ethergo/submitter/chain_queue.go
29-29: undefined: txSubmitterImpl (typecheck)
50-50: undefined: txSubmitterImpl (typecheck)
144-144: undefined: txSubmitterImpl (typecheck)
167-167: c.db undefined (type *chainQueue has no field or method db) (typecheck)
185-185: c.db undefined (type *chainQueue has no field or method db) (typecheck)
196-196: c.metrics undefined (type *chainQueue has no field or method metrics) (typecheck)
203-203: c.signer undefined (type *chainQueue has no field or method signer) (typecheck)
218-218: c.txTypeForChain undefined (type *chainQueue has no field or method txTypeForChain) (typecheck)
223-223: c.metrics undefined (type *chainQueue has no field or method metrics) (typecheck)
228-228: c.getGasEstimate undefined (type *chainQueue has no field or method getGasEstimate) (typecheck)
233-233: c.signer undefined (type *chainQueue has no field or method signer) (typecheck)
242-242: c.setGasPrice undefined (type *chainQueue has no field or method setGasPrice) (typecheck)
278-278: undefined: txToAttributes (typecheck)
305-305: c.config undefined (type *chainQueue has no field or method config) (typecheck)
312-312: c.metrics undefined (type *chainQueue has no field or method metrics) (typecheck)
320-320: c.signer undefined (type *chainQueue has no field or method signer) (typecheck)
342-342: c.db undefined (type *chainQueue has no field or method db) (typecheck)
357-357: c.config undefined (type *chainQueue has no field or method config) (typecheck)
Additional comments not posted (3)
ethergo/submitter/config/iconfig_generated.go (1)
34-35
: The addition ofGetMinGasBalance
method aligns well with the existing interface structure and provides necessary functionality for gas management.ethergo/submitter/config/config.go (1)
48-49
: The addition of theMinGasBalance
field and theGetMinGasBalance
method are correctly implemented to handle chain-specific configurations. This enhances the flexibility and functionality of the gas management system.Also applies to: 205-212
ethergo/submitter/chain_queue.go (1)
350-374
: The implementation ofhasSufficientGas
method is robust, using both configuration data and live blockchain state to determine gas sufficiency. This is a critical addition for managing transaction costs effectively.Tools
golangci-lint
357-357: c.config undefined (type *chainQueue has no field or method config) (typecheck)
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- ethergo/submitter/chain_queue.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- ethergo/submitter/chain_queue.go
Summary by CodeRabbit
New Features
Bug Fixes