Skip to content

Commit b1c2ea9

Browse files
committed
upstream: merge tag 'geth-v1.15.1' into bsc-develop
2 parents c84a7f8 + b027a90 commit b1c2ea9

File tree

8 files changed

+22
-7
lines changed

8 files changed

+22
-7
lines changed

cmd/evm/testdata/evmrun/3.out.1.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"root": "b444481d1367188172f8c6091e948aaa68bae763fd26d6b9e994306a66bf69f9",
33
"accounts": {
4-
"pre(0x30d7a0694cb29af31b982480e11d7ebb003a3fca4026939149071f014689b142)": {
4+
"0x0000000000000000000000007265636569766572": {
55
"balance": "0",
66
"nonce": 0,
77
"root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
88
"codeHash": "0x3e48ef54b89079a075f3b8fc253c657a86b110a7aed3568c1517b10edf2c3eb6",
99
"code": "0x6040",
10+
"address": "0x0000000000000000000000007265636569766572",
1011
"key": "0x30d7a0694cb29af31b982480e11d7ebb003a3fca4026939149071f014689b142"
1112
}
1213
}

cmd/evm/testdata/evmrun/4.out.1.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"root": "b444481d1367188172f8c6091e948aaa68bae763fd26d6b9e994306a66bf69f9",
33
"accounts": {
4-
"pre(0x30d7a0694cb29af31b982480e11d7ebb003a3fca4026939149071f014689b142)": {
4+
"0x0000000000000000000000007265636569766572": {
55
"balance": "0",
66
"nonce": 0,
77
"root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
88
"codeHash": "0x3e48ef54b89079a075f3b8fc253c657a86b110a7aed3568c1517b10edf2c3eb6",
99
"code": "0x6040",
10+
"address": "0x0000000000000000000000007265636569766572",
1011
"key": "0x30d7a0694cb29af31b982480e11d7ebb003a3fca4026939149071f014689b142"
1112
}
1213
}

core/genesis.go

+5
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
387387
}
388388
newCfg := genesis.chainConfigOrDefault(ghash, storedCfg)
389389

390+
// Sanity-check the new configuration.
391+
if err := newCfg.CheckConfigForkOrder(); err != nil {
392+
return nil, common.Hash{}, nil, err
393+
}
394+
390395
// TODO(rjl493456442) better to define the comparator of chain config
391396
// and short circuit if the chain config is not changed.
392397
compatErr := storedCfg.CheckCompatible(newCfg, head.Number.Uint64(), head.Time)

core/rawdb/freezer_table.go

+7
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,13 @@ func (t *freezerTable) repairIndex() error {
420420
// If legacy metadata is detected, attempt to recover the offset from the
421421
// index file to avoid clearing the entire table.
422422
if t.metadata.version == freezerTableV1 {
423+
// Skip truncation if the legacy metadata is opened in read-only mode.
424+
// Since all items in the legacy index file were forcibly synchronized,
425+
// data integrity is guaranteed. Therefore, it's safe to leave any extra
426+
// items untruncated in this special scenario.
427+
if t.readonly {
428+
return nil
429+
}
423430
t.logger.Info("Recovering freezer flushOffset for legacy table", "offset", size)
424431
return t.metadata.setFlushOffset(size, true)
425432
}

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ require (
6969
github.com/shirou/gopsutil v3.21.11+incompatible
7070
github.com/status-im/keycard-go v0.2.0
7171
github.com/stretchr/testify v1.10.0
72-
github.com/supranational/blst v0.3.13
72+
github.com/supranational/blst v0.3.14
7373
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
7474
github.com/tendermint/go-amino v0.14.1
7575
github.com/tendermint/iavl v0.12.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
11461146
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
11471147
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
11481148
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1149-
github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk=
1150-
github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
1149+
github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo=
1150+
github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=
11511151
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
11521152
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
11531153
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=

params/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1297,13 +1297,13 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
12971297
} {
12981298
if cur.config != nil {
12991299
if err := cur.config.validate(); err != nil {
1300-
return fmt.Errorf("invalid blob configuration for fork %s: %v", cur.name, err)
1300+
return fmt.Errorf("invalid chain configuration in blobSchedule for fork %q: %v", cur.name, err)
13011301
}
13021302
}
13031303
if cur.timestamp != nil {
13041304
// If the fork is configured, a blob schedule must be defined for it.
13051305
if cur.config == nil {
1306-
return fmt.Errorf("unsupported fork configuration: missing blob configuration entry for %v in schedule", cur.name)
1306+
return fmt.Errorf("invalid chain configuration: missing entry for fork %q in blobSchedule", cur.name)
13071307
}
13081308
}
13091309
}

trie/secure_trie.go

+1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ func (t *StateTrie) Copy() *StateTrie {
275275
trie: *t.trie.Copy(),
276276
db: t.db,
277277
secKeyCache: t.secKeyCache,
278+
preimages: t.preimages,
278279
}
279280
}
280281

0 commit comments

Comments
 (0)