Skip to content

Commit

Permalink
Merge pull request #853 from ethereumjs/vm-benchmarks-separate-execut…
Browse files Browse the repository at this point in the history
…ion-and-code-logic

Generalize VM benchmark suite / add profiling / separate code & execution logic
  • Loading branch information
holgerd77 authored Mar 4, 2021
2 parents 2153bd7 + ef4b756 commit 42cf2c6
Show file tree
Hide file tree
Showing 18 changed files with 398 additions and 194 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/trie-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
- run: npm run benchmarks | tee output.txt
working-directory: ${{ env.cwd }}

# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
- run: git stash

- name: Set auto-push for benchmarks to true if on master
id: auto_push
run: |
Expand All @@ -102,6 +105,8 @@ jobs:
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: ${{ env.cwd }}/output.txt
# Location of data in gh-pages branch
benchmark-data-dir-path: dev/bench/trie
# Enable alert commit comment
comment-on-alert: true
# GitHub API token to make a commit comment
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/vm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
- run: npm run build:benchmarks
working-directory: ${{ env.cwd }}

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

# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
Expand All @@ -153,6 +153,8 @@ jobs:
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: ${{ env.cwd }}/output.txt
# Location of data in gh-pages branch
benchmark-data-dir-path: dev/bench/vm
# Enable alert commit comment (default alert threshold: 200%)
comment-on-alert: true
# GitHub API token to make a commit comment
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/vm-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:
- run: npm run build:benchmarks
working-directory: ${{ env.cwd }}

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

# Run git stash in case github-action-benchmark has trouble switching to gh-pages branch due to differing package-locks
Expand All @@ -257,6 +257,8 @@ jobs:
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: ${{ env.cwd }}/output.txt
# Location of data in gh-pages branch
benchmark-data-dir-path: dev/bench/vm
# Enable alert commit comment (default alert threshold: 200%)
comment-on-alert: true
# GitHub API token to make a commit comment
Expand Down
147 changes: 84 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions packages/vm/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
module.exports = {
extends: "@ethereumjs/eslint-config-defaults",
ignorePatterns: ["scripts", "examples", "karma.conf.js"],
extends: '@ethereumjs/eslint-config-defaults',
ignorePatterns: ['scripts', 'benchmarks', 'examples', 'karma.conf.js'],
rules: {
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"no-invalid-this": "off",
"no-restricted-syntax": "off",
"no-console": "off" // supress the console.log warnings in ./tests/
}
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'no-invalid-this': 'off',
'no-restricted-syntax': 'off',
},
overrides: [
{
files: ['tests/**/*.ts'],
rules: {
'no-console': 'off',
},
},
],
}
2 changes: 1 addition & 1 deletion packages/vm/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.cachedb
scripts/benchmarks/*.js
benchmarks/*.js
5 changes: 5 additions & 0 deletions packages/vm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
- 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)
- 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.

**CI and Test Improvements**

- `{ 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)
- Benchmark improvements and fixes, PR [#853](https://github.com/ethereumjs/ethereumjs-vm/pull/853)

### 5.1.0 - 2021-02-22

### Clique/PoA Support
Expand Down
Loading

0 comments on commit 42cf2c6

Please sign in to comment.