This repository contains a test script that automates the testing of Ethereum clients' ability to synchronize with an existing Ethereum network.
Before using the script, ensure you have the following dependencies installed:
- Kurtosis
curl
jq
yq
To start the synchronization test, use the following command:
make run
To stop and clean up the testnet, use:
make clean
Running make
alone will execute the synchronization test and clean up afterwards.
Before running the test, ensure that the kurtosis-config.yaml
file is prepared to include the client pairs that should be tested.
All participants with validator_count: 0
are stopped after initialization and tested for their synchronization capabilities later on.
Instead of using make run
, you can manually invoke the synctest.sh
script with optional parameters for dev/debugging purposes:
./synctest.sh <enclave-name> <kurtosis-config>
<enclave-name>
: Name of the enclave (defaults tosynctest-XXX
, whereXXX
is a random string)<kurtosis-config>
: Path to the Kurtosis configuration file (defaults to./kurtosis-config.yaml
)
The script performs the following steps:
- Spins up a Kurtosis testnet using the provided Kurtosis configuration.
- Immediately after creation, all client pairs without validator keys are shut down.
These clients are initialized but not following the chain. - Waits for a specified time to allow the testnet to proceed and build blocks.
Several transaction and blob spammers are included to add load to the chain. - After 30 minutes or when manually proceeding, the previously shut-down clients are turned on again, starting their synchronization with the chain.
- An assertion test is launched that polls the now synchronizing clients for their synchronization status.
- When all clients are synchronized, the test succeeds and the script stops execution.
This project is licensed under the MIT License. See the LICENSE file for details.
For more detailed information, refer to the script comments and the Kurtosis ethereum-package documentation.
Feel free to open issues or submit pull requests if you find any bugs or have improvements.
Happy testing!