-
Notifications
You must be signed in to change notification settings - Fork 184
feat(rpc): Add support for the EthTraceReplayBlockTransactions V2 API
#6444
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds a V2 RPC method EthTraceReplayBlockTransactionsV2, centralizes replay logic into a new async helper eth_trace_replay_block_transactions, ensures V1 delegates to the helper, changes serialization to always emit state_diff and vm_trace (nullable), and updates tests/snapshots and registration. Changes
Sequence Diagram(s)mermaid Client->>RPC: ReplayBlockTransactions request Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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 |
62d9e13 to
1b2504a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
|
||
| let state = StateTree::new_from_root(ctx.store_owned(), &state_root)?; | ||
| pub enum EthTraceReplayBlockTransactionsV2 {} | ||
| impl RpcMethod<2> for EthTraceReplayBlockTransactionsV2 { |
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.
description?
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.
I didn't notice this earlier that some of the other API's also doesn't have a Description, I will create an issue for this so we can add in all API's.
| ctx: Ctx<impl Blockstore + Send + Sync + 'static>, | ||
| (block_param, trace_types): Self::Params, | ||
| ) -> Result<Self::Ok, ServerError> { | ||
| if trace_types.as_slice() != ["trace"] { |
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.
is there a point in using anyhow here? Seems to me it'd be easier to define a new method on ServerError, e.g., ServerError::unsupported_params. It'd be cheaper.
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.
I guess we can use the ServerError::invalid_params("only 'trace' is supported", None)
6cbc78a to
505c6f5
Compare
| #[serde(rename_all = "camelCase")] | ||
| pub struct EthReplayBlockTransactionTrace { | ||
| pub output: EthBytes, | ||
| #[serde(skip_serializing_if = "Option::is_none")] |
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.
so this was incorrect?
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.
what's the struct in Lotus?
Summary of changes
Changes introduced in this pull request:
EthTraceReplayBlockTransactionsV2 APIEthTraceReplayBlockTransactionsresponseReference issue to close (if applicable)
Closes #6308
Other information and links
Change checklist
Summary by CodeRabbit
New Features
Changes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.