Multiple storage root support (#902)
* Implement a non generic version of child delta trie * Use delta_trie_root in state_machine * Expand InMemory backend to support multi-storage * Create Consolidate trait * Fix all crate compile and remove unused OverlayedChanges::drain * Implement child storage root support and overlay changes * Add child storage reader * Add child storage writer * Implement child storage cleaning * Fix light backend compile * Add all required ext functions for wasm executor * Add ext def to io * Add all io functions * Fix nostd compile * Add simple test * Remove unnecessary vec copy in child_storage_root_transaction * Use values_mut/for_each to make it shorter * Use extend to shorter a for loop * Move record_all_keys to trie so it's easier to generic them later * space -> tab * Remove to_owned in debug format * Clean out all to_owned * Break debug_trace to multiple lines * Remove 0.. * UserError copy/paste typo * Replace Vec::from_raw_parts by slice::from_raw_parts * Use iter::empty() * Wrap some long lines * Wrap a missing line * Remove unnecessary map https://github.com/paritytech/substrate/pull/856#discussion_r226222663 * Call ext_free after from_raw_parts * Fix tests in other crates
Showing
- substrate/core/client/src/cht.rs 2 additions, 2 deletionssubstrate/core/client/src/cht.rs
- substrate/core/client/src/light/backend.rs 19 additions, 2 deletionssubstrate/core/client/src/light/backend.rs
- substrate/core/executor/src/wasm_executor.rs 155 additions, 7 deletionssubstrate/core/executor/src/wasm_executor.rs
- substrate/core/network-libp2p/src/custom_proto.rs 1 addition, 1 deletionsubstrate/core/network-libp2p/src/custom_proto.rs
- substrate/core/primitives/src/storage.rs 9 additions, 0 deletionssubstrate/core/primitives/src/storage.rs
- substrate/core/sr-io/with_std.rs 55 additions, 1 deletionsubstrate/core/sr-io/with_std.rs
- substrate/core/sr-io/without_std.rs 98 additions, 1 deletionsubstrate/core/sr-io/without_std.rs
- substrate/core/state-machine/src/backend.rs 112 additions, 15 deletionssubstrate/core/state-machine/src/backend.rs
- substrate/core/state-machine/src/changes_trie/build.rs 3 additions, 3 deletionssubstrate/core/state-machine/src/changes_trie/build.rs
- substrate/core/state-machine/src/changes_trie/mod.rs 3 additions, 0 deletionssubstrate/core/state-machine/src/changes_trie/mod.rs
- substrate/core/state-machine/src/ext.rs 101 additions, 9 deletionssubstrate/core/state-machine/src/ext.rs
- substrate/core/state-machine/src/lib.rs 49 additions, 6 deletionssubstrate/core/state-machine/src/lib.rs
- substrate/core/state-machine/src/overlayed_changes.rs 130 additions, 26 deletionssubstrate/core/state-machine/src/overlayed_changes.rs
- substrate/core/state-machine/src/proving_backend.rs 38 additions, 20 deletionssubstrate/core/state-machine/src/proving_backend.rs
- substrate/core/state-machine/src/testing.rs 14 additions, 0 deletionssubstrate/core/state-machine/src/testing.rs
- substrate/core/state-machine/src/trie_backend.rs 42 additions, 10 deletionssubstrate/core/state-machine/src/trie_backend.rs
- substrate/core/state-machine/src/trie_backend_essence.rs 38 additions, 3 deletionssubstrate/core/state-machine/src/trie_backend_essence.rs
- substrate/core/trie/src/lib.rs 129 additions, 3 deletionssubstrate/core/trie/src/lib.rs
Please register or sign in to comment