Evaluate skip-sender validation for EthTraceCall
- Dominant language
- Rust
- Stars
- 697
- Forks
- 200
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 65
Description
## Summary
Evaluate whether `EthTraceCall` (`trace_call`) must support the same skip-sender-validation behavior as `EthCall` (`eth_call`) and `EthEstimateGas` (`eth_estimateGas`).
## Rationale
The sender-validation changes in #7435 allow contract and nonexistent senders for `eth_call` and `eth_estimateGas`. `EthTraceCall` currently calls `StateManager::apply_on_state_with_gas` with `SenderValidation::Enforce`. As a result, `trace_call` can reject sender types that the related Ethereum RPC methods now support.
## Affected area
- `src/rpc/methods/eth.rs`
- `EthTraceCall::handle`
- Sender-validation and retry behavior around `StateManager::apply_on_state_with_gas`
## Required work
1. Confirm the expected `trace_call` behavior against Lotus and Ethereum RPC compatibility requirements.
2. If parity requires it, add sender-validation retry logic that uses `SenderValidation::Skip` only for recognized sender-validation failures.
3. Preserve normal validation errors and unrelated execution errors.
4. Add focused tests for contract, nonexistent, and regular EOA senders.
## Acceptance criteria
- The intended `trace_call` sender-validation policy is documented by code or tests.
- If skip behavior is required, contract and nonexistent senders produce trace results when execution otherwise succeeds.
- Regular sender validation remains enforced unless the failure is a recognized sender-validation failure.
- The tests cover the selected behavior.
## Links
- Pull request: https://github.com/ChainSafe/forest/pull/7435
- Review discussion: https://github.com/ChainSafe/forest/pull/7435#discussion_r3821116826
- Requested by: @sudo-shashank
Contributor guide
Assessment
This issue has not been assessed yet.