From 33d4b8d744d8362561017003cb72787fab48bc09 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Thu, 21 Feb 2019 14:36:04 -0600 Subject: [PATCH] Statediff for full node (#6) * Open a trie from the in-memory database * Use a node's LeafKey as an identifier instead of the address It was proving difficult to find look the address up from a given path with a full node (sometimes the value wouldn't exist in the disk db). So, instead, for now we are using the node's LeafKey with is a Keccak256 hash of the address, so if we know the address we can figure out which LeafKey it matches up to. * Make sure that statediff has been processed before pruning * Use blockchain stateCache.OpenTrie for storage diffs * Clean up log lines and remove unnecessary fields from builder * Apply go fmt changes * Add a sleep to the blockchain test * Address PR comments * Address PR comments --- eth/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eth/config.go b/eth/config.go index 0a5fe000b9c6..8ed014e241ad 100644 --- a/eth/config.go +++ b/eth/config.go @@ -158,4 +158,6 @@ type Config struct { // CheckpointOracle is the configuration for checkpoint oracle. CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` + + StateDiff bool }