Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: RPC integration tests on local E3 datastore #2767

Merged
merged 13 commits into from
Mar 5, 2025
27 changes: 14 additions & 13 deletions .github/workflows/rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,29 @@ jobs:
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true

- name: Wait for port 8545 to be opened
- name: Start Silkworm RpcDaemon
working-directory: ${{runner.workspace}}/silkworm/build/cmd
run: |
${{runner.workspace}}/silkworm/.github/workflows/start_integration_rpcdaemon.sh $ERIGON_DATA_DIR ./jwt.hex &
RPC_DAEMON_PID=$!
echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV

- name: Wait for port 51515 to be opened
run: |
api_port=51515
for i in {1..30}; do
if nc -z localhost 8545; then
echo "Port 8545 is open"
if nc -z localhost $api_port; then
echo "Port $api_port is open"
break
fi
echo "Waiting for port 8545 to open..."
echo "Waiting for port $api_port to open..."
sleep 10
done
if ! nc -z localhost 8545; then
echo "Port 8545 did not open in time"
if ! nc -z localhost $api_port; then
echo "Port $api_port did not open in time"
exit 1
fi

- name: Start Silkworm RpcDaemon
working-directory: ${{runner.workspace}}/silkworm/build/cmd
run: |
${{runner.workspace}}/silkworm/.github/workflows/start_integration_rpcdaemon.sh $ERIGON_DATA_DIR ./jwt.hex &
RPC_DAEMON_PID=$!
echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV

- name: Run RPC Integration Tests
id: test_step
run: |
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ rm -rf ./mainnet/results/

# eth_getLogs: waiting erigon fix on wrong FirstLogIndex in ReceiptsDomain
# debug_traceBlockByNumber[24-28]: response different wrt erigon
python3 ./run_tests.py --continue --blockchain mainnet --jwt "$2" --display-only-fail --json-diff --port 51515 --transport_type http,websocket -x \
eth_getLogs/test_16,\
eth_getLogs/test_17,\
eth_getLogs/test_18,\
eth_getLogs/test_19,\
eth_getLogs/test_20,\
python3 ./run_tests.py --continue --blockchain mainnet --jwt "$2" --display-only-fail --json-diff --port 51515 --transport_type http -x \
debug_accountRange,\
debug_getModifiedAccountsBy,\
debug_storageRangeAt,\
debug_traceBlockByHash/test_10,\
debug_traceBlockByNumber/test_10,\
debug_traceBlockByNumber/test_24,\
Expand All @@ -39,10 +37,17 @@ debug_traceTransaction/test_90,\
debug_traceTransaction/test_91,\
debug_traceTransaction/test_92,\
debug_traceTransaction/test_96,\
engine_,\
erigon_getBalanceChangesInBlock,\
eth_getLogs/test_16,\
eth_getLogs/test_17,\
eth_getLogs/test_18,\
eth_getLogs/test_19,\
eth_getLogs/test_20,\
parity_listStorageKeys,\
trace_replayBlockTransactions/test_29,\
trace_transaction/test_44,\
trace_transaction/test_47,\
engine_
trace_transaction/test_47

failed_test=$?

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/start_integration_rpcdaemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ if [ "$#" -ne 2 ]; then
fi

echo "Silkworm RpcDaemon starting..."
./rpcdaemon --eth.addr 127.0.0.1:51515 --engine.addr 127.0.0.1:51516 --api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net --log.verbosity 1 --erigon_compatibility --jwt "$2" --skip_protocol_check --ws &
./rpcdaemon \
--eth.addr 127.0.0.1:51515 \
--engine.addr 127.0.0.1:51516 \
--api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net \
--log.verbosity info \
--erigon_compatibility \
--datadir "$1" \
--jwt "$2" \
--skip_protocol_check \
--ws &


PID=$!
Expand Down
Loading