Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dargon789 committed May 5, 2024
0 parents commit ff04430
Show file tree
Hide file tree
Showing 1,431 changed files with 406,087 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
indent_style = space
3 changes: 3 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

node ./node_modules/lint-staged/bin/lint-staged.js
3 changes: 3 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

npm run lint:diff --workspaces
9 changes: 9 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

Great that you want to contribute to the `EthereumJS` [ecosystem](https://ethereumjs.readthedocs.io/en/latest/introduction.html). `EthereumJS` is managed by the Ethereum Foundation and largely driven by the wider community. Everyone is welcome to join the effort and help to improve on the libraries (see our [Code of Conduct](https://ethereumjs.readthedocs.io/en/latest/code_of_conduct.html) 🌷).

We have written up some [Contribution Guidelines](https://ethereumjs.readthedocs.io/en/latest/contributing.html#how-to-start) to help you getting started.

These include information on how we work with **Git** and how our **general workflow** and **technical setup** looks like (stuff like language, tooling, code quality and style).

Happy Coding! 👾 😀 💻
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: General
about: Open blank issue
title: ''
labels: ''
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/block'
about: Create issue for @ethereumjs/block
title: ''
labels: 'package: block'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-blockchain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/blockchain'
about: Create issue for @ethereumjs/blockchain package
title: ''
labels: 'package: blockchain'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/client'
about: Create issue for @ethereumjs/client
title: ''
labels: 'package: client'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-common.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/common'
about: Create issue for @ethereumjs/common package
title: ''
labels: 'package: common'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-devp2p.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/devp2p'
about: Create issue for @ethereumjs/devp2p
title: ''
labels: 'package: devp2p'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-ethash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/ethash'
about: Create issue for @ethereumjs/ethash
title: ''
labels: 'package: ethash'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-evm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/evm'
about: Create issue for @ethereumjs/evm package
title: ''
labels: 'package: evm'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-statemanager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/statemanager'
about: Create issue for @ethereumjs/statemanager
title: ''
labels: 'package: statemanager'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-trie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/trie'
about: Create issue for @ethereumjs/trie package
title: ''
labels: 'package: trie'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-tx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/tx'
about: Create issue for @ethereumjs/tx package
title: ''
labels: 'package: tx'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-util.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/util'
about: Create issue for @ethereumjs/util package
title: ''
labels: 'package: util'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-verkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/verkle'
about: Create issue for @ethereumjs/verkle package
title: ''
labels: 'package: verkle'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--ethereumjs-vm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: @ethereumjs/vm'
about: Create issue for @ethereumjs/vm package
title: ''
labels: 'package: vm'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--monorepo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: Monorepo'
about: Create a monorepo-wide issue (e.g. on CI or docs)
title: ''
labels: 'package: monorepo'
assignees: ''
---
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/package--rlp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 'Package: rlp'
about: Create issue for rlp package
title: ''
labels: 'package: rlp'
assignees: ''
---
46 changes: 46 additions & 0 deletions .github/workflows/block-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Block
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

env:
cwd: ${{github.workspace}}/packages/block

defaults:
run:
working-directory: packages/block

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test-block:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci --omit=peer
working-directory: ${{github.workspace}}

- run: npm run lint
- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
files: ${{ env.cwd }}/coverage/lcov.info
flags: block
44 changes: 44 additions & 0 deletions .github/workflows/blockchain-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Blockchain
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

env:
cwd: ${{github.workspace}}/packages/blockchain

defaults:
run:
working-directory: packages/blockchain

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test-blockchain:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci --omit=peer
working-directory: ${{github.workspace}}

- run: npm run lint
- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
files: ${{ env.cwd }}/coverage/lcov.info
flags: blockchain
54 changes: 54 additions & 0 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Browser
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

env:
cwd: ${{github.workspace}}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

jobs:
test-all-browser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # necessary for block tests to load ethereum/tests

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci
- run: npm run install-browser-deps

# Install playwright dependencies
- run: npx playwright install-deps

- run: npm run test:browser -w=@ethereumjs/rlp
- run: npm run test:browser -w=@ethereumjs/util
- run: npm run test:browser -w=@ethereumjs/common
- run: npm run test:browser -w=@ethereumjs/trie
- run: npm run test:browser -w=@ethereumjs/tx
- run: npm run test:browser -w=@ethereumjs/block
# No browser tests for devp2p
- run: npm run test:browser -w=@ethereumjs/blockchain
# No browser tests for ethash
- run: npm run test:browser -w=@ethereumjs/wallet
- run: npm run test:browser -w=@ethereumjs/statemanager
- run: npm run test:browser -w=@ethereumjs/evm
# VM: several tests not passing yet
# - run: npm run test:browser -w=@ethereumjs/vm

86 changes: 86 additions & 0 deletions .github/workflows/client-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Client
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

env:
cwd: ${{github.workspace}}/packages/client

defaults:
run:
working-directory: packages/client

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test-client:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci
working-directory: ${{github.workspace}}

- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
files: ${{ env.cwd }}/coverage/lcov.info
flags: client
- uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: cd ${{github.workspace}}/packages/client && npm run test:integration

- run: npm run lint

test-client-dockerfile:
name: test client docker file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build from source
run: >
docker buildx build .
--tag ethereumjs:local
--platform linux/amd64
--build-arg COMMIT=$(git rev-parse HEAD)
working-directory: ${{github.workspace}}

test-client-cli:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- run: npm ci
working-directory: ${{github.workspace}}

- run: cd ${{github.workspace}}/packages/client && npx vitest run test/cli/cli
Loading

0 comments on commit ff04430

Please sign in to comment.