Skip to content

Commit 0ec8e93

Browse files
authored
Merge pull request #381 from OffchainLabs/merge-v1.14.4
Merge v1.14.4
2 parents b487f6f + ebdf83e commit 0ec8e93

File tree

146 files changed

+5551
-3678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+5551
-3678
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ core/ @karalabe @holiman @rjl493456442
1010
eth/ @karalabe @holiman @rjl493456442
1111
eth/catalyst/ @gballet
1212
eth/tracers/ @s1na
13+
core/tracing/ @s1na
1314
graphql/ @s1na
1415
les/ @zsfelfoldi @rjl493456442
1516
light/ @zsfelfoldi @rjl493456442

.github/workflows/go.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
if: false # not supported on OffchainLabs fork, ci.yml is used instead
1313
runs-on: self-hosted
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
- name: Set up Go
17-
uses: actions/setup-go@v2
17+
uses: actions/setup-go@v5
1818
with:
1919
go-version: 1.21.4
2020
- name: Run tests

.golangci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ run:
66
# default is true. Enables skipping of directories:
77
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
88
skip-dirs-use-default: true
9-
skip-files:
10-
- core/genesis_alloc.go
119

1210
linters:
1311
disable-all: true
@@ -26,6 +24,8 @@ linters:
2624
- exportloopref
2725
- whitespace
2826

27+
### linters we tried and will not be using:
28+
###
2929
# - structcheck # lots of false positives
3030
# - errcheck #lot of false positives
3131
# - contextcheck
@@ -40,6 +40,8 @@ linters-settings:
4040
simplify: true
4141

4242
issues:
43+
exclude-files:
44+
- core/genesis_alloc.go
4345
exclude-rules:
4446
- path: crypto/bn256/cloudflare/optate.go
4547
linters:

.travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ jobs:
9797

9898
# These builders run the tests
9999
- stage: build
100+
if: type = push
100101
os: linux
101102
arch: amd64
102103
dist: noble
@@ -105,6 +106,7 @@ jobs:
105106
- travis_wait 45 go run build/ci.go test $TEST_PACKAGES
106107

107108
- stage: build
109+
if: type = push
108110
os: linux
109111
dist: noble
110112
go: 1.21.x
@@ -146,5 +148,7 @@ jobs:
146148
os: linux
147149
dist: noble
148150
go: 1.22.x
151+
env:
152+
- racetests
149153
script:
150-
- travis_wait 50 go run build/ci.go test -race $TEST_PACKAGES
154+
- travis_wait 60 go run build/ci.go test -race $TEST_PACKAGES

Makefile

+16-8
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,43 @@
22
# with Go source code. If you know what GOPATH is then you probably
33
# don't need to bother with make.
44

5-
.PHONY: geth all test lint clean devtools help
5+
.PHONY: geth all test lint fmt clean devtools help
66

77
GOBIN = ./build/bin
88
GO ?= latest
99
GORUN = go run
1010

11-
#? geth: Build geth
11+
#? geth: Build geth.
1212
geth:
1313
$(GORUN) build/ci.go install ./cmd/geth
1414
@echo "Done building."
1515
@echo "Run \"$(GOBIN)/geth\" to launch geth."
1616

17-
#? all: Build all packages and executables
17+
#? all: Build all packages and executables.
1818
all:
1919
$(GORUN) build/ci.go install
2020

21-
#? test: Run the tests
21+
#? test: Run the tests.
2222
test: all
2323
$(GORUN) build/ci.go test
2424

25-
#? lint: Run certain pre-selected linters
25+
#? lint: Run certain pre-selected linters.
2626
lint: ## Run linters.
2727
$(GORUN) build/ci.go lint
2828

29-
#? clean: Clean go cache, built executables, and the auto generated folder
29+
#? fmt: Ensure consistent code formatting.
30+
fmt:
31+
gofmt -s -w $(shell find . -name "*.go")
32+
33+
#? clean: Clean go cache, built executables, and the auto generated folder.
3034
clean:
3135
go clean -cache
3236
rm -fr build/_workspace/pkg/ $(GOBIN)/*
3337

3438
# The devtools target installs tools required for 'go generate'.
3539
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
3640

37-
#? devtools: Install recommended developer tools
41+
#? devtools: Install recommended developer tools.
3842
devtools:
3943
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
4044
env GOBIN= go install github.com/fjl/gencodec@latest
@@ -45,5 +49,9 @@ devtools:
4549

4650
#? help: Get more info on make commands.
4751
help: Makefile
48-
@echo " Choose a command run in go-ethereum:"
52+
@echo ''
53+
@echo 'Usage:'
54+
@echo ' make [target]'
55+
@echo ''
56+
@echo 'Targets:'
4957
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'

accounts/keystore/account_cache_test.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@ func TestUpdatedKeyfileContents(t *testing.T) {
326326

327327
// Create a temporary keystore to test with
328328
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))
329+
330+
// Create the directory
331+
os.MkdirAll(dir, 0700)
332+
defer os.RemoveAll(dir)
333+
329334
ks := NewKeyStore(dir, LightScryptN, LightScryptP)
330335

331336
list := ks.Accounts()
@@ -335,9 +340,7 @@ func TestUpdatedKeyfileContents(t *testing.T) {
335340
if !waitWatcherStart(ks) {
336341
t.Fatal("keystore watcher didn't start in time")
337342
}
338-
// Create the directory and copy a key file into it.
339-
os.MkdirAll(dir, 0700)
340-
defer os.RemoveAll(dir)
343+
// Copy a key file into it
341344
file := filepath.Join(dir, "aaa")
342345

343346
// Place one of our testfiles in there

arbitrum/recordingdb.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,19 @@ type RecordingKV struct {
3232
inner *triedb.Database
3333
diskDb ethdb.KeyValueStore
3434
readDbEntries map[common.Hash][]byte
35+
mutex sync.Mutex
3536
enableBypass bool
3637
}
3738

3839
func newRecordingKV(inner *triedb.Database, diskDb ethdb.KeyValueStore) *RecordingKV {
39-
return &RecordingKV{inner, diskDb, make(map[common.Hash][]byte), false}
40+
return &RecordingKV{inner, diskDb, make(map[common.Hash][]byte), sync.Mutex{}, false}
4041
}
4142

4243
func (db *RecordingKV) Has(key []byte) (bool, error) {
4344
return false, errors.New("recording KV doesn't support Has")
4445
}
4546

47+
// Get may be called concurrently with other Get calls
4648
func (db *RecordingKV) Get(key []byte) ([]byte, error) {
4749
var hash common.Hash
4850
var res []byte
@@ -66,6 +68,8 @@ func (db *RecordingKV) Get(key []byte) ([]byte, error) {
6668
if crypto.Keccak256Hash(res) != hash {
6769
return nil, fmt.Errorf("recording KV attempted to access non-hash key %v", hash)
6870
}
71+
db.mutex.Lock()
72+
defer db.mutex.Unlock()
6973
db.readDbEntries[hash] = res
7074
return res, nil
7175
}
@@ -190,7 +194,7 @@ func (r *RecordingDatabase) StateFor(header *types.Header) (*state.StateDB, erro
190194
r.mutex.Lock()
191195
defer r.mutex.Unlock()
192196

193-
sdb, err := state.NewDeterministic(header.Root, r.db)
197+
sdb, err := state.NewRecording(header.Root, r.db)
194198
if err == nil {
195199
r.referenceRootLockHeld(header.Root)
196200
}
@@ -263,7 +267,7 @@ func (r *RecordingDatabase) PrepareRecording(ctx context.Context, lastBlockHeade
263267
if lastBlockHeader != nil {
264268
prevRoot = lastBlockHeader.Root
265269
}
266-
recordingStateDb, err := state.NewDeterministic(prevRoot, recordingStateDatabase)
270+
recordingStateDb, err := state.NewRecording(prevRoot, recordingStateDatabase)
267271
if err != nil {
268272
return nil, nil, nil, fmt.Errorf("failed to create recordingStateDb: %w", err)
269273
}

beacon/engine/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash,
209209
if params.BaseFeePerGas != nil && (params.BaseFeePerGas.Sign() == -1 || params.BaseFeePerGas.BitLen() > 256) {
210210
return nil, fmt.Errorf("invalid baseFeePerGas: %v", params.BaseFeePerGas)
211211
}
212-
var blobHashes []common.Hash
212+
var blobHashes = make([]common.Hash, 0, len(txs))
213213
for _, tx := range txs {
214214
blobHashes = append(blobHashes, tx.BlobHashes()...)
215215
}

beacon/light/sync/head_sync_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func TestValidatedHead(t *testing.T) {
9191
ts.ServerEvent(EvNewOptimisticUpdate, testServer3, testOptUpdate4)
9292
// finality should be requested from both servers
9393
ts.Run(4, testServer1, ReqFinality{}, testServer3, ReqFinality{})
94-
// future period annonced heads should be queued
94+
// future period announced heads should be queued
9595
ht.ExpValidated(t, 4, nil)
9696

9797
chain.SetNextSyncPeriod(2)

beacon/types/exec_payload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func convertPayload[T payloadType](payload T, parentRoot *zrntcommon.Root) (*typ
6565

6666
block := types.NewBlockWithHeader(&header).WithBody(types.Body{Transactions: transactions, Withdrawals: withdrawals})
6767
if hash := block.Hash(); hash != expectedHash {
68-
return nil, fmt.Errorf("Sanity check failed, payload hash does not match (expected %x, got %x)", expectedHash, hash)
68+
return nil, fmt.Errorf("sanity check failed, payload hash does not match (expected %x, got %x)", expectedHash, hash)
6969
}
7070
return block, nil
7171
}

build/checksums.txt

+30-29
Original file line numberDiff line numberDiff line change
@@ -48,36 +48,37 @@ cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39 go1.22.3.windo
4848
40b37f4b068fc759f3a0dd61176a0f7570a4ba48bed8561c31d3967a3583981a go1.22.3.windows-arm.zip
4949
59b76ee22b9b1c3afbf7f50e3cb4edb954d6c0d25e5e029ab5483a6804d61e71 go1.22.3.windows-arm64.zip
5050

51-
# version:golangci 1.55.2
51+
# version:golangci 1.59.0
5252
# https://github.com/golangci/golangci-lint/releases/
53-
# https://github.com/golangci/golangci-lint/releases/download/v1.55.2/
54-
632e96e6d5294fbbe7b2c410a49c8fa01c60712a0af85a567de85bcc1623ea21 golangci-lint-1.55.2-darwin-amd64.tar.gz
55-
234463f059249f82045824afdcdd5db5682d0593052f58f6a3039a0a1c3899f6 golangci-lint-1.55.2-darwin-arm64.tar.gz
56-
2bdd105e2d4e003a9058c33a22bb191a1e0f30fa0790acca0d8fbffac1d6247c golangci-lint-1.55.2-freebsd-386.tar.gz
57-
e75056e8b082386676ce23eba455cf893931a792c0d87e1e3743c0aec33c7fb5 golangci-lint-1.55.2-freebsd-amd64.tar.gz
58-
5789b933facaf6136bd23f1d50add67b79bbcf8dfdfc9069a37f729395940a66 golangci-lint-1.55.2-freebsd-armv6.tar.gz
59-
7f21ab1008d05f32c954f99470fc86a83a059e530fe2add1d0b7d8ed4d8992a7 golangci-lint-1.55.2-freebsd-armv7.tar.gz
60-
33ab06139b9219a28251f10821da94423db30285cc2af97494cbb2a281927de9 golangci-lint-1.55.2-illumos-amd64.tar.gz
61-
57ce6f8ce3ad6ee45d7cc3d9a047545a851c2547637834a3fcb086c7b40b1e6b golangci-lint-1.55.2-linux-386.tar.gz
62-
ca21c961a33be3bc15e4292dc40c98c8dcc5463a7b6768a3afc123761630c09c golangci-lint-1.55.2-linux-amd64.tar.gz
63-
8eb0cee9b1dbf0eaa49871798c7f8a5b35f2960c52d776a5f31eb7d886b92746 golangci-lint-1.55.2-linux-arm64.tar.gz
64-
3195f3e0f37d353fd5bd415cabcd4e263f5c29d3d0ffb176c26ff3d2c75eb3bb golangci-lint-1.55.2-linux-armv6.tar.gz
65-
c823ee36eb1a719e171de1f2f5ca3068033dce8d9817232fd10ed71fd6650406 golangci-lint-1.55.2-linux-armv7.tar.gz
66-
758a5d2a356dc494bd13ed4c0d4bf5a54a4dc91267ea5ecdd87b86c7ca0624e7 golangci-lint-1.55.2-linux-loong64.tar.gz
67-
2c7b9abdce7cae802a67d583cd7c6dca520bff6d0e17c8535a918e2f2b437aa0 golangci-lint-1.55.2-linux-mips64.tar.gz
68-
024e0a15b85352cc27271285526e16a4ab66d3e67afbbe446c9808c06cb8dbed golangci-lint-1.55.2-linux-mips64le.tar.gz
69-
6b00f89ba5506c1de1efdd9fa17c54093013a294fefd8b9b31534db626a672ee golangci-lint-1.55.2-linux-ppc64le.tar.gz
70-
0faa0d047d9bf7b703ed3ea65b6117043c93504f9ca1de25ae929d3901c73d4a golangci-lint-1.55.2-linux-riscv64.tar.gz
71-
30dec9b22e7d5bb4e9d5ccea96da20f71cd7db3c8cf30b8ddc7cb9174c4d742a golangci-lint-1.55.2-linux-s390x.tar.gz
72-
5a0ede48f79ad707902fdb29be8cd2abd8302dc122b65ebae3fdfc86751c7698 golangci-lint-1.55.2-netbsd-386.tar.gz
73-
95af20a2e617126dd5b08122ece7819101070e1582a961067ce8c41172f901ad golangci-lint-1.55.2-netbsd-amd64.tar.gz
74-
94fb7dacb7527847cc95d7120904e19a2a0a81a0d50d61766c9e0251da72ab9d golangci-lint-1.55.2-netbsd-armv6.tar.gz
75-
ca906bce5fee9619400e4a321c56476fe4a4efb6ac4fc989d340eb5563348873 golangci-lint-1.55.2-netbsd-armv7.tar.gz
76-
45b442f69fc8915c4500201c0247b7f3f69544dbc9165403a61f9095f2c57355 golangci-lint-1.55.2-windows-386.zip
77-
f57d434d231d43417dfa631587522f8c1991220b43c8ffadb9c7bd279508bf81 golangci-lint-1.55.2-windows-amd64.zip
78-
fd7dc8f4c6829ee6fafb252a4d81d2155cd35da7833665cbb25d53ce7cecd990 golangci-lint-1.55.2-windows-arm64.zip
79-
1892c3c24f9e7ef44b02f6750c703864b6dc350129f3ec39510300007b2376f1 golangci-lint-1.55.2-windows-armv6.zip
80-
a5e68ae73d38748b5269fad36ac7575e3c162a5dc63ef58abdea03cc5da4522a golangci-lint-1.55.2-windows-armv7.zip
53+
# https://github.com/golangci/golangci-lint/releases/download/v1.59.0/
54+
418acf7e255ddc0783e97129c9b03d9311b77826a5311d425a01c708a86417e7 golangci-lint-1.59.0-darwin-amd64.tar.gz
55+
5f6a1d95a6dd69f6e328eb56dd311a38e04cfab79a1305fbf4957f4e203f47b6 golangci-lint-1.59.0-darwin-arm64.tar.gz
56+
8899bf589185d49f747f3e5db9f0bde8a47245a100c64a3dd4d65e8e92cfc4f2 golangci-lint-1.59.0-freebsd-386.tar.gz
57+
658212f138d9df2ac89427e22115af34bf387c0871d70f2a25101718946a014f golangci-lint-1.59.0-freebsd-amd64.tar.gz
58+
4c6395ea40f314d3b6fa17d8997baab93464d5d1deeaab513155e625473bd03a golangci-lint-1.59.0-freebsd-armv6.tar.gz
59+
ff37da4fbaacdb6bbae70fdbdbb1ba932a859956f788c82822fa06bef5b7c6b3 golangci-lint-1.59.0-freebsd-armv7.tar.gz
60+
439739469ed2bda182b1ec276d40c40e02f195537f78e3672996741ad223d6b6 golangci-lint-1.59.0-illumos-amd64.tar.gz
61+
940801d46790e40d0a097d8fee34e2606f0ef148cd039654029b0b8750a15ed6 golangci-lint-1.59.0-linux-386.tar.gz
62+
3b14a439f33c4fff83dbe0349950d984042b9a1feb6c62f82787b598fc3ab5f4 golangci-lint-1.59.0-linux-amd64.tar.gz
63+
c57e6c0b0fa03089a2611dceddd5bc5d206716cccdff8b149da8baac598719a1 golangci-lint-1.59.0-linux-arm64.tar.gz
64+
93149e2d3b25ac754df9a23172403d8aa6d021a7e0d9c090a12f51897f68c9a0 golangci-lint-1.59.0-linux-armv6.tar.gz
65+
d10ac38239d9efee3ee87b55c96cdf3fa09e1a525babe3ffdaaf65ccc48cf3dc golangci-lint-1.59.0-linux-armv7.tar.gz
66+
047338114b4f0d5f08f0fb9a397b03cc171916ed0960be7dfb355c2320cd5e9c golangci-lint-1.59.0-linux-loong64.tar.gz
67+
5632df0f7f8fc03a80a266130faef0b5902d280cf60621f1b2bdc1aef6d97ee9 golangci-lint-1.59.0-linux-mips64.tar.gz
68+
71dd638c82fa4439171e7126d2c7a32b5d103bfdef282cea40c83632cb3d1f4b golangci-lint-1.59.0-linux-mips64le.tar.gz
69+
6cf9ea0d34e91669948483f9ae7f07da319a879344373a1981099fbd890cde00 golangci-lint-1.59.0-linux-ppc64le.tar.gz
70+
af0205fa6fbab197cee613c359947711231739095d21b5c837086233b36ad971 golangci-lint-1.59.0-linux-riscv64.tar.gz
71+
a9d2fb93f3c688ebccef94f5dc96c0b07c4d20bf6556cddebd8442159b0c80f6 golangci-lint-1.59.0-linux-s390x.tar.gz
72+
68ab4c57a847b8ace9679887f2f8b2b6760e57ee29dcde8c3f40dd8bb2654fa2 golangci-lint-1.59.0-netbsd-386.tar.gz
73+
d277b8b435c19406d00de4d509eadf5a024a5782878332e9a1b7c02bb76e87a7 golangci-lint-1.59.0-netbsd-amd64.tar.gz
74+
83211656be8dcfa1545af4f92894409f412d1f37566798cb9460a526593ad62c golangci-lint-1.59.0-netbsd-arm64.tar.gz
75+
6c6866d28bf79fa9817a0f7d2b050890ed109cae80bdb4dfa39536a7226da237 golangci-lint-1.59.0-netbsd-armv6.tar.gz
76+
11587566363bd03ca586b7df9776ccaed569fcd1f3489930ac02f9375b307503 golangci-lint-1.59.0-netbsd-armv7.tar.gz
77+
466181a8967bafa495e41494f93a0bec829c2cf715de874583b0460b3b8ae2b8 golangci-lint-1.59.0-windows-386.zip
78+
3317d8a87a99a49a0a1321d295c010790e6dbf43ee96b318f4b8bb23eae7a565 golangci-lint-1.59.0-windows-amd64.zip
79+
b3af955c7fceac8220a36fc799e1b3f19d3b247d32f422caac5f9845df8f7316 golangci-lint-1.59.0-windows-arm64.zip
80+
6f083c7d0c764e5a0e5bde46ee3e91ae357d80c194190fe1d9754392e9064c7e golangci-lint-1.59.0-windows-armv6.zip
81+
3709b4dd425deadab27748778d08e03c0f804d7748f7dd5b6bb488d98aa031c7 golangci-lint-1.59.0-windows-armv7.zip
8182

8283
# This is the builder on PPA that will build Go itself (inception-y), don't modify!
8384
#

cmd/clef/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ func listWallets(c *cli.Context) error {
552552
// accountImport imports a raw hexadecimal private key via CLI.
553553
func accountImport(c *cli.Context) error {
554554
if c.Args().Len() != 1 {
555-
return errors.New("<keyfile> must be given as first argument.")
555+
return errors.New("<keyfile> must be given as first argument")
556556
}
557557
internalApi, ui, err := initInternalApi(c)
558558
if err != nil {

0 commit comments

Comments
 (0)