Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cicd/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"target":"4",
"prerelease":false
},
"eos-evm-contract":{
"evm-contract":{
"target":"main",
"prerelease":false
},
"eos-evm-miner":{
"evm-miner":{
"target":"main",
"prerelease":false
}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/node.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# EOS EVM Node CI
This GitHub Actions workflow builds eos-evm-node and eos-evm-rpc.
# EVM Node CI
This GitHub Actions workflow builds evm-node and evm-rpc.

### Index
1. [Triggers](#triggers)
Expand Down Expand Up @@ -27,21 +27,21 @@ This workflow performs the following steps:
1. Attach Documentation
1. Checkout the repo with no submodules.
1. Attach an annotation to the GitHub Actions build summary page containing CI documentation.
1. EOS EVM Node Build
1. EVM Node Build
1. Authenticate to the `trustevm-ci-submodule-checkout` GitHub app using the [AntelopeIO/github-app-token-action](https://github.com/AntelopeIO/github-app-token-action) action to obtain an ephemeral token.
1. Checkout the repo and submodules using the ephemeral token.
1. Build eos-evm-node and eos-evm-rpc using `cmake` and `make`.
1. Build evm-node and evm-rpc using `cmake` and `make`.
1. Upload the build folder to GitHub Actions if the `upload-artifacts` input is set to `true`.

## Outputs
This workflow produces the following outputs:
1. Build Artifacts - `build.tar.gz` containing the built artifacts of eos-evm-node and eos-evm-rpc, if the `upload-artifacts` input is set to `true`.
1. Build Artifacts - `build.tar.gz` containing the built artifacts of evm-node and evm-rpc, if the `upload-artifacts` input is set to `true`.

> 💾️ Build artifacts are only attached on-demand for this pipeline because they are >117 MB each, but we only get 2 GB of cumulative artifact storage in GitHub Actions while eos-evm is a private repo. Obtain artifacts by performing a manual build with `upload-artifacts` set to `true`.
> 💾️ Build artifacts are only attached on-demand for this pipeline because they are >117 MB each, but we only get 2 GB of cumulative artifact storage in GitHub Actions while evm-node is a private repo. Obtain artifacts by performing a manual build with `upload-artifacts` set to `true`.

## See Also
- [github-app-token-action](https://github.com/AntelopeIO/github-app-token-action) GitHub action
- [EOS EVM Documentation](../../README.md)
- [EVM Documentation](../../README.md)

For assistance with the CI system, please open an issue in this repo or reach out in the `#help-automation` channel via IM.

Expand Down
104 changes: 52 additions & 52 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: EOS EVM Node CI
name: EVM Node CI

on:
push:
Expand All @@ -18,18 +18,18 @@ on:
- default
- true
- false
override-eos-evm-contract:
description: 'Override eos-evm-contract target'
override-evm-contract:
description: 'Override evm-contract target'
type: string
override-eos-evm-contract-prerelease:
override-evm-contract-prerelease:
type: choice
description: Override eos-evm-contract prelease
description: Override evm-contract prelease
options:
- default
- true
- false
override-eos-evm-miner:
description: 'Override eos-evm-miner target'
override-evm-miner:
description: 'Override evm-miner target'
type: string

defaults:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}}

build:
name: EOS EVM Node Build
name: EVM Node Build
needs: [d, build-platforms]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
strategy:
Expand All @@ -117,7 +117,7 @@ jobs:
submodules: 'recursive'
token: ${{ steps.auth.outputs.token }}

- name: Build EOS EVM Node
- name: Build EVM Node
run: .github/workflows/build-node.sh
env:
CC: gcc-11
Expand All @@ -137,9 +137,9 @@ jobs:
antelope-spring-dev-prerelease: ${{steps.versions.outputs.antelope-spring-dev-prerelease}}
cdt-target: ${{steps.versions.outputs.cdt-target}}
cdt-prerelease: ${{steps.versions.outputs.cdt-prerelease}}
eos-evm-contract-target: ${{steps.versions.outputs.eos-evm-contract-target}}
eos-evm-contract-prerelease: ${{steps.versions.outputs.eos-evm-contract-prerelease}}
eos-evm-miner-target: ${{steps.versions.outputs.eos-evm-miner-target}}
evm-contract-target: ${{steps.versions.outputs.evm-contract-target}}
evm-contract-prerelease: ${{steps.versions.outputs.evm-contract-prerelease}}
evm-miner-target: ${{steps.versions.outputs.evm-miner-target}}
steps:
- name: Setup versions from input or defaults
id: versions
Expand All @@ -151,28 +151,28 @@ jobs:
echo antelope-spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".prerelease') >> $GITHUB_OUTPUT
echo cdt-target=$(echo "$DEFAULTS_JSON" | jq -r '."cdt".target') >> $GITHUB_OUTPUT
echo cdt-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."cdt".prerelease') >> $GITHUB_OUTPUT
echo eos-evm-contract-target=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-contract".target') >> $GITHUB_OUTPUT
echo eos-evm-contract-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-contract".prerelease') >> $GITHUB_OUTPUT
echo eos-evm-miner-target=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-miner".target') >> $GITHUB_OUTPUT
echo evm-contract-target=$(echo "$DEFAULTS_JSON" | jq -r '."evm-contract".target') >> $GITHUB_OUTPUT
echo evm-contract-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."evm-contract".prerelease') >> $GITHUB_OUTPUT
echo evm-miner-target=$(echo "$DEFAULTS_JSON" | jq -r '."evm-miner".target') >> $GITHUB_OUTPUT

if [[ "${{inputs.override-cdt}}" != "" ]]; then
echo cdt-target=${{inputs.override-cdt}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-cdt-prerelease}}" == +(true|false) ]]; then
echo cdt-prerelease=${{inputs.override-cdt-prerelease}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-eos-evm-contract}}" != "" ]]; then
echo eos-evm-contract-target=${{inputs.override-eos-evm-contract}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-evm-contract}}" != "" ]]; then
echo evm-contract-target=${{inputs.override-evm-contract}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-eos-evm-contract-prerelease}}" == +(true|false) ]]; then
echo eos-evm-contract-prerelease=${{inputs.override-eos-evm-contract-prerelease}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-evm-contract-prerelease}}" == +(true|false) ]]; then
echo evm-contract-prerelease=${{inputs.override-evm-contract-prerelease}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-eos-evm-miner}}" != "" ]]; then
echo eos-evm-miner-target=${{inputs.override-eos-evm-miner}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-evm-miner}}" != "" ]]; then
echo evm-miner-target=${{inputs.override-evm-miner}} >> $GITHUB_OUTPUT
fi

integration-test:
name: EOS EVM Integration Tests
name: EVM Integration Tests
needs: [d, build, versions]
if: always() && needs.d.result == 'success' && needs.build.result == 'success' && needs.versions.result == 'success'
strategy:
Expand Down Expand Up @@ -244,18 +244,18 @@ jobs:
- name: Link Spring TestHarness Module
run: ln -s /usr/share/spring_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness

- name: Download EOS EVM Contract
- name: Download EVM Contract
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: eosnetworkfoundation
repo: eos-evm-contract
target: '${{needs.versions.outputs.eos-evm-contract-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.eos-evm-contract-prerelease)}}
owner: VaultaFoundation
repo: evm-contract
target: '${{needs.versions.outputs.evm-contract-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.evm-contract-prerelease)}}
file: 'contract.tar.gz'
artifact-name: contract.test-actions-off.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract EOS EVM Contract
- name: Extract EVM Contract
id: evm-contract
run: |
mkdir contract
Expand All @@ -272,24 +272,24 @@ jobs:
app_id: ${{ secrets.TRUSTEVM_CI_APP_ID }}
private_key: ${{ secrets.TRUSTEVM_CI_APP_KEY }}

- name: Checkout eos-evm-miner
- name: Checkout evm-miner
uses: actions/checkout@v4
with:
repository: eosnetworkfoundation/eos-evm-miner
path: eos-evm-miner
ref: '${{needs.versions.outputs.eos-evm-miner-target}}'
repository: VaultaFoundation/evm-miner
path: evm-miner
ref: '${{needs.versions.outputs.evm-miner-target}}'

- name: Download EOS EVM Node builddir
- name: Download EVM Node builddir
uses: actions/download-artifact@v4
with:
name: build.tar.gz

- name: Extract EOS EVM Node builddir
- name: Extract EVM Node builddir
id: evm-node-build
run: |
mkdir eos-evm-node
mv build.tar.gz eos-evm-node/
pushd eos-evm-node
mkdir evm-node
mv build.tar.gz evm-node/
pushd evm-node
tar xvf build.tar.gz
pushd build
echo "EVM_NODE_BUILD=$(pwd)" >> "$GITHUB_OUTPUT"
Expand All @@ -306,10 +306,10 @@ jobs:
node --version
npm --version

- name: Build eos-evm-miner
id: eos-evm-miner-build
- name: Build evm-miner
id: evm-miner-build
run: |
pushd eos-evm-miner
pushd evm-miner
echo "EVM_MINER_ROOT=$(pwd)" >> "$GITHUB_OUTPUT"
npm install
npm run build
Expand All @@ -319,7 +319,7 @@ jobs:
run: |
mkdir test_run_root
cd test_run_root
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }}
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_evm_test.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.evm-miner-build.outputs.EVM_MINER_ROOT }}

- name: Test Leap Integration - with Brownie Framework
run: |
Expand All @@ -333,21 +333,21 @@ jobs:
pip install flask
pip install flask-cors --upgrade
brownie networks add Ethereum localhost5000 host=http://127.0.0.1:5000 chainid=15555
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_brownietest.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }} --flask-proxy-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_evm_brownietest.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.evm-miner-build.outputs.EVM_MINER_ROOT }} --flask-proxy-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/

- name: Test Leap Integration - different gas token
run: |
mkdir -p test_run_root
cd test_run_root
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_different_token_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.eos-evm-miner-build.outputs.EVM_MINER_ROOT }}
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_evm_different_token_test.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.evm-miner-build.outputs.EVM_MINER_ROOT }}

- name: Test Web-Socket Integration
run: |
echo "=== current directory is $(pwd)==="
apt-get install psmisc
killall -9 nodeos || true
killall -9 eos-evm-node || true
killall -9 eos-evm-rpc || true
killall -9 evm-node || true
killall -9 evm-rpc || true
sleep 1.0
mkdir -p ws_test_run_root
cd ws_test_run_root
Expand All @@ -365,15 +365,15 @@ jobs:
npm install web3
npm install collections
popd
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_ws_test_basic.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_evm_ws_test_basic.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}

- name: Test Web-Socket Fork Handling
run: |
echo "=== current directory is $(pwd)==="
apt-get install psmisc
killall -9 nodeos || true
killall -9 eos-evm-node || true
killall -9 eos-evm-rpc || true
killall -9 evm-node || true
killall -9 evm-rpc || true
sleep 1.0
mkdir -p ws_test_run_root
cd ws_test_run_root
Expand All @@ -391,15 +391,15 @@ jobs:
npm install web3
npm install collections
popd
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_ws_test_fork.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_evm_ws_test_fork.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}

- name: Test Gas Parameter Fork Handling
run: |
echo "=== current directory is $(pwd)==="
apt-get install psmisc
killall -9 nodeos || true
killall -9 eos-evm-node || true
killall -9 eos-evm-rpc || true
killall -9 evm-node || true
killall -9 evm-rpc || true
sleep 1.0
mkdir -p ws_test_run_root
cd ws_test_run_root
Expand All @@ -417,7 +417,7 @@ jobs:
npm install web3
npm install collections
popd
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_gasparam_fork_test.py -v --eos-evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}
${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_evm_gasparam_fork_test.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}

- name: Prepare Logs
if: failure()
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
build
.vscode
tests/nodeos_eos_evm_server/artifacts
tests/nodeos_eos_evm_server/cache
tests/nodeos_eos_evm_server/node_modules
tests/nodeos_evm_server/artifacts
tests/nodeos_evm_server/cache
tests/nodeos_evm_server/node_modules
tests/TestLogs
tests/eos-evm-genesis.json
tests/evm-genesis.json
tests/etc
tests/shape_bridge.json
tests/testnet.dot
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CMAKE_TOOLCHAIN_FILE
)
endif()

project(eos-evm-node)
project(evm-node)

include(cmake/conan.cmake)

Expand Down
Loading