From d5ccb2da4dfbcc64d9616a243a6221232474457c Mon Sep 17 00:00:00 2001 From: Niran Babalola Date: Tue, 28 Oct 2025 10:30:27 -0500 Subject: [PATCH 1/7] wip: add node-reth docker service --- .env.example | 7 +++++++ Dockerfile.node-reth | 29 +++++++++++++++++++++++++++++ Dockerfile.node-reth.local | 24 ++++++++++++++++++++++++ docker-compose.yml | 36 +++++++++++++++++++++++++++++++++++- justfile | 10 +++++----- 5 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 Dockerfile.node-reth create mode 100644 Dockerfile.node-reth.local diff --git a/.env.example b/.env.example index 69b1a01..4c91551 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,10 @@ +# Node Reth - Build Configuration +# For remote builds from GitHub (default): +NODE_RETH_REF=tips +# For local builds, set these: +# NODE_RETH_LOCAL_PATH=/path/to/your/node-reth +# NODE_RETH_DOCKERFILE=Dockerfile.node-reth.local + # Ingress TIPS_INGRESS_ADDRESS=0.0.0.0 TIPS_INGRESS_PORT=8080 diff --git a/Dockerfile.node-reth b/Dockerfile.node-reth new file mode 100644 index 0000000..bc5c0d0 --- /dev/null +++ b/Dockerfile.node-reth @@ -0,0 +1,29 @@ +ARG NODE_RETH_REF=tips + +FROM rust:1.88 AS build + +ARG NODE_RETH_REF + +WORKDIR /app + +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get install -y git libclang-dev pkg-config curl build-essential && \ + rm -rf /var/lib/apt/lists/* + +RUN git clone https://github.com/base/node-reth.git . && \ + git checkout ${NODE_RETH_REF} + +RUN cargo build --release --bin base-reth-node + +FROM ubuntu:22.04 + +RUN apt-get update && \ + apt-get install -y jq curl && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +ENTRYPOINT [ "./base-reth-node" ] + +COPY --from=build /app/target/release/base-reth-node ./ diff --git a/Dockerfile.node-reth.local b/Dockerfile.node-reth.local new file mode 100644 index 0000000..2729195 --- /dev/null +++ b/Dockerfile.node-reth.local @@ -0,0 +1,24 @@ +FROM rust:1.88 AS build + +WORKDIR /app + +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get install -y git libclang-dev pkg-config curl build-essential && \ + rm -rf /var/lib/apt/lists/* + +COPY . . + +RUN cargo build --release --bin base-reth-node + +FROM ubuntu:22.04 + +RUN apt-get update && \ + apt-get install -y jq curl && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +ENTRYPOINT [ "./base-reth-node" ] + +COPY --from=build /app/target/release/base-reth-node ./ diff --git a/docker-compose.yml b/docker-compose.yml index 5791426..53f5969 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,4 +71,38 @@ services: /usr/bin/mc mb minio/tips; /usr/bin/mc anonymous set public minio/tips; exit 0; - " \ No newline at end of file + " + + node-reth: + build: + context: ${NODE_RETH_LOCAL_PATH:-.} + dockerfile: ${NODE_RETH_DOCKERFILE:-Dockerfile.node-reth} + args: + NODE_RETH_REF: ${NODE_RETH_REF:-tips} + image: node-reth:latest + container_name: tips-node-reth + ports: + - "2222:8545" + - "2223:8546" + - "1115:1115" + - "30303:30303" + volumes: + - ./data/node-reth:/data + command: > + node + --datadir /data + --chain base-sepolia + --http + --http.addr 0.0.0.0 + --http.port 8545 + --http.api eth,net,web3,txpool,base + --ws + --ws.addr 0.0.0.0 + --ws.port 8546 + --ws.api eth,net,web3,txpool,base + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "curl -sf http://localhost:8545 -X POST -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' || exit 1"] + interval: 10s + timeout: 5s + retries: 10 \ No newline at end of file diff --git a/justfile b/justfile index ebac294..2b0ac41 100644 --- a/justfile +++ b/justfile @@ -36,12 +36,12 @@ stop-all: # Start every service running in docker, useful for demos start-all: stop-all - export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio && docker compose build && docker compose up -d + export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio data/node-reth && docker compose build && docker compose up -d # Start every service in docker, except the one you're currently working on. e.g. just start-except ui ingress-rpc start-except programs: stop-all #!/bin/bash - all_services=(kafka kafka-setup minio minio-setup ingress-rpc audit ui) + all_services=(kafka kafka-setup minio minio-setup node-reth ingress-rpc audit ui) exclude_services=({{ programs }}) # Create result array with services not in exclude list @@ -58,12 +58,12 @@ start-except programs: stop-all result_services+=("$service") fi done - - export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio && docker compose build && docker compose up -d ${result_services[@]} + + export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio data/node-reth && docker compose build && docker compose up -d ${result_services[@]} ### RUN SERVICES ### deps-reset: - COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml docker compose down && docker compose rm && rm -rf data/ && mkdir -p data/kafka data/minio && docker compose up -d + COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml docker compose down && docker compose rm && rm -rf data/ && mkdir -p data/kafka data/minio data/node-reth && docker compose up -d deps: COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml docker compose down && docker compose rm && docker compose up -d From 0728987e9b37a440ac7e47352763fe5ba7e0f4da Mon Sep 17 00:00:00 2001 From: Niran Babalola Date: Tue, 28 Oct 2025 16:42:26 -0500 Subject: [PATCH 2/7] refactor: simplify node-reth setup with upstream images Remove custom Dockerfiles in favor of building from GitHub/local paths via justfile. Split docker-compose into separate execution (node-reth) and consensus (op-node) services using official op-node image. Add OP Node configuration to .env.example with comprehensive settings for consensus layer integration. --- .env.example | 27 +++++++++++++++ Dockerfile.node-reth | 29 ---------------- Dockerfile.node-reth.local | 24 ------------- docker-compose.yml | 71 ++++++++++++++++++++++++-------------- justfile | 49 +++++++++++++++++++++++--- 5 files changed, 117 insertions(+), 83 deletions(-) delete mode 100644 Dockerfile.node-reth delete mode 100644 Dockerfile.node-reth.local diff --git a/.env.example b/.env.example index 4c91551..fc3598f 100644 --- a/.env.example +++ b/.env.example @@ -35,3 +35,30 @@ TIPS_UI_S3_CONFIG_TYPE=manual TIPS_UI_S3_ENDPOINT=http://localhost:7000 TIPS_UI_S3_ACCESS_KEY_ID=minioadmin TIPS_UI_S3_SECRET_ACCESS_KEY=minioadmin + +# OP Node (Consensus Layer) - Configuration for node-reth-consensus +OP_NODE_NETWORK= +OP_NODE_ROLLUP_CONFIG=/data/rollup.json +OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true +OP_NODE_SYNCMODE=consensus-layer +OP_NODE_L1_ETH_RPC=http://host.docker.internal:8545 +OP_NODE_L1_BEACON=http://host.docker.internal:3500 +OP_NODE_L1_RPC_KIND=debug_geth +OP_NODE_L1_TRUST_RPC=false +OP_NODE_L2_ENGINE_KIND=reth +OP_NODE_L2_ENGINE_AUTH=/data/jwtsecret +OP_NODE_P2P_LISTEN_IP=0.0.0.0 +OP_NODE_P2P_LISTEN_TCP_PORT=9222 +OP_NODE_P2P_LISTEN_UDP_PORT=9222 +OP_NODE_P2P_INTERNAL_IP=true +OP_NODE_P2P_ADVERTISE_IP=host.docker.internal +OP_NODE_P2P_NO_DISCOVERY=true +OP_NODE_RPC_ADDR=0.0.0.0 +OP_NODE_RPC_PORT=8545 +OP_NODE_LOG_LEVEL=debug +OP_NODE_LOG_FORMAT=json +OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log +OP_NODE_METRICS_ENABLED=true +OP_NODE_METRICS_ADDR=0.0.0.0 +OP_NODE_METRICS_PORT=7300 +STATSD_ADDRESS=172.17.0.1 diff --git a/Dockerfile.node-reth b/Dockerfile.node-reth deleted file mode 100644 index bc5c0d0..0000000 --- a/Dockerfile.node-reth +++ /dev/null @@ -1,29 +0,0 @@ -ARG NODE_RETH_REF=tips - -FROM rust:1.88 AS build - -ARG NODE_RETH_REF - -WORKDIR /app - -RUN apt-get update && \ - apt-get -y upgrade && \ - apt-get install -y git libclang-dev pkg-config curl build-essential && \ - rm -rf /var/lib/apt/lists/* - -RUN git clone https://github.com/base/node-reth.git . && \ - git checkout ${NODE_RETH_REF} - -RUN cargo build --release --bin base-reth-node - -FROM ubuntu:22.04 - -RUN apt-get update && \ - apt-get install -y jq curl && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /app - -ENTRYPOINT [ "./base-reth-node" ] - -COPY --from=build /app/target/release/base-reth-node ./ diff --git a/Dockerfile.node-reth.local b/Dockerfile.node-reth.local deleted file mode 100644 index 2729195..0000000 --- a/Dockerfile.node-reth.local +++ /dev/null @@ -1,24 +0,0 @@ -FROM rust:1.88 AS build - -WORKDIR /app - -RUN apt-get update && \ - apt-get -y upgrade && \ - apt-get install -y git libclang-dev pkg-config curl build-essential && \ - rm -rf /var/lib/apt/lists/* - -COPY . . - -RUN cargo build --release --bin base-reth-node - -FROM ubuntu:22.04 - -RUN apt-get update && \ - apt-get install -y jq curl && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /app - -ENTRYPOINT [ "./base-reth-node" ] - -COPY --from=build /app/target/release/base-reth-node ./ diff --git a/docker-compose.yml b/docker-compose.yml index 53f5969..0b537d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -73,36 +73,55 @@ services: exit 0; " - node-reth: - build: - context: ${NODE_RETH_LOCAL_PATH:-.} - dockerfile: ${NODE_RETH_DOCKERFILE:-Dockerfile.node-reth} - args: - NODE_RETH_REF: ${NODE_RETH_REF:-tips} +# Ethereum Nodes in TIPS +# ====================== +# +# ┌─────────────────────┬──────────────────────────────────┬─────────────────────────────────────┐ +# │ Component │ Production │ Local Development │ +# ├─────────────────────┼──────────────────────────────────┼─────────────────────────────────────┤ +# │ Sequencer │ │ │ +# │ - Consensus Layer │ "consensus" container running │ builder-playground op-node │ +# │ │ op-node │ (runs separately within Docker) │ +# │ - Execution Layer │ "execution" container running │ builder-playground op-geth │ +# │ │ base/node-reth │ (runs separately within Docker) │ +# │ - Builder │ "builder" container running │ op-rbuilder │ +# │ │ op-rbuilder │ (runs on host machine) │ +# ├─────────────────────┼──────────────────────────────────┼─────────────────────────────────────┤ +# │ RPC Node │ │ │ +# │ - Consensus Layer │ "consensus" container running │ node-reth-consensus (container) │ +# │ │ op-node │ │ +# │ - Execution Layer │ "execution" container running │ node-reth-execution (container) │ +# │ │ base/node-reth │ │ +# ├─────────────────────┼──────────────────────────────────┼─────────────────────────────────────┤ +# │ L1 Dependencies │ Externally hosted L1 node │ builder-playground el + beacon │ +# │ │ │ (el: 8545, beacon: 3500) │ +# └─────────────────────┴──────────────────────────────────┴─────────────────────────────────────┘ + + node-reth-execution: image: node-reth:latest - container_name: tips-node-reth - ports: - - "2222:8545" - - "2223:8546" - - "1115:1115" - - "30303:30303" + container_name: tips-node-reth-execution volumes: - - ./data/node-reth:/data - command: > - node - --datadir /data - --chain base-sepolia - --http - --http.addr 0.0.0.0 - --http.port 8545 - --http.api eth,net,web3,txpool,base - --ws - --ws.addr 0.0.0.0 - --ws.port 8546 - --ws.api eth,net,web3,txpool,base + - ~/.playground/devnet/jwtsecret:/data/jwtsecret:ro + - ~/.playground/devnet/rollup.json:/data/rollup.json:ro + - ~/.playground/devnet:/playground + command: ["node", "--datadir", "/playground/tips-node-reth"] restart: unless-stopped healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8545 -X POST -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' || exit 1"] interval: 10s timeout: 5s - retries: 10 \ No newline at end of file + retries: 10 + + node-reth-consensus: + image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.7 + container_name: tips-node-reth-consensus + depends_on: + node-reth-execution: + condition: service_healthy + volumes: + - ~/.playground/devnet/jwtsecret:/data/jwtsecret:ro + - ~/.playground/devnet/rollup.json:/data/rollup.json:ro + env_file: + - .env.docker + environment: + OP_NODE_L2_ENGINE_RPC: http://node-reth-execution:8551 diff --git a/justfile b/justfile index 2b0ac41..465afb1 100644 --- a/justfile +++ b/justfile @@ -35,13 +35,13 @@ stop-all: export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && docker compose down && docker compose rm && rm -rf data/ # Start every service running in docker, useful for demos -start-all: stop-all +start-all: stop-all ensure-node-reth-image export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio data/node-reth && docker compose build && docker compose up -d # Start every service in docker, except the one you're currently working on. e.g. just start-except ui ingress-rpc -start-except programs: stop-all +start-except programs: stop-all ensure-node-reth-image #!/bin/bash - all_services=(kafka kafka-setup minio minio-setup node-reth ingress-rpc audit ui) + all_services=(kafka kafka-setup minio minio-setup node-reth-execution node-reth-consensus ingress-rpc audit ui) exclude_services=({{ programs }}) # Create result array with services not in exclude list @@ -104,4 +104,45 @@ send-txn: txn=$(cast mktx --private-key {{ sender_key }} 0x0000000000000000000000000000000000000000 --value 0.01ether --nonce $nonce --chain-id 13 -r {{ builder_url }}) hash=$(curl -s {{ ingress_url }} -X POST -H "Content-Type: application/json" --data "{\"method\":\"eth_sendRawTransaction\",\"params\":[\"$txn\"],\"id\":1,\"jsonrpc\":\"2.0\"}" | jq -r ".result") cast receipt $hash -r {{ sequencer_url }} | grep status - cast receipt $hash -r {{ builder_url }} | grep status \ No newline at end of file + cast receipt $hash -r {{ builder_url }} | grep status + +# Build node-reth Docker image +# Args: +# ref: Git ref to build from GitHub (default: "main") +# local: Local path to build from (default: "" = use GitHub) +# Examples: +# just build-node-reth # Build from GitHub main branch +# just build-node-reth ref=v1.2.3 # Build from GitHub tag v1.2.3 +# just build-node-reth local=../node-reth # Build from local checkout +# Tags created: node-reth:latest and node-reth: (adds -dirty suffix if local working tree has changes) +build-node-reth ref="main" local="": + #!/bin/bash + if [ -z "{{ local }}" ]; then + echo "Building node-reth from GitHub ref: {{ ref }}" + # Get the commit hash for the ref + COMMIT_HASH=$(git ls-remote https://github.com/base/node-reth.git {{ ref }} | cut -f1 | cut -c1-8) + echo "Commit hash: $COMMIT_HASH" + docker build -t node-reth:latest -t node-reth:$COMMIT_HASH \ + -f https://raw.githubusercontent.com/base/node-reth/{{ ref }}/Dockerfile \ + https://github.com/base/node-reth.git#{{ ref }} + else + echo "Building node-reth from local path: {{ local }}" + # Get the commit hash from local repo + cd {{ local }} + COMMIT_HASH=$(git rev-parse --short=8 HEAD) + # Check if working tree is dirty + if ! git diff-index --quiet HEAD --; then + COMMIT_HASH="${COMMIT_HASH}-dirty" + fi + echo "Commit hash: $COMMIT_HASH" + docker build -t node-reth:latest -t node-reth:$COMMIT_HASH -f {{ local }}/Dockerfile {{ local }} + fi + +ensure-node-reth-image: + #!/bin/bash + if ! docker image inspect node-reth:latest >/dev/null 2>&1; then + echo "node-reth:latest image not found, building..." + just build-node-reth + else + echo "node-reth:latest image already exists" + fi From caaa4281aa9427814788f879c8eb75169464c993 Mon Sep 17 00:00:00 2001 From: Niran Babalola Date: Tue, 28 Oct 2025 16:47:31 -0500 Subject: [PATCH 3/7] Clean up unused env vars and data dirs --- .env.example | 7 ------- justfile | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index fc3598f..1e72c7e 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,3 @@ -# Node Reth - Build Configuration -# For remote builds from GitHub (default): -NODE_RETH_REF=tips -# For local builds, set these: -# NODE_RETH_LOCAL_PATH=/path/to/your/node-reth -# NODE_RETH_DOCKERFILE=Dockerfile.node-reth.local - # Ingress TIPS_INGRESS_ADDRESS=0.0.0.0 TIPS_INGRESS_PORT=8080 diff --git a/justfile b/justfile index 465afb1..4c4a561 100644 --- a/justfile +++ b/justfile @@ -36,7 +36,7 @@ stop-all: # Start every service running in docker, useful for demos start-all: stop-all ensure-node-reth-image - export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio data/node-reth && docker compose build && docker compose up -d + export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio && docker compose build && docker compose up -d # Start every service in docker, except the one you're currently working on. e.g. just start-except ui ingress-rpc start-except programs: stop-all ensure-node-reth-image @@ -59,11 +59,11 @@ start-except programs: stop-all ensure-node-reth-image fi done - export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio data/node-reth && docker compose build && docker compose up -d ${result_services[@]} + export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && mkdir -p data/kafka data/minio && docker compose build && docker compose up -d ${result_services[@]} ### RUN SERVICES ### deps-reset: - COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml docker compose down && docker compose rm && rm -rf data/ && mkdir -p data/kafka data/minio data/node-reth && docker compose up -d + COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml docker compose down && docker compose rm && rm -rf data/ && mkdir -p data/kafka data/minio && docker compose up -d deps: COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml docker compose down && docker compose rm && docker compose up -d From 73f5c7a37f6a450c33e45a110dea97d5415d3074 Mon Sep 17 00:00:00 2001 From: Niran Babalola Date: Tue, 28 Oct 2025 18:07:33 -0500 Subject: [PATCH 4/7] Pass CLI args to node-reth that are equivalent to op-rbuilder's --builder.playground flag --- docker-compose.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0b537d4..19ffe20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -103,8 +103,30 @@ services: volumes: - ~/.playground/devnet/jwtsecret:/data/jwtsecret:ro - ~/.playground/devnet/rollup.json:/data/rollup.json:ro + - ~/.playground/devnet/l2-genesis.json:/data/l2-genesis.json:ro - ~/.playground/devnet:/playground - command: ["node", "--datadir", "/playground/tips-node-reth"] + command: + - node + - --datadir + - /playground/tips-node-reth + - --chain + - /data/l2-genesis.json + - --http + - --http.addr + - 0.0.0.0 + - --http.port + - "8545" + - --authrpc.addr + - 0.0.0.0 + - --authrpc.port + - "8551" + - --authrpc.jwtsecret + - /data/jwtsecret + - --disable-discovery + env_file: + - .env.docker + environment: + PLAYGROUND_DIR: /playground restart: unless-stopped healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8545 -X POST -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' || exit 1"] From 2e0d3da1594ff7ea3ba55be6a782acf303b21425 Mon Sep 17 00:00:00 2001 From: Niran Babalola Date: Tue, 28 Oct 2025 22:37:10 -0500 Subject: [PATCH 5/7] feat: automate builder-playground P2P configuration The playground-env target extracts the builder-playground host IP and op-node peer ID from logs, eliminating manual configuration. Running 'just sync-env' now automatically generates the correct P2P static peer configuration for connecting to builder-playground. --- .env.example | 5 ++--- .gitignore | 1 + justfile | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 1e72c7e..8e0c13b 100644 --- a/.env.example +++ b/.env.example @@ -33,10 +33,9 @@ TIPS_UI_S3_SECRET_ACCESS_KEY=minioadmin OP_NODE_NETWORK= OP_NODE_ROLLUP_CONFIG=/data/rollup.json OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true -OP_NODE_SYNCMODE=consensus-layer OP_NODE_L1_ETH_RPC=http://host.docker.internal:8545 OP_NODE_L1_BEACON=http://host.docker.internal:3500 -OP_NODE_L1_RPC_KIND=debug_geth +OP_NODE_L1_RPC_KIND=basic OP_NODE_L1_TRUST_RPC=false OP_NODE_L2_ENGINE_KIND=reth OP_NODE_L2_ENGINE_AUTH=/data/jwtsecret @@ -45,7 +44,7 @@ OP_NODE_P2P_LISTEN_TCP_PORT=9222 OP_NODE_P2P_LISTEN_UDP_PORT=9222 OP_NODE_P2P_INTERNAL_IP=true OP_NODE_P2P_ADVERTISE_IP=host.docker.internal -OP_NODE_P2P_NO_DISCOVERY=true +OP_NODE_P2P_NO_DISCOVERY=false OP_NODE_RPC_ADDR=0.0.0.0 OP_NODE_RPC_PORT=8545 OP_NODE_LOG_LEVEL=debug diff --git a/.gitignore b/.gitignore index f380f46..3126c46 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ Thumbs.db # Environment variables .env .env.docker +.env.playground /ui/.env # Claude diff --git a/justfile b/justfile index 4c4a561..a2980b5 100644 --- a/justfile +++ b/justfile @@ -22,7 +22,16 @@ sync: deps-reset ### REFORMAT ### just fix -sync-env: +playground-env: + #!/bin/bash + HOST_IP=$(docker run --rm alpine nslookup host.docker.internal | awk '/Address: / && $2 !~ /:/ {print $2; exit}') + PEER_ID=$(grep 'started p2p host' ~/.playground/devnet/logs/op-node.log | sed -n 's/.*peerID=\([^ ]*\).*/\1/p' | head -1) + echo "BUILDER_PLAYGROUND_HOST_IP=$HOST_IP" > .env.playground + echo "BUILDER_PLAYGROUND_PEER_ID=$PEER_ID" >> .env.playground + echo "OP_NODE_P2P_STATIC=/ip4/$HOST_IP/tcp/9003/p2p/$PEER_ID" >> .env.playground + cat .env.playground + +sync-env: playground-env cp .env.example .env cp .env.example ./ui/.env cp .env.example .env.docker @@ -30,6 +39,8 @@ sync-env: sed -i '' 's/localhost:9092/host.docker.internal:9094/g' ./.env.docker # Change other dependencies sed -i '' 's/localhost/host.docker.internal/g' ./.env.docker + # Append playground-specific P2P config + cat .env.playground >> .env.docker stop-all: export COMPOSE_FILE=docker-compose.yml:docker-compose.tips.yml && docker compose down && docker compose rm && rm -rf data/ From f330d5373aa003f7926ce5c7d1a53924282632f3 Mon Sep 17 00:00:00 2001 From: William Law Date: Fri, 31 Oct 2025 12:01:00 -0400 Subject: [PATCH 6/7] just start-all works now --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 19ffe20..48117d5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,13 +98,14 @@ services: # └─────────────────────┴──────────────────────────────────┴─────────────────────────────────────┘ node-reth-execution: - image: node-reth:latest + image: ghcr.io/base/node-reth:latest container_name: tips-node-reth-execution volumes: - ~/.playground/devnet/jwtsecret:/data/jwtsecret:ro - ~/.playground/devnet/rollup.json:/data/rollup.json:ro - ~/.playground/devnet/l2-genesis.json:/data/l2-genesis.json:ro - ~/.playground/devnet:/playground + entrypoint: ["/app/base-reth-node"] command: - node - --datadir @@ -127,6 +128,8 @@ services: - .env.docker environment: PLAYGROUND_DIR: /playground + RETH_CHAIN: /data/l2-genesis.json + NODE_TYPE: base restart: unless-stopped healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8545 -X POST -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' || exit 1"] From 434c25ab170d22106f6fed7707486c6e2d571f4b Mon Sep 17 00:00:00 2001 From: William Law Date: Mon, 3 Nov 2025 14:58:51 -0500 Subject: [PATCH 7/7] remove unused just cmds --- justfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/justfile b/justfile index a2980b5..77642c8 100644 --- a/justfile +++ b/justfile @@ -85,12 +85,6 @@ audit: ingress-rpc: cargo run --bin tips-ingress-rpc -maintenance: - cargo run --bin tips-maintenance - -ingress-writer: - cargo run --bin tips-ingress-writer - ui: cd ui && yarn dev