From 88451f474fdcdb1d260e75fe1221ea1becd9a97c Mon Sep 17 00:00:00 2001 From: yarkin Date: Thu, 22 May 2025 23:05:36 +0800 Subject: [PATCH 01/18] Update Readme --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index edc0f7b..cd218e7 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# EOS EVM NODE +# Vaulta EVM NODE ## Overview -The EOS EVM Node consumes Antelope (EOS) blocks from a Leap node via state history (SHiP) endpoint and builds the virtual EVM blockchain in a deterministic way. -The EOS EVM RPC will talk with the EOS EVM node, and provide read-only Ethereum compatible RPC services for clients (such as MetaMask). +The Vaulta EVM Node consumes Antelope (Vaulta) blocks from a Leap node via state history (SHiP) endpoint and builds the virtual EVM blockchain in a deterministic way. +The Vaulta EVM RPC will talk with the Vaulta EVM node, and provide read-only Ethereum compatible RPC services for clients (such as MetaMask). -Clients can also push Ethereum compatible transactions (aka EVM transactions) to the EOS blockchain, via proxy and Transaction Wrapper (TX-Wrapper), which encapsulates EVM transactions into Antelope transactions. All EVM transactions will be validated and executed by the EOS EVM Contract deployed on the EOS blockchain. +Clients can also push Ethereum compatible transactions (aka EVM transactions) to the Vaulta blockchain, via proxy and Transaction Wrapper (TX-Wrapper), which encapsulates EVM transactions into Antelope transactions. All EVM transactions will be validated and executed by the Vaulta EVM Contract deployed on the Vaulta blockchain. ``` | | WRITE +-----------------+ - | +------------------------->| EOS EVM MINER | + | +------------------------->| EVM MINER | | | +-------v---------+ | | | Leap node | ---> connect to the other nodes in the blockchain network client | | +-------+---------+ @@ -19,7 +19,7 @@ Clients can also push Ethereum compatible transactions (aka EVM transactions) to | +-----------+ v | | +-----------------+ | READ | +--------------+ | | - | +---->| EOS EVM RPC |---->| EOS EVM Node + + | +---->| EVM RPC |---->| EVM Node + | +--------------+ | | | +-----------------+ ``` @@ -28,7 +28,7 @@ Clients can also push Ethereum compatible transactions (aka EVM transactions) to ### checkout the source code: ``` -git clone https://github.com/eosnetworkfoundation/eos-evm-node.git +git clone https://github.com/VaultaFoundation/evm-node.git cd eos-evm-node git submodule update --init --recursive ``` @@ -70,15 +70,15 @@ make -j8 ## Deployments For local testnet deployment and testings, please refer to -https://github.com/eosnetworkfoundation/eos-evm/blob/main/docs/local_testnet_deployment_plan.md +https://github.com/VaultaFoundation/evm-contract/blob/main/docs/local_testnet_deployment_plan.md For public testnet deployment, please refer to -https://github.com/eosnetworkfoundation/eos-evm/blob/main/docs/public_testnet_deployment_plan.md +https://github.com/VaultaFoundation/evm-contract/blob/main/docs/public_testnet_deployment_plan.md ## CI This repo contains the following GitHub Actions workflows for CI: -- EOS EVM Node CI - build the EOS EVM node - - [Pipeline](https://github.com/eosnetworkfoundation/eos-evm-node/actions/workflows/node.yml) +- Vaulta EVM Node CI - build the Vaulta EVM node + - [Pipeline](https://github.com/VaultaFoundation/evm-node/actions/workflows/node.yml) - [Documentation](./.github/workflows/node.md) See the pipeline documentation for more information. From 8d9b8779cc77137775c53285fa7c478e7bac80c8 Mon Sep 17 00:00:00 2001 From: yarkin Date: Thu, 22 May 2025 23:49:10 +0800 Subject: [PATCH 02/18] Deprecate eos-evm-node option. --- src/rpc_plugin.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/rpc_plugin.cpp b/src/rpc_plugin.cpp index abb0b4b..7cddb61 100644 --- a/src/rpc_plugin.cpp +++ b/src/rpc_plugin.cpp @@ -29,7 +29,9 @@ void rpc_plugin::set_program_options( appbase::options_description& cli, appbase ("http-port", boost::program_options::value()->default_value(silkworm::kDefaultEth1EndPoint), "http port for JSON RPC of the form
:") ("eos-evm-node", boost::program_options::value()->default_value(silkworm::kDefaultPrivateApiAddr), - "address to eos-evm-node of the form
:") + "[deprecated] address to eos-evm-node of the form
:") + ("evm-node", boost::program_options::value(), + "address to evm-node of the form
:") ("rpc-threads", boost::program_options::value()->default_value(16), "number of threads for use with rpc") ("chaindata", boost::program_options::value()->default_value("./"), @@ -78,9 +80,14 @@ void rpc_plugin::plugin_initialize( const appbase::variables_map& options ) try const auto max_readers = options.at("rpc-max-readers").as(); const auto rpc_quirk_flag = options.at("rpc-quirk-flag").as(); - // TODO when we resolve issues with silkrpc compiling in eos-evm-node then remove - // the `eos-evm-node` options and use silk_engine for the address and configuration - const auto& node_port = options.at("eos-evm-node").as(); + // TODO when we resolve issues with silkrpc compiling in evm-node then remove + // the `evm-node` options and use silk_engine for the address and configuration + + // If emv-node is empty fallback to eos-evm-node for compatibility. + // eos-evm-node shares the same default value as evm-node so we are fine when neither is set. + const auto& node_port = options.at("evm-node").empty() ? options.at("eos-evm-node").as() : + options.at("evm-node").as(); + //const auto node_settings = engine.get_node_settings(); const auto& data_dir = options.at("chaindata").as(); @@ -120,7 +127,7 @@ void rpc_plugin::plugin_initialize( const appbase::variables_map& options ) try void rpc_plugin::plugin_startup() { my->daemon_thread = std::thread([this]() { silkworm::log::set_thread_name("rpc-daemon"); - silkworm::rpc::Daemon::run(my->settings, {"eos-evm-rpc", "version: "+appbase::app().full_version_string()}); + silkworm::rpc::Daemon::run(my->settings, {"evm-rpc", "version: "+appbase::app().full_version_string()}); }); } From 6082306f184314e166c7c9da2b38078eb33b6bb7 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 08:50:47 +0800 Subject: [PATCH 03/18] Change binary name --- .github/workflows/node.md | 6 +-- .github/workflows/node.yml | 20 +++++----- README.md | 8 ++-- peripherals/eos-evm-ws-proxy/README.md | 8 ++-- scripts/.env-sample | 2 +- scripts/start-evm-node.sh | 14 +++---- src/CMakeLists.txt | 16 ++++---- src/{eos-evm-node.cpp => evm-node.cpp} | 0 src/{eos-evm-rpc.cpp => evm-rpc.cpp} | 0 tests/flask_proxy.py | 4 +- tests/nodeos_eos_evm_brownietest.py | 28 ++++++------- tests/nodeos_eos_evm_different_token_test.py | 24 +++++------ tests/nodeos_eos_evm_gasparam_fork_test.py | 42 ++++++++++---------- tests/nodeos_eos_evm_server.py | 8 ++-- tests/nodeos_eos_evm_server/PERFORMANCE.md | 20 +++++----- tests/nodeos_eos_evm_test.py | 26 ++++++------ tests/nodeos_eos_evm_ws_test_basic.py | 26 ++++++------ tests/nodeos_eos_evm_ws_test_fork.py | 26 ++++++------ 18 files changed, 140 insertions(+), 138 deletions(-) rename src/{eos-evm-node.cpp => evm-node.cpp} (100%) rename src/{eos-evm-rpc.cpp => evm-rpc.cpp} (100%) diff --git a/.github/workflows/node.md b/.github/workflows/node.md index 82579ad..3e65da4 100644 --- a/.github/workflows/node.md +++ b/.github/workflows/node.md @@ -1,5 +1,5 @@ # EOS EVM Node CI -This GitHub Actions workflow builds eos-evm-node and eos-evm-rpc. +This GitHub Actions workflow builds evm-node and evm-rpc. ### Index 1. [Triggers](#triggers) @@ -30,12 +30,12 @@ This workflow performs the following steps: 1. EOS 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`. diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 1c66b7c..f1d6aa0 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -275,7 +275,7 @@ jobs: - name: Checkout eos-evm-miner uses: actions/checkout@v4 with: - repository: eosnetworkfoundation/eos-evm-miner + repository: VaultaFoundation/eos-evm-miner path: eos-evm-miner ref: '${{needs.versions.outputs.eos-evm-miner-target}}' @@ -287,9 +287,9 @@ jobs: - name: Extract EOS 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" @@ -346,8 +346,8 @@ jobs: 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 @@ -372,8 +372,8 @@ jobs: 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 @@ -398,8 +398,8 @@ jobs: 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 diff --git a/README.md b/README.md index cd218e7..65245dc 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Clients can also push Ethereum compatible transactions (aka EVM transactions) to ### checkout the source code: ``` git clone https://github.com/VaultaFoundation/evm-node.git -cd eos-evm-node +cd evm-node git submodule update --init --recursive ``` -### compile eos-evm-node, eos-evm-rpc +### compile evm-node, evm-rpc Prerequisites: - Ubuntu 22 or later or other compatible Linux @@ -55,8 +55,8 @@ make -j8 ``` You'll get the list of binaries with other tools: ``` -bin/eos-evm-node -bin/eos-evm-rpc +bin/evm-node +bin/evm-rpc ``` Alternatively, to build with specific compiler: diff --git a/peripherals/eos-evm-ws-proxy/README.md b/peripherals/eos-evm-ws-proxy/README.md index a9fe76c..3e07da5 100644 --- a/peripherals/eos-evm-ws-proxy/README.md +++ b/peripherals/eos-evm-ws-proxy/README.md @@ -4,8 +4,8 @@ 1. **Clone the Repository** ``` - git clone https://github.com/eosnetworkfoundation/eos-evm-node - cd eos-evm-node/peripherals/eos-evm-ws-proxy + git clone https://github.com/VaultaFoundation/evm-node + cd evm-node/peripherals/eos-evm-ws-proxy ``` 2. **Install Dependencies** @@ -34,7 +34,7 @@ node main.js The following environment variables are available for configuration in the `.env` file: -- `WEB3_RPC_ENDPOINT`: The endpoint for the eos-evm-rpc +- `WEB3_RPC_ENDPOINT`: The endpoint for the evm-rpc - `NODEOS_RPC_ENDPOINT`: The endpoint for the nodeos RPC - `POLL_INTERVAL`: The interval (in milliseconds) at which the blockchain is polled - `WS_LISTENING_PORT`: The port on which the WebSocket server listens @@ -42,5 +42,5 @@ The following environment variables are available for configuration in the `.env - `MAX_LOGS_SUBS_PER_CONNECTION`: The maximum number of `logs`` subscriptions per connection. - `MAX_MINEDTX_SUBS_PER_CONNECTION`: The maximum number of `minedTransactions` subscriptions per connection. - `LOG_LEVEL`: Logging level (e.g., `debug`). -- `GENESIS_JSON`: full file path of evm genesis.json, defaults to 'eos-evm-genesis.json'. For EOS EVM mainnet, you can download a copy of genesis.json from https://github.com/eosnetworkfoundation/evm-public-docs/blob/main/mainnet-genesis.json. +- `GENESIS_JSON`: full file path of evm genesis.json, defaults to 'eos-evm-genesis.json'. For EOS EVM mainnet, you can download a copy of genesis.json from https://github.com/VaultaFoundation/evm-public-docs/blob/main/mainnet-genesis.json. diff --git a/scripts/.env-sample b/scripts/.env-sample index e44392d..1d9d9ce 100644 --- a/scripts/.env-sample +++ b/scripts/.env-sample @@ -2,7 +2,7 @@ CORE_SYMBOL_NAME=EOS EVM_CONTRACT_ROOT=/path/to/eos-evm-contract LEAP_ROOT=/path/to/leap-4 EVM_BRIDGE_ROOT=/path/to/evm-bridge-contracts -EVM_NODE_ROOT=/path/to/eos-evm-node +EVM_NODE_ROOT=/path/to/evm-node WEB3_RPC_ENDPOINT=http://localhost:5000 NODEOS_RPC_ENDPOINT=http://localhost:8889 POLL_INTERVAL=500 diff --git a/scripts/start-evm-node.sh b/scripts/start-evm-node.sh index ea2993a..e610421 100755 --- a/scripts/start-evm-node.sh +++ b/scripts/start-evm-node.sh @@ -18,13 +18,13 @@ fi mkdir -p data-evm-node/snapshots -if [ ! -f $EVM_NODE_ROOT/build/src/eos-evm-node ]; then - echo $EVM_NODE_ROOT/build/src/eos-evm-node not found +if [ ! -f $EVM_NODE_ROOT/build/src/evm-node ]; then + echo $EVM_NODE_ROOT/build/src/evm-node not found exit 1 fi -if [ ! -f $EVM_NODE_ROOT/build/src/eos-evm-rpc ]; then - echo $EVM_NODE_ROOT/build/src/eos-evm-rpc not found +if [ ! -f $EVM_NODE_ROOT/build/src/evm-rpc ]; then + echo $EVM_NODE_ROOT/build/src/evm-rpc not found exit 1 fi @@ -41,7 +41,7 @@ if [ ! -f eos-evm-genesis.json ]; then fi echo "Launching EOS EVM Node" -$EVM_NODE_ROOT/build/src/eos-evm-node \ +$EVM_NODE_ROOT/build/src/evm-node \ --plugin=blockchain_plugin \ --ship-endpoint=127.0.0.1:8999 \ --genesis-json=eos-evm-genesis.json \ @@ -56,8 +56,8 @@ $EVM_NODE_ROOT/build/src/eos-evm-node \ sleep 2 echo "Launching EOS EVM Rpc" -$EVM_NODE_ROOT/build/src/eos-evm-rpc \ - --eos-evm-node=127.0.0.1:8080 \ +$EVM_NODE_ROOT/build/src/evm-rpc \ + --evm-node=127.0.0.1:8080 \ --http-port=0.0.0.0:8881 \ --chaindata=data-evm-node \ --stdout=1 \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a3e949b..6169b96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,13 +24,13 @@ add_library(rpc_plugin rpc_plugin.cpp) target_include_directories(rpc_plugin PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) target_link_libraries(rpc_plugin PUBLIC ${SILKWORM_LIBRARIES} appbase abieos silkrpc ) -add_executable(eos-evm-node eos-evm-node.cpp) -target_include_directories(eos-evm-node PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(eos-evm-node PRIVATE appbase abieos sys_plugin engine_plugin ship_receiver_plugin block_conversion_plugin blockchain_plugin boost_filesystem version) +add_executable(evm-node evm-node.cpp) +target_include_directories(evm-node PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +target_link_libraries(evm-node PRIVATE appbase abieos sys_plugin engine_plugin ship_receiver_plugin block_conversion_plugin blockchain_plugin boost_filesystem version) -add_executable(eos-evm-rpc eos-evm-rpc.cpp) -target_include_directories(eos-evm-rpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(eos-evm-rpc PRIVATE appbase abieos sys_plugin rpc_plugin boost_filesystem version) +add_executable(evm-rpc evm-rpc.cpp) +target_include_directories(evm-rpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +target_link_libraries(evm-rpc PRIVATE appbase abieos sys_plugin rpc_plugin boost_filesystem version) -copy_bin( eos-evm-node ) -copy_bin( eos-evm-rpc ) +copy_bin( evm-node ) +copy_bin( evm-rpc ) diff --git a/src/eos-evm-node.cpp b/src/evm-node.cpp similarity index 100% rename from src/eos-evm-node.cpp rename to src/evm-node.cpp diff --git a/src/eos-evm-rpc.cpp b/src/evm-rpc.cpp similarity index 100% rename from src/eos-evm-rpc.cpp rename to src/evm-rpc.cpp diff --git a/tests/flask_proxy.py b/tests/flask_proxy.py index 68b3ac3..d128e15 100644 --- a/tests/flask_proxy.py +++ b/tests/flask_proxy.py @@ -25,9 +25,9 @@ def forward_request(req): #print("got resp from miner:" + str(resp)) return resp else: - #print("send req to eos-evm-rpc:" + str(req)) + #print("send req to evm-rpc:" + str(req)) resp = requests.post(readEndpoint, json.dumps(req), headers={"Accept":"application/json","Content-Type":"application/json"}).json() - #print("got from eos-evm-rpc:" + str(resp)) + #print("got from evm-rpc:" + str(resp)) return resp request_data = request.get_json() diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_eos_evm_brownietest.py index 4fcc098..a0bcac9 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_eos_evm_brownietest.py @@ -54,11 +54,11 @@ # # Example (Running with leap src build): # cd ~/leap/build -# ~/eos-evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/eos-evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/eos-evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/eos-evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -473,8 +473,8 @@ def toDict(dictToParse): Utils.Print("Generated EVM json genesis file in: %s" % genesisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") Utils.Print("") # @@ -490,16 +490,16 @@ def toDict(dictToParse): rows=prodNode.getTable(evmAcc.name, evmAcc.name, "balances") Utils.Print("\tBefore transfer table rows:", rows) - # Launch eos-evm-node - Utils.Print("===== laucnhing eos-evm-node =====") + # Launch evm-node + Utils.Print("===== laucnhing evm-node =====") dataDir = Utils.DataDir + "eos_evm" - nodeStdOutDir = dataDir + "/eos-evm-node.stdout" - nodeStdErrDir = dataDir + "/eos-evm-node.stderr" + nodeStdOutDir = dataDir + "/evm-node.stdout" + nodeStdErrDir = dataDir + "/evm-node.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(nodeStdOutDir, "w") errFile = open(nodeStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" + cmd = f"{eosEvmBuildRoot}/bin/evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmNodePOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) @@ -525,13 +525,13 @@ def toDict(dictToParse): # Transfer funds (now using version=1) nonProdNode.transferFunds(cluster.eosioAccount, evmAcc, "112.0000 EOS", "0xB106D2C286183FFC3D1F0C4A6f0753bB20B407c2", waitForTransBlock=True) - # Launch eos-evm-rpc - Utils.Print("===== laucnhing eos-evm-rpc =====") - rpcStdOutDir = dataDir + "/eos-evm-rpc.stdout" - rpcStdErrDir = dataDir + "/eos-evm-rpc.stderr" + # Launch evm-rpc + Utils.Print("===== laucnhing evm-rpc =====") + rpcStdOutDir = dataDir + "/evm-rpc.stdout" + rpcStdErrDir = dataDir + "/evm-rpc.stderr" outFile = open(rpcStdOutDir, "w") errFile = open(rpcStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" + cmd = f"{eosEvmBuildRoot}/bin/evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmRPCPOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index 66fbf80..55e809b 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -48,11 +48,11 @@ # # Example (Running with leap src build): # cd ~/leap/build -# ~/eos-evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/eos-evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/eos-evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/eos-evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -570,8 +570,8 @@ def getAccountGasBalance(node, account): Utils.Print("Generated EVM json genesis file in: %s" % genesisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") Utils.Print("") # @@ -851,27 +851,27 @@ def getAccountGasBalance(node, account): assert(row4["balance"] == "0000000000000000000000000000000000000000000000013539c783bbf0c000") - # Launch eos-evm-node + # Launch evm-node dataDir = Utils.DataDir + "eos_evm" - nodeStdOutDir = dataDir + "/eos-evm-node.stdout" - nodeStdErrDir = dataDir + "/eos-evm-node.stderr" + nodeStdOutDir = dataDir + "/evm-node.stdout" + nodeStdErrDir = dataDir + "/evm-node.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(nodeStdOutDir, "w") errFile = open(nodeStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" + cmd = f"{eosEvmBuildRoot}/bin/evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmNodePOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) time.sleep(10) # allow time to sync trxs - # Launch eos-evm-rpc - rpcStdOutDir = dataDir + "/eos-evm-rpc.stdout" - rpcStdErrDir = dataDir + "/eos-evm-rpc.stderr" + # Launch evm-rpc + rpcStdOutDir = dataDir + "/evm-rpc.stdout" + rpcStdErrDir = dataDir + "/evm-rpc.stderr" outFile = open(rpcStdOutDir, "w") errFile = open(rpcStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" + cmd = f"{eosEvmBuildRoot}/bin/evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmRPCPOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_eos_evm_gasparam_fork_test.py index 5732991..ffd91d6 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_eos_evm_gasparam_fork_test.py @@ -49,7 +49,7 @@ # --eos-evm-contract-root should point to root of EOS EVM contract build dir # # cd build/tests -# ./nodeos_eos_gasparam_fork_test.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/eos-evm-node/build -v +# ./nodeos_eos_gasparam_fork_test.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -498,8 +498,8 @@ def makeReservedEvmAddress(account): Utils.Print("Generated EVM json genesis file in: %s" % genesisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") Utils.Print("") # @@ -634,27 +634,27 @@ def makeReservedEvmAddress(account): # {"ram_price_mb":"5.0000 EOS","gas_price":10000000000} # {'consensusParameter': AttributeDict({'gasFeeParameters': AttributeDict({'gasCodedeposit': 477, 'gasNewaccount': 165519, 'gasSset': 167942, 'gasTxcreate': 289062, 'gasTxnewaccount': 165519} - # Launch eos-evm-node + # Launch evm-node dataDir = Utils.DataDir + "eos_evm" - nodeStdOutDir = dataDir + "/eos-evm-node.stdout" - nodeStdErrDir = dataDir + "/eos-evm-node.stderr" + nodeStdOutDir = dataDir + "/evm-node.stdout" + nodeStdErrDir = dataDir + "/evm-node.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(nodeStdOutDir, "w") errFile = open(nodeStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" + cmd = f"{eosEvmBuildRoot}/bin/evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmNodePOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) time.sleep(4.0) # allow time to sync trxs - # Launch eos-evm-rpc - rpcStdOutDir = dataDir + "/eos-evm-rpc.stdout" - rpcStdErrDir = dataDir + "/eos-evm-rpc.stderr" + # Launch evm-rpc + rpcStdOutDir = dataDir + "/evm-rpc.stdout" + rpcStdErrDir = dataDir + "/evm-rpc.stderr" outFile = open(rpcStdOutDir, "w") errFile = open(rpcStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" + cmd = f"{eosEvmBuildRoot}/bin/evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) os.environ["WEB3_RPC_ENDPOINT"] = "http://127.0.0.1:8881/" @@ -664,7 +664,7 @@ def makeReservedEvmAddress(account): # ==== gas parameter before the fork === # verify version 1 - Utils.Print("Verify evm_version==1 from eos-evm-node") + Utils.Print("Verify evm_version==1 from evm-node") # Verify header.nonce == 1 (evmversion=1) evm_block = w3.eth.get_block('latest') Utils.Print("before fork, the latest evm block is:" + str(evm_block)) @@ -688,7 +688,7 @@ def makeReservedEvmAddress(account): raise assert r == int(row['balance'],16), f"{row['eth_address']} {r} != {int(row['balance'],16)}" - Utils.Print("checking if any error in eos-evm-node") + Utils.Print("checking if any error in evm-node") foundErr = False stdErrFile = open(nodeStdErrDir, "r") lines = stdErrFile.readlines() @@ -697,7 +697,7 @@ def makeReservedEvmAddress(account): Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) foundErr = True - Utils.Print("checking if any error in eos-evm-rpc") + Utils.Print("checking if any error in evm-rpc") stdErrFile = open(rpcStdErrDir, "r") lines = stdErrFile.readlines() for line in lines: @@ -849,7 +849,7 @@ def makeReservedEvmAddress(account): assert(row4_node1["balance"] == "0000000000000000000000000000000000000000000000024c91bd38333b1600") assert(row4["balance"] != row4_node1["balance"]) - # verify eos-evm-node get the new gas parameter from the minor fork + # verify evm-node get the new gas parameter from the minor fork evm_block = w3.eth.get_block('latest') Utils.Print("in minor fork, the latest evm block is:" + str(evm_block)) assert(evm_block["nonce"].hex() == "0000000000000001" or evm_block["nonce"].hex() == "0x0000000000000001") @@ -861,8 +861,8 @@ def makeReservedEvmAddress(account): assert(evm_block["consensusParameter"]["gasFeeParameters"]["gasTxcreate"] == 347238) assert(evm_block["consensusParameter"]["gasFeeParameters"]["gasTxnewaccount"] == 198831) - # Validate all balances are the same between node0(prodNode) and eos-evm-node - Utils.Print("Validate all balances are the same between node0(minor-fork) and eos-evm-node") + # Validate all balances are the same between node0(prodNode) and evm-node + Utils.Print("Validate all balances are the same between node0(minor-fork) and evm-node") rows=prodNode.getTable(evmAcc.name, evmAcc.name, "account") for row in rows['rows']: Utils.Print("0x{0} balance is {1} in leap".format(row['eth_address'], int(row['balance'],16))) @@ -872,7 +872,7 @@ def makeReservedEvmAddress(account): except: Utils.Print("ERROR - RPC endpoint not available - Exception thrown - Checking 0x{0} balance".format(row['eth_address'])) raise - Utils.Print("0x{0} balance is {1} in eos-evm-rpc".format(row['eth_address'], r)) + Utils.Print("0x{0} balance is {1} in evm-rpc".format(row['eth_address'], r)) assert r == int(row['balance'],16), f"{row['eth_address']} {r} != {int(row['balance'],16)}" Print("Tracking the blocks from the divergence till there are 10*12 blocks on one chain and 10*12+1 on the other, from block %d to %d" % (killBlockNum, lastBlockNum)) @@ -977,8 +977,8 @@ def makeReservedEvmAddress(account): assert(evm_block["consensusParameter"]["gasFeeParameters"]["gasTxcreate"] == 289062) assert(evm_block["consensusParameter"]["gasFeeParameters"]["gasTxnewaccount"] == 165519) - # Validate all balances are the same between node0(prodNode) and eos-evm-node - Utils.Print("Validate all balances are the same between node0 and eos-evm-node after fork resolved") + # Validate all balances are the same between node0(prodNode) and evm-node + Utils.Print("Validate all balances are the same between node0 and evm-node after fork resolved") time.sleep(1.0) rows=prodNode.getTable(evmAcc.name, evmAcc.name, "account") for row in rows['rows']: @@ -989,7 +989,7 @@ def makeReservedEvmAddress(account): except: Utils.Print("ERROR - RPC endpoint not available - Exception thrown - Checking 0x{0} balance".format(row['eth_address'])) raise - Utils.Print("0x{0} balance is {1} in eos-evm-rpc".format(row['eth_address'], r)) + Utils.Print("0x{0} balance is {1} in evm-rpc".format(row['eth_address'], r)) assert r == int(row['balance'],16), f"{row['eth_address']} {r} != {int(row['balance'],16)}" # ensure all blocks from the lib before divergence till the current head are now in consensus diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_eos_evm_server.py index 05e0c03..01e6e17 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_eos_evm_server.py @@ -42,7 +42,7 @@ # # --eos-evm-contract-root should point to root of EOS EVM Contract build dir # --genesis-json file to save generated EVM genesis json -# --read-endpoint eos-evm-rpc endpoint (read endpoint) +# --read-endpoint evm-rpc endpoint (read endpoint) # # Example: # cd ~/ext/leap/build @@ -67,7 +67,7 @@ appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM Contract build dir", default=None) appArgs.add(flag="--eos-evm-bridge-contracts-root", type=str, help="EOS EVM Bridge contracts build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") -appArgs.add(flag="--read-endpoint", type=str, help="EVM read endpoint (eos-evm-rpc)", default="http://localhost:8881") +appArgs.add(flag="--read-endpoint", type=str, help="EVM read endpoint (evm-rpc)", default="http://localhost:8881") appArgs.add(flag="--use-eos-vm-oc", type=bool, help="EOS EVM Contract build dir", default=False) args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -413,8 +413,8 @@ Utils.Print("Generated EVM json genesis file in: %s" % gensisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp --verbosity=4" % gensisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp --verbosity=4" % gensisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp --api-spec=eth,debug,net,trace") Utils.Print("") Utils.Print("Web3 endpoint:") Utils.Print(" http://localhost:5000") diff --git a/tests/nodeos_eos_evm_server/PERFORMANCE.md b/tests/nodeos_eos_evm_server/PERFORMANCE.md index 14304ab..f58dd79 100644 --- a/tests/nodeos_eos_evm_server/PERFORMANCE.md +++ b/tests/nodeos_eos_evm_server/PERFORMANCE.md @@ -12,21 +12,23 @@ _set stack-size in src/CMakeList.txt to_ **16384** _before building_ ``` cd ~/evmperf -git clone https://github.com/eosnetworkfoundation/eos-evm -cd eos-evm/contract +git clone https://github.com/VaultaFoundation/evm-contract +cd evm-contract mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_LOGTIME=ON .. make -j4 ``` -### Build eos-evm-node and eos-evm-rpc +### Build evm-node and evm-rpc ``` -cd ~/evmperf/eos-evm +cd ~/evmperf +git clone https://github.com/VaultaFoundation/evm-node +cd evm-node mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. -make -j4 eos-evm-node eos-evm-rpc +make -j4 evm-node evm-rpc ``` @@ -66,17 +68,17 @@ cd .. (_wait until nodeos_eos_evm_server start listening at localhost:5000_) -### Launch eos-evm-node +### Launch evm-node ``` cd ~/evmperf/eos-evm/build/bin rm -rf chaindata etl-temp config-dir -./eos-evm-node --plugin=blockchain_plugin --ship-endpoint=127.0.0.1:8999 --genesis-json=$HOME/evmperf/leap/build/eos-evm-genesis.json --verbosity=4 +./evm-node --plugin=blockchain_plugin --ship-endpoint=127.0.0.1:8999 --genesis-json=$HOME/evmperf/leap/build/eos-evm-genesis.json --verbosity=4 ``` -### Launch eos-evm-rpc +### Launch evm-rpc ``` cd ~/evmperf/eos-evm/build/bin -./eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=./ --api-spec=eth,debug,net,trace --verbosity=4 +./evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=./ --api-spec=eth,debug,net,trace --verbosity=4 ``` ### Install scripts dependencies diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index 829b72c..d7a8894 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -49,11 +49,11 @@ # # Example (Running with leap src build): # cd ~/leap/build -# ~/eos-evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/eos-evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/eos-evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/eos-evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -625,8 +625,8 @@ def get_full_table(table_name): Utils.Print("Generated EVM json genesis file in: %s" % genesisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") Utils.Print("") # @@ -905,28 +905,28 @@ def get_full_table(table_name): assert(row4["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") assert(row4["balance"] == "0000000000000000000000000000000000000000000000013539c783bbf0c000") - # Launch eos-evm-node - Utils.Print("===== laucnhing eos-evm-node & eos-evm-rpc =====") + # Launch evm-node + Utils.Print("===== laucnhing evm-node & evm-rpc =====") dataDir = Utils.DataDir + "eos_evm" - nodeStdOutDir = dataDir + "/eos-evm-node.stdout" - nodeStdErrDir = dataDir + "/eos-evm-node.stderr" + nodeStdOutDir = dataDir + "/evm-node.stdout" + nodeStdErrDir = dataDir + "/evm-node.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(nodeStdOutDir, "w") errFile = open(nodeStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=10 --nocolor=1 --chain-data={dataDir}" + cmd = f"{eosEvmBuildRoot}/bin/evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=10 --nocolor=1 --chain-data={dataDir}" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmNodePOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) time.sleep(10) # allow time to sync trxs - # Launch eos-evm-rpc - rpcStdOutDir = dataDir + "/eos-evm-rpc.stdout" - rpcStdErrDir = dataDir + "/eos-evm-rpc.stderr" + # Launch evm-rpc + rpcStdOutDir = dataDir + "/evm-rpc.stdout" + rpcStdErrDir = dataDir + "/evm-rpc.stderr" outFile = open(rpcStdOutDir, "w") errFile = open(rpcStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" + cmd = f"{eosEvmBuildRoot}/bin/evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmRPCPOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) diff --git a/tests/nodeos_eos_evm_ws_test_basic.py b/tests/nodeos_eos_evm_ws_test_basic.py index ab267b7..9e81dc5 100755 --- a/tests/nodeos_eos_evm_ws_test_basic.py +++ b/tests/nodeos_eos_evm_ws_test_basic.py @@ -48,7 +48,7 @@ # --eos-evm-contract-root should point to root of EOS EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_basic.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/eos-evm-node/build -v +# ./nodeos_eos_evm_ws_test_basic.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -459,8 +459,8 @@ def makeReservedEvmAddress(account): Utils.Print("Generated EVM json genesis file in: %s" % genesisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") Utils.Print("") # @@ -573,27 +573,27 @@ def makeReservedEvmAddress(account): Utils.Print("\taccount row4: ", row4) assert(row4["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") - # Launch eos-evm-node + # Launch evm-node dataDir = Utils.DataDir + "eos_evm" - nodeStdOutDir = dataDir + "/eos-evm-node.stdout" - nodeStdErrDir = dataDir + "/eos-evm-node.stderr" + nodeStdOutDir = dataDir + "/evm-node.stdout" + nodeStdErrDir = dataDir + "/evm-node.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(nodeStdOutDir, "w") errFile = open(nodeStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" + cmd = f"{eosEvmBuildRoot}/bin/evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmNodePOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) time.sleep(10) # allow time to sync trxs - # Launch eos-evm-rpc - rpcStdOutDir = dataDir + "/eos-evm-rpc.stdout" - rpcStdErrDir = dataDir + "/eos-evm-rpc.stderr" + # Launch evm-rpc + rpcStdOutDir = dataDir + "/evm-rpc.stdout" + rpcStdErrDir = dataDir + "/evm-rpc.stderr" outFile = open(rpcStdOutDir, "w") errFile = open(rpcStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" + cmd = f"{eosEvmBuildRoot}/bin/evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) os.environ["WEB3_RPC_ENDPOINT"] = "http://127.0.0.1:8881/" @@ -612,7 +612,7 @@ def makeReservedEvmAddress(account): raise assert r == int(row['balance'],16), f"{row['eth_address']} {r} != {int(row['balance'],16)}" - Utils.Print("checking if any error in eos-evm-node") + Utils.Print("checking if any error in evm-node") foundErr = False stdErrFile = open(nodeStdErrDir, "r") lines = stdErrFile.readlines() @@ -621,7 +621,7 @@ def makeReservedEvmAddress(account): Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) foundErr = True - Utils.Print("checking if any error in eos-evm-rpc") + Utils.Print("checking if any error in evm-rpc") stdErrFile = open(rpcStdErrDir, "r") lines = stdErrFile.readlines() for line in lines: diff --git a/tests/nodeos_eos_evm_ws_test_fork.py b/tests/nodeos_eos_evm_ws_test_fork.py index 633c1c0..e3d9156 100755 --- a/tests/nodeos_eos_evm_ws_test_fork.py +++ b/tests/nodeos_eos_evm_ws_test_fork.py @@ -49,7 +49,7 @@ # --eos-evm-contract-root should point to root of EOS EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_fork.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/eos-evm-node/build -v +# ./nodeos_eos_evm_ws_test_fork.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -585,8 +585,8 @@ def makeReservedEvmAddress(account): Utils.Print("Generated EVM json genesis file in: %s" % genesisJson) Utils.Print("") Utils.Print("You can now run:") - Utils.Print(" eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) - Utils.Print(" eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") + Utils.Print(" evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json=%s --chain-data=/tmp/data --verbosity=5" % genesisJson) + Utils.Print(" evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata=/tmp/data --api-spec=eth,debug,net,trace") Utils.Print("") # @@ -704,27 +704,27 @@ def makeReservedEvmAddress(account): Utils.Print("\taccount row4: ", row4) assert(row4["eth_address"] == "9e126c57330fa71556628e0aabd6b6b6783d99fa") - # Launch eos-evm-node + # Launch evm-node dataDir = Utils.DataDir + "eos_evm" - nodeStdOutDir = dataDir + "/eos-evm-node.stdout" - nodeStdErrDir = dataDir + "/eos-evm-node.stderr" + nodeStdOutDir = dataDir + "/evm-node.stdout" + nodeStdErrDir = dataDir + "/evm-node.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(nodeStdOutDir, "w") errFile = open(nodeStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" + cmd = f"{eosEvmBuildRoot}/bin/evm-node --plugin=blockchain_plugin --ship-core-account=eosio.evm --ship-endpoint=127.0.0.1:8999 --genesis-json={genesisJson} --verbosity=5 --nocolor=1 --chain-data={dataDir}" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) evmNodePOpen=Utils.delayedCheckOutput(cmdArr, stdout=outFile, stderr=errFile) time.sleep(4.0) # allow time to sync trxs - # Launch eos-evm-rpc - rpcStdOutDir = dataDir + "/eos-evm-rpc.stdout" - rpcStdErrDir = dataDir + "/eos-evm-rpc.stderr" + # Launch evm-rpc + rpcStdOutDir = dataDir + "/evm-rpc.stdout" + rpcStdErrDir = dataDir + "/evm-rpc.stderr" outFile = open(rpcStdOutDir, "w") errFile = open(rpcStdErrDir, "w") - cmd = f"{eosEvmBuildRoot}/bin/eos-evm-rpc --eos-evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" + cmd = f"{eosEvmBuildRoot}/bin/evm-rpc --evm-node=127.0.0.1:8080 --http-port=0.0.0.0:8881 --chaindata={dataDir} --api-spec=eth,debug,net,trace" Utils.Print(f"Launching: {cmd}") cmdArr=shlex.split(cmd) os.environ["WEB3_RPC_ENDPOINT"] = "http://127.0.0.1:8881/" @@ -744,7 +744,7 @@ def makeReservedEvmAddress(account): raise assert r == int(row['balance'],16), f"{row['eth_address']} {r} != {int(row['balance'],16)}" - Utils.Print("checking if any error in eos-evm-node") + Utils.Print("checking if any error in evm-node") foundErr = False stdErrFile = open(nodeStdErrDir, "r") lines = stdErrFile.readlines() @@ -753,7 +753,7 @@ def makeReservedEvmAddress(account): Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) foundErr = True - Utils.Print("checking if any error in eos-evm-rpc") + Utils.Print("checking if any error in evm-rpc") stdErrFile = open(rpcStdErrDir, "r") lines = stdErrFile.readlines() for line in lines: From 5834e270cd26b87356205bc73a297fc81e1bb10d Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:25:19 +0800 Subject: [PATCH 04/18] Change EOS EVM->EVM --- src/engine_plugin.cpp | 2 +- src/ship_receiver_plugin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine_plugin.cpp b/src/engine_plugin.cpp index ff5b2d9..cca2b62 100644 --- a/src/engine_plugin.cpp +++ b/src/engine_plugin.cpp @@ -112,7 +112,7 @@ class engine_plugin_impl : std::enable_shared_from_this { auto sentry = std::make_shared(); eth.reset(new silkworm::EthereumBackEnd(node_settings, &db_env, sentry)); - eth->set_node_name("EOS EVM Node"); + eth->set_node_name("EVM Node"); SILK_INFO << "Created Ethereum Backend with network id <" << node_settings.network_id << ">"; server.reset(new silkworm::rpc::BackEndKvServer(server_settings, *eth.get())); diff --git a/src/ship_receiver_plugin.cpp b/src/ship_receiver_plugin.cpp index ae3d4ae..b54ff96 100644 --- a/src/ship_receiver_plugin.cpp +++ b/src/ship_receiver_plugin.cpp @@ -458,7 +458,7 @@ void ship_receiver_plugin::set_program_options( appbase::options_description& cl ("ship-endpoint", boost::program_options::value()->default_value("127.0.0.1:8999"), "SHiP host address") ("ship-core-account", boost::program_options::value()->default_value("evmevmevmevm"), - "Account on the core blockchain that hosts the EOS EVM Contract") + "Account on the core blockchain that hosts the EVM Contract") ("ship-max-retry", boost::program_options::value(), "Max retry times before give up when trying to reconnect to SHiP endpoints" ) ("ship-delay-second", boost::program_options::value(), From 7cc2f3fdc4a1fedfcc27f991e90fdbd28cbb130f Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:25:41 +0800 Subject: [PATCH 05/18] change project name in makefile --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdf1f36..4dda356 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_TOOLCHAIN_FILE ) endif() -project(eos-evm-node) +project(evm-node) include(cmake/conan.cmake) From 87094079e7aaf67849dbf8f7f2d7a91825ebfbb9 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:32:16 +0800 Subject: [PATCH 06/18] Update nginx error message --- peripherals/proxy/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peripherals/proxy/nginx.conf b/peripherals/proxy/nginx.conf index 8eb9880..f5fcfb0 100644 --- a/peripherals/proxy/nginx.conf +++ b/peripherals/proxy/nginx.conf @@ -107,7 +107,7 @@ http { add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' '*'; add_header 'Content-Type' 'text/html'; - return 200 'This is an API endpoint that only accepts JSON-RPC requests.
Please visit https://docs.eosnetwork.com/docs/latest/eos-evm/ for information about EOS EVM. \n'; + return 200 'This is an API endpoint that only accepts JSON-RPC requests.
Please visit https://docs.vaulta.com/evm/quick-start/introduction/ for information about EVM. \n'; } resolver 127.0.0.11; From 0e5ab23e51a5a93eb88723315d6c3b1237eeceb9 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:33:30 +0800 Subject: [PATCH 07/18] Update sample script --- scripts/start-evm-node.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/start-evm-node.sh b/scripts/start-evm-node.sh index e610421..90193b8 100755 --- a/scripts/start-evm-node.sh +++ b/scripts/start-evm-node.sh @@ -40,7 +40,7 @@ if [ ! -f eos-evm-genesis.json ]; then done fi -echo "Launching EOS EVM Node" +echo "Launching EVM Node" $EVM_NODE_ROOT/build/src/evm-node \ --plugin=blockchain_plugin \ --ship-endpoint=127.0.0.1:8999 \ @@ -55,7 +55,7 @@ $EVM_NODE_ROOT/build/src/evm-node \ sleep 2 -echo "Launching EOS EVM Rpc" +echo "Launching EVM Rpc" $EVM_NODE_ROOT/build/src/evm-rpc \ --evm-node=127.0.0.1:8080 \ --http-port=0.0.0.0:8881 \ @@ -67,7 +67,7 @@ $EVM_NODE_ROOT/build/src/evm-rpc \ sleep 2 -echo "Launching EOS EVM WS proxy" +echo "Launching EVM WS proxy" if [ ! -d "node_modules" ]; then cp $EVM_NODE_ROOT/peripherals/eos-evm-ws-proxy/package.json . npm install From 31e3ed96acdb6b4500c10bbd4d8ed75dedc18c09 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:33:52 +0800 Subject: [PATCH 08/18] update es-proxy readme --- peripherals/eos-evm-ws-proxy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peripherals/eos-evm-ws-proxy/README.md b/peripherals/eos-evm-ws-proxy/README.md index 3e07da5..7a74a36 100644 --- a/peripherals/eos-evm-ws-proxy/README.md +++ b/peripherals/eos-evm-ws-proxy/README.md @@ -42,5 +42,5 @@ The following environment variables are available for configuration in the `.env - `MAX_LOGS_SUBS_PER_CONNECTION`: The maximum number of `logs`` subscriptions per connection. - `MAX_MINEDTX_SUBS_PER_CONNECTION`: The maximum number of `minedTransactions` subscriptions per connection. - `LOG_LEVEL`: Logging level (e.g., `debug`). -- `GENESIS_JSON`: full file path of evm genesis.json, defaults to 'eos-evm-genesis.json'. For EOS EVM mainnet, you can download a copy of genesis.json from https://github.com/VaultaFoundation/evm-public-docs/blob/main/mainnet-genesis.json. +- `GENESIS_JSON`: full file path of evm genesis.json, defaults to 'eos-evm-genesis.json'. For Vaulta EVM mainnet, you can download a copy of genesis.json from https://github.com/VaultaFoundation/evm-public-docs/blob/main/mainnet-genesis.json. From 4fe4469fc83c11999d7a21f82a4081639728b278 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:34:05 +0800 Subject: [PATCH 09/18] Update test script comments --- tests/nodeos_eos_evm_brownietest.py | 12 ++++++------ tests/nodeos_eos_evm_different_token_test.py | 16 ++++++++-------- tests/nodeos_eos_evm_gasparam_fork_test.py | 14 +++++++------- tests/nodeos_eos_evm_server.py | 10 +++++----- tests/nodeos_eos_evm_test.py | 16 ++++++++-------- tests/nodeos_eos_evm_ws_test_basic.py | 14 +++++++------- tests/nodeos_eos_evm_ws_test_fork.py | 14 +++++++------- 7 files changed, 48 insertions(+), 48 deletions(-) diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_eos_evm_brownietest.py index a0bcac9..d8d7394 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_eos_evm_brownietest.py @@ -43,14 +43,14 @@ ############################################################### # nodeos_eos_evm_test # -# Set up a EOS EVM env and run simple tests. +# Set up a EVM env and run simple tests. # # Need to install: # web3 - pip install web3 # # --use-miner path to eos-evm-miner. if specified then uses eos-evm-miner to get gas price. -# --eos-evm-build-root should point to the root of EOS EVM build dir -# --eos-evm-contract-root should point to root of EOS EVM contract build dir +# --eos-evm-build-root should point to the root of EVM build dir +# --eos-evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build @@ -81,10 +81,10 @@ def prefix_0x(hexstr): return hexstr appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EOS EVM build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") -appArgs.add(flag="--use-miner", type=str, help="EOS EVM miner to use to send trx to nodeos", default=None) +appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) appArgs.add(flag="--miner-cmd", type=str, help="command line to start EVM miner", default="node dist/index.js") appArgs.add(flag="--flask-proxy-root", type=str, help="command line to start EVM miner", default=".") diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index 55e809b..ae8d851 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -37,14 +37,14 @@ ############################################################### # nodeos_eos_evm_test # -# Set up a EOS EVM env and run simple tests. +# Set up a EVM env and run simple tests. # # Need to install: # web3 - pip install web3 # # --use-miner path to eos-evm-miner. if specified then uses eos-evm-miner to get gas price. -# --eos-evm-build-root should point to the root of EOS EVM build dir -# --eos-evm-contract-root should point to root of EOS EVM contract build dir +# --eos-evm-build-root should point to the root of EVM build dir +# --eos-evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build @@ -63,10 +63,10 @@ errorExit=Utils.errorExit appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EOS EVM build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") -appArgs.add(flag="--use-miner", type=str, help="EOS EVM miner to use to send trx to nodeos", default=None) +appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running"}, applicationSpecificArgs=appArgs) debug=args.v @@ -1009,14 +1009,14 @@ def get_block(num): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) + Utils.Print(" Found ERROR in EVM NODE log: ", line) foundErr = True stdErrFile = open(rpcStdErrDir, "r") lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM RPC log: ", line) + Utils.Print(" Found ERROR in EVM RPC log: ", line) foundErr = True testSuccessful= not foundErr diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_eos_evm_gasparam_fork_test.py index ffd91d6..3546a6a 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_eos_evm_gasparam_fork_test.py @@ -38,15 +38,15 @@ ############################################################### # nodeos_eos_evm_ws_test_fork # -# Set up a EOS EVM env and run leap fork tests with websocket support +# Set up a EVM env and run leap fork tests with websocket support # This test is based on both nodeos_eos_evm_ws_test_basic & nodeos_short_fork_take_over_test # # Need to install: # web3 - pip install web3 # - pip install otree # -# --eos-evm-build-root should point to the root of EOS EVM build dir -# --eos-evm-contract-root should point to root of EOS EVM contract build dir +# --eos-evm-build-root should point to the root of EVM build dir +# --eos-evm-contract-root should point to root of EVM contract build dir # # cd build/tests # ./nodeos_eos_gasparam_fork_test.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v @@ -152,8 +152,8 @@ def getMinHeadAndLib(prodNodes): return (headBlockNum, libNum) appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EOS EVM build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -694,7 +694,7 @@ def makeReservedEvmAddress(account): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) + Utils.Print(" Found ERROR in EVM NODE log: ", line) foundErr = True Utils.Print("checking if any error in evm-rpc") @@ -702,7 +702,7 @@ def makeReservedEvmAddress(account): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM RPC log: ", line) + Utils.Print(" Found ERROR in EVM RPC log: ", line) foundErr = True tries = 120 diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_eos_evm_server.py index 01e6e17..136a60e 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_eos_evm_server.py @@ -30,7 +30,7 @@ ############################################################### # nodeos_eos_evm_server # -# Set up a EOS EVM env +# Set up a EVM env # # This test sets up 2 producing nodes and one "bridge" node using test_control_api_plugin. # One producing node has 3 of the elected producers and the other has 1 of the elected producers. @@ -40,7 +40,7 @@ # The bridge node has the test_control_api_plugin, which exposes a restful interface that the test script uses to kill # the "bridge" node when /fork endpoint called. # -# --eos-evm-contract-root should point to root of EOS EVM Contract build dir +# --eos-evm-contract-root should point to root of EVM Contract build dir # --genesis-json file to save generated EVM genesis json # --read-endpoint evm-rpc endpoint (read endpoint) # @@ -64,11 +64,11 @@ errorExit=Utils.errorExit appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM Contract build dir", default=None) -appArgs.add(flag="--eos-evm-bridge-contracts-root", type=str, help="EOS EVM Bridge contracts build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM Contract build dir", default=None) +appArgs.add(flag="--eos-evm-bridge-contracts-root", type=str, help="EVM Bridge contracts build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--read-endpoint", type=str, help="EVM read endpoint (evm-rpc)", default="http://localhost:8881") -appArgs.add(flag="--use-eos-vm-oc", type=bool, help="EOS EVM Contract build dir", default=False) +appArgs.add(flag="--use-eos-vm-oc", type=bool, help="EVM Contract build dir", default=False) args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) debug=args.v diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index d7a8894..c2cee79 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -38,14 +38,14 @@ ############################################################### # nodeos_eos_evm_test # -# Set up a EOS EVM env and run simple tests. +# Set up a EVM env and run simple tests. # # Need to install: # web3 - pip install web3 # # --use-miner path to eos-evm-miner. if specified then uses eos-evm-miner to get gas price. -# --eos-evm-build-root should point to the root of EOS EVM build dir -# --eos-evm-contract-root should point to root of EOS EVM contract build dir +# --eos-evm-build-root should point to the root of EVM build dir +# --eos-evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build @@ -76,10 +76,10 @@ def prefix_0x(hexstr): return hexstr appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EOS EVM build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") -appArgs.add(flag="--use-miner", type=str, help="EOS EVM miner to use to send trx to nodeos", default=None) +appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running"}, applicationSpecificArgs=appArgs) debug=args.v @@ -1477,7 +1477,7 @@ def get_block(num): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) + Utils.Print(" Found ERROR in EVM NODE log: ", line) foundErr = True Utils.Print("checking %s for errors" % (rpcStdErrDir)) @@ -1485,7 +1485,7 @@ def get_block(num): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM RPC log: ", line) + Utils.Print(" Found ERROR in EVM RPC log: ", line) foundErr = True testSuccessful= not foundErr diff --git a/tests/nodeos_eos_evm_ws_test_basic.py b/tests/nodeos_eos_evm_ws_test_basic.py index 9e81dc5..0e14907 100755 --- a/tests/nodeos_eos_evm_ws_test_basic.py +++ b/tests/nodeos_eos_evm_ws_test_basic.py @@ -38,14 +38,14 @@ ############################################################### # nodeos_eos_evm_ws_test_basic # -# Set up a EOS EVM env and run simple tests with websocket support +# Set up a EVM env and run simple tests with websocket support # # Need to install: # web3 - pip install web3 # - pip install otree # -# --eos-evm-build-root should point to the root of EOS EVM build dir -# --eos-evm-contract-root should point to root of EOS EVM contract build dir +# --eos-evm-build-root should point to the root of EVM build dir +# --eos-evm-contract-root should point to root of EVM contract build dir # # cd build/tests # ./nodeos_eos_evm_ws_test_basic.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v @@ -57,8 +57,8 @@ errorExit=Utils.errorExit appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EOS EVM build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -618,7 +618,7 @@ def makeReservedEvmAddress(account): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) + Utils.Print(" Found ERROR in EVM NODE log: ", line) foundErr = True Utils.Print("checking if any error in evm-rpc") @@ -626,7 +626,7 @@ def makeReservedEvmAddress(account): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM RPC log: ", line) + Utils.Print(" Found ERROR in EVM RPC log: ", line) foundErr = True Utils.Print("starting websocket proxy") diff --git a/tests/nodeos_eos_evm_ws_test_fork.py b/tests/nodeos_eos_evm_ws_test_fork.py index e3d9156..c5f29fa 100755 --- a/tests/nodeos_eos_evm_ws_test_fork.py +++ b/tests/nodeos_eos_evm_ws_test_fork.py @@ -38,15 +38,15 @@ ############################################################### # nodeos_eos_evm_ws_test_fork # -# Set up a EOS EVM env and run leap fork tests with websocket support +# Set up a EVM env and run leap fork tests with websocket support # This test is based on both nodeos_eos_evm_ws_test_basic & nodeos_short_fork_take_over_test # # Need to install: # web3 - pip install web3 # - pip install otree # -# --eos-evm-build-root should point to the root of EOS EVM build dir -# --eos-evm-contract-root should point to root of EOS EVM contract build dir +# --eos-evm-build-root should point to the root of EVM build dir +# --eos-evm-contract-root should point to root of EVM contract build dir # # cd build/tests # ./nodeos_eos_evm_ws_test_fork.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v @@ -152,8 +152,8 @@ def getMinHeadAndLib(prodNodes): return (headBlockNum, libNum) appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EOS EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EOS EVM build dir", default=None) +appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -750,7 +750,7 @@ def makeReservedEvmAddress(account): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM NODE log: ", line) + Utils.Print(" Found ERROR in EVM NODE log: ", line) foundErr = True Utils.Print("checking if any error in evm-rpc") @@ -758,7 +758,7 @@ def makeReservedEvmAddress(account): lines = stdErrFile.readlines() for line in lines: if line.find("ERROR") != -1 or line.find("CRIT") != -1: - Utils.Print(" Found ERROR in EOS EVM RPC log: ", line) + Utils.Print(" Found ERROR in EVM RPC log: ", line) foundErr = True # start to test web-socket connection From 108142380ad53dda1ca1139207c917a870d62110 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 10:34:28 +0800 Subject: [PATCH 10/18] update CI --- .github/workflows/node.md | 8 ++++---- .github/workflows/node.yml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/node.md b/.github/workflows/node.md index 3e65da4..640378a 100644 --- a/.github/workflows/node.md +++ b/.github/workflows/node.md @@ -1,4 +1,4 @@ -# EOS EVM Node CI +# EVM Node CI This GitHub Actions workflow builds evm-node and evm-rpc. ### Index @@ -27,7 +27,7 @@ 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 evm-node and evm-rpc using `cmake` and `make`. @@ -37,11 +37,11 @@ This workflow performs the following steps: This workflow produces the following outputs: 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. diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index f1d6aa0..07ef381 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -1,4 +1,4 @@ -name: EOS EVM Node CI +name: EVM Node CI on: push: @@ -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: @@ -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 @@ -172,7 +172,7 @@ jobs: 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: @@ -244,7 +244,7 @@ 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 @@ -255,7 +255,7 @@ jobs: 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 @@ -279,12 +279,12 @@ jobs: path: eos-evm-miner ref: '${{needs.versions.outputs.eos-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 evm-node From 698aeef97d03a5ad1f6178c8a6d5a472474d1ce6 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 18:45:21 +0800 Subject: [PATCH 11/18] update reference to eos-evm-miner --- .cicd/defaults.json | 2 +- .github/workflows/node.yml | 32 ++++++++++---------- tests/nodeos_eos_evm_brownietest.py | 16 +++++----- tests/nodeos_eos_evm_different_token_test.py | 16 +++++----- tests/nodeos_eos_evm_test.py | 16 +++++----- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.cicd/defaults.json b/.cicd/defaults.json index d907841..6468c17 100644 --- a/.cicd/defaults.json +++ b/.cicd/defaults.json @@ -11,7 +11,7 @@ "target":"main", "prerelease":false }, - "eos-evm-miner":{ + "evm-miner":{ "target":"main", "prerelease":false } diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 07ef381..07d2a45 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -28,8 +28,8 @@ on: - default - true - false - override-eos-evm-miner: - description: 'Override eos-evm-miner target' + override-evm-miner: + description: 'Override evm-miner target' type: string defaults: @@ -139,7 +139,7 @@ jobs: 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-miner-target: ${{steps.versions.outputs.evm-miner-target}} steps: - name: Setup versions from input or defaults id: versions @@ -153,7 +153,7 @@ jobs: 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-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 @@ -167,8 +167,8 @@ jobs: if [[ "${{inputs.override-eos-evm-contract-prerelease}}" == +(true|false) ]]; then echo eos-evm-contract-prerelease=${{inputs.override-eos-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: @@ -272,12 +272,12 @@ 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: VaultaFoundation/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 EVM Node builddir uses: actions/download-artifact@v4 @@ -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 @@ -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_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.evm-miner-build.outputs.EVM_MINER_ROOT }} - name: Test Leap Integration - with Brownie Framework run: | @@ -333,13 +333,13 @@ 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_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.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_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.evm-miner-build.outputs.EVM_MINER_ROOT }} - name: Test Web-Socket Integration run: | diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_eos_evm_brownietest.py index d8d7394..1a8fe80 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_eos_evm_brownietest.py @@ -48,17 +48,17 @@ # Need to install: # web3 - pip install web3 # -# --use-miner path to eos-evm-miner. if specified then uses eos-evm-miner to get gas price. +# --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. # --eos-evm-build-root should point to the root of EVM build dir # --eos-evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -165,7 +165,7 @@ def setEosEvmMinerEnv(eosnode): os.environ["MINER_PERMISSION"]="active" os.environ["EXPIRE_SEC"]="60" - Utils.Print(f"Set up configuration of eos-evm-miner via environment variables.") + Utils.Print(f"Set up configuration of evm-miner via environment variables.") Utils.Print(f"PRIVATE_KEY: {os.environ.get('PRIVATE_KEY')}") Utils.Print(f"MINER_ACCOUNT: {os.environ.get('MINER_ACCOUNT')}") Utils.Print(f"RPC_ENDPOINTS: {os.environ.get('RPC_ENDPOINTS')}") @@ -404,13 +404,13 @@ def toDict(dictToParse): trans=prodNode.pushMessage(evmAcc.name, "open", '[{0}]'.format(minerAcc.name), '-p {0}'.format(minerAcc.name)) # - # Setup eos-evm-miner + # Setup evm-miner # if useMiner is not None: setEosEvmMinerEnv(nonProdNode) - dataDir = Utils.DataDir + "eos-evm-miner" - outDir = dataDir + "/eos-evm-miner.stdout" - errDir = dataDir + "/eos-evm-miner.stderr" + dataDir = Utils.DataDir + "evm-miner" + outDir = dataDir + "/evm-miner.stdout" + errDir = dataDir + "/evm-miner.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(outDir, "w") diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index ae8d851..9b9f965 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -42,17 +42,17 @@ # Need to install: # web3 - pip install web3 # -# --use-miner path to eos-evm-miner. if specified then uses eos-evm-miner to get gas price. +# --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. # --eos-evm-build-root should point to the root of EVM build dir # --eos-evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -136,7 +136,7 @@ def setEosEvmMinerEnv(): os.environ["MINER_PERMISSION"]="active" os.environ["EXPIRE_SEC"]="60" - Utils.Print(f"Set up configuration of eos-evm-miner via environment variables.") + Utils.Print(f"Set up configuration of evm-miner via environment variables.") Utils.Print(f"PRIVATE_KEY: {os.environ.get('PRIVATE_KEY')}") Utils.Print(f"MINER_ACCOUNT: {os.environ.get('MINER_ACCOUNT')}") Utils.Print(f"RPC_ENDPOINTS: {os.environ.get('RPC_ENDPOINTS')}") @@ -431,13 +431,13 @@ def getAccountGasBalance(node, account): trans=prodNode.pushMessage(evmAcc.name, "open", '[{0}]'.format(minerAcc.name), '-p {0}'.format(minerAcc.name)) # - # Setup eos-evm-miner + # Setup evm-miner # if useMiner is not None: setEosEvmMinerEnv() - dataDir = Utils.DataDir + "eos-evm-miner" - outDir = dataDir + "/eos-evm-miner.stdout" - errDir = dataDir + "/eos-evm-miner.stderr" + dataDir = Utils.DataDir + "evm-miner" + outDir = dataDir + "/evm-miner.stdout" + errDir = dataDir + "/evm-miner.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(outDir, "w") diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index c2cee79..71e303a 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -43,17 +43,17 @@ # Need to install: # web3 - pip install web3 # -# --use-miner path to eos-evm-miner. if specified then uses eos-evm-miner to get gas price. +# --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. # --eos-evm-build-root should point to the root of EVM build dir # --eos-evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/eos-evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -148,7 +148,7 @@ def setEosEvmMinerEnv(): os.environ["MINER_PERMISSION"]="active" os.environ["EXPIRE_SEC"]="60" - Utils.Print(f"Set up configuration of eos-evm-miner via environment variables.") + Utils.Print(f"Set up configuration of evm-miner via environment variables.") Utils.Print(f"PRIVATE_KEY: {os.environ.get('PRIVATE_KEY')}") Utils.Print(f"MINER_ACCOUNT: {os.environ.get('MINER_ACCOUNT')}") Utils.Print(f"RPC_ENDPOINTS: {os.environ.get('RPC_ENDPOINTS')}") @@ -486,13 +486,13 @@ def get_full_table(table_name): trans=prodNode.pushMessage(evmAcc.name, "open", '[{0}]'.format(minerAcc.name), '-p {0}'.format(minerAcc.name)) # - # Setup eos-evm-miner + # Setup evm-miner # if useMiner is not None: setEosEvmMinerEnv() - dataDir = Utils.DataDir + "eos-evm-miner" - outDir = dataDir + "/eos-evm-miner.stdout" - errDir = dataDir + "/eos-evm-miner.stderr" + dataDir = Utils.DataDir + "evm-miner" + outDir = dataDir + "/evm-miner.stdout" + errDir = dataDir + "/evm-miner.stderr" shutil.rmtree(dataDir, ignore_errors=True) os.makedirs(dataDir) outFile = open(outDir, "w") From cbd8371e15d39a015f4b5be19e07cf9209050a76 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 18:47:07 +0800 Subject: [PATCH 12/18] update reference to eos-evm-contract --- .cicd/defaults.json | 2 +- .github/workflows/node.yml | 42 ++++++++++---------- scripts/.env-sample | 2 +- scripts/start-evm-runtime.sh | 2 +- tests/nodeos_eos_evm_brownietest.py | 10 ++--- tests/nodeos_eos_evm_different_token_test.py | 10 ++--- tests/nodeos_eos_evm_gasparam_fork_test.py | 8 ++-- tests/nodeos_eos_evm_server.py | 8 ++-- tests/nodeos_eos_evm_server/PERFORMANCE.md | 2 +- tests/nodeos_eos_evm_test.py | 10 ++--- tests/nodeos_eos_evm_ws_test_basic.py | 8 ++-- tests/nodeos_eos_evm_ws_test_fork.py | 8 ++-- 12 files changed, 56 insertions(+), 56 deletions(-) diff --git a/.cicd/defaults.json b/.cicd/defaults.json index 6468c17..df9744f 100644 --- a/.cicd/defaults.json +++ b/.cicd/defaults.json @@ -7,7 +7,7 @@ "target":"4", "prerelease":false }, - "eos-evm-contract":{ + "evm-contract":{ "target":"main", "prerelease":false }, diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 07d2a45..2ce0b62 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -18,12 +18,12 @@ 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 @@ -137,8 +137,8 @@ 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}} + 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 @@ -151,8 +151,8 @@ 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 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 @@ -161,11 +161,11 @@ jobs: 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-evm-miner}}" != "" ]]; then echo evm-miner-target=${{inputs.override-evm-miner}} >> $GITHUB_OUTPUT @@ -248,9 +248,9 @@ jobs: 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)}} + 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 }} @@ -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.evm-miner-build.outputs.EVM_MINER_ROOT }} + ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_test.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-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: | @@ -333,13 +333,13 @@ 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.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_eos_evm_brownietest.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-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.evm-miner-build.outputs.EVM_MINER_ROOT }} + ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_evm_different_token_test.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-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: | @@ -365,7 +365,7 @@ 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_eos_evm_ws_test_basic.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} - name: Test Web-Socket Fork Handling run: | @@ -391,7 +391,7 @@ 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_eos_evm_ws_test_fork.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} - name: Test Gas Parameter Fork Handling run: | @@ -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_eos_evm_gasparam_fork_test.py -v --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} - name: Prepare Logs if: failure() diff --git a/scripts/.env-sample b/scripts/.env-sample index 1d9d9ce..d6c71a3 100644 --- a/scripts/.env-sample +++ b/scripts/.env-sample @@ -1,5 +1,5 @@ CORE_SYMBOL_NAME=EOS -EVM_CONTRACT_ROOT=/path/to/eos-evm-contract +EVM_CONTRACT_ROOT=/path/to/evm-contract LEAP_ROOT=/path/to/leap-4 EVM_BRIDGE_ROOT=/path/to/evm-bridge-contracts EVM_NODE_ROOT=/path/to/evm-node diff --git a/scripts/start-evm-runtime.sh b/scripts/start-evm-runtime.sh index 6ed758a..94ce77a 100755 --- a/scripts/start-evm-runtime.sh +++ b/scripts/start-evm-runtime.sh @@ -36,5 +36,5 @@ if [ ! -d "venv" ]; then ln -s $LEAP_ROOT/build/tests/TestHarness venv/lib/python3.10/site-packages/TestHarness fi -CORE_SYMBOL_NAME=$CORE_SYMBOL_NAME ./venv/bin/python3 $EVM_NODE_ROOT/tests/nodeos_eos_evm_server.py --eos-evm-contract-root $EVM_CONTRACT_ROOT/build --eos-evm-bridge-contracts-root $EVM_BRIDGE_ROOT/build +CORE_SYMBOL_NAME=$CORE_SYMBOL_NAME ./venv/bin/python3 $EVM_NODE_ROOT/tests/nodeos_eos_evm_server.py --evm-contract-root $EVM_CONTRACT_ROOT/build --eos-evm-bridge-contracts-root $EVM_BRIDGE_ROOT/build mv eos-evm-genesis.json eos-evm-genesis.json.last &> /dev/null diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_eos_evm_brownietest.py index 1a8fe80..1c8178a 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_eos_evm_brownietest.py @@ -50,15 +50,15 @@ # # --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. # --eos-evm-build-root should point to the root of EVM build dir -# --eos-evm-contract-root should point to root of EVM contract build dir +# --evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -81,7 +81,7 @@ def prefix_0x(hexstr): return hexstr appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) @@ -99,7 +99,7 @@ def prefix_0x(hexstr): minerCmd=args.miner_cmd flaskProxyRoot=args.flask_proxy_root -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" szabo = 1000000000000 diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index 9b9f965..5f91f65 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -44,15 +44,15 @@ # # --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. # --eos-evm-build-root should point to the root of EVM build dir -# --eos-evm-contract-root should point to root of EVM contract build dir +# --evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -63,7 +63,7 @@ errorExit=Utils.errorExit appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) @@ -77,7 +77,7 @@ genesisJson=args.genesis_json useMiner=args.use_miner -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" szabo = 1000000000000 diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_eos_evm_gasparam_fork_test.py index 3546a6a..e90d025 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_eos_evm_gasparam_fork_test.py @@ -46,10 +46,10 @@ # - pip install otree # # --eos-evm-build-root should point to the root of EVM build dir -# --eos-evm-contract-root should point to root of EVM contract build dir +# --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_gasparam_fork_test.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_eos_gasparam_fork_test.py --evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -152,7 +152,7 @@ def getMinHeadAndLib(prodNodes): return (headBlockNum, libNum) appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") @@ -171,7 +171,7 @@ def getMinHeadAndLib(prodNodes): maxActiveProducers=3 totalProducers=maxActiveProducers -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" szabo = 1000000000000 diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_eos_evm_server.py index 136a60e..f3de570 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_eos_evm_server.py @@ -40,13 +40,13 @@ # The bridge node has the test_control_api_plugin, which exposes a restful interface that the test script uses to kill # the "bridge" node when /fork endpoint called. # -# --eos-evm-contract-root should point to root of EVM Contract build dir +# --evm-contract-root should point to root of EVM Contract build dir # --genesis-json file to save generated EVM genesis json # --read-endpoint evm-rpc endpoint (read endpoint) # # Example: # cd ~/ext/leap/build -# ~/ext/eos-evm/tests/leap/nodeos_eos_evm_server.py --eos-evm-contract-root ~/ext/eos-evm/contract/build --leave-running +# ~/ext/eos-evm/tests/leap/nodeos_eos_evm_server.py --evm-contract-root ~/ext/eos-evm/contract/build --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -64,7 +64,7 @@ errorExit=Utils.errorExit appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM Contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM Contract build dir", default=None) appArgs.add(flag="--eos-evm-bridge-contracts-root", type=str, help="EVM Bridge contracts build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--read-endpoint", type=str, help="EVM read endpoint (evm-rpc)", default="http://localhost:8881") @@ -80,7 +80,7 @@ gensisJson=args.genesis_json readEndpoint=args.read_endpoint useEosVmOC=args.use_eos_vm_oc -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" totalProducerNodes=2 totalNonProducerNodes=1 diff --git a/tests/nodeos_eos_evm_server/PERFORMANCE.md b/tests/nodeos_eos_evm_server/PERFORMANCE.md index f58dd79..596a97a 100644 --- a/tests/nodeos_eos_evm_server/PERFORMANCE.md +++ b/tests/nodeos_eos_evm_server/PERFORMANCE.md @@ -63,7 +63,7 @@ _use --use-eos-vm-oc=1 when launching **nodeos_eos_evm_server.py** if you want t cd ~/evmperf/leap/build/tests source venv/bin/activate cd .. -./tests/nodeos_eos_evm_server.py --leave-running --eos-evm-contract-root ~/evmperf/eos-evm/contract/build +./tests/nodeos_eos_evm_server.py --leave-running --evm-contract-root ~/evmperf/eos-evm/contract/build ``` (_wait until nodeos_eos_evm_server start listening at localhost:5000_) diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index 71e303a..7460659 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -45,15 +45,15 @@ # # --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. # --eos-evm-build-root should point to the root of EVM build dir -# --eos-evm-contract-root should point to root of EVM contract build dir +# --evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --eos-evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -76,7 +76,7 @@ def prefix_0x(hexstr): return hexstr appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) @@ -90,7 +90,7 @@ def prefix_0x(hexstr): genesisJson=args.genesis_json useMiner=args.use_miner -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" szabo = 1000000000000 diff --git a/tests/nodeos_eos_evm_ws_test_basic.py b/tests/nodeos_eos_evm_ws_test_basic.py index 0e14907..2c1df28 100755 --- a/tests/nodeos_eos_evm_ws_test_basic.py +++ b/tests/nodeos_eos_evm_ws_test_basic.py @@ -45,10 +45,10 @@ # - pip install otree # # --eos-evm-build-root should point to the root of EVM build dir -# --eos-evm-contract-root should point to root of EVM contract build dir +# --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_basic.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_eos_evm_ws_test_basic.py --evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -57,7 +57,7 @@ errorExit=Utils.errorExit appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") @@ -70,7 +70,7 @@ eosEvmBuildRoot=args.eos_evm_build_root genesisJson=args.genesis_json -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" szabo = 1000000000000 diff --git a/tests/nodeos_eos_evm_ws_test_fork.py b/tests/nodeos_eos_evm_ws_test_fork.py index c5f29fa..8991943 100755 --- a/tests/nodeos_eos_evm_ws_test_fork.py +++ b/tests/nodeos_eos_evm_ws_test_fork.py @@ -46,10 +46,10 @@ # - pip install otree # # --eos-evm-build-root should point to the root of EVM build dir -# --eos-evm-contract-root should point to root of EVM contract build dir +# --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_fork.py --eos-evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_eos_evm_ws_test_fork.py --evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -152,7 +152,7 @@ def getMinHeadAndLib(prodNodes): return (headBlockNum, libNum) appArgs=AppArgs() -appArgs.add(flag="--eos-evm-contract-root", type=str, help="EVM contract build dir", default=None) +appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") @@ -171,7 +171,7 @@ def getMinHeadAndLib(prodNodes): maxActiveProducers=3 totalProducers=maxActiveProducers -assert eosEvmContractRoot is not None, "--eos-evm-contract-root is required" +assert eosEvmContractRoot is not None, "--evm-contract-root is required" assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" szabo = 1000000000000 From 3f9269455f83f62e39c5fca0ac898107540b3329 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 19:41:48 +0800 Subject: [PATCH 13/18] try fix ci --- .github/workflows/node.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 2ce0b62..5447bcc 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -247,7 +247,7 @@ jobs: - name: Download EVM Contract uses: AntelopeIO/asset-artifact-download-action@v3 with: - owner: eosnetworkfoundation + owner: VaultaFoundation repo: evm-contract target: '${{needs.versions.outputs.evm-contract-target}}' prereleases: ${{fromJSON(needs.versions.outputs.evm-contract-prerelease)}} From 751e236f675eddafc60b85c05323a7739a1baad3 Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 21:01:08 +0800 Subject: [PATCH 14/18] try fix ci --- .github/workflows/node.yml | 12 ++++++------ tests/nodeos_eos_evm_brownietest.py | 14 +++++++------- tests/nodeos_eos_evm_different_token_test.py | 14 +++++++------- tests/nodeos_eos_evm_gasparam_fork_test.py | 12 ++++++------ tests/nodeos_eos_evm_server.py | 2 +- tests/nodeos_eos_evm_test.py | 14 +++++++------- tests/nodeos_eos_evm_ws_test_basic.py | 12 ++++++------ tests/nodeos_eos_evm_ws_test_fork.py | 12 ++++++------ 8 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 5447bcc..4d3ac23 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -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 --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.evm-miner-build.outputs.EVM_MINER_ROOT }} + ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_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: | @@ -333,13 +333,13 @@ 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 --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-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/ + ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_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 --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --eos-evm-build-root ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }} --use-miner ${{ steps.evm-miner-build.outputs.EVM_MINER_ROOT }} + ${{ steps.evm-node-build.outputs.EVM_NODE_BUILD }}/tests/nodeos_eos_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: | @@ -365,7 +365,7 @@ 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 --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_eos_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: | @@ -391,7 +391,7 @@ 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 --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_eos_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: | @@ -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 --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_eos_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() diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_eos_evm_brownietest.py index 1c8178a..e7298f2 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_eos_evm_brownietest.py @@ -49,16 +49,16 @@ # web3 - pip install web3 # # --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. -# --eos-evm-build-root should point to the root of EVM build dir +# --evm-build-root should point to the root of EVM build dir # --evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -82,7 +82,7 @@ def prefix_0x(hexstr): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) +appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) appArgs.add(flag="--miner-cmd", type=str, help="command line to start EVM miner", default="node dist/index.js") @@ -92,15 +92,15 @@ def prefix_0x(hexstr): debug=args.v killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details -eosEvmContractRoot=args.eos_evm_contract_root -eosEvmBuildRoot=args.eos_evm_build_root +eosEvmContractRoot=args.evm_contract_root +eosEvmBuildRoot=args.evm_build_root genesisJson=args.genesis_json useMiner=args.use_miner minerCmd=args.miner_cmd flaskProxyRoot=args.flask_proxy_root assert eosEvmContractRoot is not None, "--evm-contract-root is required" -assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" +assert eosEvmBuildRoot is not None, "--evm-build-root is required" szabo = 1000000000000 seed=1 diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index 5f91f65..4ca92c9 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -43,16 +43,16 @@ # web3 - pip install web3 # # --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. -# --eos-evm-build-root should point to the root of EVM build dir +# --evm-build-root should point to the root of EVM build dir # --evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -64,7 +64,7 @@ appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) +appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) @@ -72,13 +72,13 @@ debug=args.v killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details -eosEvmContractRoot=args.eos_evm_contract_root -eosEvmBuildRoot=args.eos_evm_build_root +eosEvmContractRoot=args.evm_contract_root +eosEvmBuildRoot=args.evm_build_root genesisJson=args.genesis_json useMiner=args.use_miner assert eosEvmContractRoot is not None, "--evm-contract-root is required" -assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" +assert eosEvmBuildRoot is not None, "--evm-build-root is required" szabo = 1000000000000 seed=1 diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_eos_evm_gasparam_fork_test.py index e90d025..d4dc5ea 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_eos_evm_gasparam_fork_test.py @@ -45,11 +45,11 @@ # web3 - pip install web3 # - pip install otree # -# --eos-evm-build-root should point to the root of EVM build dir +# --evm-build-root should point to the root of EVM build dir # --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_gasparam_fork_test.py --evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_eos_gasparam_fork_test.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -153,7 +153,7 @@ def getMinHeadAndLib(prodNodes): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) +appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -161,8 +161,8 @@ def getMinHeadAndLib(prodNodes): killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details keepLogs=args.keep_logs -eosEvmContractRoot=args.eos_evm_contract_root -eosEvmBuildRoot=args.eos_evm_build_root +eosEvmContractRoot=args.evm_contract_root +eosEvmBuildRoot=args.evm_build_root genesisJson=args.genesis_json totalProducerNodes=2 @@ -172,7 +172,7 @@ def getMinHeadAndLib(prodNodes): totalProducers=maxActiveProducers assert eosEvmContractRoot is not None, "--evm-contract-root is required" -assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" +assert eosEvmBuildRoot is not None, "--evm-build-root is required" szabo = 1000000000000 seed=1 diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_eos_evm_server.py index f3de570..adabd1c 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_eos_evm_server.py @@ -75,7 +75,7 @@ killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details keepLogs=args.keep_logs -eosEvmContractRoot=args.eos_evm_contract_root +eosEvmContractRoot=args.evm_contract_root eosEvmBridgeContractsRoot=args.eos_evm_bridge_contracts_root gensisJson=args.genesis_json readEndpoint=args.read_endpoint diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index 7460659..de0dfec 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -44,16 +44,16 @@ # web3 - pip install web3 # # --use-miner path to evm-miner. if specified then uses evm-miner to get gas price. -# --eos-evm-build-root should point to the root of EVM build dir +# --evm-build-root should point to the root of EVM build dir # --evm-contract-root should point to root of EVM contract build dir # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --eos-evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... @@ -77,7 +77,7 @@ def prefix_0x(hexstr): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) +appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) @@ -85,13 +85,13 @@ def prefix_0x(hexstr): debug=args.v killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details -eosEvmContractRoot=args.eos_evm_contract_root -eosEvmBuildRoot=args.eos_evm_build_root +eosEvmContractRoot=args.evm_contract_root +eosEvmBuildRoot=args.evm_build_root genesisJson=args.genesis_json useMiner=args.use_miner assert eosEvmContractRoot is not None, "--evm-contract-root is required" -assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" +assert eosEvmBuildRoot is not None, "--evm-build-root is required" szabo = 1000000000000 seed=1 diff --git a/tests/nodeos_eos_evm_ws_test_basic.py b/tests/nodeos_eos_evm_ws_test_basic.py index 2c1df28..005675f 100755 --- a/tests/nodeos_eos_evm_ws_test_basic.py +++ b/tests/nodeos_eos_evm_ws_test_basic.py @@ -44,11 +44,11 @@ # web3 - pip install web3 # - pip install otree # -# --eos-evm-build-root should point to the root of EVM build dir +# --evm-build-root should point to the root of EVM build dir # --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_basic.py --evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_eos_evm_ws_test_basic.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -58,7 +58,7 @@ appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) +appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -66,12 +66,12 @@ killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details keepLogs=args.keep_logs -eosEvmContractRoot=args.eos_evm_contract_root -eosEvmBuildRoot=args.eos_evm_build_root +eosEvmContractRoot=args.evm_contract_root +eosEvmBuildRoot=args.evm_build_root genesisJson=args.genesis_json assert eosEvmContractRoot is not None, "--evm-contract-root is required" -assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" +assert eosEvmBuildRoot is not None, "--evm-build-root is required" szabo = 1000000000000 seed=1 diff --git a/tests/nodeos_eos_evm_ws_test_fork.py b/tests/nodeos_eos_evm_ws_test_fork.py index 8991943..ed46a88 100755 --- a/tests/nodeos_eos_evm_ws_test_fork.py +++ b/tests/nodeos_eos_evm_ws_test_fork.py @@ -45,11 +45,11 @@ # web3 - pip install web3 # - pip install otree # -# --eos-evm-build-root should point to the root of EVM build dir +# --evm-build-root should point to the root of EVM build dir # --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_fork.py --evm-contract-root ~/workspaces/TrustEVM/build --eos-evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_eos_evm_ws_test_fork.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### @@ -153,7 +153,7 @@ def getMinHeadAndLib(prodNodes): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) -appArgs.add(flag="--eos-evm-build-root", type=str, help="EVM build dir", default=None) +appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) @@ -161,8 +161,8 @@ def getMinHeadAndLib(prodNodes): killEosInstances= not args.leave_running dumpErrorDetails=args.dump_error_details keepLogs=args.keep_logs -eosEvmContractRoot=args.eos_evm_contract_root -eosEvmBuildRoot=args.eos_evm_build_root +eosEvmContractRoot=args.evm_contract_root +eosEvmBuildRoot=args.evm_build_root genesisJson=args.genesis_json totalProducerNodes=2 @@ -172,7 +172,7 @@ def getMinHeadAndLib(prodNodes): totalProducers=maxActiveProducers assert eosEvmContractRoot is not None, "--evm-contract-root is required" -assert eosEvmBuildRoot is not None, "--eos-evm-build-root is required" +assert eosEvmBuildRoot is not None, "--evm-build-root is required" szabo = 1000000000000 seed=1 From 292bc561423f2be9751c7c8ccfd314b307c3d77a Mon Sep 17 00:00:00 2001 From: yarkin Date: Fri, 23 May 2025 22:40:01 +0800 Subject: [PATCH 15/18] Rollback some ci test names to make ci pass for now --- .github/workflows/node.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 4d3ac23..2b00f74 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -92,7 +92,7 @@ jobs: file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} build: - name: EVM Node Build + name: EOS EVM Node Build needs: [d, build-platforms] if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') strategy: @@ -172,7 +172,7 @@ jobs: fi integration-test: - name: EVM Integration Tests + name: EOS EVM Integration Tests needs: [d, build, versions] if: always() && needs.d.result == 'success' && needs.build.result == 'success' && needs.versions.result == 'success' strategy: From 42cb393de6a4f817200fa4b543a57f8ab7aa3267 Mon Sep 17 00:00:00 2001 From: yarkin Date: Sat, 24 May 2025 14:41:22 +0800 Subject: [PATCH 16/18] change default genesis file name --- .gitignore | 2 +- peripherals/eos-evm-ws-proxy/README.md | 2 +- peripherals/eos-evm-ws-proxy/config.js | 2 +- scripts/.env-sample | 2 +- scripts/start-evm-node.sh | 8 ++++---- scripts/start-evm-runtime.sh | 2 +- tests/nodeos_eos_evm_brownietest.py | 2 +- tests/nodeos_eos_evm_different_token_test.py | 2 +- tests/nodeos_eos_evm_gasparam_fork_test.py | 2 +- tests/nodeos_eos_evm_server.py | 2 +- tests/nodeos_eos_evm_server/PERFORMANCE.md | 2 +- tests/nodeos_eos_evm_test.py | 2 +- tests/nodeos_eos_evm_ws_test_basic.py | 2 +- tests/nodeos_eos_evm_ws_test_fork.py | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index fc2e959..4720a5d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ tests/nodeos_eos_evm_server/artifacts tests/nodeos_eos_evm_server/cache tests/nodeos_eos_evm_server/node_modules tests/TestLogs -tests/eos-evm-genesis.json +tests/evm-genesis.json tests/etc tests/shape_bridge.json tests/testnet.dot diff --git a/peripherals/eos-evm-ws-proxy/README.md b/peripherals/eos-evm-ws-proxy/README.md index 7a74a36..56ff4eb 100644 --- a/peripherals/eos-evm-ws-proxy/README.md +++ b/peripherals/eos-evm-ws-proxy/README.md @@ -42,5 +42,5 @@ The following environment variables are available for configuration in the `.env - `MAX_LOGS_SUBS_PER_CONNECTION`: The maximum number of `logs`` subscriptions per connection. - `MAX_MINEDTX_SUBS_PER_CONNECTION`: The maximum number of `minedTransactions` subscriptions per connection. - `LOG_LEVEL`: Logging level (e.g., `debug`). -- `GENESIS_JSON`: full file path of evm genesis.json, defaults to 'eos-evm-genesis.json'. For Vaulta EVM mainnet, you can download a copy of genesis.json from https://github.com/VaultaFoundation/evm-public-docs/blob/main/mainnet-genesis.json. +- `GENESIS_JSON`: full file path of evm genesis.json, defaults to 'evm-genesis.json'. For Vaulta EVM mainnet, you can download a copy of genesis.json from https://github.com/VaultaFoundation/evm-public-docs/blob/main/mainnet-genesis.json. diff --git a/peripherals/eos-evm-ws-proxy/config.js b/peripherals/eos-evm-ws-proxy/config.js index 839ed6d..f6bf189 100644 --- a/peripherals/eos-evm-ws-proxy/config.js +++ b/peripherals/eos-evm-ws-proxy/config.js @@ -10,7 +10,7 @@ const poll_interval = parseInt(process.env.POLL_INTERVAL, 10) || 1000; const max_logs_subs_per_connection = parseInt(process.env.MAX_LOGS_SUBS_PER_CONNECTION, 10) || 1; const max_minedtx_subs_per_connection = parseInt(process.env.MAX_MINEDTX_SUBS_PER_CONNECTION, 10) || 1; const log_level = process.env.LOG_LEVEL || 'info'; -const genesis_json = process.env.GENESIS_JSON || 'eos-evm-genesis.json'; +const genesis_json = process.env.GENESIS_JSON || 'evm-genesis.json'; module.exports = { ws_listening_port, diff --git a/scripts/.env-sample b/scripts/.env-sample index d6c71a3..2444753 100644 --- a/scripts/.env-sample +++ b/scripts/.env-sample @@ -11,4 +11,4 @@ WS_LISTENING_HOST=localhost MAX_LOGS_SUBS_PER_CONNECTION=1 MAX_MINEDTX_SUBS_PER_CONNECTION=1 LOG_LEVEL=debug -GENESIS_JSON=eos-evm-genesis.json +GENESIS_JSON=evm-genesis.json diff --git a/scripts/start-evm-node.sh b/scripts/start-evm-node.sh index 90193b8..4e337ed 100755 --- a/scripts/start-evm-node.sh +++ b/scripts/start-evm-node.sh @@ -33,9 +33,9 @@ if [ ! -f $EVM_NODE_ROOT/peripherals/eos-evm-ws-proxy/main.js ]; then exit 1 fi -if [ ! -f eos-evm-genesis.json ]; then - echo "Waiting for eos-evm-genesis.json ..." - while [ ! -f eos-evm-genesis.json ]; do +if [ ! -f evm-genesis.json ]; then + echo "Waiting for evm-genesis.json ..." + while [ ! -f evm-genesis.json ]; do sleep 1 done fi @@ -44,7 +44,7 @@ echo "Launching EVM Node" $EVM_NODE_ROOT/build/src/evm-node \ --plugin=blockchain_plugin \ --ship-endpoint=127.0.0.1:8999 \ - --genesis-json=eos-evm-genesis.json \ + --genesis-json=evm-genesis.json \ --ship-core-account=eosio.evm \ --chain-data=data-evm-node \ --ship-max-retry=1000000 \ diff --git a/scripts/start-evm-runtime.sh b/scripts/start-evm-runtime.sh index 94ce77a..d149e6f 100755 --- a/scripts/start-evm-runtime.sh +++ b/scripts/start-evm-runtime.sh @@ -37,4 +37,4 @@ if [ ! -d "venv" ]; then fi CORE_SYMBOL_NAME=$CORE_SYMBOL_NAME ./venv/bin/python3 $EVM_NODE_ROOT/tests/nodeos_eos_evm_server.py --evm-contract-root $EVM_CONTRACT_ROOT/build --eos-evm-bridge-contracts-root $EVM_BRIDGE_ROOT/build -mv eos-evm-genesis.json eos-evm-genesis.json.last &> /dev/null +mv evm-genesis.json evm-genesis.json.last &> /dev/null diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_eos_evm_brownietest.py index e7298f2..0a5d6a3 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_eos_evm_brownietest.py @@ -83,7 +83,7 @@ def prefix_0x(hexstr): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) appArgs.add(flag="--miner-cmd", type=str, help="command line to start EVM miner", default="node dist/index.js") appArgs.add(flag="--flask-proxy-root", type=str, help="command line to start EVM miner", default=".") diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_eos_evm_different_token_test.py index 4ca92c9..8409b40 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_eos_evm_different_token_test.py @@ -65,7 +65,7 @@ appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running"}, applicationSpecificArgs=appArgs) diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_eos_evm_gasparam_fork_test.py index d4dc5ea..8c7c7e6 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_eos_evm_gasparam_fork_test.py @@ -154,7 +154,7 @@ def getMinHeadAndLib(prodNodes): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) debug=args.v diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_eos_evm_server.py index adabd1c..42bcd53 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_eos_evm_server.py @@ -66,7 +66,7 @@ appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM Contract build dir", default=None) appArgs.add(flag="--eos-evm-bridge-contracts-root", type=str, help="EVM Bridge contracts build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") appArgs.add(flag="--read-endpoint", type=str, help="EVM read endpoint (evm-rpc)", default="http://localhost:8881") appArgs.add(flag="--use-eos-vm-oc", type=bool, help="EVM Contract build dir", default=False) diff --git a/tests/nodeos_eos_evm_server/PERFORMANCE.md b/tests/nodeos_eos_evm_server/PERFORMANCE.md index 596a97a..d3c6f4b 100644 --- a/tests/nodeos_eos_evm_server/PERFORMANCE.md +++ b/tests/nodeos_eos_evm_server/PERFORMANCE.md @@ -72,7 +72,7 @@ cd .. ``` cd ~/evmperf/eos-evm/build/bin rm -rf chaindata etl-temp config-dir -./evm-node --plugin=blockchain_plugin --ship-endpoint=127.0.0.1:8999 --genesis-json=$HOME/evmperf/leap/build/eos-evm-genesis.json --verbosity=4 +./evm-node --plugin=blockchain_plugin --ship-endpoint=127.0.0.1:8999 --genesis-json=$HOME/evmperf/leap/build/evm-genesis.json --verbosity=4 ``` ### Launch evm-rpc diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_eos_evm_test.py index de0dfec..9ad9cc5 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_eos_evm_test.py @@ -78,7 +78,7 @@ def prefix_0x(hexstr): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") appArgs.add(flag="--use-miner", type=str, help="EVM miner to use to send trx to nodeos", default=None) args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running"}, applicationSpecificArgs=appArgs) diff --git a/tests/nodeos_eos_evm_ws_test_basic.py b/tests/nodeos_eos_evm_ws_test_basic.py index 005675f..e41f842 100755 --- a/tests/nodeos_eos_evm_ws_test_basic.py +++ b/tests/nodeos_eos_evm_ws_test_basic.py @@ -59,7 +59,7 @@ appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) debug=args.v diff --git a/tests/nodeos_eos_evm_ws_test_fork.py b/tests/nodeos_eos_evm_ws_test_fork.py index ed46a88..c4b6c47 100755 --- a/tests/nodeos_eos_evm_ws_test_fork.py +++ b/tests/nodeos_eos_evm_ws_test_fork.py @@ -154,7 +154,7 @@ def getMinHeadAndLib(prodNodes): appArgs=AppArgs() appArgs.add(flag="--evm-contract-root", type=str, help="EVM contract build dir", default=None) appArgs.add(flag="--evm-build-root", type=str, help="EVM build dir", default=None) -appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="eos-evm-genesis.json") +appArgs.add(flag="--genesis-json", type=str, help="File to save generated genesis json", default="evm-genesis.json") args=TestHelper.parse_args({"--keep-logs","--dump-error-details","-v","--leave-running" }, applicationSpecificArgs=appArgs) debug=args.v From 42d614b375c55dbc0cbe5eec480accd45e855eee Mon Sep 17 00:00:00 2001 From: yarkin Date: Tue, 3 Jun 2025 21:11:08 +0800 Subject: [PATCH 17/18] Rename nodeos_eos_evm_* scrpts and folders --- .github/workflows/node.yml | 12 +++++------ .gitignore | 6 +++--- scripts/start-evm-runtime.sh | 2 +- tests/CMakeLists.txt | 16 +++++++-------- ...ownietest.py => nodeos_evm_brownietest.py} | 6 +++--- ....py => nodeos_evm_different_token_test.py} | 6 +++--- ...st.py => nodeos_evm_gasparam_fork_test.py} | 4 ++-- ...eos_evm_server.py => nodeos_evm_server.py} | 4 ++-- .../CMakeLists.txt | 0 .../PERFORMANCE.md | 20 +++++++++---------- .../README.md | 0 .../contracts/BlockNum.sol | 0 .../contracts/Blockhash.sol | 0 .../contracts/CMakeLists.txt | 0 .../contracts/Eventor.sol | 0 .../contracts/Lock.sol | 0 .../contracts/Recursive.sol | 0 .../contracts/Storage.sol | 0 .../contracts/Token.sol | 0 .../contracts/WEOS.sol | 0 .../extract-logtime-cmd.sh | 0 .../hardhat.config.js | 0 .../package.json | 0 .../performance-measurements-0.5.0.md | 0 .../scripts/CMakeLists.txt | 0 .../scripts/deploy-blockhash.js | 0 .../scripts/deploy-blocknum.js | 0 .../scripts/deploy-eventor.js | 0 .../scripts/deploy-recursive.js | 0 .../scripts/deploy-token.js | 0 .../scripts/deploy-uniswap.js | 0 .../scripts/deploy.js | 0 .../yarn.lock | 0 ...eos_eos_evm_test.py => nodeos_evm_test.py} | 6 +++--- ...t_basic.py => nodeos_evm_ws_test_basic.py} | 4 ++-- ...est_fork.py => nodeos_evm_ws_test_fork.py} | 6 +++--- 36 files changed, 46 insertions(+), 46 deletions(-) rename tests/{nodeos_eos_evm_brownietest.py => nodeos_evm_brownietest.py} (98%) rename tests/{nodeos_eos_evm_different_token_test.py => nodeos_evm_different_token_test.py} (99%) rename tests/{nodeos_eos_evm_gasparam_fork_test.py => nodeos_evm_gasparam_fork_test.py} (99%) rename tests/{nodeos_eos_evm_server.py => nodeos_evm_server.py} (99%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/CMakeLists.txt (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/PERFORMANCE.md (81%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/README.md (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/BlockNum.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/Blockhash.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/CMakeLists.txt (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/Eventor.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/Lock.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/Recursive.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/Storage.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/Token.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/contracts/WEOS.sol (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/extract-logtime-cmd.sh (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/hardhat.config.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/package.json (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/performance-measurements-0.5.0.md (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/CMakeLists.txt (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy-blockhash.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy-blocknum.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy-eventor.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy-recursive.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy-token.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy-uniswap.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/scripts/deploy.js (100%) rename tests/{nodeos_eos_evm_server => nodeos_evm_server}/yarn.lock (100%) rename tests/{nodeos_eos_evm_test.py => nodeos_evm_test.py} (99%) rename tests/{nodeos_eos_evm_ws_test_basic.py => nodeos_evm_ws_test_basic.py} (99%) rename tests/{nodeos_eos_evm_ws_test_fork.py => nodeos_evm_ws_test_fork.py} (99%) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 2b00f74..c6c391d 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -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 --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 }} + ${{ 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: | @@ -333,13 +333,13 @@ 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 --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/ + ${{ 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 --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 }} + ${{ 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: | @@ -365,7 +365,7 @@ 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 --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --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: | @@ -391,7 +391,7 @@ 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 --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --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: | @@ -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 --evm-contract-root ${{ steps.evm-contract.outputs.EVM_CONTRACT }} --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() diff --git a/.gitignore b/.gitignore index 4720a5d..c615f47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ 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/evm-genesis.json tests/etc diff --git a/scripts/start-evm-runtime.sh b/scripts/start-evm-runtime.sh index d149e6f..705998e 100755 --- a/scripts/start-evm-runtime.sh +++ b/scripts/start-evm-runtime.sh @@ -36,5 +36,5 @@ if [ ! -d "venv" ]; then ln -s $LEAP_ROOT/build/tests/TestHarness venv/lib/python3.10/site-packages/TestHarness fi -CORE_SYMBOL_NAME=$CORE_SYMBOL_NAME ./venv/bin/python3 $EVM_NODE_ROOT/tests/nodeos_eos_evm_server.py --evm-contract-root $EVM_CONTRACT_ROOT/build --eos-evm-bridge-contracts-root $EVM_BRIDGE_ROOT/build +CORE_SYMBOL_NAME=$CORE_SYMBOL_NAME ./venv/bin/python3 $EVM_NODE_ROOT/tests/nodeos_evm_server.py --evm-contract-root $EVM_CONTRACT_ROOT/build --eos-evm-bridge-contracts-root $EVM_BRIDGE_ROOT/build mv evm-genesis.json evm-genesis.json.last &> /dev/null diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 364abda..43a652e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,13 +1,13 @@ -add_subdirectory( nodeos_eos_evm_server ) +add_subdirectory( nodeos_evm_server ) configure_file(antelope_name.py . COPYONLY) -configure_file(nodeos_eos_evm_ws_test_basic.py . COPYONLY) -configure_file(nodeos_eos_evm_ws_test_fork.py . COPYONLY) -configure_file(nodeos_eos_evm_server.py . COPYONLY) -configure_file(nodeos_eos_evm_test.py . COPYONLY) -configure_file(nodeos_eos_evm_different_token_test.py . COPYONLY) -configure_file(nodeos_eos_evm_gasparam_fork_test.py . COPYONLY) -configure_file(nodeos_eos_evm_brownietest.py . COPYONLY) +configure_file(nodeos_evm_ws_test_basic.py . COPYONLY) +configure_file(nodeos_evm_ws_test_fork.py . COPYONLY) +configure_file(nodeos_evm_server.py . COPYONLY) +configure_file(nodeos_evm_test.py . COPYONLY) +configure_file(nodeos_evm_different_token_test.py . COPYONLY) +configure_file(nodeos_evm_gasparam_fork_test.py . COPYONLY) +configure_file(nodeos_evm_brownietest.py . COPYONLY) configure_file(flask_proxy.py . COPYONLY) configure_file(defertest.wasm . COPYONLY) configure_file(defertest.abi . COPYONLY) diff --git a/tests/nodeos_eos_evm_brownietest.py b/tests/nodeos_evm_brownietest.py similarity index 98% rename from tests/nodeos_eos_evm_brownietest.py rename to tests/nodeos_evm_brownietest.py index 0a5d6a3..5b58c36 100755 --- a/tests/nodeos_eos_evm_brownietest.py +++ b/tests/nodeos_evm_brownietest.py @@ -41,7 +41,7 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_test +# nodeos_evm_test # # Set up a EVM env and run simple tests. # @@ -54,11 +54,11 @@ # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... diff --git a/tests/nodeos_eos_evm_different_token_test.py b/tests/nodeos_evm_different_token_test.py similarity index 99% rename from tests/nodeos_eos_evm_different_token_test.py rename to tests/nodeos_evm_different_token_test.py index 8409b40..7606136 100755 --- a/tests/nodeos_eos_evm_different_token_test.py +++ b/tests/nodeos_evm_different_token_test.py @@ -35,7 +35,7 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_test +# nodeos_evm_test # # Set up a EVM env and run simple tests. # @@ -48,11 +48,11 @@ # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... diff --git a/tests/nodeos_eos_evm_gasparam_fork_test.py b/tests/nodeos_evm_gasparam_fork_test.py similarity index 99% rename from tests/nodeos_eos_evm_gasparam_fork_test.py rename to tests/nodeos_evm_gasparam_fork_test.py index 8c7c7e6..7c1412c 100755 --- a/tests/nodeos_eos_evm_gasparam_fork_test.py +++ b/tests/nodeos_evm_gasparam_fork_test.py @@ -36,10 +36,10 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_ws_test_fork +# nodeos_evm_ws_test_fork # # Set up a EVM env and run leap fork tests with websocket support -# This test is based on both nodeos_eos_evm_ws_test_basic & nodeos_short_fork_take_over_test +# This test is based on both nodeos_evm_ws_test_basic & nodeos_short_fork_take_over_test # # Need to install: # web3 - pip install web3 diff --git a/tests/nodeos_eos_evm_server.py b/tests/nodeos_evm_server.py similarity index 99% rename from tests/nodeos_eos_evm_server.py rename to tests/nodeos_evm_server.py index 42bcd53..e0063ca 100755 --- a/tests/nodeos_eos_evm_server.py +++ b/tests/nodeos_evm_server.py @@ -28,7 +28,7 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_server +# nodeos_evm_server # # Set up a EVM env # @@ -46,7 +46,7 @@ # # Example: # cd ~/ext/leap/build -# ~/ext/eos-evm/tests/leap/nodeos_eos_evm_server.py --evm-contract-root ~/ext/eos-evm/contract/build --leave-running +# ~/ext/eos-evm/tests/leap/nodeos_evm_server.py --evm-contract-root ~/ext/eos-evm/contract/build --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... diff --git a/tests/nodeos_eos_evm_server/CMakeLists.txt b/tests/nodeos_evm_server/CMakeLists.txt similarity index 100% rename from tests/nodeos_eos_evm_server/CMakeLists.txt rename to tests/nodeos_evm_server/CMakeLists.txt diff --git a/tests/nodeos_eos_evm_server/PERFORMANCE.md b/tests/nodeos_evm_server/PERFORMANCE.md similarity index 81% rename from tests/nodeos_eos_evm_server/PERFORMANCE.md rename to tests/nodeos_evm_server/PERFORMANCE.md index d3c6f4b..285df07 100644 --- a/tests/nodeos_eos_evm_server/PERFORMANCE.md +++ b/tests/nodeos_evm_server/PERFORMANCE.md @@ -45,10 +45,10 @@ cmake -DCMAKE_BUILD_TYPE=Release .. make -j4 ``` -### Setup nodeos_eos_evm_server.py python env +### Setup nodeos_evm_server.py python env ``` cd ~/evmperf/leap/build/tests -ln -s ~/evmperf/eos-evm/tests/leap/nodeos_eos_evm_server.py nodeos_eos_evm_server.py +ln -s ~/evmperf/eos-evm/tests/leap/nodeos_evm_server.py nodeos_evm_server.py sed -i 's/SYS/EOS/g' core_symbol.py python3 -m venv venv source venv/bin/activate @@ -57,16 +57,16 @@ pip install 'web3>=6' flask flask-cors ### Launch nodeos and deploy EVM contract -_use --use-eos-vm-oc=1 when launching **nodeos_eos_evm_server.py** if you want to measure OC performance_ +_use --use-eos-vm-oc=1 when launching **nodeos_evm_server.py** if you want to measure OC performance_ ``` cd ~/evmperf/leap/build/tests source venv/bin/activate cd .. -./tests/nodeos_eos_evm_server.py --leave-running --evm-contract-root ~/evmperf/eos-evm/contract/build +./tests/nodeos_evm_server.py --leave-running --evm-contract-root ~/evmperf/eos-evm/contract/build ``` -(_wait until nodeos_eos_evm_server start listening at localhost:5000_) +(_wait until nodeos_evm_server start listening at localhost:5000_) ### Launch evm-node ``` @@ -83,32 +83,32 @@ cd ~/evmperf/eos-evm/build/bin ### Install scripts dependencies ``` -cd ~/evmperf/eos-evm/tests/leap/nodeos_eos_evm_server +cd ~/evmperf/eos-evm/tests/leap/nodeos_evm_server yarn install ``` ### Deploy Uniswap V2 ``` -cd ~/evmperf/eos-evm/tests/leap/nodeos_eos_evm_server +cd ~/evmperf/eos-evm/tests/leap/nodeos_evm_server npx hardhat run scripts/deploy-uniswap.js ``` ### Deploy Recursive contract ``` -cd ~/evmperf/eos-evm/tests/leap/nodeos_eos_evm_server +cd ~/evmperf/eos-evm/tests/leap/nodeos_evm_server npx hardhat run scripts/deploy-recursive.js ``` ### Allow Uniswap router to transfer AAA tokens ``` -cd ~/evmperf/eos-evm/tests/leap/nodeos_eos_evm_server +cd ~/evmperf/eos-evm/tests/leap/nodeos_evm_server npx hardhat approve --erc20 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 --router 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 --amount 10000 ``` ### Tail logs _(separate console)_ ``` -cd ~/evmperf/eos-evm/tests/leap/nodeos_eos_evm_server +cd ~/evmperf/eos-evm/tests/leap/nodeos_evm_server ./extract-logtime-cmd.sh ~/evmperf/leap/build/var/lib/node_01/stderr.txt ``` diff --git a/tests/nodeos_eos_evm_server/README.md b/tests/nodeos_evm_server/README.md similarity index 100% rename from tests/nodeos_eos_evm_server/README.md rename to tests/nodeos_evm_server/README.md diff --git a/tests/nodeos_eos_evm_server/contracts/BlockNum.sol b/tests/nodeos_evm_server/contracts/BlockNum.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/BlockNum.sol rename to tests/nodeos_evm_server/contracts/BlockNum.sol diff --git a/tests/nodeos_eos_evm_server/contracts/Blockhash.sol b/tests/nodeos_evm_server/contracts/Blockhash.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/Blockhash.sol rename to tests/nodeos_evm_server/contracts/Blockhash.sol diff --git a/tests/nodeos_eos_evm_server/contracts/CMakeLists.txt b/tests/nodeos_evm_server/contracts/CMakeLists.txt similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/CMakeLists.txt rename to tests/nodeos_evm_server/contracts/CMakeLists.txt diff --git a/tests/nodeos_eos_evm_server/contracts/Eventor.sol b/tests/nodeos_evm_server/contracts/Eventor.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/Eventor.sol rename to tests/nodeos_evm_server/contracts/Eventor.sol diff --git a/tests/nodeos_eos_evm_server/contracts/Lock.sol b/tests/nodeos_evm_server/contracts/Lock.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/Lock.sol rename to tests/nodeos_evm_server/contracts/Lock.sol diff --git a/tests/nodeos_eos_evm_server/contracts/Recursive.sol b/tests/nodeos_evm_server/contracts/Recursive.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/Recursive.sol rename to tests/nodeos_evm_server/contracts/Recursive.sol diff --git a/tests/nodeos_eos_evm_server/contracts/Storage.sol b/tests/nodeos_evm_server/contracts/Storage.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/Storage.sol rename to tests/nodeos_evm_server/contracts/Storage.sol diff --git a/tests/nodeos_eos_evm_server/contracts/Token.sol b/tests/nodeos_evm_server/contracts/Token.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/Token.sol rename to tests/nodeos_evm_server/contracts/Token.sol diff --git a/tests/nodeos_eos_evm_server/contracts/WEOS.sol b/tests/nodeos_evm_server/contracts/WEOS.sol similarity index 100% rename from tests/nodeos_eos_evm_server/contracts/WEOS.sol rename to tests/nodeos_evm_server/contracts/WEOS.sol diff --git a/tests/nodeos_eos_evm_server/extract-logtime-cmd.sh b/tests/nodeos_evm_server/extract-logtime-cmd.sh similarity index 100% rename from tests/nodeos_eos_evm_server/extract-logtime-cmd.sh rename to tests/nodeos_evm_server/extract-logtime-cmd.sh diff --git a/tests/nodeos_eos_evm_server/hardhat.config.js b/tests/nodeos_evm_server/hardhat.config.js similarity index 100% rename from tests/nodeos_eos_evm_server/hardhat.config.js rename to tests/nodeos_evm_server/hardhat.config.js diff --git a/tests/nodeos_eos_evm_server/package.json b/tests/nodeos_evm_server/package.json similarity index 100% rename from tests/nodeos_eos_evm_server/package.json rename to tests/nodeos_evm_server/package.json diff --git a/tests/nodeos_eos_evm_server/performance-measurements-0.5.0.md b/tests/nodeos_evm_server/performance-measurements-0.5.0.md similarity index 100% rename from tests/nodeos_eos_evm_server/performance-measurements-0.5.0.md rename to tests/nodeos_evm_server/performance-measurements-0.5.0.md diff --git a/tests/nodeos_eos_evm_server/scripts/CMakeLists.txt b/tests/nodeos_evm_server/scripts/CMakeLists.txt similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/CMakeLists.txt rename to tests/nodeos_evm_server/scripts/CMakeLists.txt diff --git a/tests/nodeos_eos_evm_server/scripts/deploy-blockhash.js b/tests/nodeos_evm_server/scripts/deploy-blockhash.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy-blockhash.js rename to tests/nodeos_evm_server/scripts/deploy-blockhash.js diff --git a/tests/nodeos_eos_evm_server/scripts/deploy-blocknum.js b/tests/nodeos_evm_server/scripts/deploy-blocknum.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy-blocknum.js rename to tests/nodeos_evm_server/scripts/deploy-blocknum.js diff --git a/tests/nodeos_eos_evm_server/scripts/deploy-eventor.js b/tests/nodeos_evm_server/scripts/deploy-eventor.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy-eventor.js rename to tests/nodeos_evm_server/scripts/deploy-eventor.js diff --git a/tests/nodeos_eos_evm_server/scripts/deploy-recursive.js b/tests/nodeos_evm_server/scripts/deploy-recursive.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy-recursive.js rename to tests/nodeos_evm_server/scripts/deploy-recursive.js diff --git a/tests/nodeos_eos_evm_server/scripts/deploy-token.js b/tests/nodeos_evm_server/scripts/deploy-token.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy-token.js rename to tests/nodeos_evm_server/scripts/deploy-token.js diff --git a/tests/nodeos_eos_evm_server/scripts/deploy-uniswap.js b/tests/nodeos_evm_server/scripts/deploy-uniswap.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy-uniswap.js rename to tests/nodeos_evm_server/scripts/deploy-uniswap.js diff --git a/tests/nodeos_eos_evm_server/scripts/deploy.js b/tests/nodeos_evm_server/scripts/deploy.js similarity index 100% rename from tests/nodeos_eos_evm_server/scripts/deploy.js rename to tests/nodeos_evm_server/scripts/deploy.js diff --git a/tests/nodeos_eos_evm_server/yarn.lock b/tests/nodeos_evm_server/yarn.lock similarity index 100% rename from tests/nodeos_eos_evm_server/yarn.lock rename to tests/nodeos_evm_server/yarn.lock diff --git a/tests/nodeos_eos_evm_test.py b/tests/nodeos_evm_test.py similarity index 99% rename from tests/nodeos_eos_evm_test.py rename to tests/nodeos_evm_test.py index 9ad9cc5..4652793 100755 --- a/tests/nodeos_eos_evm_test.py +++ b/tests/nodeos_evm_test.py @@ -36,7 +36,7 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_test +# nodeos_evm_test # # Set up a EVM env and run simple tests. # @@ -49,11 +49,11 @@ # # Example (Running with leap src build): # cd ~/leap/build -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Example (Running with leap dev-install): # ln -s /usr/share/leap_testing/tests/TestHarness /usr/lib/python3/dist-packages/TestHarness -# ~/evm-node/build/tests/nodeos_eos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running +# ~/evm-node/build/tests/nodeos_evm_test.py --evm-contract-root ~/eos-evm/build --evm-build-root ~/evm-node/build --use-miner ~/evm-miner --leave-running # # Launches wallet at port: 9899 # Example: bin/cleos --wallet-url http://127.0.0.1:9899 ... diff --git a/tests/nodeos_eos_evm_ws_test_basic.py b/tests/nodeos_evm_ws_test_basic.py similarity index 99% rename from tests/nodeos_eos_evm_ws_test_basic.py rename to tests/nodeos_evm_ws_test_basic.py index e41f842..397c408 100755 --- a/tests/nodeos_eos_evm_ws_test_basic.py +++ b/tests/nodeos_evm_ws_test_basic.py @@ -36,7 +36,7 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_ws_test_basic +# nodeos_evm_ws_test_basic # # Set up a EVM env and run simple tests with websocket support # @@ -48,7 +48,7 @@ # --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_basic.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_evm_ws_test_basic.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### diff --git a/tests/nodeos_eos_evm_ws_test_fork.py b/tests/nodeos_evm_ws_test_fork.py similarity index 99% rename from tests/nodeos_eos_evm_ws_test_fork.py rename to tests/nodeos_evm_ws_test_fork.py index c4b6c47..30e3a10 100755 --- a/tests/nodeos_eos_evm_ws_test_fork.py +++ b/tests/nodeos_evm_ws_test_fork.py @@ -36,10 +36,10 @@ from antelope_name import convert_name_to_value ############################################################### -# nodeos_eos_evm_ws_test_fork +# nodeos_evm_ws_test_fork # # Set up a EVM env and run leap fork tests with websocket support -# This test is based on both nodeos_eos_evm_ws_test_basic & nodeos_short_fork_take_over_test +# This test is based on both nodeos_evm_ws_test_basic & nodeos_short_fork_take_over_test # # Need to install: # web3 - pip install web3 @@ -49,7 +49,7 @@ # --evm-contract-root should point to root of EVM contract build dir # # cd build/tests -# ./nodeos_eos_evm_ws_test_fork.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v +# ./nodeos_evm_ws_test_fork.py --evm-contract-root ~/workspaces/TrustEVM/build --evm-build-root ~/workspaces/evm-node/build -v # # ############################################################### From 2ec21be1a02b3d242264493f5c53f48e12590ea2 Mon Sep 17 00:00:00 2001 From: yarkin Date: Tue, 3 Jun 2025 23:00:44 +0800 Subject: [PATCH 18/18] Change test name again as we decided to update the CI. --- .github/workflows/node.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index c6c391d..6794c1a 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -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: @@ -172,7 +172,7 @@ jobs: 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: