fix: (backport) post zero priority fee to avoid gas price bump failure in zetacore#3934
Conversation
📝 WalkthroughWalkthroughThe changes update the gas price posting logic for EVM chains to always use a zero priority fee, reflecting a shift to legacy transaction types and avoiding gas price bump failures. Related tests were adjusted, and a changelog entry was added. The priority fee determination method was exported, but its logic remains unchanged. Changes
Sequence Diagram(s)sequenceDiagram
participant Observer
participant Zetacore
Observer->Zetacore: PostGasPrice(baseFee, priorityFee=0)
Zetacore-->>Observer: Ack/Result
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
Documentation and Community
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3934 +/- ##
===========================================
- Coverage 64.92% 64.84% -0.08%
===========================================
Files 471 471
Lines 34413 34417 +4
===========================================
- Hits 22343 22319 -24
- Misses 11036 11069 +33
+ Partials 1034 1029 -5
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
zetaclient/chains/evm/observer/observer_gas.go (1)
46-48: Consider the necessity of exporting DeterminePriorityFee.The function has been exported but is no longer used internally in the PostGasPrice flow. This creates an inconsistency where we maintain functionality that contradicts the current architectural decision to use zero priority fees.
Consider either:
- Keeping the function private if it's not needed externally
- Adding documentation explaining when this exported function should be used
- Removing the function entirely if the zero priority fee approach is permanent
Note: Static analysis indicates this line isn't covered by tests, which is expected given the current usage pattern.
🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 48-48: zetaclient/chains/evm/observer/observer_gas.go#L48
Added line #L48 was not covered by tests
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
changelog.md(1 hunks)zetaclient/chains/evm/observer/observer_gas.go(3 hunks)zetaclient/chains/evm/observer/observer_gas_test.go(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.go`: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
**/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/evm/observer/observer_gas_test.gozetaclient/chains/evm/observer/observer_gas.go
🪛 GitHub Check: codecov/patch
zetaclient/chains/evm/observer/observer_gas.go
[warning] 48-48: zetaclient/chains/evm/observer/observer_gas.go#L48
Added line #L48 was not covered by tests
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: start-e2e-test / e2e
🔇 Additional comments (2)
zetaclient/chains/evm/observer/observer_gas.go (1)
18-22: LGTM: Clear documentation of the architectural change.The comments effectively explain the rationale for hardcoding the priority fee to zero, with appropriate links to the relevant code and issue. This change aligns with the shift from EIP-1559 to legacy transactions.
changelog.md (1)
62-62: LGTM: Accurate and well-formatted changelog entry.The changelog entry correctly documents this fix under the appropriate section, with a clear description of the change and its purpose. The entry follows the established format and provides sufficient context for users.
Description
Backport the original fix #3930
How Has This Been Tested?
Summary by CodeRabbit