A project for launching a DevNet with the Lido protocol locally. The project includes starting a new network, launching a block explorer, and deploying Lido smart contracts.
Warning
This is an alpha version of the project. Stay tuned for updates.
- Node 20+ (Install Node.js)
- Docker 27+ (Install Docker)
- Docker Compose V2 (Install Docker Compose)
- Kurtosis (Install Kurtosis)
- Foundry tools (Install Foundry)
- Just (Install Just)
Follow these steps to spin up the DevNet:
-
Start the Kurtosis instance
This is required for launching Ethereum nodes:kurtosis engine start
-
Install project dependencies:
yarn && yarn submodule
-
Install subdependencies of the project:
./bin/run.js install
-
Launch the environment and deploy Lido smart contracts:
./bin/run.js up --full
Optionally, use the
--verify
flag to deploy smart contracts with verification on the block explorer:./bin/run.js up --full --verify
-
Initiate aragon voting that enables Pectra supporting in the Lido protocol
Since the voting scripts use Python and Brownie, install the required dependencies:
./bin/run.js voting install
If you encounter errors, install additional modules as prompted.
Next, add an account. Unfortunately, Brownie cannot fetch account settings automatically, but we provide an easy-to-use console interface for automation. Simply run the following command and enter the private key displayed in the logs:
./bin/run.js voting add-account
After adding the account, initiate the first stage of transitioning the protocol to the Pectra hard fork:
./bin/run.js voting enact-before-pectra
Once the initial stage is complete, finalize the transition by executing the second stage of the voting process after the Pectra hard fork:
./bin/run.js voting enact-after-pectra
-
Launch validators
After completing the
up
command, launch the validators with:./bin/run.js validator up
Ensure the validators have started without issues by checking the logs:
./bin/run.js validator logs
On Linux, you may encounter access issues with the validator keys. To fix this, run:
chown -R 1000:1000 artifacts/validator
This issue will be resolved in a future release.
-
Done!
You have successfully launched the network, infrastructure, and protocol locally.
To stop the DevNet, run the following commands:
./bin/run.js validator down
./bin/run.js kapi down
./bin/run.js oracles down
./bin/run.js stop
These commands will properly delete the state of all services and restart them.
To get the current links to available services, run:
./bin/run.js network info
This will provide the most up-to-date information on available network services.
To initiate a voluntary exit for a validator from the protocol, use the following command:
./bin/run.js validator exit --mtype <MNEMONIC_TYPE> --index <VALIDATOR_INDEX>
-
--mtype
: (required) Specifies the mnemonic type to use. Options:genesis
- Use the mnemonic from the genesis configuration.generated
- Use a newly generated mnemonic.
-
--index
: (required) Specifies the index of the validator to exit.
If you want to exit a validator with index 42
using the genesis
mnemonic, run:
./bin/run.js validator exit --mtype genesis --index 42