Skip to content

Commit

Permalink
chore: use troll-turtle image in aztec-spartan (#10856)
Browse files Browse the repository at this point in the history
also disregard ethereum_host from the host.
  • Loading branch information
just-mitch authored Dec 18, 2024
1 parent a17d319 commit c598bae
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
32 changes: 30 additions & 2 deletions spartan/releases/rough-rhino/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,41 @@ test-p2p-key:
echo "✅ P2P private key test passed" || \
(echo "❌ P2P private key test failed" && exit 1)

test-ethereum-host:
FROM +test-setup
RUN echo -e "\n\n" | ./aztec-spartan.sh config \
-n "troll-turtle" \
-e http://foobar:8545 \
-p 8080 \
-p2p 40400 \
-ip 1.2.3.4 \
-k 0x00 \
-pk 00000
RUN test -f .env && \
grep -q "ETHEREUM_HOST=http://foobar:8545" .env && \
echo "✅ Ethereum host cli test passed" || \
(echo "❌ Ethereum host cli test failed" && exit 1)

# We don't respect the env var here
RUN echo -e "\n\n" | ETHEREUM_HOST=http://foobar:8545 ./aztec-spartan.sh config \
-n "troll-turtle" \
-p 8080 \
-p2p 40400 \
-ip 1.2.3.4 \
-k 0x00 \
-pk 00000
RUN test -f .env && \
grep -q "ETHEREUM_HOST=http://34.19.127.9:8545" .env && \
echo "✅ Ethereum host override test passed" || \
(echo "❌ Ethereum host override test failed" && exit 1)


test-all:
BUILD +test-help
BUILD +test-no-config
BUILD +test-install
BUILD +test-docker-check
BUILD +test-start-stop
BUILD +test-update
BUILD +test-data-dir
BUILD +test-p2p-key

BUILD +test-ethereum-host
7 changes: 6 additions & 1 deletion spartan/releases/rough-rhino/aztec-spartan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ DEFAULT_KEY="0x0000000000000000000000000000000000000000000000000000000000000001"
DEFAULT_IP=$(curl -s --connect-timeout 5 https://api.ipify.org?format=json | grep -o '"ip":"[^"]*' | cut -d'"' -f4 || echo "")
DEFAULT_BIND_MOUNT_DIR="$HOME/aztec-data"

# unset these to avoid conflicts with the host's environment
ETHEREUM_HOST=
IMAGE=
BOOTNODE_URL=


# Parse command line arguments
parse_args() {
Expand Down Expand Up @@ -168,7 +173,7 @@ configure_environment() {
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}"
IMAGE="${IMAGE:-aztecprotocol/aztec:0.67.1}"
IMAGE="${IMAGE:-aztecprotocol/aztec:troll-turtle}"
else
# unknown network
echo -e "${RED}Unknown network: $NETWORK${NC}"
Expand Down

0 comments on commit c598bae

Please sign in to comment.