From 44dd26730c62ffd19dc359e886e1546a99e448ed Mon Sep 17 00:00:00 2001 From: nicolas <48695862+merklefruit@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:12:58 +0200 Subject: [PATCH] feat: example devnet config with default tag --- justfile | 4 +-- scripts/.gitignore | 1 + ...fig.yaml => kurtosis_config.template.yaml} | 20 ++++-------- scripts/start-devnet.sh | 32 +++++++------------ 4 files changed, 21 insertions(+), 36 deletions(-) create mode 100644 scripts/.gitignore rename scripts/{kurtosis_config.yaml => kurtosis_config.template.yaml} (65%) diff --git a/justfile b/justfile index 974344ec2..c9dc37d68 100644 --- a/justfile +++ b/justfile @@ -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: diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 000000000..e3fde99d0 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1 @@ +kurtosis_config.yaml \ No newline at end of file diff --git a/scripts/kurtosis_config.yaml b/scripts/kurtosis_config.template.yaml similarity index 65% rename from scripts/kurtosis_config.yaml rename to scripts/kurtosis_config.template.yaml index 31e8e30a4..1ea50a661 100644 --- a/scripts/kurtosis_config.yaml +++ b/scripts/kurtosis_config.template.yaml @@ -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 @@ -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: [] diff --git a/scripts/start-devnet.sh b/scripts/start-devnet.sh index 8d77e4cf2..dca832d56 100755 --- a/scripts/start-devnet.sh +++ b/scripts/start-devnet.sh @@ -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 " + 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!"