Skip to main content
The following guide walks you through setting up a local Berachain devnet using Kurtosis.
Some features like native dApps, contracts, and more may still be a work in progress.

Requirements

Before starting, ensure that you have the following installed on your computer:
  • Docker version 25.0.2 or greater
  • Kurtosis v0.90.1 or greater
  • Foundry v1.0.0 or greater (for testing purposes)

Kurtosis local devnet

Going through this process will set up and run multiple services, execution clients, block explorers, databases, and more.
This may require a decent amount of resources to run. If you run into limits, modify the yaml configuration file to limit the number of services.
If you run the default Kurtosis configuration, it will run the following:
  • 5 validator nodes
  • 3 full nodes
  • 6 additional services
You can modify the beaconkit-local.yaml to fit your system requirements.
The packaged Kurtosis EL genesis template already includes the depositContractAddress field that Fusaka networks require. If you swap in a custom EL genesis, add "depositContractAddress": "0x4242424242424242424242424242424242424242" under config.

Step 1 - Clone repository and run nodes

The first step is to clone the Beacon Kit repository.
After cloning the repository, run make start-devnet.
If you encounter issues, please see Debugging Issues below.
It is highly recommended before running Kurtosis to disable additional_services: entirely for most use-cases. See Node Setup for details.

Step 2 - Configure wallet

If you want to see a list of all defined wallet addresses and private keys, refer to constants.star. Start by adding the network to your MetaMask wallet.
Your port number will be different. Use the port number from the list of services output in Step
  1. Look at using a JSON-RPC service with el-full-reth-0 or other and use the eth-json-rpc port.
Next import one of the private keys defined in constants.star.

Step 3 - Deploy contract

To demonstrate deploying a contract to the local devnet, you can use forge create:

Step 4 - Read contract

Verify that the contract was deployed and the initial message was set:

Testing deposits

In this section, you upgrade one of the full nodes from the default Kurtosis deployment to a full validator, following the process laid out in the Become a Validator guide.

Node setup

Revise beaconkit-local.yml to remove all additional services, then clean and re-launch:
Identify a full node from the list of activated containers using kurtosis enclave inspect my-local-devnet.

Collect registration transaction parameters

Log into the beaconkit container:
Obtain the validator keys and genesis root hash:
Load those values into environment variables and calculate the deposit signature:
Verify the calculated signature:

Send registration and activation transactions

Generate the command in the container and execute it from the host OS. Send the registration transaction first, then the activation transaction with the remaining stake. After 2 complete epochs, the validator status should change to active_ongoing.

Debugging issues

If Docker stops working on MacOS, first try running kurtosis clean -a. If the problem persists, try removing all containers and restarting Docker.
To watch logs for deposit activity:

Teardown and cleanup

To remove all services and clean up the environment: