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
2 changes: 2 additions & 0 deletions .github/workflows/_build-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod

- name: Cache geth binary
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod

- name: Install project dependencies
run: |
Expand All @@ -35,7 +37,7 @@ jobs:
- name: Lint Go
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with:
version: v2.0
version: v2.13.2

go-test:
outputs:
Expand All @@ -53,6 +55,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod

- name: Install project dependencies
run: |
Expand Down Expand Up @@ -89,6 +93,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod

- name: Install project dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod

- name: Install project dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/public-benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod

- name: Install project dependencies
run: |
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/base/base-bench

go 1.24.6

toolchain go1.24.11
go 1.27.1

require (
github.com/charmbracelet/huh v0.8.0
Expand Down
3 changes: 2 additions & 1 deletion runner/payload/loadtest/load_test_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/base/base-bench/runner/network/mempool"
"github.com/base/base-bench/runner/network/types"
"github.com/base/base-bench/runner/payload/worker"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/pkg/errors"
"gopkg.in/yaml.v3"
Expand Down Expand Up @@ -76,7 +77,7 @@ func NewLoadTestPayloadWorker(

w := &loadTestPayloadWorker{
log: log,
prefundSK: hex.EncodeToString(prefundedPrivateKey.D.Bytes()),
prefundSK: hex.EncodeToString(crypto.FromECDSA(&prefundedPrivateKey)),
loadTestBin: cfg.LoadTestBinary(),
elRPCURL: elRPCURL,
flashblocksURL: flashblocksURL,
Expand Down
2 changes: 1 addition & 1 deletion runner/payload/simulator/simulatorstats/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (o OpcodeStats) String() string {
})
opcodes = opcodes[:min(10, len(opcodes))]
for _, opcode := range opcodes {
result.WriteString(fmt.Sprintf("\n - %20s: %.2f", opcode, o[opcode]))
fmt.Fprintf(&result, "\n - %20s: %.2f", opcode, o[opcode])
}
return result.String()
}
Expand Down
4 changes: 3 additions & 1 deletion runner/payload/simulator/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package simulator
import (
"context"
"crypto/ecdsa"
"encoding/binary"
"fmt"
"math"
"math/big"
Expand Down Expand Up @@ -217,7 +218,8 @@ func generateCallerAccounts(prefundedKey *ecdsa.PrivateKey, numCallers int) ([]*
}

// Use deterministic random source seeded from prefunded key
seed := int64(prefundedKey.D.Uint64())
keyBytes := crypto.FromECDSA(prefundedKey)
seed := int64(binary.BigEndian.Uint64(keyBytes[len(keyBytes)-8:]))
src := rand.New(rand.NewSource(seed))

keys := make([]*ecdsa.PrivateKey, numCallers)
Expand Down
3 changes: 2 additions & 1 deletion runner/payload/txfuzz/tx_fuzz_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/base/base-bench/runner/network/mempool"
"github.com/base/base-bench/runner/network/types"
"github.com/base/base-bench/runner/payload/worker"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -43,7 +44,7 @@ func NewTxFuzzPayloadWorker(

t := &txFuzzPayloadWorker{
log: log,
prefundSK: hex.EncodeToString(prefundedPrivateKey.D.Bytes()),
prefundSK: hex.EncodeToString(crypto.FromECDSA(&prefundedPrivateKey)),
txFuzzBin: cfg.TxFuzzBinary(),
elRPCURL: elRPCURL,
mempool: mempool,
Expand Down
Loading