Expand description
Shared vocabulary types for the SolDB workspace.
Every other crate agrees on the types defined here: a TransactionTrace and the
StepTable of its steps are what an execution backend produces and what the
debugger and the frontends consume. A backend builds steps as TraceSteps or
appends them field by field; readers get a StepView per step. This crate
deliberately has no soldb dependencies so that it can stay the single type boundary in
the graph.
These types are also a serialization contract. They round-trip through serde into
trace files and into the web-facing JSON document, so adding a field is additive and
needs #[serde(default)], while renaming or removing one is a breaking change.
TraceCapabilities describes what the selected backend was actually able to
record. Frontends should branch on those flags rather than on the backend name, so a
new backend does not require changes further up the stack.
Modules§
- opcode
- EVM opcodes by byte, with the mnemonics a trace spells them with.
Structs§
- Account
Change - Bytes
- A cheaply cloneable and sliceable chunk of contiguous memory.
- Contract
Creation - EvmWord
- One 256-bit word, big-endian.
- Execution
Call - Execution
Log - Function
Call - GasSummary
- Root
Kind - The kind of the top-level call that starts at
entry_step. - Stack
- The stack of one step, bottom first.
- Step
Record - One step as a producer appends it with
StepTable::append: its plain fields, and the state that changed since the step before. - Step
Snapshot - The machine state one step captured.
- Step
Snapshot Ref - A borrowed view of one step’s captured machine state.
- Step
Table - The steps of a trace, in columns. See the module docs.
- Step
View - One step of a
StepTable. - Steps
- The steps of a
StepTable, in order. - Storage
Change - Trace
Artifacts - Trace
Capabilities - Trace
Step - One recorded EVM step, as a backend builds it.
- Transaction
Trace - A complete recording of one execution.
- Word
Interner - Hands out one
Wordper distinct value, so repeated stack words are stored once.
Enums§
- HexError
- Why a string is not hex.
- Memory
Write Error - Why a memory write cannot be recorded.
- Soldb
Error - Step
Error - Why a step cannot be added to a
StepTable. - Word
Error - Why a string is not a word.
Constants§
- STACK_
CHECKPOINT - Every this many steps, a step stores its whole stack, so that reading a word never walks back further.
Functions§
- decode_
hex - Hex digits, with or without a
0xprefix and in either case, as bytes. - decode_
hex_ into decode_hexappending tobytes, for a caller joining many pieces into one buffer.- encode_
hex - Bytes as lowercase hex digits without a
0xprefix, the spelling trace files use for memory. - same_
buffer - Whether two byte views are the same bytes in the same place, which is how a shared
Bytesis recognized without comparing its contents.
Type Aliases§
- Soldb
Result - Word
- One machine word as a backend spelled it, shared between the steps that hold it.