forked from cerc-io/plugeth
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:
co-authored by
Gary Rong
parent
f5d3d486e4
commit
85b8d1c06c
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user