Skip to content

Commit a12442c

Browse files
authored
ci: RPC integration tests on local E3 datastore (#2767)
1 parent c05e57f commit a12442c

File tree

3 files changed

+37
-22
lines changed

3 files changed

+37
-22
lines changed

.github/workflows/rpc-integration-tests.yml

+14-13
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,29 @@ jobs:
5656
run: |
5757
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
5858
59-
- name: Wait for port 8545 to be opened
59+
- name: Start Silkworm RpcDaemon
60+
working-directory: ${{runner.workspace}}/silkworm/build/cmd
61+
run: |
62+
${{runner.workspace}}/silkworm/.github/workflows/start_integration_rpcdaemon.sh $ERIGON_DATA_DIR ./jwt.hex &
63+
RPC_DAEMON_PID=$!
64+
echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV
65+
66+
- name: Wait for port 51515 to be opened
6067
run: |
68+
api_port=51515
6169
for i in {1..30}; do
62-
if nc -z localhost 8545; then
63-
echo "Port 8545 is open"
70+
if nc -z localhost $api_port; then
71+
echo "Port $api_port is open"
6472
break
6573
fi
66-
echo "Waiting for port 8545 to open..."
74+
echo "Waiting for port $api_port to open..."
6775
sleep 10
6876
done
69-
if ! nc -z localhost 8545; then
70-
echo "Port 8545 did not open in time"
77+
if ! nc -z localhost $api_port; then
78+
echo "Port $api_port did not open in time"
7179
exit 1
7280
fi
7381
74-
- name: Start Silkworm RpcDaemon
75-
working-directory: ${{runner.workspace}}/silkworm/build/cmd
76-
run: |
77-
${{runner.workspace}}/silkworm/.github/workflows/start_integration_rpcdaemon.sh $ERIGON_DATA_DIR ./jwt.hex &
78-
RPC_DAEMON_PID=$!
79-
echo "RPC_DAEMON_PID=$RPC_DAEMON_PID" >> $GITHUB_ENV
80-
8182
- name: Run RPC Integration Tests
8283
id: test_step
8384
run: |

.github/workflows/run_integration_tests.sh

+13-8
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ rm -rf ./mainnet/results/
1414

1515
# eth_getLogs: waiting erigon fix on wrong FirstLogIndex in ReceiptsDomain
1616
# debug_traceBlockByNumber[24-28]: response different wrt erigon
17-
python3 ./run_tests.py --continue --blockchain mainnet --jwt "$2" --display-only-fail --json-diff --port 51515 --transport_type http,websocket -x \
18-
eth_getLogs/test_16,\
19-
eth_getLogs/test_17,\
20-
eth_getLogs/test_18,\
21-
eth_getLogs/test_19,\
22-
eth_getLogs/test_20,\
17+
python3 ./run_tests.py --continue --blockchain mainnet --jwt "$2" --display-only-fail --json-diff --port 51515 --transport_type http -x \
18+
debug_accountRange,\
19+
debug_getModifiedAccountsBy,\
20+
debug_storageRangeAt,\
2321
debug_traceBlockByHash/test_10,\
2422
debug_traceBlockByNumber/test_10,\
2523
debug_traceBlockByNumber/test_24,\
@@ -39,10 +37,17 @@ debug_traceTransaction/test_90,\
3937
debug_traceTransaction/test_91,\
4038
debug_traceTransaction/test_92,\
4139
debug_traceTransaction/test_96,\
40+
engine_,\
41+
erigon_getBalanceChangesInBlock,\
42+
eth_getLogs/test_16,\
43+
eth_getLogs/test_17,\
44+
eth_getLogs/test_18,\
45+
eth_getLogs/test_19,\
46+
eth_getLogs/test_20,\
47+
parity_listStorageKeys,\
4248
trace_replayBlockTransactions/test_29,\
4349
trace_transaction/test_44,\
44-
trace_transaction/test_47,\
45-
engine_
50+
trace_transaction/test_47
4651

4752
failed_test=$?
4853

.github/workflows/start_integration_rpcdaemon.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ if [ "$#" -ne 2 ]; then
1111
fi
1212

1313
echo "Silkworm RpcDaemon starting..."
14-
./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 &
14+
./rpcdaemon \
15+
--eth.addr 127.0.0.1:51515 \
16+
--engine.addr 127.0.0.1:51516 \
17+
--api admin,debug,eth,parity,erigon,trace,web3,txpool,ots,net \
18+
--log.verbosity info \
19+
--erigon_compatibility \
20+
--datadir "$1" \
21+
--jwt "$2" \
22+
--skip_protocol_check \
23+
--ws &
1524

1625

1726
PID=$!

0 commit comments

Comments
 (0)