Skip to content

Commit 31eb579

Browse files
authored
chore: bump Reth max account slots (#166)
1 parent f6d3c3b commit 31eb579

8 files changed

Lines changed: 42 additions & 37 deletions

File tree

.github/workflows/_build-binaries.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ name: Build Binaries
55
on:
66
workflow_call:
77
inputs:
8-
reth_version:
9-
description: "Reth version to build"
8+
optimism_version:
9+
description: "Optimism version to build"
1010
required: false
1111
type: string
12-
default: "27a8c0f5a6dfb27dea84c5751776ecabdd069646"
12+
default: "3019251e80aa248e91743addd3e833190acb26f1"
1313
geth_version:
1414
description: "Geth version to build"
1515
required: false
@@ -85,25 +85,25 @@ jobs:
8585

8686
- name: Cache reth binary
8787
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
88-
id: cache-reth
88+
id: cache-optimism
8989
with:
9090
path: ~/bin/reth
91-
key: ${{ runner.os }}-reth-${{ inputs.reth_version }}
91+
key: ${{ runner.os }}-reth-${{ inputs.optimism_version }}
9292

9393
- name: Build reth
9494
if: steps.cache-reth.outputs.cache-hit != 'true'
9595
run: |
9696
unset CI
9797
mkdir -p ~/bin
9898
cd clients
99-
RETH_VERSION=${{ inputs.reth_version }} OUTPUT_DIR=~/bin ./build-reth.sh
99+
OPTIMISM_VERSION=${{ inputs.optimism_version }} OUTPUT_DIR=~/bin ./build-reth.sh
100100
# Rename op-reth to reth for consistency
101101
[ -f ~/bin/op-reth ] && mv ~/bin/op-reth ~/bin/reth || true
102102
103103
- name: Upload reth artifact
104104
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
105105
with:
106-
name: reth
106+
name: optimism
107107
path: ~/bin/reth
108108
retention-days: 1
109109

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
actions: write # Required for reusable workflow to upload artifacts
7070
uses: ./.github/workflows/_build-binaries.yaml
7171
with:
72-
reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646
72+
optimism_version: 3019251e80aa248e91743addd3e833190acb26f1
7373
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
7474
builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
7575
base_reth_node_version: main
@@ -104,7 +104,7 @@ jobs:
104104
- name: Download reth binary
105105
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
106106
with:
107-
name: reth
107+
name: optimism
108108
path: ${{ runner.temp }}/bin/
109109

110110
- name: Download geth binary

.github/workflows/examples.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
actions: write # Required for reusable workflow to upload artifacts
1717
uses: ./.github/workflows/_build-binaries.yaml
1818
with:
19-
reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646
19+
optimism_version: 3019251e80aa248e91743addd3e833190acb26f1
2020
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
2121
builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
2222
base_reth_node_version: main
@@ -53,7 +53,7 @@ jobs:
5353
- name: Download reth binary
5454
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
5555
with:
56-
name: reth
56+
name: optimism
5757
path: ${{ runner.temp }}/bin/
5858

5959
- name: Download geth binary

.github/workflows/public-benchmarks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
actions: write # Required for reusable workflow to upload artifacts
1717
uses: ./.github/workflows/_build-binaries.yaml
1818
with:
19-
reth_version: 27a8c0f5a6dfb27dea84c5751776ecabdd069646
19+
optimism_version: 3019251e80aa248e91743addd3e833190acb26f1
2020
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
2121
builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601
2222

@@ -52,7 +52,7 @@ jobs:
5252
- name: Download reth binary
5353
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
5454
with:
55-
name: reth
55+
name: optimism
5656
path: ${{ runner.temp }}/bin/
5757

5858
- name: Download geth binary

clients/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Modify the `versions.env` file to change defaults for all builds:
7373

7474
```bash
7575
# Edit versions.env to update default versions
76-
RETH_VERSION="v0.2.0-beta.5"
76+
OPTIMISM_VERSION="v0.2.0-beta.5"
7777
GETH_VERSION="v1.13.0"
7878
BUILDER_VERSION="your-commit-hash"
7979
```
@@ -83,7 +83,7 @@ Override specific builds with environment variables:
8383

8484
```bash
8585
# Build reth from a specific commit
86-
RETH_REPO="https://github.com/paradigmxyz/reth/" RETH_VERSION="v0.1.0" ./build-reth.sh
86+
OPTIMISM_REPO="https://github.com/ethereum-optimism/optimism/" OPTIMISM_VERSION="v0.1.0" ./build-reth.sh
8787

8888
# Build geth from a fork
8989
GETH_REPO="https://github.com/your-fork/op-geth/" GETH_VERSION="your-branch" ./build-geth.sh
@@ -95,8 +95,8 @@ BUILDER_VERSION="main" ./build-builder.sh
9595
### Available Environment Variables
9696

9797
#### For reth (build-reth.sh):
98-
- `RETH_REPO`: Git repository URL (default: https://github.com/paradigmxyz/reth/)
99-
- `RETH_VERSION`: Git branch, tag, or commit hash (default: main)
98+
- `OPTIMISM_REPO`: Git repository URL (default: https://github.com/ethereum-optimism/optimism/)
99+
- `OPTIMISM_VERSION`: Git branch, tag, or commit hash (default: develop)
100100
- `BUILD_DIR`: Directory for source code (default: ./build)
101101
- `OUTPUT_DIR`: Directory for built binaries (default: ../bin)
102102

clients/build-reth.sh

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ if [ -f "versions.env" ]; then
88
fi
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}"
1313
BUILD_DIR="${BUILD_DIR:-./build}"
1414
OUTPUT_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"
1919
echo "Build directory: $BUILD_DIR"
2020
echo "Output directory: $OUTPUT_DIR"
2121

@@ -24,28 +24,32 @@ mkdir -p "$BUILD_DIR"
2424
cd "$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
3535
else
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
3939
fi
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
5155
echo "Copying binary to output directory..."
@@ -58,6 +62,6 @@ else
5862
FINAL_OUTPUT_DIR="../../$OUTPUT_DIR"
5963
fi
6064
mkdir -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"

clients/versions.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Source this file in scripts to use these variables
44

55
# Reth Configuration
6-
RETH_REPO="https://github.com/paradigmxyz/reth/"
7-
RETH_VERSION="v1.9.3"
6+
OPTIMISM_REPO="https://github.com/ethereum-optimism/optimism/"
7+
OPTIMISM_VERSION="3019251e80aa248e91743addd3e833190acb26f1"
88

99
# Op-Geth Configuration
1010
GETH_REPO="https://github.com/ethereum-optimism/op-geth/"

runner/clients/reth/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func (r *RethClient) Run(ctx context.Context, cfg *types.RuntimeConfig) error {
9999
// increase mempool size
100100
args = append(args, "--txpool.pending-max-count", "100000000")
101101
args = append(args, "--txpool.queued-max-count", "100000000")
102+
args = append(args, "--txpool.max-account-slots", "100000000")
102103
args = append(args, "--txpool.pending-max-size", "100")
103104
args = append(args, "--txpool.queued-max-size", "100")
104105

0 commit comments

Comments
 (0)