build reth for taiko
This commit is contained in:
@@ -54,6 +54,7 @@ ARG PROFILE=maxperf
|
||||
ARG BUILD_OP_RETH=false
|
||||
ARG BUILD_BASE_RETH=false
|
||||
ARG BUILD_BSC_RETH=false
|
||||
ARG BUILD_ALETHIA_RETH=false
|
||||
|
||||
# Set up cargo for maximum performance with aggressive optimizations
|
||||
RUN mkdir -p /root/.cargo && \
|
||||
@@ -262,6 +263,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
echo "DEBUG: BUILD_OP_RETH=[$BUILD_OP_RETH]" && \
|
||||
echo "DEBUG: BUILD_BASE_RETH=[$BUILD_BASE_RETH]" && \
|
||||
echo "DEBUG: BUILD_BSC_RETH=[$BUILD_BSC_RETH]" && \
|
||||
echo "DEBUG: BUILD_ALETHIA_RETH=[$BUILD_ALETHIA_RETH]" && \
|
||||
if [ "$BUILD_OP_RETH" = "true" ]; then \
|
||||
echo "DEBUG: Taking OP_RETH branch" && \
|
||||
echo "Building op-reth with optimism feature" && \
|
||||
@@ -277,6 +279,11 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
echo "Building reth-bsc" && \
|
||||
cargo build --profile $PROFILE --locked --bin reth-bsc --features jemalloc,asm-keccak && \
|
||||
cp target/$PROFILE/reth-bsc /usr/local/bin/reth; \
|
||||
elif [ "$BUILD_ALETHIA_RETH" = "true" ]; then \
|
||||
echo "DEBUG: Taking ALETHIA_RETH branch" && \
|
||||
echo "Building alethia-reth (Taiko)" && \
|
||||
cargo build --profile $PROFILE --locked --bin alethia-reth && \
|
||||
cp target/$PROFILE/alethia-reth /usr/local/bin/reth; \
|
||||
else \
|
||||
echo "DEBUG: Taking DEFAULT branch" && \
|
||||
echo "Building standard reth" && \
|
||||
|
||||
@@ -4,6 +4,19 @@ x-logging-defaults: &logging-defaults
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
# This node is built from source with architecture-specific optimizations
|
||||
# Build command: docker compose build --build-arg ARCH_TARGET=${ARCH_TARGET:-native} taiko-alethia-reth
|
||||
#
|
||||
# IMPORTANT: Cache optimization considerations
|
||||
|
||||
# If running multiple nodes on the same machine, be aware that:
|
||||
# - L3 cache is shared across all cores, causing cache contention
|
||||
# - Multiple nodes compete for cache space, reducing optimization effectiveness
|
||||
|
||||
# - Consider CPU pinning to minimize cache conflicts:
|
||||
# docker run --cpuset-cpus="0-7" taiko-alethia-reth # Pin to specific cores
|
||||
# - For AMD X3D CPUs, CCD0 (cores 0-7) has the 3D V-Cache
|
||||
# - For multi-node setups, generic builds may perform better than cache-optimized ones
|
||||
|
||||
# Usage:
|
||||
#
|
||||
@@ -30,7 +43,17 @@ x-logging-defaults: &logging-defaults
|
||||
|
||||
services:
|
||||
taiko-alethia-reth:
|
||||
image: ${TAIKO_RETH_IMAGE:-us-docker.pkg.dev/evmchain/images/taiko-reth}:${TAIKO_ALETHIA_RETH_VERSION:-v1.1.0}
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: reth.Dockerfile
|
||||
args:
|
||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||
RETH_VERSION: ${TAIKO_ALETHIA_RETH_VERSION:-v1.1.0}
|
||||
RETH_REPO: ${TAIKO_ALETHIA_RETH_REPO:-https://github.com/taikoxyz/alethia-reth}
|
||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||
BUILD_ALETHIA_RETH: true
|
||||
sysctls:
|
||||
# TCP Performance
|
||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||
|
||||
@@ -4,6 +4,19 @@ x-logging-defaults: &logging-defaults
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
# This node is built from source with architecture-specific optimizations
|
||||
# Build command: docker compose build --build-arg ARCH_TARGET=${ARCH_TARGET:-native} taiko-alethia-reth-pruned
|
||||
#
|
||||
# IMPORTANT: Cache optimization considerations
|
||||
|
||||
# If running multiple nodes on the same machine, be aware that:
|
||||
# - L3 cache is shared across all cores, causing cache contention
|
||||
# - Multiple nodes compete for cache space, reducing optimization effectiveness
|
||||
|
||||
# - Consider CPU pinning to minimize cache conflicts:
|
||||
# docker run --cpuset-cpus="0-7" taiko-alethia-reth-pruned # Pin to specific cores
|
||||
# - For AMD X3D CPUs, CCD0 (cores 0-7) has the 3D V-Cache
|
||||
# - For multi-node setups, generic builds may perform better than cache-optimized ones
|
||||
|
||||
# Usage:
|
||||
#
|
||||
@@ -30,7 +43,17 @@ x-logging-defaults: &logging-defaults
|
||||
|
||||
services:
|
||||
taiko-alethia-reth-pruned:
|
||||
image: ${TAIKO_RETH_IMAGE:-us-docker.pkg.dev/evmchain/images/taiko-reth}:${TAIKO_ALETHIA_RETH_VERSION:-v1.1.0}
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: reth.Dockerfile
|
||||
args:
|
||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||
RETH_VERSION: ${TAIKO_ALETHIA_RETH_VERSION:-v1.1.0}
|
||||
RETH_REPO: ${TAIKO_ALETHIA_RETH_REPO:-https://github.com/taikoxyz/alethia-reth}
|
||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||
BUILD_ALETHIA_RETH: true
|
||||
sysctls:
|
||||
# TCP Performance
|
||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||
|
||||
Reference in New Issue
Block a user