-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci,evm_transition_tool): Add EthereumJS (#752)
* Add EthereumJS wrapper * Change binary name for EthereumJS * add ethereumjs action * Correctly setup EthJS EVM action * config/feature: update to not run slow and 2537 tests * docs: add ethereumjs support to readme/index * Update .github/actions/build-evm-client/ethjs/action.yml Co-authored-by: Mario Vega <marioevz@gmail.com> * Update .github/actions/build-evm-client/ethjs/action.yml Co-authored-by: Mario Vega <marioevz@gmail.com> --------- Co-authored-by: danceratopz <danceratopz@gmail.com> Co-authored-by: Mario Vega <marioevz@gmail.com>
- Loading branch information
1 parent
061e41c
commit 589ab4e
Showing
10 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: 'Build EthereumJS monorepo' | ||
description: 'Builds the EthereumJS monorepo' | ||
inputs: | ||
repo: | ||
description: 'Source repository to use to build EthereumJS' | ||
required: true | ||
default: 'ethereumjs/ethereumjs-monorepo' | ||
ref: | ||
description: 'Reference to branch, commit, or tag to use to build EthereumJS' | ||
required: true | ||
default: 'master' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout EthereumJS monorepo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ inputs.repo }} | ||
ref: ${{ inputs.ref }} | ||
path: ethereumjs | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Build monorepo | ||
shell: bash | ||
run: | | ||
cd $GITHUB_WORKSPACE/ethereumjs | ||
npm ci | ||
- name: Add t8ntool to $PATH | ||
shell: bash | ||
run: | | ||
echo $GITHUB_WORKSPACE/ethereumjs/packages/vm/test/t8n/ >> $GITHUB_PATH | ||
echo $GITHUB_WORKSPACE/ethereumjs/node_modules/.bin >> $GITHUB_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
EthereumJS Transition tool interface. | ||
""" | ||
from pathlib import Path | ||
from re import compile | ||
from typing import Optional | ||
|
||
from ethereum_test_forks import Fork | ||
|
||
from .transition_tool import TransitionTool | ||
|
||
|
||
class EthereumJSTransitionTool(TransitionTool): | ||
""" | ||
EthereumJS Transition tool interface wrapper class. | ||
""" | ||
|
||
default_binary = Path("ethereumjs-t8ntool.sh") | ||
detect_binary_pattern = compile(r"^ethereumjs t8n\b") | ||
version_flag: str = "--version" | ||
t8n_use_stream = False | ||
|
||
binary: Path | ||
cached_version: Optional[str] = None | ||
trace: bool | ||
|
||
def __init__( | ||
self, | ||
*, | ||
binary: Optional[Path] = None, | ||
trace: bool = False, | ||
): | ||
super().__init__(binary=binary, trace=trace) | ||
|
||
def is_fork_supported(self, fork: Fork) -> bool: | ||
""" | ||
Returns True if the fork is supported by the tool. | ||
Currently, EthereumJS-t8n provides no way to determine supported forks. | ||
""" | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,6 +270,7 @@ NOP | |
NOPs | ||
nPython | ||
nSHA | ||
t8ntool | ||
num | ||
number | ||
ommer | ||
|