From b1c4b7ac8a5d8a9e7373258c5c65a5dd5fb38b9c Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 21 Feb 2025 13:19:08 +0100 Subject: [PATCH] Move geth-diff -> eth-rpc rename missing one --- README.md | 2 +- {geth-diff => eth-rpc}/.gitignore | 3 ++ {geth-diff => eth-rpc}/.prettierrc.json | 0 {geth-diff => eth-rpc}/.solhint.json | 0 {geth-diff => eth-rpc}/abi/.gitkeep | 0 {geth-diff => eth-rpc}/contracts/Errors.sol | 0 {geth-diff => eth-rpc}/contracts/Event.sol | 0 {geth-diff => eth-rpc}/contracts/Flipper.sol | 0 .../contracts/PiggyBank.sol | 0 {geth-diff => eth-rpc}/contracts/Tracing.sol | 0 {geth-diff => eth-rpc}/evm/.gitkeep | 0 {geth-diff => eth-rpc}/package-lock.json | 0 {geth-diff => eth-rpc}/package.json | 0 {geth-diff => eth-rpc}/pvm/.gitkeep | 0 {geth-diff => eth-rpc}/src/build-contracts.ts | 0 .../src/fixtures/debug_traceCall.json | 0 .../src/fixtures/trace_block.json | 0 .../src/fixtures/trace_transaction.json | 0 {geth-diff => eth-rpc}/src/geth-diff.test.ts | 0 {geth-diff => eth-rpc}/src/solc.d.ts | 0 {geth-diff => eth-rpc}/src/spammer.ts | 0 {geth-diff => eth-rpc}/src/util.ts | 0 {geth-diff => eth-rpc}/tsconfig.json | 0 {geth-diff => eth-rpc}/vitest.config.ts | 0 {geth-diff => eth-rpc}/vitest.workspace.ts | 2 +- init.sh | 30 +++++++++---------- 26 files changed, 20 insertions(+), 17 deletions(-) rename {geth-diff => eth-rpc}/.gitignore (93%) rename {geth-diff => eth-rpc}/.prettierrc.json (100%) rename {geth-diff => eth-rpc}/.solhint.json (100%) rename {geth-diff => eth-rpc}/abi/.gitkeep (100%) rename {geth-diff => eth-rpc}/contracts/Errors.sol (100%) rename {geth-diff => eth-rpc}/contracts/Event.sol (100%) rename {geth-diff => eth-rpc}/contracts/Flipper.sol (100%) rename {geth-diff => eth-rpc}/contracts/PiggyBank.sol (100%) rename {geth-diff => eth-rpc}/contracts/Tracing.sol (100%) rename {geth-diff => eth-rpc}/evm/.gitkeep (100%) rename {geth-diff => eth-rpc}/package-lock.json (100%) rename {geth-diff => eth-rpc}/package.json (100%) rename {geth-diff => eth-rpc}/pvm/.gitkeep (100%) rename {geth-diff => eth-rpc}/src/build-contracts.ts (100%) rename {geth-diff => eth-rpc}/src/fixtures/debug_traceCall.json (100%) rename {geth-diff => eth-rpc}/src/fixtures/trace_block.json (100%) rename {geth-diff => eth-rpc}/src/fixtures/trace_transaction.json (100%) rename {geth-diff => eth-rpc}/src/geth-diff.test.ts (100%) rename {geth-diff => eth-rpc}/src/solc.d.ts (100%) rename {geth-diff => eth-rpc}/src/spammer.ts (100%) rename {geth-diff => eth-rpc}/src/util.ts (100%) rename {geth-diff => eth-rpc}/tsconfig.json (100%) rename {geth-diff => eth-rpc}/vitest.config.ts (100%) rename {geth-diff => eth-rpc}/vitest.workspace.ts (79%) diff --git a/README.md b/README.md index 1196ea1..37bc027 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ var is set automatically depending on the chain. As for `TEST`, you can specify either `--matter-labs` to run the `matter-labs` tests, `--open-zeppelin` to run the openzeppelin standard tests (currently disabled) -or `--geth-diff` to run the geth differential tests. Not specifying the test will +or `--eth-rpc` to run the eth-rpc tests. Not specifying the test will result in all suites being executed consecutively. When running the Kitchensink node, you must specify the `NODE_PATH`, `ADAPTER_PATH` and diff --git a/geth-diff/.gitignore b/eth-rpc/.gitignore similarity index 93% rename from geth-diff/.gitignore rename to eth-rpc/.gitignore index 235d1b2..82054e2 100644 --- a/geth-diff/.gitignore +++ b/eth-rpc/.gitignore @@ -1,6 +1,9 @@ # Logs logs *.log +abi/* +pvm/* +evm/* npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/geth-diff/.prettierrc.json b/eth-rpc/.prettierrc.json similarity index 100% rename from geth-diff/.prettierrc.json rename to eth-rpc/.prettierrc.json diff --git a/geth-diff/.solhint.json b/eth-rpc/.solhint.json similarity index 100% rename from geth-diff/.solhint.json rename to eth-rpc/.solhint.json diff --git a/geth-diff/abi/.gitkeep b/eth-rpc/abi/.gitkeep similarity index 100% rename from geth-diff/abi/.gitkeep rename to eth-rpc/abi/.gitkeep diff --git a/geth-diff/contracts/Errors.sol b/eth-rpc/contracts/Errors.sol similarity index 100% rename from geth-diff/contracts/Errors.sol rename to eth-rpc/contracts/Errors.sol diff --git a/geth-diff/contracts/Event.sol b/eth-rpc/contracts/Event.sol similarity index 100% rename from geth-diff/contracts/Event.sol rename to eth-rpc/contracts/Event.sol diff --git a/geth-diff/contracts/Flipper.sol b/eth-rpc/contracts/Flipper.sol similarity index 100% rename from geth-diff/contracts/Flipper.sol rename to eth-rpc/contracts/Flipper.sol diff --git a/geth-diff/contracts/PiggyBank.sol b/eth-rpc/contracts/PiggyBank.sol similarity index 100% rename from geth-diff/contracts/PiggyBank.sol rename to eth-rpc/contracts/PiggyBank.sol diff --git a/geth-diff/contracts/Tracing.sol b/eth-rpc/contracts/Tracing.sol similarity index 100% rename from geth-diff/contracts/Tracing.sol rename to eth-rpc/contracts/Tracing.sol diff --git a/geth-diff/evm/.gitkeep b/eth-rpc/evm/.gitkeep similarity index 100% rename from geth-diff/evm/.gitkeep rename to eth-rpc/evm/.gitkeep diff --git a/geth-diff/package-lock.json b/eth-rpc/package-lock.json similarity index 100% rename from geth-diff/package-lock.json rename to eth-rpc/package-lock.json diff --git a/geth-diff/package.json b/eth-rpc/package.json similarity index 100% rename from geth-diff/package.json rename to eth-rpc/package.json diff --git a/geth-diff/pvm/.gitkeep b/eth-rpc/pvm/.gitkeep similarity index 100% rename from geth-diff/pvm/.gitkeep rename to eth-rpc/pvm/.gitkeep diff --git a/geth-diff/src/build-contracts.ts b/eth-rpc/src/build-contracts.ts similarity index 100% rename from geth-diff/src/build-contracts.ts rename to eth-rpc/src/build-contracts.ts diff --git a/geth-diff/src/fixtures/debug_traceCall.json b/eth-rpc/src/fixtures/debug_traceCall.json similarity index 100% rename from geth-diff/src/fixtures/debug_traceCall.json rename to eth-rpc/src/fixtures/debug_traceCall.json diff --git a/geth-diff/src/fixtures/trace_block.json b/eth-rpc/src/fixtures/trace_block.json similarity index 100% rename from geth-diff/src/fixtures/trace_block.json rename to eth-rpc/src/fixtures/trace_block.json diff --git a/geth-diff/src/fixtures/trace_transaction.json b/eth-rpc/src/fixtures/trace_transaction.json similarity index 100% rename from geth-diff/src/fixtures/trace_transaction.json rename to eth-rpc/src/fixtures/trace_transaction.json diff --git a/geth-diff/src/geth-diff.test.ts b/eth-rpc/src/geth-diff.test.ts similarity index 100% rename from geth-diff/src/geth-diff.test.ts rename to eth-rpc/src/geth-diff.test.ts diff --git a/geth-diff/src/solc.d.ts b/eth-rpc/src/solc.d.ts similarity index 100% rename from geth-diff/src/solc.d.ts rename to eth-rpc/src/solc.d.ts diff --git a/geth-diff/src/spammer.ts b/eth-rpc/src/spammer.ts similarity index 100% rename from geth-diff/src/spammer.ts rename to eth-rpc/src/spammer.ts diff --git a/geth-diff/src/util.ts b/eth-rpc/src/util.ts similarity index 100% rename from geth-diff/src/util.ts rename to eth-rpc/src/util.ts diff --git a/geth-diff/tsconfig.json b/eth-rpc/tsconfig.json similarity index 100% rename from geth-diff/tsconfig.json rename to eth-rpc/tsconfig.json diff --git a/geth-diff/vitest.config.ts b/eth-rpc/vitest.config.ts similarity index 100% rename from geth-diff/vitest.config.ts rename to eth-rpc/vitest.config.ts diff --git a/geth-diff/vitest.workspace.ts b/eth-rpc/vitest.workspace.ts similarity index 79% rename from geth-diff/vitest.workspace.ts rename to eth-rpc/vitest.workspace.ts index 046fe42..a407535 100644 --- a/geth-diff/vitest.workspace.ts +++ b/eth-rpc/vitest.workspace.ts @@ -5,7 +5,7 @@ export default defineWorkspace([ extends: './vitest.config.ts', test: { name: 'unit', - include: ['./src/geth-diff.test.ts'], + include: ['./src/*.test.ts'], }, }, ]) diff --git a/init.sh b/init.sh index 2cc8ddf..db66c93 100755 --- a/init.sh +++ b/init.sh @@ -79,13 +79,13 @@ run_matter_labs_tests() { # parse_hardhat_test_results "../test-logs/open-zeppelin-tests.log" # } -run_geth_diff_tests() { - echo "Running Geth Differential Tests" && - cd ./geth-diff && +run_eth_rpc_tests() { + echo "Running eth-rpc tests" && + cd ./eth-rpc && npm install && echo "y" | npm run build && - START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/geth-diff-tests.log" 2>&1 - parse_geth_diff_test_results "../test-logs/geth-diff-tests.log" + START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/eth-rpc-tests.log" 2>&1 + parse_eth_rpc_test_results "../test-logs/eth-rpc-tests.log" } run_all_tests() { @@ -125,12 +125,12 @@ run_all_tests() { # cd .. - echo "Running Geth Differential Tests" && - cd ./geth-diff && + echo "Running eth-rpc tests" && + cd ./eth-rpc && npm install && echo "y" | npm run build && - START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/geth-diff-tests.log" 2>&1 - parse_geth_diff_test_results "../test-logs/geth-diff-tests.log" + START_GETH=true START_SUBSTRATE_NODE=true START_ETH_RPC=true npm run test-init >".$LOG_DIR/eth-rpc-tests.log" 2>&1 + parse_eth_rpc_test_results "../test-logs/eth-rpc-tests.log" echo "Test Run Complete" } @@ -153,7 +153,7 @@ parse_hardhat_test_results() { echo "Total: $total | Passed: $passed | Failed: $failed" } -parse_geth_diff_test_results() { +parse_eth_rpc_test_results() { log_file=$1 passed=$(grep -o 'Tests [0-9]\+ passed' "$log_file" | awk '{print $2}') failed=$(grep -o 'Tests [0-9]\+ failed' "$log_file" | awk '{print $2}') @@ -274,7 +274,7 @@ case "$chain" in --ethereum) echo "Cleaning up" rm -rf ./output-logs/geth-output.log - if [ "${tests}" = "--geth-diff" ]; then + if [ "${tests}" = "--eth-rpc" ]; then echo "Starting Geth Ethereum Node" else echo "Starting Geth Ethereum Node" @@ -357,8 +357,8 @@ case "$chain" in # kill -9 $(lsof -t -i:30304) # echo "Geth Ethereum Node Stopped" # ;; - --geth-diff) - run_geth_diff_tests + --eth-rpc) + run_eth_rpc_tests sleep 1 ;; *) @@ -430,8 +430,8 @@ case "$chain" in # --open-zeppelin) # run_open_zeppelin_tests # ;; - --geth-diff) - run_geth_diff_tests + --eth-rpc) + run_eth_rpc_tests sleep 1 ;; *)