params, trie: add verkle fork management + upgrade go-verkle (#27464)

* params, trie: add verkle fork management + upgrade go-verkle

* remove the two verkle files

* core, eth, params: add missing function

* Gary's feedback

* remove trie/utils/verkle.go

* add verkle block override

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This commit is contained in:
Guillaume Ballet
2023-06-28 12:08:48 +03:00
committed by GitHub
co-authored by Gary Rong
parent f5d3d486e4
commit 85b8d1c06c
14 changed files with 69 additions and 6 deletions
+4
View File
@@ -266,6 +266,7 @@ func (e *GenesisMismatchError) Error() string {
// ChainOverrides contains the changes to chain config.
type ChainOverrides struct {
OverrideCancun *uint64
OverrideVerkle *uint64
}
// SetupGenesisBlock writes or updates the genesis block in db.
@@ -294,6 +295,9 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
if overrides != nil && overrides.OverrideCancun != nil {
config.CancunTime = overrides.OverrideCancun
}
if overrides != nil && overrides.OverrideVerkle != nil {
config.VerkleTime = overrides.OverrideVerkle
}
}
}
// Just commit the new block if there is no stored genesis block.
+2
View File
@@ -26,6 +26,8 @@ import (
// the rules.
func LookupInstructionSet(rules params.Rules) (JumpTable, error) {
switch {
case rules.IsVerkle:
return newShanghaiInstructionSet(), errors.New("verkle-fork not defined yet")
case rules.IsPrague:
return newShanghaiInstructionSet(), errors.New("prague-fork not defined yet")
case rules.IsCancun: