You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: account for new mem field in instruction trace records
komet v0.1.86 adds a per-instruction linear-memory snapshot (mem) to
trace records: a list of {addr, bytes} runs when memory changed since
the previous record, null otherwise. Update the trace fixtures, the
record-shape assertion, and the README trace reference accordingly.
@@ -159,7 +159,7 @@ The example above only has three of these: `callContract`, instruction records,
159
159
Here's what each record type carries:
160
160
161
161
-`callContract`: logged for each contract call in the transaction, including contract-to-contract calls. Records the caller, the callee, the function name, the arguments, the call depth, and the callee's storage before the call runs.
162
-
- Instruction records: logged at each WebAssembly instruction's entry. `pos` is the instruction's byte offset in the binary (`null` for synthetic instructions), `instr` is the instruction and its operands, and `stack`/`locals` are the value stack and locals as `[type, value]` pairs.
162
+
- Instruction records: logged at each WebAssembly instruction's entry. `pos` is the instruction's byte offset in the binary (`null` for synthetic instructions), `instr` is the instruction and its operands, and `stack`/`locals` are the value stack and locals as `[type, value]` pairs.`mem` is a snapshot of linear memory as a list of `{addr, bytes}` runs, emitted only when memory changed since the previous record and `null` otherwise (reuse the most recent snapshot).
163
163
-`hostCall`: logged when the contract calls a host function. `instr` gives `["hostCall", moduleId, functionId]`, identifying which host function ran. `locals` holds the function's arguments, indexed by position. Host calls don't use the stack, so `stack` is absent.
164
164
Here's a `hostCall` record for a call to `put_contract_data`, module id `l`, function id `_`:
0 commit comments