feat: add eth_baseFee rpc method#7028
Conversation
Assisted-by: Claude:claude-sonnet-4-6
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR introduces a new Ethereum-compatible JSON-RPC method ChangesEthereum Base Fee RPC Method
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/rpc/methods/eth.rs`:
- Line 835: The call to compute_base_fee(...) can fail without contextual
information; wrap the call with .context(...) to add an explanatory message for
RPC diagnostics so errors include that compute_base_fee failed and the relevant
inputs (e.g., timestamp ts and heights smoke_height/firehorse_height) — locate
the call to compute_base_fee in eth.rs and change the invocation so the returned
Result is propagated with .context("compute_base_fee failed for ts/
smoke_height/ firehorse_height") (or similar) to satisfy the anyhow::Result
guideline.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 22c12b5e-0961-4079-9ad9-415b69b9ab92
⛔ Files ignored due to path filters (3)
src/rpc/snapshots/forest__rpc__tests__rpc__v0.snapis excluded by!**/*.snapsrc/rpc/snapshots/forest__rpc__tests__rpc__v1.snapis excluded by!**/*.snapsrc/rpc/snapshots/forest__rpc__tests__rpc__v2.snapis excluded by!**/*.snap
📒 Files selected for processing (2)
src/rpc/methods/eth.rssrc/rpc/mod.rs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Adds the nonstandard
eth_baseFeeeth jsonrpc method.This method returns the calculated base fee of the next epoch.
See filecoin-project/lotus#13615
Changes
eth_baseFeeSummary by CodeRabbit
eth_baseFeeJSON-RPC method (also accessible asFilecoin.EthBaseFee) for Ethereum compatibility, allowing applications to query the network's current base fee.