Update to latest trie version. (#10972)

* Switch to 'trie' crates, there is an unpublished deps to staging
parity-common triehash still.

* Use crates.io dependency.

* indentation

* Update util/journaldb/src/traits.rs

indentation

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* Rem import braces

* switch deps to simple-codec branch (code broken)

* painfull update of trie and memdb, plus rework codec to be compatible
with simple_codec changes

* Removed useless implementation from trait.

* Remove some malloc size until update and patch triehash, seems ok
otherwhise.

* Update parity-util-mem.

* Switch to published triehash 0.8.

* Avoid redundancy in encode_partial functions.
Use better namings.

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Restore previous child rlp header length check.
Better comments and formatting.

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: David <dvdplm@gmail.com>

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: David <dvdplm@gmail.com>
This commit is contained in:
cheme
2019-08-15 15:36:48 +02:00
committed by David
parent e50eafe6e1
commit 5807402a0b
31 changed files with 229 additions and 158 deletions

View File

@@ -91,7 +91,7 @@ use verification::queue::kind::blocks::Unverified;
use verification::{Verifier, BlockQueue};
use verification;
use ansi_term::Colour;
use ethtrie::Layout;
// re-export
pub use blockchain::CacheSize as BlockChainCacheSize;
use db::{Writable, Readable, keys::BlockDetails};
@@ -726,7 +726,7 @@ impl Client {
false => TrieSpec::Secure,
};
let trie_factory = TrieFactory::new(trie_spec);
let trie_factory = TrieFactory::new(trie_spec, Layout);
let factories = Factories {
vm: VmFactory::new(config.vm_type.clone(), config.jump_table_size),
trie: trie_factory,

View File

@@ -158,7 +158,7 @@ impl<'a> EvmTestClient<'a> {
fn factories(trie_spec: trie::TrieSpec) -> Factories {
Factories {
vm: trie_vm_factories::VmFactory::new(VMType::Interpreter, 5 * 1024),
trie: trie::TrieFactory::new(trie_spec),
trie: trie::TrieFactory::new(trie_spec, ethtrie::Layout),
accountdb: Default::default(),
}
}