Skip to content

Commit 42cf2c6

Browse files
authored
Merge pull request #853 from ethereumjs/vm-benchmarks-separate-execution-and-code-logic
Generalize VM benchmark suite / add profiling / separate code & execution logic
2 parents 2153bd7 + ef4b756 commit 42cf2c6

File tree

18 files changed

+398
-194
lines changed

18 files changed

+398
-194
lines changed

.github/workflows/trie-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ jobs:
8383
- run: npm run benchmarks | tee output.txt
8484
working-directory: ${{ env.cwd }}
8585

86+
# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
87+
- run: git stash
88+
8689
- name: Set auto-push for benchmarks to true if on master
8790
id: auto_push
8891
run: |
@@ -102,6 +105,8 @@ jobs:
102105
tool: 'benchmarkjs'
103106
# Where the output from the benchmark tool is stored
104107
output-file-path: ${{ env.cwd }}/output.txt
108+
# Location of data in gh-pages branch
109+
benchmark-data-dir-path: dev/bench/trie
105110
# Enable alert commit comment
106111
comment-on-alert: true
107112
# GitHub API token to make a commit comment

.github/workflows/vm-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
- run: npm run build:benchmarks
141141
working-directory: ${{ env.cwd }}
142142

143-
- run: npm run benchmarks -- 10 | tee output.txt
143+
- run: npm run benchmarks -- mainnetBlocks:10 | tee output.txt
144144
working-directory: ${{ env.cwd }}
145145

146146
# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
@@ -153,6 +153,8 @@ jobs:
153153
tool: 'benchmarkjs'
154154
# Where the output from the benchmark tool is stored
155155
output-file-path: ${{ env.cwd }}/output.txt
156+
# Location of data in gh-pages branch
157+
benchmark-data-dir-path: dev/bench/vm
156158
# Enable alert commit comment (default alert threshold: 200%)
157159
comment-on-alert: true
158160
# GitHub API token to make a commit comment

.github/workflows/vm-pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ jobs:
245245
- run: npm run build:benchmarks
246246
working-directory: ${{ env.cwd }}
247247

248-
- run: npm run benchmarks -- 10 | tee output.txt
248+
- run: npm run benchmarks -- mainnetBlocks:10 | tee output.txt
249249
working-directory: ${{ env.cwd }}
250250

251251
# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
@@ -257,6 +257,8 @@ jobs:
257257
tool: 'benchmarkjs'
258258
# Where the output from the benchmark tool is stored
259259
output-file-path: ${{ env.cwd }}/output.txt
260+
# Location of data in gh-pages branch
261+
benchmark-data-dir-path: dev/bench/vm
260262
# Enable alert commit comment (default alert threshold: 200%)
261263
comment-on-alert: true
262264
# GitHub API token to make a commit comment

package-lock.json

Lines changed: 84 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vm/.eslintrc.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
module.exports = {
2-
extends: "@ethereumjs/eslint-config-defaults",
3-
ignorePatterns: ["scripts", "examples", "karma.conf.js"],
2+
extends: '@ethereumjs/eslint-config-defaults',
3+
ignorePatterns: ['scripts', 'benchmarks', 'examples', 'karma.conf.js'],
44
rules: {
5-
"@typescript-eslint/no-use-before-define": "off",
6-
"@typescript-eslint/no-unnecessary-condition": "off",
7-
"no-invalid-this": "off",
8-
"no-restricted-syntax": "off",
9-
"no-console": "off" // supress the console.log warnings in ./tests/
10-
}
5+
'@typescript-eslint/no-use-before-define': 'off',
6+
'@typescript-eslint/no-unnecessary-condition': 'off',
7+
'no-invalid-this': 'off',
8+
'no-restricted-syntax': 'off',
9+
},
10+
overrides: [
11+
{
12+
files: ['tests/**/*.ts'],
13+
rules: {
14+
'no-console': 'off',
15+
},
16+
},
17+
],
1118
}

packages/vm/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.cachedb
2-
scripts/benchmarks/*.js
2+
benchmarks/*.js

packages/vm/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
1111
- Fixes for [EIP2929](https://eips.ethereum.org/EIPS/eip-2929) (Gas cost increases for state access opcodes), PR [#1124](https://github.com/ethereumjs/ethereumjs-monorepo/pull/1124)
1212
- Integration of [EIP2718](https://eips.ethereum.org/EIPS/eip-2718) (Typed Transactions) and [EIP2930](https://eips.ethereum.org/EIPS/eip-2930) (Access List Transaction), PR [#1048](https://github.com/ethereumjs/ethereumjs-monorepo/pull/1048). VM now has support for access list transactions.
1313

14+
**CI and Test Improvements**
15+
16+
- `{ stateRoot, gasUsed, logsBloom, receiptRoot }` have been added to `RunBlockResult` and will be emitted with `afterBlock`, PR [#853](https://github.com/ethereumjs/ethereumjs-vm/pull/853)
17+
- Benchmark improvements and fixes, PR [#853](https://github.com/ethereumjs/ethereumjs-vm/pull/853)
18+
1419
### 5.1.0 - 2021-02-22
1520

1621
### Clique/PoA Support
File renamed without changes.

0 commit comments

Comments
 (0)