From dbeeb4fd24495b685f6196bcb158f9f6868d2d7d Mon Sep 17 00:00:00 2001 From: Himess <95512809+Himess@users.noreply.github.com> Date: Sun, 8 Feb 2026 18:21:18 +0300 Subject: [PATCH] refactor: rename rbuilder to builder Rename all internal references from "rbuilder" to "builder" across the codebase. External references to the upstream op-rbuilder project (repo URL, cargo binary name, Prometheus metric keys) are preserved. Closes #163 --- .github/scripts/run-example-benchmarks.sh | 6 +-- .github/workflows/_build-binaries.yaml | 32 ++++++------ .github/workflows/build.yaml | 6 +-- .github/workflows/examples.yaml | 6 +-- .github/workflows/public-benchmarks.yaml | 2 +- Makefile | 8 +-- clients/README.md | 28 +++++------ .../{build-rbuilder.sh => build-builder.sh} | 20 ++++---- clients/versions.env | 10 ++-- .../base-reth-node-flashblocks-test.yml | 4 +- .../examples/{rbuilder.yml => builder.yml} | 6 +-- report/src/metricDefinitions.ts | 28 +++++------ .../clients/{rbuilder => builder}/client.go | 50 +++++++++---------- .../flashblocks_client.go | 4 +- .../clients/{rbuilder => builder}/metrics.go | 2 +- .../{rbuilder => builder}/options/options.go | 8 +-- runner/clients/interface.go | 8 +-- runner/clients/types/flashblocks_client.go | 2 +- runner/config/client.go | 8 +-- runner/flags/flags.go | 10 ++-- runner/network/network_benchmark.go | 4 +- 21 files changed, 126 insertions(+), 126 deletions(-) rename clients/{build-rbuilder.sh => build-builder.sh} (75%) rename configs/examples/{rbuilder.yml => builder.yml} (68%) rename runner/clients/{rbuilder => builder}/client.go (61%) rename runner/clients/{rbuilder => builder}/flashblocks_client.go (98%) rename runner/clients/{rbuilder => builder}/metrics.go (99%) rename runner/clients/{rbuilder => builder}/options/options.go (57%) diff --git a/.github/scripts/run-example-benchmarks.sh b/.github/scripts/run-example-benchmarks.sh index 5cac7bc..cd9c081 100755 --- a/.github/scripts/run-example-benchmarks.sh +++ b/.github/scripts/run-example-benchmarks.sh @@ -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 @@ -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 \ No newline at end of file +done diff --git a/.github/workflows/_build-binaries.yaml b/.github/workflows/_build-binaries.yaml index a2b8e00..ad81e6a 100644 --- a/.github/workflows/_build-binaries.yaml +++ b/.github/workflows/_build-binaries.yaml @@ -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: @@ -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" @@ -145,7 +145,7 @@ jobs: path: ~/bin/geth retention-days: 1 - build-rbuilder: + build-builder: runs-on: ubuntu-latest permissions: contents: read @@ -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: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cb781b0..133ced7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: @@ -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 diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 27c90a7..1ae6fec 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -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: @@ -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 diff --git a/.github/workflows/public-benchmarks.yaml b/.github/workflows/public-benchmarks.yaml index 7a4288f..336f74d 100644 --- a/.github/workflows/public-benchmarks.yaml +++ b/.github/workflows/public-benchmarks.yaml @@ -18,7 +18,7 @@ jobs: with: reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646 geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0 - rbuilder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601 + builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601 basic-benchmarks: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 0acfce2..10b0a4b 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/clients/README.md b/clients/README.md index 8f1208d..c655070 100644 --- a/clients/README.md +++ b/clients/README.md @@ -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` @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) @@ -122,7 +122,7 @@ RBUILDER_VERSION="main" ./build-rbuilder.sh - Go toolchain - Git -### For op-rbuilder: +### For builder: - Rust and Cargo installed - Git @@ -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 \ No newline at end of file +- `bin/op-rbuilder` - The builder binary diff --git a/clients/build-rbuilder.sh b/clients/build-builder.sh similarity index 75% rename from clients/build-rbuilder.sh rename to clients/build-builder.sh index 99bab2c..ae73fa0 100755 --- a/clients/build-rbuilder.sh +++ b/clients/build-builder.sh @@ -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" @@ -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..." @@ -67,4 +67,4 @@ else exit 1 fi -echo "op-rbuilder binary built successfully and placed in $FINAL_OUTPUT_DIR/op-rbuilder" \ No newline at end of file +echo "Builder binary built successfully and placed in $FINAL_OUTPUT_DIR/op-rbuilder" diff --git a/clients/versions.env b/clients/versions.env index e3920bc..5ae712c 100644 --- a/clients/versions.env +++ b/clients/versions.env @@ -6,13 +6,13 @@ 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" @@ -20,4 +20,4 @@ BASE_RETH_NODE_VERSION="main" # Build Configuration # BUILD_DIR="./build" -# OUTPUT_DIR="../bin" \ No newline at end of file +# OUTPUT_DIR="../bin" diff --git a/configs/examples/base-reth-node-flashblocks-test.yml b/configs/examples/base-reth-node-flashblocks-test.yml index c2c9f71..ddc9787 100644 --- a/configs/examples/base-reth-node-flashblocks-test.yml +++ b/configs/examples/base-reth-node-flashblocks-test.yml @@ -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 @@ -12,7 +12,7 @@ benchmarks: - transfer-only - type: node_type values: - - rbuilder + - builder - type: validator_node_type values: - base-reth-node diff --git a/configs/examples/rbuilder.yml b/configs/examples/builder.yml similarity index 68% rename from configs/examples/rbuilder.yml rename to configs/examples/builder.yml index 4de430d..11efd1e 100644 --- a/configs/examples/rbuilder.yml +++ b/configs/examples/builder.yml @@ -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 @@ -12,7 +12,7 @@ benchmarks: - transfer-only - type: node_type values: - - rbuilder + - builder - type: validator_node_type values: - reth diff --git a/report/src/metricDefinitions.ts b/report/src/metricDefinitions.ts index 5581eb9..f9c6cdd 100644 --- a/report/src/metricDefinitions.ts +++ b/report/src/metricDefinitions.ts @@ -151,45 +151,45 @@ export const CHART_CONFIG = { }, reth_op_rbuilder_block_built_success: { type: "line", - title: "Reth OP RBuilder Block Built Success", - description: "Indicates whether the RBuilder successfully built a block", + title: "Reth OP Builder Block Built Success", + description: "Indicates whether the Builder successfully built a block", unit: "count", }, reth_op_rbuilder_flashblock_count: { type: "line", - title: "Reth OP RBuilder Flashblock Count", - description: "Shows the number of flashblocks built by RBuilder", + title: "Reth OP Builder Flashblock Count", + description: "Shows the number of flashblocks built by Builder", unit: "count", }, reth_op_rbuilder_total_block_built_duration: { type: "line", - title: "Reth OP RBuilder Total Block Built Duration", - description: "Shows the total time taken to build a block by RBuilder", + title: "Reth OP Builder Total Block Built Duration", + description: "Shows the total time taken to build a block by Builder", unit: "s", }, reth_op_rbuilder_flashblock_build_duration: { type: "line", - title: "Reth OP RBuilder Flashblock Build Duration", - description: "Shows the time taken to build a flashblock by RBuilder", + title: "Reth OP Builder Flashblock Build Duration", + description: "Shows the time taken to build a flashblock by Builder", unit: "s", }, reth_op_rbuilder_state_root_calculation_duration: { type: "line", - title: "Reth OP RBuilder State Root Calculation Duration", - description: "Shows the time taken to calculate the state root by RBuilder", + title: "Reth OP Builder State Root Calculation Duration", + description: "Shows the time taken to calculate the state root by Builder", unit: "s", }, reth_op_rbuilder_sequencer_tx_duration: { type: "line", - title: "Reth OP RBuilder Sequencer Tx Duration", - description: "Shows the time taken for sequencer transactions in RBuilder", + title: "Reth OP Builder Sequencer Tx Duration", + description: "Shows the time taken for sequencer transactions in Builder", unit: "s", }, reth_op_rbuilder_payload_tx_simulation_duration: { type: "line", - title: "Reth OP RBuilder Payload Tx Simulation Duration", + title: "Reth OP Builder Payload Tx Simulation Duration", description: - "Shows the time taken for payload transaction simulation in RBuilder", + "Shows the time taken for payload transaction simulation in Builder", unit: "s", }, reth_sync_state_provider_total_storage_fetch_latency: { diff --git a/runner/clients/rbuilder/client.go b/runner/clients/builder/client.go similarity index 61% rename from runner/clients/rbuilder/client.go rename to runner/clients/builder/client.go index 088aea9..eb07359 100644 --- a/runner/clients/rbuilder/client.go +++ b/runner/clients/builder/client.go @@ -1,4 +1,4 @@ -package rbuilder +package builder import ( "context" @@ -16,8 +16,8 @@ import ( "github.com/ethereum/go-ethereum/ethclient" ) -// RbuilderClient handles the lifecycle of a reth client. -type RbuilderClient struct { +// BuilderClient handles the lifecycle of a builder client. +type BuilderClient struct { logger log.Logger options *config.InternalClientOptions @@ -30,12 +30,12 @@ type RbuilderClient struct { metricsCollector metrics.Collector } -// NewRbuilderClient creates a new client for reth. -func NewRbuilderClient(logger log.Logger, options *config.InternalClientOptions, ports portmanager.PortManager) types.ExecutionClient { +// NewBuilderClient creates a new builder client. +func NewBuilderClient(logger log.Logger, options *config.InternalClientOptions, ports portmanager.PortManager) types.ExecutionClient { // only support reth for now - rethClient := reth.NewRethClientWithBin(logger, options, ports, options.RbuilderBin) + rethClient := reth.NewRethClientWithBin(logger, options, ports, options.BuilderBin) - return &RbuilderClient{ + return &BuilderClient{ logger: logger, options: options, elClient: rethClient, @@ -43,9 +43,9 @@ func NewRbuilderClient(logger log.Logger, options *config.InternalClientOptions, } } -// Run runs the reth client with the given runtime config. -func (r *RbuilderClient) Run(ctx context.Context, cfg *types.RuntimeConfig) error { - r.websocketPort = r.ports.AcquirePort("rbuilder", portmanager.FlashblocksWebsocketPortPurpose) +// Run runs the builder client with the given runtime config. +func (r *BuilderClient) Run(ctx context.Context, cfg *types.RuntimeConfig) error { + r.websocketPort = r.ports.AcquirePort("builder", portmanager.FlashblocksWebsocketPortPurpose) cfg2 := *cfg cfg2.Args = append(cfg2.Args, "--flashblocks.port", fmt.Sprintf("%d", r.websocketPort)) @@ -66,12 +66,12 @@ func (r *RbuilderClient) Run(ctx context.Context, cfg *types.RuntimeConfig) erro return nil } -func (r *RbuilderClient) MetricsCollector() metrics.Collector { +func (r *BuilderClient) MetricsCollector() metrics.Collector { return r.metricsCollector } -// Stop stops the reth client. -func (r *RbuilderClient) Stop() { +// Stop stops the builder client. +func (r *BuilderClient) Stop() { // Stop flashblocks client if it exists if r.flashblocksClient != nil { if err := r.flashblocksClient.Stop(); err != nil { @@ -84,42 +84,42 @@ func (r *RbuilderClient) Stop() { } // Client returns the ethclient client. -func (r *RbuilderClient) Client() *ethclient.Client { +func (r *BuilderClient) Client() *ethclient.Client { return r.elClient.Client() } // ClientURL returns the raw client URL for transaction generators. -func (r *RbuilderClient) ClientURL() string { +func (r *BuilderClient) ClientURL() string { return r.elClient.ClientURL() } // AuthClient returns the auth client used for CL communication. -func (r *RbuilderClient) AuthClient() client.RPC { +func (r *BuilderClient) AuthClient() client.RPC { return r.elClient.AuthClient() } -func (r *RbuilderClient) MetricsPort() int { +func (r *BuilderClient) MetricsPort() int { return r.elClient.MetricsPort() } -// GetVersion returns the version of the Rbuilder client -func (r *RbuilderClient) GetVersion(ctx context.Context) (string, error) { - // Rbuilder is based on reth, so delegate to the underlying reth client +// GetVersion returns the version of the builder client +func (r *BuilderClient) GetVersion(ctx context.Context) (string, error) { + // Builder is based on reth, so delegate to the underlying reth client return r.elClient.GetVersion(ctx) } // SetHead resets the blockchain to a specific block using debug.setHead -func (r *RbuilderClient) SetHead(ctx context.Context, blockNumber uint64) error { - // Rbuilder is based on reth, so delegate to the underlying reth client +func (r *BuilderClient) SetHead(ctx context.Context, blockNumber uint64) error { + // Builder is based on reth, so delegate to the underlying reth client return r.elClient.SetHead(ctx, blockNumber) } // FlashblocksClient returns the flashblocks websocket client for collecting flashblock payloads. -func (r *RbuilderClient) FlashblocksClient() types.FlashblocksClient { +func (r *BuilderClient) FlashblocksClient() types.FlashblocksClient { return r.flashblocksClient } -// SupportsFlashblocks returns false as rbuilder doesn't support receiving flashblock payloads. -func (r *RbuilderClient) SupportsFlashblocks() bool { +// SupportsFlashblocks returns false as builder doesn't support receiving flashblock payloads. +func (r *BuilderClient) SupportsFlashblocks() bool { return false } diff --git a/runner/clients/rbuilder/flashblocks_client.go b/runner/clients/builder/flashblocks_client.go similarity index 98% rename from runner/clients/rbuilder/flashblocks_client.go rename to runner/clients/builder/flashblocks_client.go index 5932285..4525a30 100644 --- a/runner/clients/rbuilder/flashblocks_client.go +++ b/runner/clients/builder/flashblocks_client.go @@ -1,4 +1,4 @@ -package rbuilder +package builder import ( "context" @@ -13,7 +13,7 @@ import ( ) // flashblocksClient implements the FlashblocksClient interface for collecting -// flashblock payloads from rbuilder via websocket and broadcasting them to listeners. +// flashblock payloads from the builder via websocket and broadcasting them to listeners. type flashblocksClient struct { log log.Logger port uint64 diff --git a/runner/clients/rbuilder/metrics.go b/runner/clients/builder/metrics.go similarity index 99% rename from runner/clients/rbuilder/metrics.go rename to runner/clients/builder/metrics.go index c2b1290..d6f8336 100644 --- a/runner/clients/rbuilder/metrics.go +++ b/runner/clients/builder/metrics.go @@ -1,4 +1,4 @@ -package rbuilder +package builder import ( "bytes" diff --git a/runner/clients/rbuilder/options/options.go b/runner/clients/builder/options/options.go similarity index 57% rename from runner/clients/rbuilder/options/options.go rename to runner/clients/builder/options/options.go index e58cc7a..51ad504 100644 --- a/runner/clients/rbuilder/options/options.go +++ b/runner/clients/builder/options/options.go @@ -1,11 +1,11 @@ -package rbuilderoptions +package builderoptions import "github.com/base/base-bench/runner/clients/reth/options" // RethOptions contains the options for the reth client determined by the test. -type RbuilderOptions struct { +type BuilderOptions struct { options.RethOptions - // RbuilderBin is the path to the rbuilder binary. - RbuilderBin string + // BuilderBin is the path to the builder binary. + BuilderBin string } diff --git a/runner/clients/interface.go b/runner/clients/interface.go index 88aba2f..25768c6 100644 --- a/runner/clients/interface.go +++ b/runner/clients/interface.go @@ -5,8 +5,8 @@ import ( "github.com/base/base-bench/runner/benchmark/portmanager" "github.com/base/base-bench/runner/clients/baserethnode" + "github.com/base/base-bench/runner/clients/builder" "github.com/base/base-bench/runner/clients/geth" - "github.com/base/base-bench/runner/clients/rbuilder" "github.com/base/base-bench/runner/clients/reth" "github.com/base/base-bench/runner/clients/types" "github.com/base/base-bench/runner/config" @@ -19,8 +19,8 @@ func NewClient(client Client, logger log.Logger, options *config.InternalClientO return reth.NewRethClient(logger, options, portManager) case Geth: return geth.NewGethClient(logger, options, portManager) - case Rbuilder: - return rbuilder.NewRbuilderClient(logger, options, portManager) + case Builder: + return builder.NewBuilderClient(logger, options, portManager) case BaseRethNode: return baserethnode.NewBaseRethNodeClient(logger, options, portManager) default: @@ -34,6 +34,6 @@ type Client uint const ( Reth Client = iota Geth - Rbuilder + Builder BaseRethNode ) diff --git a/runner/clients/types/flashblocks_client.go b/runner/clients/types/flashblocks_client.go index f54be47..2d1298a 100644 --- a/runner/clients/types/flashblocks_client.go +++ b/runner/clients/types/flashblocks_client.go @@ -9,7 +9,7 @@ type FlashblockListener interface { } // FlashblocksClient is an interface for collecting flashblock payloads from a websocket connection. -// Only clients that support flashblocks (e.g., rbuilder) will provide a non-nil implementation. +// Only clients that support flashblocks (e.g., builder) will provide a non-nil implementation. // It uses a broadcast pattern where listeners can subscribe to receive flashblock updates. type FlashblocksClient interface { // Start begins collecting flashblocks from the websocket connection diff --git a/runner/config/client.go b/runner/config/client.go index aa27491..f73a6c9 100644 --- a/runner/config/client.go +++ b/runner/config/client.go @@ -5,8 +5,8 @@ import ( "github.com/base/base-bench/runner/benchmark/portmanager" baserethnode "github.com/base/base-bench/runner/clients/baserethnode/options" + builderoptions "github.com/base/base-bench/runner/clients/builder/options" gethoptions "github.com/base/base-bench/runner/clients/geth/options" - rbuilderoptions "github.com/base/base-bench/runner/clients/rbuilder/options" rethoptions "github.com/base/base-bench/runner/clients/reth/options" "github.com/base/base-bench/runner/flags" ) @@ -16,7 +16,7 @@ type ClientOptions struct { CommonOptions rethoptions.RethOptions gethoptions.GethOptions - rbuilderoptions.RbuilderOptions + builderoptions.BuilderOptions baserethnode.BaseRethNodeOptions PortOverrides PortOverrides } @@ -57,8 +57,8 @@ func ReadClientOptions(ctx *cli.Context) ClientOptions { GethOptions: gethoptions.GethOptions{ GethBin: ctx.String(flags.GethBin), }, - RbuilderOptions: rbuilderoptions.RbuilderOptions{ - RbuilderBin: ctx.String(flags.RbuilderBin), + BuilderOptions: builderoptions.BuilderOptions{ + BuilderBin: ctx.String(flags.BuilderBin), }, BaseRethNodeOptions: baserethnode.BaseRethNodeOptions{ BaseRethNodeBin: ctx.String(flags.BaseRethNodeBin), diff --git a/runner/flags/flags.go b/runner/flags/flags.go index 054d6af..0197453 100644 --- a/runner/flags/flags.go +++ b/runner/flags/flags.go @@ -8,7 +8,7 @@ import ( const ( RethBin = "reth-bin" - RbuilderBin = "rbuilder-bin" + BuilderBin = "builder-bin" GethBin = "geth-bin" BaseRethNodeBin = "base-reth-node-bin" ) @@ -28,10 +28,10 @@ func CLIFlags(envPrefix string) []cli.Flag { EnvVars: opservice.PrefixEnvVar(envPrefix, "GETH_BIN"), }, &cli.StringFlag{ - Name: RbuilderBin, - Usage: "Rbuilder binary path", - Value: "rbuilder", - EnvVars: opservice.PrefixEnvVar(envPrefix, "RBUILDER_BIN"), + Name: BuilderBin, + Usage: "Builder binary path", + Value: "builder", + EnvVars: opservice.PrefixEnvVar(envPrefix, "BUILDER_BIN"), }, &cli.StringFlag{ Name: BaseRethNodeBin, diff --git a/runner/network/network_benchmark.go b/runner/network/network_benchmark.go index 5f462da..53246b3 100644 --- a/runner/network/network_benchmark.go +++ b/runner/network/network_benchmark.go @@ -264,8 +264,8 @@ func setupNode(ctx context.Context, l log.Logger, nodeTypeStr string, params ben nodeType = clients.Geth case "reth": nodeType = clients.Reth - case "rbuilder": - nodeType = clients.Rbuilder + case "builder": + nodeType = clients.Builder case "base-reth-node": nodeType = clients.BaseRethNode default: