pub struct OpcodeStep {
pub pc: u64,
pub op: u8,
pub gas: u64,
pub gas_cost: u64,
pub mem_size: u64,
pub depth: u32,
pub return_data: Bytes,
pub refund: u64,
pub stack: Option<Vec<U256>>,
pub memory: Option<Vec<MemoryChunk>>,
pub storage: Option<BTreeMap<H256, H256>>,
pub error: Option<String>,
}Expand description
Per-opcode trace entry — pure data, no Serialize impl.
To get this on the wire, wrap in one of the format newtypes:
StructLoggerStepfor geth-RPCdebug_traceTransactionshape.Eip3155Stepfor EIP-3155 spec shape.
See the module-level doc for why both formats coexist.
Fields§
§pc: u64§op: u8Raw opcode byte value (e.g. 0x60 for PUSH1). Each format serializer decides how to render this (numeric byte, hex string, mnemonic string).
gas: u64§gas_cost: u64§mem_size: u64Current memory size in bytes.
depth: u32§return_data: BytesReturn data from the previous sub-call.
refund: u64Gas refund counter.
stack: Option<Vec<U256>>Some(vec) when stack capture is enabled (bottom-first); None when disabled.
Each format serializer decides how to render None: structLogger emits JSON null,
EIP-3155 emits [] (per spec’s “MUST initialize to empty array” rule).
memory: Option<Vec<MemoryChunk>>Some(chunks) when memory capture is enabled; None when disabled (field omitted).
storage: Option<BTreeMap<H256, H256>>Some(map) at SLOAD/SSTORE steps when storage capture is enabled; None
otherwise. The map is a cumulative snapshot of every slot touched by an
SLOAD/SSTORE so far in the transaction — matching geth’s structLogger.
The tracer maintains this in LevmOpcodeTracer::cumulative_storage.
error: Option<String>Trait Implementations§
Auto Trait Implementations§
impl !Freeze for OpcodeStep
impl RefUnwindSafe for OpcodeStep
impl Send for OpcodeStep
impl Sync for OpcodeStep
impl Unpin for OpcodeStep
impl UnsafeUnpin for OpcodeStep
impl UnwindSafe for OpcodeStep
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.