Skip to content

lidofinance/lido-local-devnet

Repository files navigation

Lido Local DevNet

Lido Local DevNet is a powerful tool for deploying and testing the Lido protocol in a local Ethereum network. It provides a streamlined process for launching Ethereum nodes, block explorers, Lido smart contracts, Lido oracles, and essential tooling.

  • Run Ethereum + Lido locally – Deploy and test the full Lido protocol on your machine.
  • One-command setup – Spin up a complete test environment with a single command.
  • Multi-node support – Test the protocol on all available Ethereum node implementations.
  • Highly customizable deployment – Fine-tune deployment parameters to fit specific testing needs.
  • Modular execution – The project is structured as a set of commands, allowing you to rerun any step independently.
  • Multiple parallel environments – Run several test networks on the same machine to validate different scenarios.
  • Git branch-aware deployment – Deploy and execute scripts and from different Git branches, simulating real-world deployment workflows.
  • Integrated tooling – Built-in support for block explorers, oracles, and auxiliary services to streamline testing.
  • Seamless debugging – Restart individual services or redeploy specific components without affecting the entire setup.

Requirements


Getting Started (with k8s integration)

Original docs are located in https://docs.kurtosis.com/k8s/

1. Install dependencies

yarn && yarn build:all

2. Create .env file and fill it with the required values

cp .env.sample .env

3. (Optional) Turn on SSH Tunnel to the machine with k8s cluster

./bin/run.js ssh tunnel

4. Set the current context to the k8s cluster (if you have multiple clusters)

Contexts can be found by running: kubectl config get-contexts

kubectl config use-context <cluster context> # or whatever your k8s context is

5. Ensure that you are connected to the k8s cluster

The cluster can be accessible via SSH Tunnel.

kubectl cluster-info

6. Change kurtosis config to work with the k8s cluster

Update once your kurtosis config at echo $(kurtosis config path) location

config-version: 6
should-send-metrics: false
kurtosis-clusters:
  docker:
    type: "docker"
  cloud:
    type: "kubernetes"
    config:
      kubernetes-cluster-name: "<cluster name from kubectl>" # change the cluster name if needed
      storage-class: "ssd-hostpath"
      enclave-size-in-megabytes: 256

7. Point kurtosis to the cluster

# tell kurtosis to work with k8s cluster
kurtosis cluster set cloud # or whatever your kurtosis cluster is

8. Start Kurtosis

Kurtosis is required to launch Ethereum nodes

kurtosis engine start

9. Launch the environment and deploy Lido smart contracts

Below is an example for launching the fusaka test stand. If you need a different setup, refer to the test stands documentation.

./bin/run.js stands <stand-name>  # (fusaka) or any other test stand name

For contract verification, use the --verify flag:

./bin/run.js stands <stand-name> --verify

For a full DSM infrastructure deployment, add the --dsm flag:

./bin/run.js stands <stand-name> --verify --dsm

10. (Optional) Interaction with Voting scripts

Since voting scripts require Python and Brownie, install the necessary dependencies:

./bin/run.js voting install

If errors occur, install any missing modules as prompted.

Next, add an account. Brownie does not automatically fetch account settings, but a console interface simplifies automation. Run the following command and enter the private key displayed in the logs:

./bin/run.js voting add-account

After adding an account, proceed with the voting process. See the voting documentation for more details. Below is an example for transitioning the protocol to the Pectra hard fork. If you need a different setup, refer to the documentation.

Before Pectra:

./bin/run.js voting enact-before-pectra

After Pectra:

./bin/run.js voting enact-after-pectra

11. Done!

The network, infrastructure, and protocol have been successfully launched.


Stopping the DevNet

To stop the DevNet and remove all services, run:

./bin/run.js down

Running Multiple Environments

To run multiple devnets on a single cluster, change the DEVNET_NAME=<another_devnet> variable in .env file All the commands will be executed in the context of the current devnet.

DevNet info

To get the latest information on available services, run:

./bin/run.js chain info

Available Services

To get the latest information on available services, run:

./bin/run.js config

Available Commands

This repository provides a high-level interface for managing DevNet. However, if you need to restart a specific service or deployment step, refer to the command documentation.


Architecture

For a comprehensive understanding of the project architecture, including the command system, services, state management, and how to extend the project, please refer to the Architecture Guide.


Developing Your Own Commands

If you want to start developing your own commands, read the short guide on the core API. For a deeper understanding of the architecture and design patterns, see the Architecture Guide.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9