Align debug_traceCall base fee with Geth - #12804
Conversation
|
Claude finished @flcl42's task in 6m 53s —— View job Code review — PR #12804
The core idea is right: Geth lowers the base fee to zero for unpriced call-like execution ( Findings
1. Medium — duplicate/divergent "unpriced call" predicate (inline)
They disagree for
Prefer computing the flag from 2. Medium — override ordering is the opposite of
|
wurdum
left a comment
There was a problem hiding this comment.
It looks like it makes sense to unify this base fee override logic in one place. NoBaseFee is already computed from TransactionForRpc.ShouldSetBaseFee() in both RPC modules; letting that flag travel with the BlockOverride into the single place that applies it would make one line decide that an unpriced call keeps a zero base fee.
The natural home is IOverridableEnv.BuildAndOverride, which is plugin-visible surface the project's guidance asks not to widen. A cheaper variant reaches most of the benefit without touching an interface: move GetBlockOverrideForExecution up into TxExecutor<TResult> so all three eth executors share it, and set NoBaseFee in DebugBridge.GetBundleTrace from the TransactionForRpc already in hand there.
EVM Opcode Benchmark DiffAggregated runs: base=1, pr=1 No significant regressions or improvements detected. |
Changes
debug_traceCallwith Geth by using a zero base fee when the call has no gas pricing.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
debug_traceCall_without_gas_pricing_uses_zero_base_feeregression test passed.Documentation
Requires documentation update
Requires explanation in Release Notes
Remarks
Geth lowers the base fee to zero for unpriced
debug_traceCallrequests. Without that behavior, BASEFEE-dependent calls can diverge from Geth or fail in the trace context when the live block base fee is non-zero.