@@ -18,7 +18,6 @@ package core
18
18
19
19
import (
20
20
"bytes"
21
- "encoding/gob"
22
21
"encoding/json"
23
22
"errors"
24
23
"fmt"
@@ -28,7 +27,6 @@ import (
28
27
"github.com/ethereum/go-ethereum/common"
29
28
"github.com/ethereum/go-ethereum/common/hexutil"
30
29
"github.com/ethereum/go-ethereum/common/math"
31
- "github.com/ethereum/go-ethereum/core/overlay"
32
30
"github.com/ethereum/go-ethereum/core/rawdb"
33
31
"github.com/ethereum/go-ethereum/core/state"
34
32
"github.com/ethereum/go-ethereum/core/tracing"
@@ -147,9 +145,6 @@ func hashAlloc(ga *types.GenesisAlloc, isVerkle bool) (common.Hash, error) {
147
145
emptyRoot = types .EmptyVerkleHash
148
146
}
149
147
db := rawdb .NewMemoryDatabase ()
150
- if isVerkle {
151
- saveVerkleTransitionStatusAtVerlkeGenesis (db )
152
- }
153
148
statedb , err := state .New (emptyRoot , state .NewDatabase (triedb .NewDatabase (db , config ), nil ))
154
149
if err != nil {
155
150
return common.Hash {}, err
@@ -281,24 +276,6 @@ func (o *ChainOverrides) apply(cfg *params.ChainConfig) error {
281
276
return cfg .CheckConfigForkOrder ()
282
277
}
283
278
284
- // saveVerkleTransitionStatusAtVerlkeGenesis saves a conversion marker
285
- // representing a converted state, which is used in devnets that activate
286
- // verkle at genesis.
287
- func saveVerkleTransitionStatusAtVerlkeGenesis (db ethdb.Database ) {
288
- saveVerkleTransitionStatus (db , common.Hash {}, & overlay.TransitionState {Ended : true })
289
- }
290
-
291
- func saveVerkleTransitionStatus (db ethdb.Database , root common.Hash , ts * overlay.TransitionState ) {
292
- var buf bytes.Buffer
293
- enc := gob .NewEncoder (& buf )
294
- err := enc .Encode (ts )
295
- if err != nil {
296
- log .Error ("failed to encode transition state" , "err" , err )
297
- return
298
- }
299
- rawdb .WriteVerkleTransitionState (db , root , buf .Bytes ())
300
- }
301
-
302
279
// SetupGenesisBlock writes or updates the genesis block in db.
303
280
// The block that will be used is:
304
281
//
@@ -322,11 +299,6 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
322
299
if genesis != nil && genesis .Config == nil {
323
300
return nil , common.Hash {}, nil , errGenesisNoConfig
324
301
}
325
- // In case of verkle-at-genesis, we need to ensure that the conversion
326
- // markers are indicating that the conversion has completed.
327
- if genesis != nil && genesis .Config .VerkleTime != nil && * genesis .Config .VerkleTime == genesis .Timestamp {
328
- saveVerkleTransitionStatusAtVerlkeGenesis (db )
329
- }
330
302
// Commit the genesis if the database is empty
331
303
ghash := rawdb .ReadCanonicalHash (db , 0 )
332
304
if (ghash == common.Hash {}) {
@@ -578,9 +550,6 @@ func (g *Genesis) Commit(db ethdb.Database, triedb *triedb.Database) (*types.Blo
578
550
if err != nil {
579
551
return nil , err
580
552
}
581
- if g .IsVerkle () {
582
- saveVerkleTransitionStatus (db , block .Root (), & overlay.TransitionState {Ended : true })
583
- }
584
553
batch := db .NewBatch ()
585
554
rawdb .WriteGenesisStateSpec (batch , block .Hash (), blob )
586
555
rawdb .WriteBlock (batch , block )
0 commit comments