Skip to content

Commit 913c470

Browse files
authored
Merge pull request #1015 from ethereumjs/monorepo-add-mpt
MPT monorepo transition
2 parents c0e9b8a + f729439 commit 913c470

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+18321
-1981
lines changed

.github/workflows/node-versions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
run: npm run test
6969
working-directory: packages/ethash
7070

71+
- name: Test Trie
72+
run: npm run test
73+
working-directory: packages/trie
74+
7175
- name: Test Tx
7276
run: npm run test
7377
working-directory: packages/tx

.github/workflows/trie-build.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Trie
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- '*'
8+
pull_request:
9+
types: [opened, reopened, synchronize]
10+
11+
env:
12+
cwd: ${{github.workspace}}/packages/trie
13+
14+
defaults:
15+
run:
16+
working-directory: packages/trie
17+
18+
jobs:
19+
test-trie:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
node-version: [12]
24+
steps:
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- uses: actions/checkout@v2
30+
with:
31+
submodules: recursive
32+
33+
- name: Dependency cache
34+
uses: actions/cache@v2
35+
id: cache
36+
with:
37+
key: Trie-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
38+
path: '**/node_modules'
39+
40+
# Installs root dependencies, ignoring Bootstrap All script.
41+
# Bootstraps the current package only
42+
- run: npm install --ignore-scripts && npm run bootstrap:trie
43+
if: steps.cache.outputs.cache-hit != 'true'
44+
working-directory: ${{github.workspace}}
45+
46+
# Builds current package and the ones it depends from.
47+
- run: npm run build:trie
48+
working-directory: ${{github.workspace}}
49+
50+
- run: npm run coverage
51+
52+
- uses: codecov/codecov-action@v1
53+
with:
54+
file: ${{ env.cwd }}/coverage/lcov.info
55+
flags: trie
56+
if: ${{ matrix.node-version == 12 }}
57+
58+
- run: npm run lint
59+
60+
trie-benchmarks:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/setup-node@v1
64+
with:
65+
node-version: 12.x
66+
- uses: actions/checkout@v1
67+
with:
68+
submodules: recursive
69+
70+
- name: Dependency cache
71+
uses: actions/cache@v2
72+
id: cache
73+
with:
74+
key: Trie-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
75+
path: '**/node_modules'
76+
77+
# Installs root dependencies, ignoring Bootstrap All script.
78+
# Bootstraps the current package only
79+
- run: npm install --ignore-scripts && npm run bootstrap:trie
80+
if: steps.cache.outputs.cache-hit != 'true'
81+
working-directory: ${{github.workspace}}
82+
83+
- run: npm run benchmarks | tee output.txt
84+
working-directory: ${{ env.cwd }}
85+
86+
- name: Set auto-push for benchmarks to true if on master
87+
id: auto_push
88+
run: |
89+
if [$REF == 'refs/heads/master']
90+
then
91+
echo "::set-output name=auto_push::true"
92+
else
93+
echo "::set-output name=auto_push::false"
94+
fi
95+
env:
96+
REF: ${{ github.ref }}
97+
98+
- name: Compare benchmarks
99+
uses: rhysd/github-action-benchmark@v1
100+
if: github.ref == 'refs/heads/master'
101+
with:
102+
tool: 'benchmarkjs'
103+
# Where the output from the benchmark tool is stored
104+
output-file-path: ${{ env.cwd }}/output.txt
105+
# Enable alert commit comment
106+
comment-on-alert: true
107+
# GitHub API token to make a commit comment
108+
github-token: ${{ secrets.GITHUB_TOKEN }}
109+
# Push and deploy to GitHub pages branch automatically (if on master)
110+
auto-push: ${{ steps.auto_push.outputs.auto_push }}
111+
112+
# Re-apply git stash to prepare for saving back to cache.
113+
# Avoids exit code 1 by checking if there are changes to be stashed first
114+
- run: STASH_LIST=`git stash list` && [ ! -z $STASH_LIST ] && git stash apply || echo "No files to stash-apply. Skipping…"

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ This was originally the EthereumJS VM repository. On Q1 2020 we brought some of
1717
| [@ethereumjs/blockchain][blockchain-package] | [![NPM Package][blockchain-npm-badge]][blockchain-npm-link] | [![Blockchain Issues][blockchain-issues-badge]][blockchain-issues-link] | [![Actions Status][blockchain-actions-badge]][blockchain-actions-link] | [![Code Coverage][blockchain-coverage-badge]][blockchain-coverage-link] |
1818
| [@ethereumjs/client][client-package] | [![NPM Package][client-npm-badge]][client-npm-link] | [![Client Issues][client-issues-badge]][client-issues-link] | [![Actions Status][client-actions-badge]][client-actions-link] | [![Code Coverage][client-coverage-badge]][client-coverage-link] |
1919
| [@ethereumjs/common][common-package] | [![NPM Package][common-npm-badge]][common-npm-link] | [![Common Issues][common-issues-badge]][common-issues-link] | [![Actions Status][common-actions-badge]][common-actions-link] | [![Code Coverage][common-coverage-badge]][common-coverage-link] |
20-
| [@ethereumjs/devp2p][devp2p-package] | [![NPM Package][devp2p-npm-badge]][devp2p-npm-link] | [![Common Issues][devp2p-issues-badge]][devp2p-issues-link] | [![Actions Status][devp2p-actions-badge]][devp2p-actions-link] | [![Code Coverage][devp2p-coverage-badge]][devp2p-coverage-link]
20+
| [@ethereumjs/devp2p][devp2p-package] | [![NPM Package][devp2p-npm-badge]][devp2p-npm-link] | [![Devp2p Issues][devp2p-issues-badge]][devp2p-issues-link] | [![Actions Status][devp2p-actions-badge]][devp2p-actions-link] | [![Code Coverage][devp2p-coverage-badge]][devp2p-coverage-link]
2121
| [@ethereumjs/ethash][ethash-package] | [![NPM Package][ethash-npm-badge]][ethash-npm-link] | [![Ethash Issues][ethash-issues-badge]][ethash-issues-link] | [![Actions Status][ethash-actions-badge]][ethash-actions-link] | [![Code Coverage][ethash-coverage-badge]][ethash-coverage-link] |
22+
| [@ethereumjs/trie][trie-package] | [![NPM Package][trie-npm-badge]][trie-npm-link] | [![Trie Issues][trie-issues-badge]][trie-issues-link] | [![Actions Status][trie-actions-badge]][trie-actions-link] | [![Code Coverage][trie-coverage-badge]][trie-coverage-link]
2223
| [@ethereumjs/tx][tx-package] | [![NPM Package][tx-npm-badge]][tx-npm-link] | [![Tx Issues][tx-issues-badge]][tx-issues-link] | [![Actions Status][tx-actions-badge]][tx-actions-link] | [![Code Coverage][tx-coverage-badge]][tx-coverage-link] |
2324
| [@ethereumjs/vm][vm-package] | [![NPM Package][vm-npm-badge]][vm-npm-link] | [![VM Issues][vm-issues-badge]][vm-issues-link] | [![Actions Status][vm-actions-badge]][vm-actions-link] | [![Code Coverage][vm-coverage-badge]][vm-coverage-link] |
2425

@@ -227,8 +228,8 @@ If you want to join for work or do improvements on the libraries have a look at
227228
[devp2p-npm-link]: https://www.npmjs.com/package/@ethereumjs/devp2p
228229
[devp2p-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20devp2p?label=issues
229230
[devp2p-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+devp2p"
230-
[devp2p-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Common/badge.svg
231-
[devp2p-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Common%22
231+
[devp2p-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Devp2p/badge.svg
232+
[devp2p-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Devp2p%22
232233
[devp2p-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=devp2p
233234
[devp2p-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/devp2p
234235
[ethash-package]: ./packages/ethash
@@ -249,6 +250,15 @@ If you want to join for work or do improvements on the libraries have a look at
249250
[tx-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Tx%22
250251
[tx-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=tx
251252
[tx-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/tx
253+
[trie-package]: ./packages/trie
254+
[trie-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/trie.svg
255+
[trie-npm-link]: https://www.npmjs.com/package/@ethereumjs/trie
256+
[trie-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20trie?label=issues
257+
[trie-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+trie"
258+
[trie-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Trie/badge.svg
259+
[trie-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Trie%22
260+
[trie-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=trie
261+
[trie-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/trie
252262
[vm-package]: ./packages/vm
253263
[vm-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/vm.svg
254264
[vm-npm-link]: https://www.npmjs.com/package/@ethereumjs/vm

0 commit comments

Comments
 (0)