diff --git a/spartan/releases/README.md b/spartan/releases/README.md index ea41c68b991..b368c4c723f 100644 --- a/spartan/releases/README.md +++ b/spartan/releases/README.md @@ -48,9 +48,17 @@ To spare you a few keystrokes, you can use `npx aztec-spartan [start/stop/logs/u ## Node Configuration -You can tweak your validator in many different ways. Just edit the `.env` file directly and re-run `./aztec-spartan.sh`. +The `aztec-spartan.sh` script will set the following required variables on your behalf. You can ofcourse override the variables set by the script by simply changing the `.env` file directly and re-running `./aztec-spartan.sh` -Different env variables correspond to different components on the node. +| Variable | Description | +| ----- | ----- | +| ETHEREUM_HOST | URL to the Ethereum node your validator will connect to. For as long as we're on private networks, please use the value in `aztec-spartan.sh`| +| BOOTNODE_URL | URL to a bootnode that supplies L1 contract addresses and the ENR of the bootstrap nodes. | +| IMAGE | The docker image to run | + +In addition, the user is prompted to enter 1) an IP Address and a P2P port to be used for the TCP and UDP addresses (defaults to 40400) 2) A port for your node (8080) 3) an Ethereum private key 4) `COINBASE` which is the Ethereum address associated with the private key and 5) a path to a local directory to store node data if you don't opt for a named volume. + +On a first run, the script will generate a p2p private key and store it in `$DATA_DIR/var/lib/aztec/p2p-private-key`. If you wish to change your p2p private key, you can pass it on as a CLI arg using the flag `-pk` or update the `PEER_ID_PRIVATE_KEY` in the env file. ### Publisher and Archiver @@ -60,7 +68,7 @@ The Archiver's primary functions are data storage and retrieval (i.e. L1->L2 mes |Variable| Description| |----|-----| -|ETHEREUM_HOST| This is the URL to the L1 node your validator will connect to. For as long as we're on private networks, please use the value from above | +|ETHEREUM_HOST| This is the URL to the L1 node your validator will connect to. For as long as we're on private networks, please use the value in `aztec-spartan.sh`| |L1_CHAIN_ID | Chain ID of the L1 | | DATA_DIRECTORY | Optional dir to store archiver and world state data. If omitted will store in memory | | ARCHIVER_POLLING_INTERVAL_MS | The polling interval in ms for retrieving new L2 blocks and encrypted logs @@ -117,12 +125,6 @@ The P2P client coordinates peer-to-peer communication between Nodes. Please refer to the Epoch Proving Integration [Guide](https://hackmd.io/@aztec-network/epoch-proving-integration-guide) for info on how to setup your prover node. -During a governance upgrade, we'll announce details on the discord. At some point we'll also write AZIPs (Aztec Improvement Proposals) and post them to either the github or forum to collect feedback. - -We'll deploy the payload to the L1 and share the address of the payload with the sequencers on discord. - -To participate in the governance vote, sequencers must change the variable `GOVERNANCE_PROPOSER_PAYLOAD_ADDRESS` in the Sequencer Client to vote during the L2 slot they've been assigned sequencer duties. - ## Governance Upgrades During a governance upgrade, we'll announce details on the discord. At some point we'll also write AZIPs (Aztec Improvement Proposals) and post them to either the github or forum to collect feedback. diff --git a/spartan/releases/testnet/aztec-spartan.sh b/spartan/releases/testnet/aztec-spartan.sh index 2b90bf5fc0e..2d05a936d8f 100755 --- a/spartan/releases/testnet/aztec-spartan.sh +++ b/spartan/releases/testnet/aztec-spartan.sh @@ -171,8 +171,8 @@ configure_environment() { # if the network is `troll-turtle` if [ "$NETWORK" = "troll-turtle" ]; then - BOOTNODE_URL="${BOOTNODE_URL:-http://34.82.213.6:8080}" - ETHEREUM_HOST="${ETHEREUM_HOST:-http://34.19.127.9:8545}" + BOOTNODE_URL="${BOOTNODE_URL:-http://34.82.108.83:8080}" + ETHEREUM_HOST="${ETHEREUM_HOST:-http://34.82.53.127:8545}" IMAGE="${IMAGE:-aztecprotocol/aztec:troll-turtle}" else # unknown network @@ -216,6 +216,20 @@ configure_environment() { done fi + if [ -n "$CLI_COINBASE" ]; then + COINBASE="$CLI_COINBASE" + else + while true; do + read -p "COINBASE (default: 0xbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa): " COINBASE + COINBASE=${COINBASE:-0xbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} + if [[ "$COINBASE" =~ ^0x[a-fA-F0-9]{40}$ ]]; then + break + else + echo -e "${RED}Error: Invalid COINBASE address. Please enter a valid Ethereum address.${NC}" + fi + done + fi + if [ -n "$CLI_IP" ]; then IP="$CLI_IP" else @@ -250,7 +264,6 @@ configure_environment() { cat > .env << EOF P2P_UDP_ANNOUNCE_ADDR=${IP}:${P2P_PORT} P2P_TCP_ANNOUNCE_ADDR=${IP}:${P2P_PORT} -COINBASE=0xbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa VALIDATOR_DISABLED=false VALIDATOR_PRIVATE_KEY=${KEY} SEQ_PUBLISHER_PRIVATE_KEY=${KEY}