Add support for the Filecoin.EthGetTransactionByBlockNumberAndIndex V2#6469
Conversation
WalkthroughAdds a V2 RPC variant for Filecoin.EthGetTransactionByBlockNumberAndIndex, extracts the transaction-by-block-index logic into a shared helper, updates RPC registration, and adds tests, snapshots, and filter-list entries for the new method. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant RPC as "RPC Module"
participant Eth as "eth.rs:Handler"
participant Tipset as "Tipset Resolver"
participant Helper as "eth_tx_by_block_num_and_idx"
participant Chain as "Chain/State"
Client->>RPC: Filecoin.EthGetTransactionByBlockNumberAndIndex[V2] request
RPC->>Eth: route to handler (V1 or V2)
Eth->>Tipset: resolve tipset (block number/hash or V2 param)
Tipset-->>Eth: return Tipset
Eth->>Helper: fetch transaction at index from Tipset
Helper->>Chain: read messages/state for Tipset
Chain-->>Helper: messages & state
Helper-->>Eth: ApiEthTx | None
Eth-->>RPC: response (ApiEthTx or null)
RPC-->>Client: RPC response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 14 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.EthGetTransactionByBlockNumberAndIndexV2 and added test.Reference issue to close (if applicable)
Closes #6302
Other information and links
Change checklist
Summary by CodeRabbit
New Features
Tests
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.