From d35f94db804376a555c1b987ddecd7cefb10308b Mon Sep 17 00:00:00 2001 From: goldsquid Date: Fri, 1 Aug 2025 17:40:35 +0700 Subject: [PATCH] build base reth with flashbots --- op/reth/base-mainnet-op-reth-archive-trace.yml | 5 ++--- op/reth/base-mainnet-op-reth-minimal-trace.yml | 14 ++++++++++++-- op/reth/base-mainnet-op-reth-pruned-trace.yml | 14 ++++++++++++-- op/reth/base-sepolia-op-reth-archive-trace.yml | 5 ++--- op/reth/base-sepolia-op-reth-minimal-trace.yml | 5 ++--- op/reth/base-sepolia-op-reth-pruned-trace.yml | 5 ++--- reth.Dockerfile | 4 ++++ 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/op/reth/base-mainnet-op-reth-archive-trace.yml b/op/reth/base-mainnet-op-reth-archive-trace.yml index a6a093f2..f32c83df 100644 --- a/op/reth/base-mainnet-op-reth-archive-trace.yml +++ b/op/reth/base-mainnet-op-reth-archive-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: base-mainnet-op-reth: - image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_MAINNET_RETH_VERSION:-v1.6.0} + image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_MAINNET_RETH_VERSION:-v0.1.6} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle @@ -53,7 +53,7 @@ services: - 8545 - 9001 - 8551 - entrypoint: [op-reth, node] + entrypoint: [base-reth-node, node] command: - --chain=base - --datadir=/root/.local/share/reth @@ -70,7 +70,6 @@ services: - --rpc.max-blocks-per-filter=0 - --rpc.max-connections=50000 - --rpc.max-logs-per-response=0 - - --websocket-url=wss://mainnet.flashblocks.base.org/ws - --http - --http.addr=0.0.0.0 - --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev diff --git a/op/reth/base-mainnet-op-reth-minimal-trace.yml b/op/reth/base-mainnet-op-reth-minimal-trace.yml index c7e3cc5a..d80aaade 100644 --- a/op/reth/base-mainnet-op-reth-minimal-trace.yml +++ b/op/reth/base-mainnet-op-reth-minimal-trace.yml @@ -30,7 +30,17 @@ x-logging-defaults: &logging-defaults services: base-mainnet-op-reth-minimal: - image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_MAINNET_RETH_VERSION:-v1.6.0} + build: + context: ./ + dockerfile: reth.Dockerfile + args: + LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm} + LLVM_VERSION: ${LLVM_VERSION:-20250514100911} + RETH_VERSION: ${BASE_MAINNET_RETH_VERSION:-v0.1.6} + RETH_REPO: ${BASE_MAINNET_RETH_REPO:-https://github.com/base/node-reth.git} + ARCH_TARGET: ${ARCH_TARGET:-native} + PROFILE: ${RETH_BUILD_PROFILE:-maxperf} + BUILD_OP_RETH: true sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle @@ -53,7 +63,7 @@ services: - 8545 - 9001 - 8551 - entrypoint: [op-reth, node] + entrypoint: [base-reth-node, node] command: - --chain=base - --datadir=/root/.local/share/reth diff --git a/op/reth/base-mainnet-op-reth-pruned-trace.yml b/op/reth/base-mainnet-op-reth-pruned-trace.yml index 8621d2aa..2ad96141 100644 --- a/op/reth/base-mainnet-op-reth-pruned-trace.yml +++ b/op/reth/base-mainnet-op-reth-pruned-trace.yml @@ -30,7 +30,17 @@ x-logging-defaults: &logging-defaults services: base-mainnet-op-reth-pruned: - image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_MAINNET_RETH_VERSION:-v1.6.0} + build: + context: ./ + dockerfile: reth.Dockerfile + args: + LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm} + LLVM_VERSION: ${LLVM_VERSION:-20250514100911} + RETH_VERSION: ${BASE_MAINNET_RETH_VERSION:-v0.1.6} + RETH_REPO: ${BASE_MAINNET_RETH_REPO:-https://github.com/base/node-reth.git} + ARCH_TARGET: ${ARCH_TARGET:-native} + PROFILE: ${RETH_BUILD_PROFILE:-maxperf} + BUILD_OP_RETH: true sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle @@ -53,7 +63,7 @@ services: - 8545 - 9001 - 8551 - entrypoint: [op-reth, node] + entrypoint: [base-reth-node, node] command: - --chain=base - --datadir=/root/.local/share/reth diff --git a/op/reth/base-sepolia-op-reth-archive-trace.yml b/op/reth/base-sepolia-op-reth-archive-trace.yml index 34a8a706..2660bd69 100644 --- a/op/reth/base-sepolia-op-reth-archive-trace.yml +++ b/op/reth/base-sepolia-op-reth-archive-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: base-sepolia-op-reth: - image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_SEPOLIA_RETH_VERSION:-v1.6.0} + image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_SEPOLIA_RETH_VERSION:-v0.1.6} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle @@ -53,7 +53,7 @@ services: - 8545 - 9001 - 8551 - entrypoint: [op-reth, node] + entrypoint: [base-reth-node, node] command: - --chain=base-sepolia - --datadir=/root/.local/share/reth @@ -70,7 +70,6 @@ services: - --rpc.max-blocks-per-filter=0 - --rpc.max-connections=50000 - --rpc.max-logs-per-response=0 - - --websocket-url=wss://sepolia.flashblocks.base.org/ws - --http - --http.addr=0.0.0.0 - --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev diff --git a/op/reth/base-sepolia-op-reth-minimal-trace.yml b/op/reth/base-sepolia-op-reth-minimal-trace.yml index 4f5d2534..4ef5fa88 100644 --- a/op/reth/base-sepolia-op-reth-minimal-trace.yml +++ b/op/reth/base-sepolia-op-reth-minimal-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: base-sepolia-op-reth-minimal: - image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_SEPOLIA_RETH_VERSION:-v1.6.0} + image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_SEPOLIA_RETH_VERSION:-v0.1.6} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle @@ -53,7 +53,7 @@ services: - 8545 - 9001 - 8551 - entrypoint: [op-reth, node] + entrypoint: [base-reth-node, node] command: - --chain=base-sepolia - --datadir=/root/.local/share/reth @@ -70,7 +70,6 @@ services: - --rpc.max-blocks-per-filter=0 - --rpc.max-connections=50000 - --rpc.max-logs-per-response=0 - - --websocket-url=wss://sepolia.flashblocks.base.org/ws - --http - --http.addr=0.0.0.0 - --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev diff --git a/op/reth/base-sepolia-op-reth-pruned-trace.yml b/op/reth/base-sepolia-op-reth-pruned-trace.yml index 67fb946b..17417eb6 100644 --- a/op/reth/base-sepolia-op-reth-pruned-trace.yml +++ b/op/reth/base-sepolia-op-reth-pruned-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: base-sepolia-op-reth-pruned: - image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_SEPOLIA_RETH_VERSION:-v1.6.0} + image: ${BASE_RETH_IMAGE:-ghcr.io/paradigmxyz/op-reth}:${BASE_SEPOLIA_RETH_VERSION:-v0.1.6} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle @@ -53,7 +53,7 @@ services: - 8545 - 9001 - 8551 - entrypoint: [op-reth, node] + entrypoint: [base-reth-node, node] command: - --chain=base-sepolia - --datadir=/root/.local/share/reth @@ -71,7 +71,6 @@ services: - --rpc.max-blocks-per-filter=0 - --rpc.max-connections=50000 - --rpc.max-logs-per-response=0 - - --websocket-url=wss://sepolia.flashblocks.base.org/ws - --http - --http.addr=0.0.0.0 - --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev diff --git a/reth.Dockerfile b/reth.Dockerfile index cdb43b64..68dfb827 100644 --- a/reth.Dockerfile +++ b/reth.Dockerfile @@ -255,6 +255,10 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ echo "Building op-reth with optimism feature" && \ cargo build --profile $PROFILE --locked --bin op-reth --features jemalloc,asm-keccak --manifest-path crates/optimism/bin/Cargo.toml && \ cp target/$PROFILE/op-reth /usr/local/bin/op-reth; \ + elif [ "$BUILD_BASE_RETH" = "true" ]; then \ + echo "Building base-reth-node with flashbots feature" && \ + cargo build --profile $PROFILE --bin base-reth-node --release && \ + cp target/$PROFILE/op-reth /usr/local/bin/base-reth-node; \ else \ echo "Building standard reth" && \ cargo build --profile $PROFILE --locked --bin reth --features jemalloc,asm-keccak && \