Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/scripts/run-example-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BENCHMARK_CONFIGS=(
configs/examples/erc20.yml
configs/examples/simulator.yml
configs/examples/sload.yml
configs/examples/rbuilder.yml
configs/examples/builder.yml
configs/examples/base-reth-node.yml
configs/examples/sstore.yml
# configs/examples/snapshot.yml
Expand All @@ -29,6 +29,6 @@ for config in "${BENCHMARK_CONFIGS[@]}"; do
--output-dir $TEMP_DIR/output \
--reth-bin $TEMP_DIR/bin/reth \
--geth-bin $TEMP_DIR/bin/geth \
--rbuilder-bin $TEMP_DIR/bin/rbuilder \
--builder-bin $TEMP_DIR/bin/builder \
--base-reth-node-bin $TEMP_DIR/bin/base-reth-node
done
done
32 changes: 16 additions & 16 deletions .github/workflows/_build-binaries.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Reusable workflow for building all binaries
# This workflow is called by other workflows to build reth, geth, rbuilder, op-program, and contracts
# This workflow is called by other workflows to build reth, geth, builder, op-program, and contracts
name: Build Binaries

on:
Expand All @@ -15,8 +15,8 @@ on:
required: false
type: string
default: "6cbfcd5161083bcd4052edc3022d9f99c6fe40e0"
rbuilder_version:
description: "Rbuilder version to build"
builder_version:
description: "Builder version to build"
required: false
type: string
default: "23f42c8e78ba3abb45a8840df7037a27e196e601"
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
path: ~/bin/geth
retention-days: 1

build-rbuilder:
build-builder:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -161,28 +161,28 @@ jobs:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0

- name: Cache rbuilder binary
- name: Cache builder binary
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
id: cache-rbuilder
id: cache-builder
with:
path: ~/bin/rbuilder
key: ${{ runner.os }}-rbuilder-${{ inputs.rbuilder_version }}
path: ~/bin/builder
key: ${{ runner.os }}-builder-${{ inputs.builder_version }}

- name: Build rbuilder
if: steps.cache-rbuilder.outputs.cache-hit != 'true'
- name: Build builder
if: steps.cache-builder.outputs.cache-hit != 'true'
run: |
unset CI
mkdir -p ~/bin
cd clients
RBUILDER_VERSION=${{ inputs.rbuilder_version }} OUTPUT_DIR=~/bin ./build-rbuilder.sh
# Rename op-rbuilder to rbuilder for consistency
[ -f ~/bin/op-rbuilder ] && mv ~/bin/op-rbuilder ~/bin/rbuilder || true
BUILDER_VERSION=${{ inputs.builder_version }} OUTPUT_DIR=~/bin ./build-builder.sh
# Rename op-rbuilder to builder for consistency
[ -f ~/bin/op-rbuilder ] && mv ~/bin/op-rbuilder ~/bin/builder || true

- name: Upload rbuilder artifact
- name: Upload builder artifact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: rbuilder
path: ~/bin/rbuilder
name: builder
path: ~/bin/builder
retention-days: 1

build-base-reth-node:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
with:
reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
rbuilder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
base_reth_node_version: main

basic-benchmarks:
Expand Down Expand Up @@ -113,10 +113,10 @@ jobs:
name: geth
path: ${{ runner.temp }}/bin/

- name: Download rbuilder binary
- name: Download builder binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: rbuilder
name: builder
path: ${{ runner.temp }}/bin/

- name: Download base-reth-node binary
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
rbuilder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
base_reth_node_version: main

example-benchmarks:
Expand Down Expand Up @@ -62,10 +62,10 @@ jobs:
name: geth
path: ${{ runner.temp }}/bin/

- name: Download rbuilder binary
- name: Download builder binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: rbuilder
name: builder
path: ${{ runner.temp }}/bin/

- name: Download base-reth-node binary
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/public-benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
rbuilder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601

basic-benchmarks:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ build-reth:
build-geth:
cd clients && ./build-geth.sh

.PHONY: build-rbuilder
build-rbuilder:
cd clients && ./build-rbuilder.sh
.PHONY: build-builder
build-builder:
cd clients && ./build-builder.sh

.PHONY: build-binaries
build-binaries: build-reth build-geth build-rbuilder
build-binaries: build-reth build-geth build-builder

.PHONY: build-frontend
build-frontend:
Expand Down
28 changes: 14 additions & 14 deletions clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Builds the op-geth binary from the Ethereum Optimism op-geth repository using ju
- Version: `optimism`
- Build tool: `go run build/ci.go install`

### build-rbuilder.sh
Builds the op-rbuilder binary from the op-rbuilder repository using Cargo.
### build-builder.sh
Builds the builder binary from the op-rbuilder repository using Cargo.

**Default Configuration:**
- Repository: `https://github.com/base/op-rbuilder`
Expand All @@ -42,8 +42,8 @@ make build-reth
# Build only geth
make build-geth

# Build only op-rbuilder
make build-rbuilder
# Build only builder
make build-builder
```

### Direct Script Execution
Expand All @@ -56,8 +56,8 @@ cd clients
# Build geth with defaults
./build-geth.sh

# Build op-rbuilder with defaults
./build-rbuilder.sh
# Build builder with defaults
./build-builder.sh
```

## Version Management
Expand All @@ -75,7 +75,7 @@ Modify the `versions.env` file to change defaults for all builds:
# Edit versions.env to update default versions
RETH_VERSION="v0.2.0-beta.5"
GETH_VERSION="v1.13.0"
RBUILDER_VERSION="your-commit-hash"
BUILDER_VERSION="your-commit-hash"
```

#### 2. Environment Variables
Expand All @@ -88,8 +88,8 @@ RETH_REPO="https://github.com/paradigmxyz/reth/" RETH_VERSION="v0.1.0" ./build-r
# Build geth from a fork
GETH_REPO="https://github.com/your-fork/op-geth/" GETH_VERSION="your-branch" ./build-geth.sh

# Build op-rbuilder from a different commit
RBUILDER_VERSION="main" ./build-rbuilder.sh
# Build builder from a different commit
BUILDER_VERSION="main" ./build-builder.sh
```

### Available Environment Variables
Expand All @@ -106,9 +106,9 @@ RBUILDER_VERSION="main" ./build-rbuilder.sh
- `BUILD_DIR`: Directory for source code (default: ./build)
- `OUTPUT_DIR`: Directory for built binaries (default: ../bin)

#### For op-rbuilder (build-rbuilder.sh):
- `RBUILDER_REPO`: Git repository URL (default: https://github.com/haardikk21/op-rbuilder)
- `RBUILDER_VERSION`: Git branch, tag, or commit hash (default: main)
#### For builder (build-builder.sh):
- `BUILDER_REPO`: Git repository URL (default: https://github.com/base/op-rbuilder)
- `BUILDER_VERSION`: Git branch, tag, or commit hash (default: main)
- `BUILD_DIR`: Directory for source code (default: ./build)
- `OUTPUT_DIR`: Directory for built binaries (default: ../bin)

Expand All @@ -122,7 +122,7 @@ RBUILDER_VERSION="main" ./build-rbuilder.sh
- Go toolchain
- Git

### For op-rbuilder:
### For builder:
- Rust and Cargo installed
- Git

Expand All @@ -131,4 +131,4 @@ RBUILDER_VERSION="main" ./build-rbuilder.sh
Built binaries will be placed in the `bin/` directory at the project root:
- `bin/reth` - The reth binary
- `bin/geth` - The op-geth binary
- `bin/op-rbuilder` - The op-rbuilder binary
- `bin/op-rbuilder` - The builder binary
20 changes: 10 additions & 10 deletions clients/build-rbuilder.sh → clients/build-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ if [ -f "versions.env" ]; then
fi

# Default values
RBUILDER_REPO="${RBUILDER_REPO:-https://github.com/base/op-rbuilder}"
RBUILDER_VERSION="${RBUILDER_VERSION:-main}"
BUILDER_REPO="${BUILDER_REPO:-https://github.com/base/op-rbuilder}"
BUILDER_VERSION="${BUILDER_VERSION:-main}"
BUILD_DIR="${BUILD_DIR:-./build}"
OUTPUT_DIR="${OUTPUT_DIR:-../bin}"

echo "Building op-rbuilder binary..."
echo "Repository: $RBUILDER_REPO"
echo "Version/Commit: $RBUILDER_VERSION"
echo "Building builder binary..."
echo "Repository: $BUILDER_REPO"
echo "Version/Commit: $BUILDER_VERSION"
echo "Build directory: $BUILD_DIR"
echo "Output directory: $OUTPUT_DIR"

Expand All @@ -29,17 +29,17 @@ if [ -d "op-rbuilder" ]; then
cd op-rbuilder

# ensure remote matches the repository
git remote set-url origin "$RBUILDER_REPO"
git remote set-url origin "$BUILDER_REPO"
git fetch origin
else
echo "Cloning op-rbuilder repository..."
git clone "$RBUILDER_REPO" op-rbuilder
git clone "$BUILDER_REPO" op-rbuilder
cd op-rbuilder
fi

# Checkout specified version/commit
echo "Checking out version: $RBUILDER_VERSION"
git checkout -f "$RBUILDER_VERSION"
echo "Checking out version: $BUILDER_VERSION"
git checkout -f "$BUILDER_VERSION"

# Build the binary using cargo
echo "Building op-rbuilder with cargo..."
Expand Down Expand Up @@ -67,4 +67,4 @@ else
exit 1
fi

echo "op-rbuilder binary built successfully and placed in $FINAL_OUTPUT_DIR/op-rbuilder"
echo "Builder binary built successfully and placed in $FINAL_OUTPUT_DIR/op-rbuilder"
10 changes: 5 additions & 5 deletions clients/versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
RETH_REPO="https://github.com/paradigmxyz/reth/"
RETH_VERSION="v1.9.3"

# Op-Geth Configuration
# Op-Geth Configuration
GETH_REPO="https://github.com/ethereum-optimism/op-geth/"
GETH_VERSION="v1.101604.0"

# Op-Rbuilder Configuration
RBUILDER_REPO="https://github.com/base/op-rbuilder"
RBUILDER_VERSION="main"
# Builder Configuration
BUILDER_REPO="https://github.com/base/op-rbuilder"
BUILDER_VERSION="main"

# Base Reth Node Configuration
BASE_RETH_NODE_REPO="https://github.com/base/base"
BASE_RETH_NODE_VERSION="main"

# Build Configuration
# BUILD_DIR="./build"
# OUTPUT_DIR="../bin"
# OUTPUT_DIR="../bin"
4 changes: 2 additions & 2 deletions configs/examples/base-reth-node-flashblocks-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Base Reth Node flashblocks metrics test
description: Test base-reth-node flashblock metrics collection with rbuilder as sequencer and base-reth-node as validator
description: Test base-reth-node flashblock metrics collection with builder as sequencer and base-reth-node as validator
payloads:
- name: Transfer Only
type: transfer-only
Expand All @@ -12,7 +12,7 @@ benchmarks:
- transfer-only
- type: node_type
values:
- rbuilder
- builder
- type: validator_node_type
values:
- base-reth-node
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Rbuilder transfer throughput test
description: Test rbuilder transfer throughput with different number of hot accounts (meant to stress test parallelism)
name: Builder transfer throughput test
description: Test builder transfer throughput with different number of hot accounts (meant to stress test parallelism)
payloads:
- name: Transfer Only
type: transfer-only
Expand All @@ -12,7 +12,7 @@ benchmarks:
- transfer-only
- type: node_type
values:
- rbuilder
- builder
- type: validator_node_type
values:
- reth
Expand Down
Loading