Add support for the Filecoin.EthTraceFilter V2#6522
Add support for the Filecoin.EthTraceFilter V2#6522sudo-shashank wants to merge 29 commits intomainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a v2 RPC endpoint Filecoin.EthTraceFilter (EthTraceFilterV2) that mirrors v1 semantics but resolves blocks via the v2 tipset/block resolver; registers the new method and adds a corresponding test and snapshot entry. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant RPC as RpcServer / EthTraceFilterV2
participant Resolver as TipsetResolverV2
participant DB as Blockstore
participant Trace as TraceFilterLogic
Client->>RPC: Call Filecoin.EthTraceFilter (filter)
RPC->>Resolver: resolve fromBlock/toBlock (tipset_by_block_number_or_hash_v2)
Resolver->>DB: fetch tipset by number or hash
DB-->>Resolver: tipset (epoch)
Resolver-->>RPC: resolved epochs
RPC->>Trace: invoke trace_filter with resolved epochs
Trace-->>RPC: traces (sorted by block_number, tx_position, trace_address)
RPC-->>Client: return Vec<EthBlockTrace>
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 52: Update the CHANGELOG.md entry that currently references PR `#6522` to
reference issue `#6307` instead; replace the PR link
"[`#6522`](https://github.com/ChainSafe/forest/pull/6522): Implemented
`Filecoin.EthTraceFilter` for API v2." with the issue-style entry
"[`#6307`](https://github.com/ChainSafe/forest/issues/6307): Implemented
`Filecoin.EthTraceFilter` for API v2." so the changelog points to the issue
rather than the PR.
In `@src/rpc/methods/eth.rs`:
- Around line 4144-4189: The public enum EthTraceFilterV2 lacks rustdoc; add a
concise triple-slash doc comment above pub enum EthTraceFilterV2 describing its
purpose (RPC method Filecoin.EthTraceFilter / alias "trace_filter"), expected
parameter (EthTraceFilterCriteria), return type (Vec<EthBlockTrace>), and a
brief note about behavior (returns traces for transactions matching the filter
between from_block and to_block as handled in impl RpcMethod for
EthTraceFilterV2), so readers of the type and generated docs immediately
understand what this RPC endpoint represents and how it is used.
hanabi1224
left a comment
There was a problem hiding this comment.
Please move the changelog entry to the new unreleased section
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary of changes
Changes introduced in this pull request:
Filecoin.EthTraceFilterV2 and added test.Filecoin.EthTraceFilterfilter optionsfrom_blockandto_blocknow default tolatesttag when omitted for v1 and v2 API.Reference issue to close (if applicable)
Closes #6307
Other information and links
Change checklist
Outside contributions
Summary by CodeRabbit
New Features
Tests
Changelog
Snapshots