* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff
* Fixing tests
* Fixing tests
* Fixing cargo.toml for std configuration
* fmt
* Committing suggested changes
renaming, and re exporting macro.
* Removing unneeded imports
* Move `NposSolution` to frame
* Removing `npos_election` dependencies
Implementing _fpes better
* some feedback for moving NPoSSolution to frame
* fmt
* more formatting
* Fixed some imports and fmt
* Fixing docs
Co-authored-by: kianenigma <kian@parity.io>
* setting flag
* flag in storage struct
* fix flagging to access and insert.
* added todo to fix
* also missing serialize meta to storage proof
* extract meta.
* Isolate old trie layout.
* failing test that requires storing in meta when old hash scheme is used.
* old hash compatibility
* Db migrate.
* runing tests with both states when interesting.
* fix chain spec test with serde default.
* export state (missing trie function).
* Pending using new branch, lacking genericity on layout resolution.
* extract and set global meta
* Update to branch 4
* fix iterator with root flag (no longer insert node).
* fix trie root hashing of root
* complete basic backend.
* Remove old_hash meta from proof that do not use inner_hashing.
* fix trie test for empty (force layout on empty deltas).
* Root update fix.
* debug on meta
* Use trie key iteration that do not include value in proofs.
* switch default test ext to use inner hash.
* small integration test, and fix tx cache mgmt in ext.
test failing
* Proof scenario at state-machine level.
* trace for db upgrade
* try different param
* act more like iter_from.
* Bigger batches.
* Update trie dependency.
* drafting codec changes and refact
* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.
* alt hashing only for branch with value.
* fix trie tests
* Hash of value include the encoded size.
* removing fields(broken)
* fix trie_stream to also include value length in inner hash.
* triedbmut only using alt type if inner hashing.
* trie_stream to also only use alt hashing type when actually alt hashing.
* Refactor meta state, logic should work with change of trie treshold.
* Remove NoMeta variant.
* Remove state_hashed trigger specific functions.
* pending switching to using threshold, new storage root api does not
make much sense.
* refactoring to use state from backend (not possible payload changes).
* Applying from previous state
* Remove default from storage, genesis need a special build.
* rem empty space
* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.
* fix compilation
* Right logic to avoid switch on reencode when default layout.
* Clean up some todos
* remove trie meta from root upstream
* update upstream and fix benches.
* split some long lines.
* UPdate trie crate to work with new design.
* Finish update to refactored upstream.
* update to latest triedb changes.
* Clean up.
* fix executor test.
* rust fmt from master.
* rust format.
* rustfmt
* fix
* start host function driven versioning
* update state-machine part
* still need access to state version from runtime
* state hash in mem: wrong
* direction likely correct, but passing call to code exec for genesis
init seem awkward.
* state version serialize in runtime, wrong approach, just initialize it
with no threshold for core api < 4 seems more proper.
* stateversion from runtime version (core api >= 4).
* update trie, fix tests
* unused import
* clean some TODOs
* Require RuntimeVersionOf for executor
* use RuntimeVersionOf to resolve genesis state version.
* update runtime version test
* fix state-machine tests
* TODO
* Use runtime version from storage wasm with fast sync.
* rustfmt
* fmt
* fix test
* revert useless changes.
* clean some unused changes
* fmt
* removing useless trait function.
* remove remaining reference to state_hash
* fix some imports
* Follow chain state version management.
* trie update, fix and constant threshold for trie layouts.
* update deps
* Update to latest trie pr changes.
* fix benches
* Verify proof requires right layout.
* update trie_root
* Update trie deps to latest
* Update to latest trie versioning
* Removing patch
* update lock
* extrinsic for sc-service-test using layout v0.
* Adding RuntimeVersionOf to CallExecutor works.
* fmt
* error when resolving version and no wasm in storage.
* use existing utils to instantiate runtime code.
* migration pallet
* Patch to delay runtime switch.
* Revert "Patch to delay runtime switch."
This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
* fix test
* fix child migration calls.
* useless closure
* remove remaining state_hash variables.
* Fix and add more tests
* Remove outdated comment
* useless inner hash
* fmt
* remote tests
* finally ksm works
* batches are broken
* clean the benchmarks
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
* Update frame/state-trie-migration/src/lib.rs
* brand new version
* fix build
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update primitives/storage/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* fmt and opt-in feature to apply state change.
* feature gate core version, use new test feature for node and test node
* Use a 'State' api version instead of Core one.
* fix merge of test function
* use blake macro.
* Fix state api (require declaring the api in runtime).
* Opt out feature, fix macro for io to select a given version
instead of latest.
* run test nodes on new state.
* fix
* new test structure
* new testing stuff from emeric
* Add commit_all, still not working
* Fix all tests
* add comment
* we have PoV tracking baby
* document stuff, but proof size is still wrong
* FUCK YEAH
* a big batch of review comments
* add more tests
* tweak test
* update config
* some remote-ext stuff
* delete some of the old stuff
* sync more files with master to minimize the diff
* Fix all tests
* make signed migration a bit more relaxed
* add witness check to signed submissions
* allow custom migration to also go above limit
* Fix these pesky tests
* ==== removal of the unsigned stuff ====
* Make all tests work again
* separate the tests from the logic so it can be reused easier
* fix overall build
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Slightly better termination
* some final tweaks
* Fix tests
* Restrict access to signed migrations
* mig rpc
* fix
* better rpc name
* Make rpc unsafe
* address most of the review comments
* fix defensive
* New simplified code
* Fix weights
* fmt
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* make the tests correctly fail
* Fix build
* Fix build
* try and fix the benchmarks
* fix build
* Fix cargo file
* Fix runtime deposit
* make rustdoc happy
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_state_trie_migration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/state-trie-migration/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* update rpc deps, try to process empty keys.
* move rpc crate
* move check backend out of state machine
* Add primitive crate.
* module code
* fix runtime test
* StateMigrationStatusProvider
* Pass backend to rpc.
* fmt
* review changes
* move rpc crate
* try remove primitive crate
* Update utils/frame/rpc/state-trie-migration-rpc/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* review changes.
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Parity Bot <admin@parity.io>
* Move `sp-npos-elections-solution-type`
to `frame-election-provider-support`
First stab at it, will need to amend some more stuff
* Fixing tests
* Fixing tests
* Fixing cargo.toml for std configuration
* fmt
* Committing suggested changes
renaming, and re exporting macro.
* Removing unneeded imports
* make instantiable
* update
* cargo fmt
* Clean up
* bags-list: Make it generic over node value
* Respond to some feedback
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Add back default impl for weight update worst case
* Update to Score in more places'
* Use VoteWeight, not u64 to reduce test diff
* FMT
* FullCodec implies Codec
* formatting
* Fixup bags list remote test
Co-authored-by: doordashcon <jesse.chejieh@gmail.com>
Co-authored-by: Doordashcon <90750465+Doordashcon@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* starting
* Updated from other branch.
* setting flag
* flag in storage struct
* fix flagging to access and insert.
* added todo to fix
* also missing serialize meta to storage proof
* extract meta.
* Isolate old trie layout.
* failing test that requires storing in meta when old hash scheme is used.
* old hash compatibility
* Db migrate.
* runing tests with both states when interesting.
* fix chain spec test with serde default.
* export state (missing trie function).
* Pending using new branch, lacking genericity on layout resolution.
* extract and set global meta
* Update to branch 4
* fix iterator with root flag (no longer insert node).
* fix trie root hashing of root
* complete basic backend.
* Remove old_hash meta from proof that do not use inner_hashing.
* fix trie test for empty (force layout on empty deltas).
* Root update fix.
* debug on meta
* Use trie key iteration that do not include value in proofs.
* switch default test ext to use inner hash.
* small integration test, and fix tx cache mgmt in ext.
test failing
* Proof scenario at state-machine level.
* trace for db upgrade
* try different param
* act more like iter_from.
* Bigger batches.
* Update trie dependency.
* drafting codec changes and refact
* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.
* alt hashing only for branch with value.
* fix trie tests
* Hash of value include the encoded size.
* removing fields(broken)
* fix trie_stream to also include value length in inner hash.
* triedbmut only using alt type if inner hashing.
* trie_stream to also only use alt hashing type when actually alt hashing.
* Refactor meta state, logic should work with change of trie treshold.
* Remove NoMeta variant.
* Remove state_hashed trigger specific functions.
* pending switching to using threshold, new storage root api does not
make much sense.
* refactoring to use state from backend (not possible payload changes).
* Applying from previous state
* Remove default from storage, genesis need a special build.
* rem empty space
* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.
* fix compilation
* Right logic to avoid switch on reencode when default layout.
* Clean up some todos
* remove trie meta from root upstream
* update upstream and fix benches.
* split some long lines.
* UPdate trie crate to work with new design.
* Finish update to refactored upstream.
* update to latest triedb changes.
* Clean up.
* fix executor test.
* rust fmt from master.
* rust format.
* rustfmt
* fix
* start host function driven versioning
* update state-machine part
* still need access to state version from runtime
* state hash in mem: wrong
* direction likely correct, but passing call to code exec for genesis
init seem awkward.
* state version serialize in runtime, wrong approach, just initialize it
with no threshold for core api < 4 seems more proper.
* stateversion from runtime version (core api >= 4).
* update trie, fix tests
* unused import
* clean some TODOs
* Require RuntimeVersionOf for executor
* use RuntimeVersionOf to resolve genesis state version.
* update runtime version test
* fix state-machine tests
* TODO
* Use runtime version from storage wasm with fast sync.
* rustfmt
* fmt
* fix test
* revert useless changes.
* clean some unused changes
* fmt
* removing useless trait function.
* remove remaining reference to state_hash
* fix some imports
* Follow chain state version management.
* trie update, fix and constant threshold for trie layouts.
* update deps
* Update to latest trie pr changes.
* fix benches
* Verify proof requires right layout.
* update trie_root
* Update trie deps to latest
* Update to latest trie versioning
* Removing patch
* update lock
* extrinsic for sc-service-test using layout v0.
* Adding RuntimeVersionOf to CallExecutor works.
* fmt
* error when resolving version and no wasm in storage.
* use existing utils to instantiate runtime code.
* migration pallet
* Patch to delay runtime switch.
* Revert "Patch to delay runtime switch."
This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
* fix test
* fix child migration calls.
* useless closure
* remove remaining state_hash variables.
* Fix and add more tests
* Remove outdated comment
* useless inner hash
* fmt
* remote tests
* finally ksm works
* batches are broken
* clean the benchmarks
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
* Update frame/state-trie-migration/src/lib.rs
* brand new version
* fix build
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update primitives/storage/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* fmt and opt-in feature to apply state change.
* feature gate core version, use new test feature for node and test node
* Use a 'State' api version instead of Core one.
* fix merge of test function
* use blake macro.
* Fix state api (require declaring the api in runtime).
* Opt out feature, fix macro for io to select a given version
instead of latest.
* run test nodes on new state.
* fix
* new test structure
* new testing stuff from emeric
* Add commit_all, still not working
* Fix all tests
* add comment
* we have PoV tracking baby
* document stuff, but proof size is still wrong
* FUCK YEAH
* a big batch of review comments
* add more tests
* tweak test
* update config
* some remote-ext stuff
* delete some of the old stuff
* sync more files with master to minimize the diff
* Fix all tests
* make signed migration a bit more relaxed
* add witness check to signed submissions
* allow custom migration to also go above limit
* Fix these pesky tests
* ==== removal of the unsigned stuff ====
* Make all tests work again
* separate the tests from the logic so it can be reused easier
* fix overall build
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Slightly better termination
* some final tweaks
* Fix tests
* Restrict access to signed migrations
* address most of the review comments
* fix defensive
* New simplified code
* Fix weights
* fmt
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* make the tests correctly fail
* Fix build
* Fix build
* try and fix the benchmarks
* fix build
* Fix cargo file
* Fix runtime deposit
* make rustdoc happy
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_state_trie_migration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/state-trie-migration/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Parity Bot <admin@parity.io>
* Upgraded dependencies
* Adapting code to scale v3
* Empty commit to trigger CI
* Triggering CI
* Fixing UI test
* Remove superfluous dev-dep added by #9228
* Cryout for CI
* Mark sync_state_genSyncSpec JSON-RPC as safe
* Note that parameter is unused
* Ideally I'd wait for compilation to be finished before pushing, but it's really taking a long time
* Remove deny_unsafe parameter
* Remove unused dependency
* wasm-builder: Support latest nightly
With latest nightly, aka rust version 1.60+ namespaced features are added. This changes the handling
of optional dependencies. We currently have features that enable optional dependencies when `std` is
enabled. This was before no problem, but now the wasm-builder detects them as enabled. To support
the transition period until 1.60 is released as stable, this pr adds an heuristic to not enable these
optional crates in the wasm build when they are enabled in the `std` feature. This heuristic fails
when someones enables these optional dependencies from the outside as well as via the `std` feature,
however we hope that no one is doing this at the moment. When namespaced features are enabled, these
dependencies needs to be enabled using `dep:dependency-name` to solve this properly.
https://doc.rust-lang.org/cargo/reference/unstable.html#namespaced-features
* Remove accidentally added features
* Remove `u32_trait`
This trait only existed because there wasn't any const generic support at time of creation. However,
we now have support for it :)
* FMT
* pallet-scheduler: Fix migrations V2 to V3
V2 already supported origins, so we need to move them over instead of setting it to `Root`. Besides
that it also removes the custom `Releases` enum and moves it over to `StorageVersion`.
* Fixes
* Fixes
* 🤦
* Use proper bounded vector type for nominations
* add docs and tweak chill_other for cleanup purposes
* Fix the build
* remove TODO
* add a bit more doc
* even more docs
gushc
* Update frame/staking/src/pallet/mod.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
* Update frame/staking/src/pallet/mod.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
* Fix the nasty bug
* also bound the Snapshot type
* fix doc test
* document bounded_vec
* self-review
* remove unused
* Fix build
* frame-support: repetition overload for bounded_vec
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fix
* remove the need to allocate into unbounded voters etc etc
* Don't expect
* unbreal the build again
* handle macro a bit better
Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Improve usability of add_benchmark and list_benchmark.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* node-template: use new define_benchmarks syntax
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* make CI happy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* remove old imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fix TryBuild tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "fix TryBuild tests"
This reverts commit 82ea52fd25c0ef5efa46669217694835a7404d4e.
* review: remove blank lines
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Allow the treasury to have a maximum bound on the bond
* Update frame/treasury/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* grandpa: update notif protocol name
* grandpa: add chain id prefix to protocol name
* grandpa: beautify protocol name handling
* grandpa: prepend genesis hash to protocol name
* chain-spec: add optional 'fork_id'
'fork_id' is used to uniquely identify forks of the same chain/network
'ChainSpec' trait provides default 'None' implementation, meaning this
chain hasn't been forked.
* grandpa: protocol_name mod instead of struct
* beefy: add genesis hash prefix to protocol name
* chainspec: add fork_id
* grandpa: simplify protocol name
* grandpa: contain protocol name building logic
* beefy: contain protocol name building logic
* grandpa: fix tests
* fix merge damage
* fix docs reference visibility
Signed-off-by: acatangiu <adrian@parity.io>
* Update client/finality-grandpa/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update client/finality-grandpa/src/communication/mod.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update client/beefy/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update client/beefy/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* avoid using hash default, even for protocol names
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* starting
* Updated from other branch.
* setting flag
* flag in storage struct
* fix flagging to access and insert.
* added todo to fix
* also missing serialize meta to storage proof
* extract meta.
* Isolate old trie layout.
* failing test that requires storing in meta when old hash scheme is used.
* old hash compatibility
* Db migrate.
* runing tests with both states when interesting.
* fix chain spec test with serde default.
* export state (missing trie function).
* Pending using new branch, lacking genericity on layout resolution.
* extract and set global meta
* Update to branch 4
* fix iterator with root flag (no longer insert node).
* fix trie root hashing of root
* complete basic backend.
* Remove old_hash meta from proof that do not use inner_hashing.
* fix trie test for empty (force layout on empty deltas).
* Root update fix.
* debug on meta
* Use trie key iteration that do not include value in proofs.
* switch default test ext to use inner hash.
* small integration test, and fix tx cache mgmt in ext.
test failing
* Proof scenario at state-machine level.
* trace for db upgrade
* try different param
* act more like iter_from.
* Bigger batches.
* Update trie dependency.
* drafting codec changes and refact
* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.
* alt hashing only for branch with value.
* fix trie tests
* Hash of value include the encoded size.
* removing fields(broken)
* fix trie_stream to also include value length in inner hash.
* triedbmut only using alt type if inner hashing.
* trie_stream to also only use alt hashing type when actually alt hashing.
* Refactor meta state, logic should work with change of trie treshold.
* Remove NoMeta variant.
* Remove state_hashed trigger specific functions.
* pending switching to using threshold, new storage root api does not
make much sense.
* refactoring to use state from backend (not possible payload changes).
* Applying from previous state
* Remove default from storage, genesis need a special build.
* rem empty space
* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.
* fix compilation
* Right logic to avoid switch on reencode when default layout.
* Clean up some todos
* remove trie meta from root upstream
* update upstream and fix benches.
* split some long lines.
* UPdate trie crate to work with new design.
* Finish update to refactored upstream.
* update to latest triedb changes.
* Clean up.
* fix executor test.
* rust fmt from master.
* rust format.
* rustfmt
* fix
* start host function driven versioning
* update state-machine part
* still need access to state version from runtime
* state hash in mem: wrong
* direction likely correct, but passing call to code exec for genesis
init seem awkward.
* state version serialize in runtime, wrong approach, just initialize it
with no threshold for core api < 4 seems more proper.
* stateversion from runtime version (core api >= 4).
* update trie, fix tests
* unused import
* clean some TODOs
* Require RuntimeVersionOf for executor
* use RuntimeVersionOf to resolve genesis state version.
* update runtime version test
* fix state-machine tests
* TODO
* Use runtime version from storage wasm with fast sync.
* rustfmt
* fmt
* fix test
* revert useless changes.
* clean some unused changes
* fmt
* removing useless trait function.
* remove remaining reference to state_hash
* fix some imports
* Follow chain state version management.
* trie update, fix and constant threshold for trie layouts.
* update deps
* Update to latest trie pr changes.
* fix benches
* Verify proof requires right layout.
* update trie_root
* Update trie deps to latest
* Update to latest trie versioning
* Removing patch
* update lock
* extrinsic for sc-service-test using layout v0.
* Adding RuntimeVersionOf to CallExecutor works.
* fmt
* error when resolving version and no wasm in storage.
* use existing utils to instantiate runtime code.
* Patch to delay runtime switch.
* Revert "Patch to delay runtime switch."
This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
* useless closure
* remove remaining state_hash variables.
* Remove outdated comment
* useless inner hash
* fmt
* fmt and opt-in feature to apply state change.
* feature gate core version, use new test feature for node and test node
* Use a 'State' api version instead of Core one.
* fix merge of test function
* use blake macro.
* Fix state api (require declaring the api in runtime).
* Opt out feature, fix macro for io to select a given version
instead of latest.
* run test nodes on new state.
* fix
* Apply review change (docs and error).
* fmt
* use explicit runtime_interface in doc test
* fix ui test
* fix doc test
* fmt
* use default for path and specname when resolving version.
* small review related changes.
* doc value size requirement.
* rename old_state feature
* Remove macro changes
* feature rename
* state version as host function parameter
* remove flag for client api
* fix tests
* switch storage chain proof to V1
* host functions, pass by state version enum
* use WrappedRuntimeCode
* start
* state_version in runtime version
* rust fmt
* Update storage proof of max size.
* fix runtime version rpc test
* right intent of convert from compat
* fix doc test
* fix doc test
* split proof
* decode without replay, and remove some reexports.
* Decode with compatibility by default.
* switch state_version to u8. And remove RuntimeVersionBasis.
* test
* use api when reading embedded version
* fix decode with apis
* extract core version instead
* test fix
* unused import
* review changes.
Co-authored-by: kianenigma <kian@parity.io>
* SlotDuration: Always fetch the slot duration from the runtime
The slot duration should always be fetched from the runtime instead of being cached in the db. The
slot duration is only fetched on startup of the node, so the performance isn't that important. This
is especially helpful for the case when the slot duration of a chain should be changed through a
runtime upgrade (there be dragons, so take care).
* Fix docs
* Remove logging
* Fix warning