diff --git a/spartan/aztec-network/eth-devnet/docker-compose.yml b/spartan/aztec-network/eth-devnet/docker-compose.yml index da47adb59da6..429c99e2fcf5 100644 --- a/spartan/aztec-network/eth-devnet/docker-compose.yml +++ b/spartan/aztec-network/eth-devnet/docker-compose.yml @@ -45,8 +45,8 @@ services: dockerfile: entrypoints/eth-validator.Dockerfile volumes: - "eth_validator_data:/data" - - "${PWD}/config/keys:/data/validators" - - "${PWD}/config/secrets:/data/secrets" + - "${PWD}/config/val-keys/data/keys:/validator_setup/validators" + - "${PWD}/config/val-keys/data/secrets:/validator_setup/secrets" - "${PWD}/out/config.yaml:/genesis/config.yaml" - "${PWD}/out/deposit_contract_block.txt:/genesis/deposit_contract_block.txt" - "${PWD}/out/genesis.ssz:/genesis/genesis.ssz" diff --git a/spartan/aztec-network/eth-devnet/entrypoints/eth-beacon.sh b/spartan/aztec-network/eth-devnet/entrypoints/eth-beacon.sh index c30e419257b0..040050ab0da3 100755 --- a/spartan/aztec-network/eth-devnet/entrypoints/eth-beacon.sh +++ b/spartan/aztec-network/eth-devnet/entrypoints/eth-beacon.sh @@ -1,13 +1,17 @@ #! /bin/bash -if [ "$K8S_MODE" = "true" ]; then +if [ -n "$K8S_MODE" ] && [ "$K8S_MODE" = "true" ]; then # In k8s config maps cannot contain ssz files # Genesis information is copied such that we can write into it # First serialize the ssz file + echo "running in k8s mode" cp -r /genesis-template /genesis && base64 -d /genesis/genesis-ssz > /genesis/genesis.ssz fi +echo "env vars: $BEACON_HTTP_PORT" +echo "env vars: $ETH_EXECUTION_URL" + lighthouse bn \ --disable-peer-scoring \ --disable-packet-filter \ @@ -16,13 +20,13 @@ lighthouse bn \ --staking \ --http \ --http-address=0.0.0.0 \ - --http-port=$BEACON_HTTP_PORT \ + --http-port=${BEACON_HTTP_PORT} \ --validator-monitor-auto \ --http-allow-origin='*' \ --listen-address=0.0.0.0 \ --target-peers=0 \ --testnet-dir=/genesis \ - --execution-endpoints=$ETH_EXECUTION_URL \ + --execution-endpoints=${ETH_EXECUTION_URL} \ --execution-jwt-secret-key="61e1dd9539e8cc37b3d71dcf8ce372f0e119cc1c73426ee80472a4214f2a41a1" \ --allow-insecure-genesis-sync \ --debug-level=info \ No newline at end of file diff --git a/spartan/aztec-network/eth-devnet/entrypoints/eth-execution.sh b/spartan/aztec-network/eth-devnet/entrypoints/eth-execution.sh index fa6773c3f173..e14a5356c956 100755 --- a/spartan/aztec-network/eth-devnet/entrypoints/eth-execution.sh +++ b/spartan/aztec-network/eth-devnet/entrypoints/eth-execution.sh @@ -2,11 +2,11 @@ reth node \ --http \ - --http.port=$HTTP_PORT \ + --http.port=${HTTP_PORT} \ --http.addr="0.0.0.0" \ --http.api="admin,net,eth,web3,debug,trace" \ --http.corsdomain="*" \ - --txpool.max-tx-input-bytes=$MAX_TX_INPUT_SIZE_BYTES \ + --txpool.max-tx-input-bytes=${MAX_TX_INPUT_SIZE_BYTES} \ --max-outbound-peers=0 \ --max-inbound-peers=0 \ --ipcdisable \ diff --git a/spartan/aztec-network/eth-devnet/entrypoints/eth-validator.sh b/spartan/aztec-network/eth-devnet/entrypoints/eth-validator.sh index 768097318756..20c87cdb7886 100755 --- a/spartan/aztec-network/eth-devnet/entrypoints/eth-validator.sh +++ b/spartan/aztec-network/eth-devnet/entrypoints/eth-validator.sh @@ -1,19 +1,28 @@ #! /bin/bash -if [ "$K8S_MODE" = "true" ]; then +if [ -n "$K8S_MODE" ] && [ "$K8S_MODE" = "true" ]; then cp -r /genesis-template /genesis && mkdir -p /data/validators && mkdir -p /data/secrets && cp -r /validator-setup/keys/* /data/validators && cp -r /validator-setup/secrets/* /data/secrets && base64 -d /genesis/genesis-ssz > /genesis/genesis.ssz +else + echo "making data folder" + mkdir -p /data/validators + mkdir -p /data/secrets + cp -r /validator_setup/validators/* /data/validators + cp -r /validator_setup/secrets/* /data/secrets fi +echo "validators: $(ls -la /data/validators)" +echo "secrets: $(ls -la /data/secrets)" + echo $ETH_BEACON_URL lighthouse vc \ --datadir="/data" \ - --beacon-nodes=$ETH_BEACON_URL \ + --beacon-nodes=${ETH_BEACON_URL} \ --testnet-dir=/genesis \ --init-slashing-protection \ --suggested-fee-recipient="0xff00000000000000000000000000000000c0ffee" \ diff --git a/spartan/aztec-network/eth-devnet/run-locally.sh b/spartan/aztec-network/eth-devnet/run-locally.sh new file mode 100755 index 000000000000..cb5a3ca32421 --- /dev/null +++ b/spartan/aztec-network/eth-devnet/run-locally.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +REPO_ROOT=$(git rev-parse --show-toplevel) + +${REPO_ROOT}/spartan/aztec-network/eth-devnet/create.sh +(cd ${REPO_ROOT}/spartan/aztec-network/eth-devnet && docker compose up) diff --git a/spartan/aztec-network/templates/eth/eth-execution.yaml b/spartan/aztec-network/templates/eth/eth-execution.yaml index 361e74acdc9b..6c4e475936b0 100644 --- a/spartan/aztec-network/templates/eth/eth-execution.yaml +++ b/spartan/aztec-network/templates/eth/eth-execution.yaml @@ -24,8 +24,10 @@ spec: - name: ethereum image: "{{ .Values.images.reth.image }}" imagePullPolicy: {{ .Values.images.reth.pullPolicy }} - command: ["/bin/sh"] - args: ["/entrypoints/eth-execution.sh"] + command: ["/bin/sh", "-c"] + args: + - | + exec /entrypoints/eth-execution.sh env: - name: K8S_MODE value: "true" diff --git a/spartan/aztec-network/templates/eth/eth-validator.yaml b/spartan/aztec-network/templates/eth/eth-validator.yaml index b4ea835b2d0a..87f34b023f89 100644 --- a/spartan/aztec-network/templates/eth/eth-validator.yaml +++ b/spartan/aztec-network/templates/eth/eth-validator.yaml @@ -57,7 +57,7 @@ spec: - name: shared-volume mountPath: /data - name: genesis - mountPath: /genesis + mountPath: /genesis-template - name: validator-setup mountPath: /validator-setup - name: entrypoint-scripts diff --git a/spartan/aztec-network/values/exp-1.yaml b/spartan/aztec-network/values/exp-1.yaml index 0ef7a0a96d66..1bb353c9f5b7 100644 --- a/spartan/aztec-network/values/exp-1.yaml +++ b/spartan/aztec-network/values/exp-1.yaml @@ -171,7 +171,8 @@ jobs: enable: false ethereum: - resources: - requests: - memory: "5Gi" - cpu: "1.5" + execution: + resources: + requests: + memory: "5Gi" + cpu: "1.5"