Skip to content

Commit 3136bd2

Browse files
t8n: do not create empty coinbase account from SpuriousDragon on state.reward == 0 (#3720)
* t8n: do not create empty coinbase account from SpuriousDragon on state.reward == 0 * update t8ntool releated readmes * make cspell happy * await cleanup
1 parent b3ff2bc commit 3136bd2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

packages/vm/DEVELOPER.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,7 @@ npm run profiling -- mainnetBlocks:10
217217
and open the link it generates.
218218

219219
For a high-level introduction on flame graphs see e.g. [this](https://blog.codecentric.de/en/2017/09/jvm-fire-using-flame-graphs-analyse-performance/) blog article (the non-Java part).
220+
221+
## T8NTool: fill `execution-spec-tests` tests and write those
222+
223+
The VM has t8ntool (transition-tool) support, see: <https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/test/t8n/README.md>. This tool can be used to create fixtures from the `execution-spec-tests` repo. These fixtures can be consumed by other clients in their test runner (similar to running `npm run test:blockchain` or `npm run test:state` in the VM package). The t8ntool readme also links to a guide on how to write tests to contribute to `execution-spec-tests`.

packages/vm/test/t8n/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ Processing new transaction...
3838
address: '0x0000000000000000000000000000000000001000'
3939
}
4040
```
41+
42+
## Writing a test in execution-spec-test
43+
44+
This issue comment is a good reference to write tests, together with an example: <https://github.com/ethereumjs/ethereumjs-monorepo/issues/3666#issuecomment-2349611424>

packages/vm/test/t8n/t8ntool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export class TransitionTool {
113113

114114
if (args.state.reward !== BigInt(-1)) {
115115
await rewardAccount(this.vm.evm, block.header.coinbase, args.state.reward, this.vm.common)
116+
await this.vm.evm.journal.cleanup()
116117
}
117118

118119
const result = await builder.build()

0 commit comments

Comments
 (0)