diff --git a/justfile b/justfile index 974344ec..c9dc37d6 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 00000000..e3fde99d --- /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 31e8e30a..1ea50a66 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 8d77e4cf..dca832d5 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!"