go-ethereum/cmd
rjl493456442 37c0e6992e
cmd, core, miner: rework genesis setup (#30907)
This pull request refactors the genesis setup function, the major
changes are highlighted here:

**(a) Triedb is opened in verkle mode if `EnableVerkleAtGenesis` is
configured in chainConfig or the database has been initialized previously with
`EnableVerkleAtGenesis` configured**.

A new config field `EnableVerkleAtGenesis` has been added in the
chainConfig. This field must be configured with True if Geth wants to initialize 
the genesis in Verkle mode.

In the verkle devnet-7, the verkle transition is activated at genesis.
Therefore, the verkle rules should be used since the genesis. In production
networks (mainnet and public testnets), verkle activation always occurs after
the genesis block. Therefore, this flag is only made for devnet and should be
deprecated later. Besides, verkle transition at non-genesis block hasn't been
implemented yet, it should be done in the following PRs.

**(b) The genesis initialization condition has been simplified**
There is a special mode supported by the Geth is that: Geth can be
initialized with an existing chain segment, which can fasten the node sync
process by retaining the chain freezer folder.

Originally, if the triedb is regarded as uninitialized and the genesis block can
be found in the chain freezer, the genesis block along with genesis state will be
committed. This condition has been simplified to checking the presence of chain
config in key-value store. The existence of chain config can represent the genesis
has been committed.
2025-01-14 11:49:30 +01:00
..
abidump all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
abigen all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
blsync beacon/blsync: remove cli dependencies (#30720) 2024-11-08 15:21:00 +01:00
clef cmd/clef: fix JS issues in documentation (#30980) 2025-01-07 10:31:10 +01:00
devp2p cmd/devp2p/internal/ethtest: using slices.SortFunc to simplify the code (#31012) 2025-01-13 18:00:25 +01:00
era cmd: use package filepath over path for file system operations (#29227) 2024-03-12 10:00:34 +01:00
ethkey cmd: fix some typos in readmes (#29405) 2024-04-11 14:06:49 +03:00
evm core, core/types: rename AuthList to SetCodeAuthorizations (#30935) 2024-12-19 10:06:33 +01:00
geth cmd, core, miner: rework genesis setup (#30907) 2025-01-14 11:49:30 +01:00
rlpdump build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
utils cmd, core, miner: rework genesis setup (#30907) 2025-01-14 11:49:30 +01:00