* Check every minute whether authority-discovery key has changed
* Fix test
* Fix comment
* Use HashSet for latest_published_keys
* More fixing
* God I'm tired, sorry
* Establish the runtime_blob module
Seed it with the existing contents of the `util` module.
* Port wasmtime mutable globals instrumentation into runtime blob APIs
* Opt-out from fast instance reuse
* Minor clean up
* Spaces
* Docs clean up
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Factor out the expects
* Fix the suggestion
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix account ref-counting in session.
* Avoid needless check
* fix compile
* put back in check and conversion
* Fix test to actually catch this error
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Fixes `storage_hash` caching issue and enables better caching for Cumulus
There was a caching issue with `storage_hash` that resulted in not
reverting cached storage hashes when required. In Cumulus this resulted
in nodes failing to import new blocks after a runtime upgrade, because
they were using the old runtime version.
Besides that, this pr optimizes for the Cumulus use case. In particular
that we always import blocks first as non-best blocks and enact them
later. In current version of the caching that would mean we would always
throw away the complete cache of the latest imported block. Now, we
always update the cache for the first block of a new block height. This
enables us to use the cache if this block will enacted as best block
later. If there is a fork and that is enacted as best, we revert all the
changes to the cache.
* Apply suggestions from code review
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
* Indentation
* Update client/db/src/storage_cache.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Make use of PrefixIterator underneath Storage[Key]Iterator
* Add ChildTriePrefixIterator and methods
* Add documentation on ChilTriePrefixIterator fields
* Deprecate Storage[Key]Iterator API instead of removing them
* Allow fetching for the prefix as an option for ChildTriePrefixIterator
* Rename prefix_fetch to fetch_previous_key
* fix implementation + test
* make gitdiff better
* Add test for storage_iter and storage_key_iter
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* grandpa: always store justification for best finalized block
* grandpa-warp-sync: add latest justification when finished proving
* grandpa-warp-sync: change logic for sending best justification when finished
* grandpa: test storing best justification
* grandpa: reorder variants in WarpSyncFinished
* Make grandpa work
* Introduce `SharedData`
* Add test and fix bugs
* Switch to `SharedData`
* Make grandpa tests working
* More Babe work
* Make it async
* Fix fix
* Use `async_trait` in sc-consensus-slots
This makes the code a little bit easier to read and also expresses that
there can always only be one call at a time to `on_slot`.
* Make grandpa tests compile
* More Babe tests work
* Fix network test
* Start fixing service test
* Finish service-test
* Fix sc-consensus-aura
* Fix fix fix
* More fixes
* Make everything compile *yeah*
* Fix build when we have Rust 1.51
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/babe/src/tests.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/babe/src/tests.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Fix warning
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>