verkle proof deserialization (#61)

* use proof serialization

* remove cruft

* save current state

* fix most issues up to this point

* fix remaining build issues

* update the go.mod to use the right branch

* remove custom-defined set type

* update go-verkle to get merged PRs

* extract key, value data from proof

* only activate precomp calculations if this is a verkle chain

Co-authored-by: Jared Wasinger <j-wasinger@hotmail.com>
This commit is contained in:
Guillaume Ballet
2022-01-21 12:38:40 +01:00
committed by GitHub
parent 5beac51808
commit 15b353d7b4
6 changed files with 121 additions and 39 deletions

View File

@ -56,6 +56,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
"github.com/gballet/go-verkle"
)
// Config contains the configuration options of the ETH protocol.
@ -139,6 +140,13 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
}
log.Info("Initialised chain configuration", "config", chainConfig)
// Start the precomputation of Lagrange points
// if this config supports verkle trees.
if chainConfig.CancunBlock != nil {
log.Info("Detected the use of verkle trees, rebuilding the cache")
verkle.GetConfig()
}
if err := pruner.RecoverPruning(stack.ResolvePath(""), chainDb, stack.ResolvePath(config.TrieCleanCacheJournal)); err != nil {
log.Error("Failed to recover state", "error", err)
}