@@ -8,14 +8,14 @@ if [ -f "versions.env" ]; then
88fi
99
1010# Default values
11- RETH_REPO =" ${RETH_REPO :- https:// github.com/ paradigmxyz / reth / } "
12- RETH_VERSION =" ${RETH_VERSION :- main } "
11+ OPTIMISM_REPO =" ${OPTIMISM_REPO :- https:// github.com/ ethereum-optimism / optimism / } "
12+ OPTIMISM_VERSION =" ${OPTIMISM_VERSION :- develop } "
1313BUILD_DIR=" ${BUILD_DIR:- ./ build} "
1414OUTPUT_DIR=" ${OUTPUT_DIR:- ../ bin} "
1515
16- echo " Building reth binary..."
17- echo " Repository: $RETH_REPO "
18- echo " Version/Commit: $RETH_VERSION "
16+ echo " Building op- reth binary..."
17+ echo " Repository: $OPTIMISM_REPO "
18+ echo " Version/Commit: $OPTIMISM_VERSION "
1919echo " Build directory: $BUILD_DIR "
2020echo " Output directory: $OUTPUT_DIR "
2121
@@ -24,28 +24,32 @@ mkdir -p "$BUILD_DIR"
2424cd " $BUILD_DIR "
2525
2626# Clone or update repository
27- if [ -d " reth " ]; then
28- echo " Updating existing reth repository..."
29- cd reth
27+ if [ -d " optimism " ]; then
28+ echo " Updating existing optimism repository..."
29+ cd optimism
3030 git fetch origin
3131
3232 # ensure remote matches the repository
33- git remote set-url origin " $RETH_REPO "
33+ git remote set-url origin " $OPTIMISM_REPO "
3434 git fetch origin
3535else
36- echo " Cloning reth repository..."
37- git clone " $RETH_REPO " reth
38- cd reth
36+ echo " Cloning optimism repository..."
37+ git clone " $OPTIMISM_REPO " optimism
38+ cd optimism
3939fi
4040
4141# Checkout specified version/commit
42- echo " Checking out version: $RETH_VERSION "
43- git checkout -f " $RETH_VERSION "
42+ echo " Checking out version: $OPTIMISM_VERSION "
43+ git checkout -f " $OPTIMISM_VERSION "
44+
45+ pushd rust
4446
4547# Build the binary using cargo
46- echo " Building reth with cargo..."
48+ echo " Building op- reth with cargo..."
4749# Build with performance features matching CI workflow
48- cargo build --features asm-keccak,jemalloc --bin op-reth --profile maxperf --manifest-path crates/optimism/bin/Cargo.toml
50+ cargo build --features asm-keccak,jemalloc --bin op-reth --profile maxperf --manifest-path op-reth/bin/Cargo.toml
51+
52+ popd
4953
5054# Copy binary to output directory
5155echo " Copying binary to output directory..."
5862 FINAL_OUTPUT_DIR=" ../../$OUTPUT_DIR "
5963fi
6064mkdir -p " $FINAL_OUTPUT_DIR "
61- cp target/maxperf/op-reth " $FINAL_OUTPUT_DIR /"
65+ cp rust/ target/maxperf/op-reth " $FINAL_OUTPUT_DIR /"
6266
63- echo " reth binary built successfully and placed in $FINAL_OUTPUT_DIR /op-reth"
67+ echo " op- reth binary built successfully and placed in $FINAL_OUTPUT_DIR /op-reth"
0 commit comments