Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
6a6296b
feat: start adding tests
eniko1556 Jul 5, 2024
68d5b45
fix: process killing
eniko1556 Jul 5, 2024
8247940
test: mainnet client tests
eniko1556 Jul 8, 2024
2fac3ed
refactor: simplify tests
eniko1556 Jul 8, 2024
a33972f
feat: add github workflow for tests
eniko1556 Jul 8, 2024
3786cca
chore: modify tests
eniko1556 Jul 8, 2024
c3a9ae9
fix: add sudo
eniko1556 Jul 8, 2024
364f799
fix: bad subst
eniko1556 Jul 8, 2024
1896c45
chore: add CI echo
eniko1556 Jul 8, 2024
cd7bdce
fix: add packages deps to CI
eniko1556 Jul 8, 2024
6f25627
fix: dotnet host version
eniko1556 Jul 8, 2024
3b5be18
fix: dotnet
eniko1556 Jul 8, 2024
0bc6723
fix: remove openjdk
eniko1556 Jul 8, 2024
c99a69f
fix: add java to PATH
eniko1556 Jul 8, 2024
c628c2a
fix: add java to PATH
eniko1556 Jul 8, 2024
cbdd3ed
fix: add java to PATH
eniko1556 Jul 8, 2024
6c9991e
remove jre
eniko1556 Jul 8, 2024
4eedbe5
remove temurin java
eniko1556 Jul 8, 2024
fca09f1
remove temurin java
eniko1556 Jul 8, 2024
c7261c5
remove temurin java
eniko1556 Jul 8, 2024
e48195d
remove temurin java
eniko1556 Jul 8, 2024
172dfaa
fix: use java from marketplace
eniko1556 Jul 8, 2024
6efa3fb
feat: reenable other tests
eniko1556 Jul 8, 2024
fe866dc
fix: CI issues
eniko1556 Jul 8, 2024
188475f
chore: update cache, as it seem lodestar and prysm is not installed o…
eniko1556 Jul 8, 2024
2d61130
fix: change test order because of prysm test
eniko1556 Jul 8, 2024
d548e03
feat: add other el clien tests
eniko1556 Jul 8, 2024
2e6fffb
fix: nethermind ci problem
eniko1556 Jul 8, 2024
a565b0e
fix: failing prysm tests
eniko1556 Jul 8, 2024
b1ffd29
chore: try execute install script if that solves the package install …
eniko1556 Jul 8, 2024
1bfd82a
chore: logging for nethermind
eniko1556 Jul 8, 2024
ab81693
chore: install nethermind from package repo
eniko1556 Jul 8, 2024
d38bb2d
fix: use different apt cacher
eniko1556 Jul 9, 2024
60ee81a
fix: add version to apt-cache version
eniko1556 Jul 9, 2024
f4e730e
chore: try apt-deb-cache
eniko1556 Jul 9, 2024
6efa6f3
fix: latests version to v0.1
eniko1556 Jul 9, 2024
1ff199f
update version
eniko1556 Jul 9, 2024
bce6b4c
fix: inline action.yml
eniko1556 Jul 9, 2024
825fae4
fix: inline action.yml
eniko1556 Jul 9, 2024
5c21fa4
fix: inline action.yml
eniko1556 Jul 9, 2024
1bb47bc
fix: inline action.yml
eniko1556 Jul 9, 2024
8308081
fix: inline action.yml
eniko1556 Jul 9, 2024
b82c60c
fix: inline action.yml
eniko1556 Jul 9, 2024
e2869c4
fix: inline action.yml
eniko1556 Jul 9, 2024
383762c
fix: inline action.yml
eniko1556 Jul 9, 2024
e4fd0bc
fix: inline action.yml
eniko1556 Jul 9, 2024
fae01bf
fix: error logging
eniko1556 Jul 9, 2024
49afc59
fix: error logging
eniko1556 Jul 9, 2024
051c709
fix: package download
eniko1556 Jul 9, 2024
4528cf6
fix: package download
eniko1556 Jul 9, 2024
e2d9af3
fix: package-versions.txt
eniko1556 Jul 9, 2024
23a0cd7
fix: package-versions.txt
eniko1556 Jul 9, 2024
c39951f
feat: use reusable action.yml
eniko1556 Jul 9, 2024
9f39f35
simplify code
eniko1556 Jul 9, 2024
2947ef5
fix: cache restore
eniko1556 Jul 9, 2024
d91e25c
fix: cache restore
eniko1556 Jul 9, 2024
79be461
feat: reenable other el clients
eniko1556 Jul 9, 2024
9d924cc
feat: add tests for holesky and sepolia
eniko1556 Jul 9, 2024
ced48ef
fix: increase time for holesky and sepolia
eniko1556 Jul 9, 2024
38cffbc
feat: add buggy tests for ephemery and testnet
eniko1556 Jul 9, 2024
ba4807d
remove d file
eniko1556 Jul 9, 2024
8284850
chore: bump version eth-pkg/apt-deb-cache@v0.2.3
eniko1556 Jul 9, 2024
ab1218a
chore: bump version eth-pkg/apt-deb-cache@v0.2.4
eniko1556 Jul 10, 2024
6bc2325
fix: lodestar hanging in tests
eniko1556 Jul 10, 2024
d20d4bc
update tests
eniko1556 Jul 10, 2024
12ad38d
feat: use eth api endpoint for testing clients
eniko1556 Jul 11, 2024
8f20cf7
fix: change sync test and increase time
eniko1556 Jul 11, 2024
aa56aa3
feat: besu pairs work on localhost
eniko1556 Jul 11, 2024
bafd344
feat: change el test to be syncing check
eniko1556 Jul 11, 2024
9f92fb8
feat: increase wait_time
eniko1556 Jul 11, 2024
316390e
feat: increase wait_time
eniko1556 Jul 11, 2024
a00adda
fix: wrong test
eniko1556 Jul 11, 2024
6a53d35
feat: enable sepolia & holesky test, disable el sync test
eniko1556 Jul 11, 2024
6f9a4ef
update readme
eniko1556 Jul 11, 2024
a2172e0
enable http api for holesky and sepolia
eniko1556 Jul 11, 2024
1db6c20
feat: enable ephmery and fix network_id
eniko1556 Jul 11, 2024
a0fede5
feat: add testnet and ephemery actions.yml
eniko1556 Jul 11, 2024
788fb92
fix: wrong holesky network id
eniko1556 Jul 11, 2024
d5df775
fix: sepolia id
eniko1556 Jul 11, 2024
c8ddee1
update tests
eniko1556 Jul 11, 2024
055dce0
only run holesky tests
eniko1556 Jul 11, 2024
dc5d7a6
check which client are not syncing
eniko1556 Jul 12, 2024
687743c
feat: use checkpoint sync for nimbus-eth2
eniko1556 Jul 12, 2024
e853fe2
fix: nimbus beacon_url
eniko1556 Jul 12, 2024
97f4c76
nimbus-eth2 sync is not working
eniko1556 Jul 12, 2024
cf8abcc
fix: teku sync issue
eniko1556 Jul 12, 2024
4bc7362
fix: workaround of nimbus-eth2 timeout
eniko1556 Jul 16, 2024
39cae86
chore: add logging for nimbus-eth2 tests
eniko1556 Jul 16, 2024
a483ff0
fix: typo
eniko1556 Jul 16, 2024
c06350e
chore: falling tests on ci
eniko1556 Jul 16, 2024
320356d
chore: falling tests on ci
eniko1556 Jul 16, 2024
c092b7d
fix: nimbus missing from path
eniko1556 Jul 16, 2024
ebcf492
reenable mainnet tests
eniko1556 Jul 16, 2024
03c4925
check: holesky and sepolia test
eniko1556 Jul 16, 2024
0f8415b
increase sepolia sync time
eniko1556 Jul 16, 2024
4ae9339
increase time
eniko1556 Jul 16, 2024
bd22a52
modify tests on sepolia
eniko1556 Jul 16, 2024
88d919c
modify tests on sepolia
eniko1556 Jul 16, 2024
6fa829c
modify tests on sepolia
eniko1556 Jul 16, 2024
350cdfb
change lighthouse test
eniko1556 Jul 16, 2024
d5d212e
fix: some of the tests are not syncing
eniko1556 Jul 16, 2024
395cab8
fix: test
eniko1556 Jul 16, 2024
9c95598
fix: typo
eniko1556 Jul 16, 2024
3bf204f
fix: besu tests timeout
eniko1556 Jul 16, 2024
0711f3f
fix: accept wrong sync status on sepolia, as node are syncing
eniko1556 Jul 17, 2024
9dc07fb
chore: check holesky tests
eniko1556 Jul 17, 2024
858980b
fix: holesky endpoint was timing out
eniko1556 Jul 17, 2024
d9a85fe
fix: disable external-beacon-api-url for holesky
eniko1556 Jul 17, 2024
6783fe9
chore: holesky tests are green, check ephemery tests
eniko1556 Jul 17, 2024
2878a19
chore: disable some tests
eniko1556 Jul 17, 2024
78156f4
fix: testnet download
eniko1556 Jul 17, 2024
ed13cfe
fix: wait until state downloads
eniko1556 Jul 17, 2024
9f0c10b
fix: wait until state downloads
eniko1556 Jul 17, 2024
974ee15
chore: add error logging
eniko1556 Jul 17, 2024
684c617
fix: ephemery tests
eniko1556 Jul 17, 2024
d949d4e
chore: reenable some of the tests
eniko1556 Jul 17, 2024
fd89cab
chore: special case for geth/erigon and fix nethermind api on epherry
eniko1556 Jul 17, 2024
c62e3ed
chore: test localnet
eniko1556 Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/testnet_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: testnet tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
besu:
runs-on: ubuntu-24.04
strategy:
matrix:
cl_name:
- lighthouse
- lodestar
- nimbus-eth2
- prysm
- teku
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: ./node-test
with:
network: testnet
el_name: besu
cl_name: ${{matrix.cl_name}}
# erigon:
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# cl_name:
# - lighthouse
# - lodestar
# - nimbus-eth2
# - prysm
# - teku
# fail-fast: false
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - uses: ./node-test
# with:
# network: testnet
# el_name: erigon
# cl_name: ${{matrix.cl_name}}
# geth:
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# cl_name:
# - lighthouse
# - lodestar
# - nimbus-eth2
# - prysm
# - teku
# fail-fast: false
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - uses: ./node-test
# with:
# network: testnet
# el_name: geth
# cl_name: ${{matrix.cl_name}}

# nethermind:
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# cl_name:
# - lighthouse
# - lodestar
# - nimbus-eth2
# - prysm
# - teku
# fail-fast: false
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - uses: ./node-test
# with:
# network: testnet
# el_name: nethermind
# cl_name: ${{matrix.cl_name}}
# reth:
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# cl_name:
# - lighthouse
# - lodestar
# - nimbus-eth2
# - prysm
# - teku
# fail-fast: false
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - uses: ./node-test
# with:
# networK: testnet
# el_name: reth
# cl_name: ${{matrix.cl_name}}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# run-a-node

[![mainnet](https://github.com/eth-pkg/run-a-node/actions/workflows/mainnet_tests.yml/badge.svg)](https://github.com/eth-pkg/run-a-node/actions/workflows/mainnet_tests.yml)
[![holesky](https://github.com/eth-pkg/run-a-node/actions/workflows/holesky_tests.yml/badge.svg)](https://github.com/eth-pkg/run-a-node/actions/workflows/holesky_tests.yml)
[![sepolia](https://github.com/eth-pkg/run-a-node/actions/workflows/sepolia_tests.yml/badge.svg)](https://github.com/eth-pkg/run-a-node/actions/workflows/sepolia_tests.yml)

[![testnet](https://github.com/eth-pkg/run-a-node/actions/workflows/testnet_tests.yml/badge.svg)](https://github.com/eth-pkg/run-a-node/actions/workflows/testnet_tests.yml)
[![ephemery](https://github.com/eth-pkg/run-a-node/actions/workflows/ephemery_tests.yml/badge.svg)](https://github.com/eth-pkg/run-a-node/actions/workflows/ephemery_tests.yml)

This repository features two main components: the `run-a-node` top-level node running script and the `run-a-client` standardized script. The `run-a-client` script is designed to run each client uniformly, respecting each client's unique options while providing a minimal abstraction layer. This allows users to easily run clients without delving into detailed configurations until they are ready to modify specific config values.

Options are moved into configuration files, which are provided through CLI variables, ensuring a consistent format for each client. However, specific client configuration files can still be used if needed.
Expand All @@ -10,6 +17,7 @@ This repository was created as a result of the `eth-nodes` Debian packaging proj

**NOTE:** This repository is under active development. The code can change drastically, and bugs should be expected.


## Running a Client Pair

Open two terminals and execute the following commands:
Expand Down Expand Up @@ -39,3 +47,23 @@ The available options for both `run-a-client` and `run-a-node` scripts are:
- `<network>`: ephemery, holesky, mainnet, sepolia, testnet
- `<consensus_client>`: lighthouse, lodestar, nimbus-eth2, prsym, teku
- `<execution_client>`: besu, erigon, geth, nethermind, reth


## Running tests


```bash
bats --show-output-of-passing-tests tests/test_<network>.bats
```

If you want to filter by client or client pair, (timeout is based on how slow or fast your internet download speed)

```bash
timeout 11m bats --show-output-of-passing-tests tests/test_<network>.bats --filter <client>
```

or by client pair

```bash
timeout 25m bats --show-output-of-passing-tests tests/test_<network>.bats --filter <execution_client>-<consensus_client>
```
3 changes: 1 addition & 2 deletions clients/besu/24.5.1/run-besu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -e


display_help() {
echo "Usage: $0 [OPTIONS]"
echo ""
Expand Down Expand Up @@ -248,4 +247,4 @@ append_option "--bonsai-limit-trie-logs-enabled" "$BESU_CLI_BONSAI_LIMIT_TRIE_LO

echo "Running: besu $OPTIONS"

besu $OPTIONS
exec besu $OPTIONS
2 changes: 1 addition & 1 deletion clients/erigon/2.60.0/run-erigon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,4 @@ add_option "--config" "$ERIGON_CLI_CONFIG"

echo "Using Options: erigon $OPTIONS"

erigon $OPTIONS
exec erigon $OPTIONS
2 changes: 1 addition & 1 deletion clients/geth/1.14.3/run-geth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,4 @@ fi

echo "Using Options: geth $OPTIONS"

geth $OPTIONS
exec geth $OPTIONS
2 changes: 1 addition & 1 deletion clients/lighthouse/5.1.3/run-lighthouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ append_option "--wss-checkpoint" "$LIGHTHOUSE_CLI_BN_WSS_CHECKPOINT"


echo "Starting lighthouse beacon_node $OPTIONS"
lighthouse beacon_node $OPTIONS
exec lighthouse beacon_node $OPTIONS
6 changes: 4 additions & 2 deletions clients/lighthouse/5.1.3/run-validator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
set -e
#!/usr/bin/env bash

set -e

display_help() {
echo "Usage: $0 [OPTIONS]"
Expand Down Expand Up @@ -147,4 +149,4 @@ append_option "--web3-signer-max-idle-connections" "$LIGHTHOUSE_CLI_VALIDATOR_WE

echo "Using Options: $OPTIONS"

lighthouse validator_client $OPTIONS
exec lighthouse validator_client $OPTIONS
4 changes: 3 additions & 1 deletion clients/lodestar/1.18.1/run-lodestar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,6 @@ append_option "--network.connectToDiscv5Bootnodes" "$LODESTAR_CLI_NETWORK_CONNEC
append_option "--genesisStateFile" "$LODESTAR_CLI_BN_GENSIS_STATE_FILE"

echo "Starting lodestar beacon $OPTIONS"
lodestar beacon $OPTIONS

# on ci the postrm fails, so it not in path
exec /usr/lib/eth-node-lodestar/bin/lodestar beacon $OPTIONS
2 changes: 1 addition & 1 deletion clients/lodestar/1.18.1/run-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ append_flag "--distributed" "$LODESTAR_CLI_VALIDATOR_DISTRIBUTED"

echo "Using Options: $OPTIONS"

docker run chainsafe/lodestar validator $OPTIONS
exec docker run chainsafe/lodestar validator $OPTIONS
3 changes: 2 additions & 1 deletion clients/nethermind/1.26.0/run-nethermind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -563,4 +563,5 @@ append_option "--Wallet.DevAccounts" "$NETHERMIND_CLI_WALLET_DEV_ACCOUNTS"

echo "Using Options: nethermind $OPTIONS"

nethermind $OPTIONS
# CI problem again, with cache
exec /usr/lib/eth-node-nethermind/bin/Nethermind.Runner/release/nethermind $OPTIONS
76 changes: 45 additions & 31 deletions clients/nimbus-eth2/24.5.1/run-nimbus-eth2.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
#!/usr/bin/env bash

set -e
set -e

display_help() {
echo "Usage: $0 [OPTIONS]"
echo ""
echo "Options:"
echo " --conf-file FILE, -e FILE Path to .conf formatted configuration file."
echo " --conf-file FILE, -e FILE Path to .conf formatted configuration file."
echo " --help, -h Displays this help text and exits."
echo " --version, -v Displays the version and exits."
exit 0
Expand All @@ -24,22 +24,22 @@ VERSION=false

while [[ "$#" -gt 0 ]]; do
case $1 in
--conf-file|-e)
CONFIG_FILES+=("$2")
shift 2
;;
--help|-h)
HELP=true
shift
;;
--version|-v)
VERSION=true
shift
;;
*)
echo "Error: Unknown option $1"
display_help
;;
--conf-file | -e)
CONFIG_FILES+=("$2")
shift 2
;;
--help | -h)
HELP=true
shift
;;
--version | -v)
VERSION=true
shift
;;
*)
echo "Error: Unknown option $1"
display_help
;;
esac
done

Expand Down Expand Up @@ -69,15 +69,15 @@ done
OPTIONS=""

add_option() {
local option=$1
local value=$2
if [ -n "$value" ]; then
if [ "$value" == "" ];then
OPTIONS="$OPTIONS $option"
else
OPTIONS="$OPTIONS $option=$value"
fi
fi
local option=$1
local value=$2
if [ -n "$value" ]; then
if [ "$value" == "" ]; then
OPTIONS="$OPTIONS $option"
else
OPTIONS="$OPTIONS $option=$value"
fi
fi
}

add_option "--config-file" "$NIMBUS_ETH2_CONFIG_FILE"
Expand Down Expand Up @@ -159,8 +159,22 @@ add_option "--payload-builder-url" "$NIMBUS_ETH2_PAYLOAD_BUILDER_URL"
add_option "--local-block-value-boost" "$NIMBUS_ETH2_LOCAL_BLOCK_VALUE_BOOST"
add_option "--history" "$NIMBUS_ETH2_HISTORY"

echo "Using Options: $OPTIONS"

echo "Using Options: nimbus-eth2 $OPTIONS"
echo "Using Options: nimbus_beacon_node $OPTIONS"

# hack to download state before starting client
if [ -n "$NIMBUS_ETH2_FINALIZED_CHECKPOINT_STATE" ]; then
echo "Downloading checkpoint state for nimbus-eth2"
echo "curl -o $NIMBUS_ETH2_FINALIZED_CHECKPOINT_STATE \
-H 'Accept: application/octet-stream' \
$BASE_CONFIG_CL_CHECKPPOINT_SYNC_URLr/eth/v2/debug/beacon/states/finalized"
if [ "$NIMBUS_ETH2_FINALIZED_CHECKPOINT_STATE" != "" ]; then
curl -o $NIMBUS_ETH2_FINALIZED_CHECKPOINT_STATE \
-H 'Accept: application/octet-stream' \
$BASE_CONFIG_CL_CHECKPPOINT_SYNC_URL/eth/v2/debug/beacon/states/finalized

fi
fi

nimbus_beacon_node $OPTIONS
# on ci the postrm fails, so it not in path
exec /usr/lib/eth-node-nimbus-eth2/bin/nimbus_beacon_node $OPTIONS
5 changes: 4 additions & 1 deletion clients/nimbus-eth2/24.5.1/run-validator.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

set -e

display_help() {
Expand Down Expand Up @@ -84,4 +86,5 @@ append_flag(){

echo "Using Options: $OPTIONS"

/usr/lib/eth-node-nimbus-eth2/bin/validator $OPTIONS
# TODO
exec /usr/lib/eth-node-nimbus-eth2/bin/validator $OPTIONS
4 changes: 2 additions & 2 deletions clients/prysm/5.0.3/run-prysm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ append_flag "--slasher" "$PRSYM_CLI_SLASHER"
append_flag "--interop-eth1data-votes" "$PRSYM_CLI_INTEROP_ETH1DATA_VOTES"
append_flag "--force-clear-db" "$PRSYM_CLI_FORCE_CLEAR_DB"


append_option "--api-timeout" "$PRSYM_CLI_API_TIMEOUT"
append_option "--bootstrap-node" "$PRSYM_CLI_BOOTSTRAP_NODE"
append_option "--chain-config-file" "$PRSYM_CLI_CHAIN_CONFIG_FILE"
Expand Down Expand Up @@ -218,4 +217,5 @@ append_option "--interop-num-validators" "$PRSYM_CLI_INTEROP_NUM_VALIDATORS"

echo "Using Options: beacon-chain $OPTIONS"

beacon-chain $OPTIONS
# on ci the postrm fails, so it not in path
exec /usr/lib/eth-node-prysm/bin/beacon-chain $OPTIONS
5 changes: 4 additions & 1 deletion clients/prysm/5.0.3/run-validator.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

set -e

display_help() {
Expand Down Expand Up @@ -167,4 +169,5 @@ append_option "--interop-start-index" "$PRYSM_CLI_VALIDATOR_INTEROP_START_INDEX"

echo "Using Options: $OPTIONS"

/usr/lib/eth-node-prysm/bin/validator $OPTIONS
# TODO
exec /usr/lib/eth-node-prysm/bin/validator $OPTIONS
2 changes: 1 addition & 1 deletion clients/reth/1.0.0/run-reth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ append_flag "--quiet" "$RETH_CLI_NODE_QUIET"

echo "Starting node with options: reth node $OPTIONS"

reth node $OPTIONS
exec reth node $OPTIONS
Loading