Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: run devnet with configurable environments #322

Draft
wants to merge 1 commit into
base: unstable
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ demo:
./scripts/start-demo.sh

# spin up the bolt devnet
up:
up env='latest':
chmod +x ./scripts/start-devnet.sh
./scripts/start-devnet.sh
./scripts/start-devnet.sh {{env}}

# turn down the bolt devnet and remove the enclave
down:
Expand Down
1 change: 1 addition & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kurtosis_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@ additional_services:
- tx_spammer
- blockscout
- dora
# - assertoor
# - blob_spammer
# - custom_flood
# - goomy_blob
# - el_forkmon
# - beacon_metrics_gazer
# - full_beaconchain_explorer
- prometheus_grafana
# - blobscan

mev_type: full

Expand All @@ -26,12 +18,12 @@ mev_params:
# Bolt-specific images:
# Adding the `bolt_boost_image` will start the devnet with Bolt-Boost
# instead of MEV-Boost by Flashbots
bolt_boost_image: ghcr.io/chainbound/bolt-boost:0.1.0
bolt_sidecar_image: ghcr.io/chainbound/bolt-sidecar:0.1.0
helix_relay_image: ghcr.io/chainbound/helix:v0.3.0-alpha.rc2
mev_relay_image: ghcr.io/chainbound/bolt-relay:0.1.0
mev_builder_image: ghcr.io/chainbound/bolt-builder:0.1.0
mev_boost_image: ghcr.io/chainbound/bolt-mev-boost:0.1.0
bolt_boost_image: ghcr.io/chainbound/bolt-boost:$TAG
bolt_sidecar_image: ghcr.io/chainbound/bolt-sidecar:$TAG
helix_relay_image: ghcr.io/chainbound/helix:$TAG
mev_relay_image: ghcr.io/chainbound/bolt-relay:$TAG
mev_builder_image: ghcr.io/chainbound/bolt-builder:$TAG
mev_boost_image: ghcr.io/chainbound/bolt-mev-boost:$TAG

mev_boost_args: []
mev_relay_api_extra_args: []
Expand Down
32 changes: 12 additions & 20 deletions scripts/start-devnet.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
#!/bin/bash

echo "Starting the devnet..."
ENV=$1

# spin up the kurtosis devnet
kurtosis run --enclave bolt-devnet github.com/chainbound/ethereum-package@bolt --args-file ./scripts/kurtosis_config.yaml
echo "Devnet online! Waiting for the RPC to be available..."
sleep 5
if [ -z "$ENV" ]; then
echo "Usage: start-devnet.sh <ENV>"
exit 1
fi

echo "Starting the devnet on $ENV..."

RPC=$(kurtosis port print bolt-devnet el-1-geth-lighthouse rpc)
PK="bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31"
echo "RPC endpoint: $RPC"
# the environment needs to match the image tags in the kurtosis config file
sed "s/\$TAG/$ENV/g" ./scripts/kurtosis_config.template.yaml > ./scripts/kurtosis_config.yaml

# wait for the rpc to be available
while ! curl -s -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' "$RPC" >/dev/null; do
sleep 1
done
# spin up the kurtosis devnet
kurtosis run --enclave bolt-devnet github.com/chainbound/ethereum-package@bolt --args-file ./scripts/kurtosis_config.yaml

# TODO: re-add after new registry, challenger and staking contracts are available
# deploy the contracts
# (
# cd ./bolt-contracts || exit
# forge build # make sure the contracts are compiled before deploying
# forge script script/DeployOnDevnet.s.sol --broadcast --rpc-url "$RPC" --private-key "$PK"
# )
# echo "Contracts deployed!"
echo "Devnet online!"
Loading