-
Notifications
You must be signed in to change notification settings - Fork 820
Description
At the moment, normal transactions have inspecting variants, but system transactions don't have a way to enable inspecting. The system_transaction transaction abstraction is used in bera-reth to add protocol enforced, gas-free, nonce-free transactions at top of block, but we also want it to look like a normal transaction in block explorers and via RPC methods (which is not the case for other system calls like eip4788).
Inspecting doesn't seem to be possible for such transactions. (most frequently used in debug_traceTransaction
and debug_traceBlock
apis.
Additional Context
In Reth, there exists the Trace
trait which is the entry point for transaction traction tracing (see https://github.com/paradigmxyz/reth/blob/818e01773accb34ef807136fec343179678b40b5/crates/rpc/rpc-eth-api/src/helpers/trace.rs#L30-L48)
This eventually calls into alloy-evm
as such:
fn transact_raw(
&mut self,
tx: Self::Tx,
) -> Result<ResultAndState<Self::HaltReason>, Self::Error> {
if self.inspect {
self.inner.inspect_tx(tx)
} else {
self.inner.transact(tx)
}
}
However, transact system call reaches here, which has we can see has no check for inspect
as there is no inspect
equivalent for system txs:
fn transact_system_call(
&mut self,
caller: Address,
contract: Address,
data: Bytes,
) -> Result<ResultAndState<Self::HaltReason>, Self::Error> {
self.inner.transact_system_call_with_caller_finalize(caller, contract, data)
}
Looking deeper into the implementations in revm, I don't see an obvious reason why inspect
couldn't exist for system txs unless I'm mistaken. Thanks!