Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shemnon committed Aug 17, 2024
1 parent a5599d3 commit 190ef3f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions EIPS/eip-7756.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ Each object contains the following members.
| `op` | Number | Yes | Opcode |
| `immediate` | Hex-String | *see below* | Immediate argument of the Opcode |
| `gas` | Hex-Number | Yes | Gas left before executing this operation |
| `gasCost` | Hex-Number | No | Gas cost of this operation |
| `gasCost` | Hex-Number | Yes | Gas cost of this operation |
| `memory` | Array | No | Array of all allocated values |
| `memSize` | Number | Yes | Size of memory array |
| `stack` | Array | Yes | Array of all values on the stack |
| `depth` | Number | Yes | Depth of the call stack |
| `fdepth` | Number | Yes if EOF | Depth of the [EIP-4750](./eip-4750.md) return stack |
| `returnData` | Hex-String | No | Data returned by function call |
| `depth` | Number | Yes | Depth of the contract call stack (non-CALLF) |
| `functionDepth` | Number | Yes if EOF | Depth of the [EIP-4750](./eip-4750.md) CALLF return stack |
| `returnData` | Hex-String | No | Data returned by contract calls |
| `refund` | Hex-Number | Yes | Amount of **global** gas refunded |
| `opName` | String | No | Name of the operation |
| `error` | Hex-String | No | Description of an error or revert data |
Expand All @@ -75,14 +75,15 @@ Each object contains the following members.
- The `section` member must only be present when tracing a contract that is contained in an EOF container.
In cases where legacy and EOF contracts are in the same call trace the presence and absence of the `section` member indicates if the contract at that step is EOF or legacy.
- The `immediate` member is optional for PUSH series instructions, and mandatory for all other operations that have immediate arguments.
- For RJUMPV this would include the table length and the entire table. Clients MAY instead store just the table length.
- The `gas`, `stack`, `memory` and `memSize`, `depth`, and `fdepth` members are the values *before* execution of the op.
- The `gasCost` is the sum of all gas costs, including dynamic costs such as memory expansion, call stipend, and account warming costs.
- All array attributes (`stack`, `memory`) MUST be initialized to empty arrays ("stack":[]` NOT `"stack":null`).
- The `memory` or `storage` members may be omitted if they are empty or the client does not produce them.
- The `memSize` member MUST be present regardless of `memory` support. Even when `memSize` is zero.
- The `error` and `returnData` members can be omitted if they are empty.
- If the prior trace line had an exceptional halt, `error` should identify the halt. Otherwise, if a `REVERT` operation occurred it should contain the revert reason.
- The `storage` member should only include items read or written via `SSTORE` or `SLOAD`, and not the account's entire memory.
- If the prior operation failed with an exceptional halt, `error` should identify the halt. Otherwise, if the prior operation was a `REVERT` operation `error` should contain the revert data.
- The `storage` member should only include items read or written via `SSTORE` or `SLOAD`, and not the account's entire storage.
- Clients SHOULD implement a way to disable recording the storage as the stateroot includes all storage updates.
- Clients SHOULD output the members in the same order as listed in this EIP.

Expand Down Expand Up @@ -154,7 +155,7 @@ This is the trace output from the Ethereum Execution Specification Test from one
{"pc":13,"op":90,"gas":"0x2fa9e66","gasCost":"0x2","memSize":0,"stack":["0x0","0x0","0x0","0x0","0x0","0x1000"],"depth":1,"refund":0,"opName":"GAS"}
{"pc":14,"op":241,"gas":"0x2fa9e64","gasCost":"0x2eeb414","memSize":0,"stack":["0x0","0x0","0x0","0x0","0x0","0x1000","0x2fa9e64"],"depth":1,"refund":0,"opName":"CALL"}
{"pc":0,"section":0,"op":227,"immediate":"0x0001","gas":"0x2eea9ec","gasCost":"0x5","memSize":0,"stack":[],"depth":2,"refund":0,"opName":"CALLF"}
{"pc":0,"section":1,"op":228,"gas":"0x2eea9e7","gasCost":"0x3","memSize":0,"stack":[],"depth":2,"fdepth":1,"refund":0,"opName":"RETF"}
{"pc":0,"section":1,"op":228,"gas":"0x2eea9e7","gasCost":"0x3","memSize":0,"stack":[],"depth":2,"functionDepth":1,"refund":0,"opName":"RETF"}
{"pc":3,"section":0,"op":0,"gas":"0x2eea9e4","gasCost":"0x0","memSize":0,"stack":[],"depth":2,"refund":0,"opName":"STOP"}
{"pc":15,"op":96,"gas":"0x2fa9434","gasCost":"0x3","memSize":0,"stack":["0x1"],"depth":1,"refund":0,"opName":"PUSH1"}
{"pc":17,"op":85,"gas":"0x2fa9431","gasCost":"0x5654","memSize":0,"stack":["0x1","0x0"],"depth":1,"refund":0,"opName":"SSTORE"}
Expand Down

0 comments on commit 190ef3f

Please sign in to comment.