Skip to content

Commit

Permalink
fix: various infra things
Browse files Browse the repository at this point in the history
exp

fix

fix: add to various infra things

fix: docker composes

tmp
  • Loading branch information
Maddiaa0 committed Nov 27, 2024
1 parent 988e285 commit 5dbeef3
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 9 deletions.
1 change: 1 addition & 0 deletions aztec-up/bin/aztec-install
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ if [ -z "${SKIP_PULL:-}" ]; then
pull_container aztec-nargo
pull_container aztec
pull_container cli-wallet
pull_container blob-sink
fi

# Download the Docker Compose file. Used by aztec.
Expand Down
9 changes: 9 additions & 0 deletions aztec-up/bin/docker-compose.sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ services:
FORK_BLOCK_NUMBER:
ANVIL_PORT: ${ANVIL_PORT:-8545}

# TODO: add a readiness probe to this
# TODO: delete all of these extra images and just have one, then symlink them???
blob-sink:
image: aztecprotocol/blob-sink
ports:
- "${BLOB_SINK_PORT:-5052}:${BLOB_SINK_PORT:-5052}"

aztec:
image: "aztecprotocol/aztec"
ports:
Expand All @@ -30,11 +37,13 @@ services:
WS_BLOCK_CHECK_INTERVAL_MS: 50
PXE_BLOCK_POLLING_INTERVAL_MS: 50
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500
SEQ_BLOB_SINK_URL: http://blob-sink:${BLOB_SINK_PORT:-5052}
PXE_PORT: ${PXE_PORT:-8080}
PORT: ${AZTEC_NODE_PORT:-8080}
TEST_ACCOUNTS: ${TEST_ACCOUNTS:-true}
volumes:
- ./log:/usr/src/yarn-project/aztec/log:rw
depends_on:
- ethereum
- blob-sink
command: "start --sandbox"
8 changes: 8 additions & 0 deletions boxes/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ services:
WS_BLOCK_CHECK_INTERVAL_MS: 50
PXE_BLOCK_POLLING_INTERVAL_MS: 50
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500
SEQ_BLOB_SINK_URL: http://blob-sink:5052
depends_on:
- ethereum

blob-sink:
image: aztecprotocol/blob-sink:${AZTEC_DOCKER_TAG:-latest}
environment:
PORT: 5052
DEBUG: "aztec:*"
DEBUG_COLORS: "true"

boxes:
image: aztecprotocol/boxes:${AZTEC_DOCKER_TAG:-latest}
entrypoint: >
Expand Down
3 changes: 2 additions & 1 deletion scripts/run_native_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ BASE_CMD="INTERLEAVED=$INTERLEAVED ./yarn-project/end-to-end/scripts/native_netw
\"./validators.sh $NUM_VALIDATORS\" \
$PROVER_SCRIPT \
./pxe.sh \
./transaction-bot.sh"
./transaction-bot.sh \
./blob-sink.sh"

# Execute the command
eval $BASE_CMD
15 changes: 8 additions & 7 deletions yarn-project/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,22 @@ export-cli-wallet:
ARG ARCH
SAVE IMAGE --push aztecprotocol/cli-wallet:${DIST_TAG}${ARCH:+-$ARCH}

blob-sink:
blob-sink-build:
FROM +cli-base
RUN yarn workspaces focus @aztec/blob-sink --production && yarn cache clean
ENTRYPOINT ["node", "/usr/src/yarn-project/blob-sink/dest/bin/run.js"]
SAVE ARTIFACT /usr/src /usr/src

blob-sink:
FROM ubuntu:noble
RUN apt update && apt install nodejs curl -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY +blob-sink-build/usr/src /usr/src
ENTRYPOINT ["node", "/usr/src/yarn-project/blob-sink/dest/run.js"]

export-blob-sink:
FROM +blob-sink
ARG DIST_TAG="latest"
SAVE IMAGE aztecprotocol/blob-sink:${DIST_TAG}

export-blob-sink-arch:
FROM +blob-sink
ARG ARCH
SAVE IMAGE --push aztecprotocol/blob-sink:${ARCH:+-$ARCH}
SAVE IMAGE --push aztecprotocol/blob-sink:${DIST_TAG}${ARCH:+-$ARCH}

aztec-prod:
FROM +cli-base
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/end-to-end/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
image: aztecprotocol/aztec:${AZTEC_DOCKER_TAG:-latest}
command: 'start --sandbox'
environment:
DEBUG: ${DEBUG:-aztec:*,-aztec:avm_simulator:memory}
DEBUG: ${DEBUG:-aztec:*,-aztec:avm_simulator:memory,-aztec:l2_block_stream:*,-aztec:world-state:database}
DEBUG_COLORS: 1
ETHEREUM_HOST: http://fork:8545
L1_CHAIN_ID: 31337
Expand All @@ -21,11 +21,19 @@ services:
WS_BLOCK_CHECK_INTERVAL_MS: 50
PXE_BLOCK_POLLING_INTERVAL_MS: 50
ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500
SEQ_BLOB_SINK_URL: http://blob-sink:${BLOB_SINK_PORT:-5052}
ENABLE_GAS: ${ENABLE_GAS:-}
HARDWARE_CONCURRENCY: ${HARDWARE_CONCURRENCY:-}
expose:
- '8080'

blob-sink:
image: aztecprotocol/blob-sink
environment:
PORT: ${BLOB_SINK_PORT:-5052}
DEBUG: "aztec:*"
DEBUG_COLORS: 1

end-to-end:
image: aztecprotocol/end-to-end:${AZTEC_DOCKER_TAG:-latest}
environment:
Expand Down
11 changes: 11 additions & 0 deletions yarn-project/end-to-end/scripts/native-network/blob-sink.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -eu

REPO=$(git rev-parse --show-toplevel)

# Starts the Blob Sink
export PORT=${BLOB_SINK_PORT:-5052}
export DEBUG=${DEBUG:-"aztec:*"}
export DEBUG_COLORS=${DEBUG_COLORS:-1}

node --no-warnings "$REPO"/yarn-project/blob-sink/dest/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export PROVER_PUBLISHER_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478c
export PROVER_COORDINATION_NODE_URL="http://127.0.0.1:8080"
export AZTEC_NODE_URL="http://127.0.0.1:8080"
export PROVER_JOB_SOURCE_URL="http://127.0.0.1:$PORT"
export PROVER_BLOB_SINK_URL="http://127.0.0.1:${BLOB_SINK_PORT:-5052}"
export OTEL_RESOURCE_ATTRIBUTES="service.name=prover-node-${PORT}"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export P2P_TCP_ANNOUNCE_ADDR="127.0.0.1:$P2P_PORT"
export P2P_UDP_ANNOUNCE_ADDR="127.0.0.1:$P2P_PORT"
export P2P_TCP_LISTEN_ADDR="0.0.0.0:$P2P_PORT"
export P2P_UDP_LISTEN_ADDR="0.0.0.0:$P2P_PORT"
export SEQ_BLOB_SINK_URL="http://127.0.0.1:${BLOB_SINK_PORT:-5052}"
export OTEL_RESOURCE_ATTRIBUTES="service.name=validator-node-${PORT}"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="${OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:-}"
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-}"
Expand Down

0 comments on commit 5dbeef3

Please sign in to comment.