* deadlock, need to ask someone to help now
* Finally it seems to be working.. at least for a few blocks
* self-review
* major mega revamp
* some small fixes
* another mega refactor
* add license
* Apply suggestions from code review
* hack around signature verification
* Some fixes
* Update utils/frame/try-runtime/cli/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
* Update utils/frame/try-runtime/cli/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
* Update utils/frame/try-runtime/cli/src/lib.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
* final tweaks, hopefully.
* a little self-review
* Add the ext root check
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
* remove extra whitespace
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* only emit rebag event on success
* add doc explaining the term voter
* revamp/simplify rebag test
* ensure genesis accounts are placed into the correct nodes/bags
* bond_extra implicitly rebags
* types at top; doc public type
* start sketching out adjustable thresholds
* add integrity test for voter bag threshold requirements
* get rid of BagIdx
This reorganizes bag storage such that bags are always referred to
by their upper threshold. This in turn means that adding and removing
bags is cheaper; you only need to migrate certain voters, not all of them.
* implement migration logic for when the threshold list changes
* start sketching out threshold proc macros
* further refine macro signatures
* WIP: implement make_ratio macro
* start rethinking the process of producing threshold lists
The macro approach seems to be a non-starter; that only really works
if we're throwing around numeric literals everywhere, and that's just
not nice in this case.
Instead, let's write helper functions and make it really easy to
generate the tables in separate, permanent files, which humans
can then edit.
* write helper functions to emit voter bags module
* WIP: demo generating voter bags for a realistic runtime
This isn't yet done, becuase it seems to take a Very Long Time to run,
and it really shouldn't. Need to look into that.
Still, it's a lot closer than it was this morning.
* rm unnecessary arg_enum
* fix voter bags math
Turns out that when you're working in exponential space, you need
to divide, not subtract, in order to keep the math working properly.
Also neaten up the output a little bit to make it easier to read.
* add computed voter bags thresholds to node
* fixup some docs
* iter from large bags to small, fulfuilling the contract
* make tests compile
* add VoterBagThresholds to some configs
* ensure that iteration covers all voters even with implied final bag
* use sp_std::boxed::Box;
* fix unused import
* add some more voter bags tests
* file_header.txt
* integrity test to ensure min bag exceeds existential weight
* add more debug assertions about node list length
* rm unused imports
* Kian enters
* Update frame/election-provider-support/src/onchain.rs
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
* Suggestions for #9081 (Store voters in unsorted bags) (#9328)
* Add some debug asserts to node::get and remove_node
* Improve the debug asserts in remove_node
* improve debug asserts
* Space
* Remove bad assertions
* Tests: WIP take_works
* Take test
* Doc comment
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Test storage is cleaned up;
* formatting
* Switch to simpler thresholds
* Update the storage cleanup test
* Remove hardcoded values from benchmark to make it more robust
* Fix tests to acces bags properly
* Sanity check WIP; tests failing
* Update sanity checks to be more correct
* Improve storage cleanup tests
* WIP remote_ext_tests
* Some notes on next steps
* Remove some stuff that was for remote-ext tests
* Some more cleanup to reduce diff
* More :clean:
* Mo cleanin
* small fix
* A lot of changes from kian
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
* merge fallout
* Run cargo +nightly fmt
* Fix a bunch of stuff, remove not needed runtime arg of make-bags
* add logs
* Glue the new staking bags to the election snapshot (#9415)
* Glue the new staking bags to the election snapshot
* add CheckedRem (#9412)
* add CheckedRem
* fix
* Run fmt
* Test comment
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: emostov <32168567+emostov@users.noreply.github.com>
* Update node runtime with VoterSnapshotPerBlock
* Unit test for pallet-staking unsorted bags feature (targets #9081) (#9422)
* impl notional_bag_for_works
* Add tests: insert_as_works & insert_works
* Impl test: remove_works
* Trivial cleaning
* Add test: update_position_for_works
* Write out edge case; probably can delete later
* Add test: bags::get_works
* Add test: remove_node_happy_path_works
* Add test: remove_node_bad_paths_documented
* WIP: voting_data_works
* done
* Improve test voting_data_works
* Add comment
* Fill out test basic_setup_works
* Update: iteration_is_semi_sorted
* Improve remove_works
* Update update_position_for_works; create set_ledger_and_free_balance
* Improve get_works
* Improve storage clean up checks in remove test
* Test: impl rebag_works + insert_and_remove_works
* forgot file - Test: impl rebag_works + insert_and_remove_works
* Small tweak
* Update voter_bags test to reflect unused bags are removed
* Unbond & Rebond: do_rebag
* Prevent infinite loops with duplicate tail insert
* Check iter.count on voter list in pre-migrate
* undo strang fmt comment stuff
* Add in todo
Co-authored-by: kianenigma <kian@parity.io>
* Try prepare for master merge
* Reduce diff
* Add comment for test to add
* Add in code TODO for update_position efficiency updates
* Initial impl compiles
* impl StakingVoterListStub
* Sample impl<T: Config> VoterListProvider<T> for VoterList<T>
* impl VoterListProvider for voter-bags
* WIP integrate pallet-voter-bags to staking mock
* the trait `pallet_staking::pallet::pallet::Config` is not implemented for `mock::Test`
* random
* pushing my stuff
* Mock working
* WIP voter list tests
* Add bag insert, remove tests
* Add test for bag insert and remove
* Add remaining tests for VoterList
* Add tests for node
* Add rebag works
* Add rebag extrinsic tests
* Rename to bags-list and name the list .. list!
* Rename VoterBagThresholds => BagThresholds
* Add test count_works
* Test on_update_works
* test sanity check
* a round of test fixes
* push a lot of changes
* my last changes
* all bags-list test work; fmt
* Beautify some tests
* Doc comment for bags-list
* Add insert warnings
* Setup initial benchmark
* Wire up WeightInfo
* is_terminal wip; everything broken!
* Is terminal working
* add TODOs for remove_node
* clean up remoe_node
* Fix all staking tests
* retire VoterBagFor
* commit
* bring in stashed changes
* save
* bench pipeline works now, but I can't run stuff
* sabe
* benchmarks now run, but we have a failure
* WIP: Wire up make_bags
* bags-thresholds compiles
* Fix most build issues
* This will fix all the tests
* move bag thresholds to bags-list
* Move bag-thresholds bin to within pallet-bags
* Remove some unnescary TODOs
* Impl tets wrong_rebag_is_noop
* assert remove is a noop with bad data
* Assert integrity test panics
* Return an error when inserting duplicates
* Update to handle error in staking pallet when inserting to list
* Test contains and on_insert error
* Test re-nominate does not mess up list or count
* Everything builds and works, only the benchmark...
* fuck yeah benchmarks
* more cleanup, more hardening.
* use the bags list again
* fix benhc
* Some questions and changs for List::migration
* Fix migration removed_bags and new_bags usage
* Some trivial aesthetic changes
* Some more trivial changes
* tiny changes/
* mega rename
* fix all tests and ci build
* nit
* Test and fix migration
* nit
* fmt
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fmt
* remove unused
* make a few things pub
* make node also pub.. for remote-ext test
* Fix all tests again
* Force bag changes in relevant benchmarks (targets #9507) (#9529)
* force rebag for unbond, rebond, and bond_extra
* nit
* Improve utils
* fmt
* nits
* Move generate_bags to its own pallet
* Get runtime-benchmarks feature setup with prepare_on_update_benchmark
* Withdraw unbonded kill working
* Nominate bench working
* some cleanup
* WIP
* update to check head pre & post conditions
* Add some post condition verification stuff for on_remove
* Update nominate
* fmt
* Improvements
* Fix build
* fix build with polkadot companion
* Update frame/bags-list/src/list/tests.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* move generate-bag from frame to utils
* wip
* refactor WIP
* WIP save
* Refactor working
* some variable renaming
* WIP: prepare to remove head checks
* Finish MvP refactor
* Some cleanup
* Soem more cleanup
* save
* fix a lot of stuff
* Update client/db/src/bench.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Apply suggestions from code review
* Apply suggestions from code review
* Fix some issues that came from trying to merge comments on github
* some small changes
* simplify it
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Build works
* 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>
* Remove commented out debug assert
* Remove some unused deps and some unused benchmarking stuff
* Fix stakings ElectionDataProvider clear
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Improving staking pallet-bags-list migration
* fix build and some comments;
* comment
* Reduce visibility in bags list components
* make node.bag_upper only accesible to benchmarks
* Address some feedback; comments updates
* use nominator map comment
* fix vec capacity debug assert
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* clarify VoterSnapshotPerBlock
* Reduce diff on create_validators by wrapping with_seed
* Some small improvements to staking benches
* Soem comment updates
* fix vec capacity debug assert ... for real this time
* Reduce ListBags viz
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Remove supports_eq_unordered & Support eq_unordered
* Update utils/frame/generate-bags/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Make total-issuance & minimium-balance CLI args; Dont use emptry ext
* Improve docs for generate bags CLI args
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Don't use default bags weight in node runtime
* Feature gating sanity_check not working
* Feature gate sanity check by creating duplicate fns
* Fix line wrapping
* Document VoteWeightProvider
* Make bags ext-builder not a module
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* use pallet_bags_list instead of crate in mock
* Make get_bags test helper fn live in List
* use remove_from_storage_unchecked for node removal
* Remove count of ids removed in remove_many
* Add node sanity check, improve list sanity check
* Do a list sanity check after on_update
* List::migrate: clean up debug assert, exit early when no change in thresholds
* Improve public doc comments for pallet_bags_list::list::List
* Improve public doc comments for pallet_bags_list::list::List
* Update generate bags docs
* Fix grammar in bags-list benchmark
* Add benchmark case for `rebag` extrinsic
* Add count parameter to List::clear; WIP adding MaxEncodedLen to list'
* MaxEncodeLen + generate_storage_info not working for Bag or Node
* Get MaxEncodeLen derive to work
* Try to correctly feature gate SortedListProvider::clear
* Use u32::MAX, not u32::max_value
* Get up to nominators_quota noms
* SortedListProvider::clear takes an Option
* Eplicitly ignore SortedListProvider return value
* Fix doc comment
* Update node-runtime voter snapshot per block
* Add test get_max_len_voters_even_if_some_nominators_are_slashed
* Add test only_iterates_max_2_times_nominators_quota
* Fix generate bags cargo.toml
* use sp_std vec
* Remove v8 migration hooks from pallet-staking
* Update npos trait
* Try respect line width
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/bags-list/src/benchmarks.rs
* Unwrap try-runtime error; remove sortedlistprovider pre upgrade len check
* trigger ci
* restore
* trigger ci
* restore
* trigger ci
* revert
* trigger ci
* revert
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <peter.r.goodspeedniklaus@gmail.com>
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.
Updated code related to deprecated warning on tracing-subscriber `scope()`
( See https://github.com/tokio-rs/tracing/issues/1429 )
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com>
When the `Executive` was used through the `ExecuteBlock` trait, the
custom on runtime upgrade wasn't called. This happened because we forgot
to forward the type and it instead used default type `()` that doesn't
do anything. This pr fixes it by forwarding the type and also adds a
regression test.
* mark template and utils as non-publish
* switch to development version for testing
* activate unleash check
* maybe if I disable all rules...
* Fix isolated compilation of `max-encoded-len-derive` with `syn`
error[E0369]: binary operation `==` cannot be applied to type `syn::Path`
--> src/lib.rs:88:29
|
88 | .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate))
| --------- ^^ ----------------------------------- _
| |
| syn::Path
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.
Error: could not compile `max-encoded-len-derive`
* WIP: bump changes crates since v3 tag to next breaking
cargo unleash version bump-breaking --changed-since v3.0.0
cargo unleash version set-pre dev --changed-since v3.0.0
FIXME: Don't modify crates that are not yet released, e.g.
`max-encoded-len-derive`
* Update lockfile
* WIP: Bump sp-transaction-pool as well
* WIP: Bump sp-offchain as well
* WIP: Bump frame-system-rpc-runtime-api as well
* WIP: Bump sp-authority-discovery as well
* Manually deactivate dev-deps before `cargo unleash check`
Otherwise we run into `Cycle detected` error.
* Bump sp-consensus-slots
* Add missing Cargo.lock change
* Bump sp-consensus-vrf as well
* Bump sp-keyring as well
* Bump sp-consensus-pow as well
* Try to speed up the `unleash-check` job
Previously, the job took 106 minutes - let's see if explicitly
specifying a `CARGO_TARGET_DIR` will help
* fixup: Ensure the temp target dir exists for unleash check
* Bump pallet-transaction-payment-rpc-runtime-api as well
Needed for Polkadot
* Bump pallet-transaction-payment-rpc as well
Needed for Polkadot
* Try updating crates after patching in the Polkadot CI job
* Use another approach to update patched Substrate crates
* Try to update all sp-core versions in Polkadot CI job
* Simplify sp-core version checking
* Apply another shellcheck lint
* Just do the simplest thing I guess
* Welp don't do --offline then
* Clean up `unleash-check` job triggers
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* Fix a note in unleash-check cache step
* Add a note about temporary optimization in cargo-unleash
* Pin a newer version of cargo-unleash
Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* Do not call `initialize_block` before any runtime api
Before this change we always called `initialize_block` before calling
into the runtime. There was already support with `skip_initialize` to skip
the initialization. Almost no runtime_api requires that
`initialize_block` is called before. Actually this only leads to higher
execution times most of the time, because all runtime modules are
initialized and this is especially expensive when the block contained a
runtime upgrade.
TLDR: Do not call `initialize_block` before calling a runtime api.
* Change `validate_transaction` interface
* Fix rpc test
* Fixes and comments
* Some docs
* Lol
* Yeah
* Moare
* adaasda
* Convert AURA to new pallet macro
* AURA: Switch to `CurrentSlot` instead of `LastTimestamp`
This switches AURA to use `CurrentSlot` instead of `LastTimestamp`.
* Add missing file
* Update frame/aura/src/migrations.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Remove the runtime side provide inherent code
* Use correct weight
* Add TODO
* Remove the Inherent from AURA
* 🤦
* Remove unused stuff
* Update primitives authorship
* Fix babe inherent data provider
* Fix consensus-uncles
* Fix BABE
* Do some further changes to authorship primitives... :D
* More work
* Make it compile the happy path
* Make it async!
* Take hash
* More stuff
* Hacks
* Revert "Hacks"
This reverts commit cfffad88668cfdebf632a59c4fbfada001ef8251.
* Fix
* Make `execute_block` return the final block header
* Move Aura digest stuff
* Make it possible to disable equivocation checking
* Fix fix fix
* Some refactorings
* Comment
* Fixes fixes fixes
* More cleanups
* Some love
* Better love
* Make slot duration being exposed as `Duration` to the outside
* Some slot info love
* Add `build_aura_worker` utility function
* Copy copy copy
* Some stuff
* Start fixing pow
* Fix pow
* Remove some bounds
* More work
* Make grandpa work
* Make slots use `async_trait`
* Introduce `SharedData`
* Add test and fix bugs
* Switch to `SharedData`
* Make grandpa tests working
* More Babe work
* 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*
* Make manual-seal compile
* More fixes
* Start fixing Aura
* Fix Aura tests
* Fix Babe tests
* Make everything compile
* Move code around and switch to async_trait
* Fix Babe
* Docs docs docs
* Move to FRAME
* Fix fix fix
* Make everything compile
* Last cleanups
* Fix integration test
* Change slot usage of the timestamp
* We really need to switch to `impl-trait-for-tuples`
* Update primitives/inherents/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update primitives/inherents/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update primitives/inherents/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Some extra logging
* Remove dbg!
* Update primitives/consensus/common/src/import_queue/basic_queue.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Remove `serde` requirement from FRAME macros
Currently there is some implicit requirement on `serde` being present in
the `Cargo.toml` of a pallet when `GenesisConfig` is used. This pr
removes this requirement by using the serde attribute `serde(crate = "..")`.
* build a unique reexport of serde in impl_opaque_keys, by abusing paste doc concatenation
* Optimize
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Use 'Pallet' struct in construct_runtime.
* Fix genesis and metadata macro.
* Fix 'Pallet' type alias.
* Replace 'Module' with 'Pallet' for all construct_runtime use cases.
* Replace more deprecated 'Module' struct.
* Bring back AllModules and AllPalletsWithSystem type, but deprecate them.
* Replace deprecated 'Module' struct from merge master.
* Minor fix.
* Fix UI tests.
* Revert UI override in derive_no_bound.
* Fix more deprecated 'Module' use from master branch.
* Fix more deprecated 'Module' use from master branch.
* Init `RuntimeLogger` automatically for each runtime api call
This pr change the runtime api in such a way to always and automatically
enable the `RuntimeLogger`. This enables the user to use `log` or
`tracing` from inside the runtime to create log messages. As logging
introduces some extra code and especially increases the size of the wasm
blob. It is advised to disable all logging completely with
`sp-api/disable-logging` when doing the wasm builds for the on-chain
wasm runtime.
Besides these changes, the pr also brings most of the logging found in
frame to the same format "runtime::*".
* Update frame/im-online/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update test-utils/runtime/Cargo.toml
* Fix test
* Don't use tracing in the runtime, as we don't support it :D
* Fixes
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* A clean new attempt
* Checkpoint to move remote.
* A lot of dependency wiring to make it feature gated.
* bad macro, bad macro.
* Undo the DB mess.
* Update frame/support/src/traits.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* unbreak the build
* Update frame/try-runtime/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update utils/frame/try-runtime/cli/Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Update frame/try-runtime/Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Address most review grumbles.
* Fix build
* Add some comments
* Remove allowing one pallet at a time.
* More grumbles.
* relocate remote-ext
* Fix build
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Make it possible to calculate the storage as often as you want
So, until now each Substrate based blockchain has calculated the storage
root once, at the end of the block. Now there is Frontier that wants to
calculate some intermediate storage root. However this failed on block
import. The problem with that was the extrinsics root. When building the
block we stored `Default::default()` as extrinsics root, because yeah,
we don't know the extrinsics root before finishing the block. At the end
this extrinsics root was then calculated. But on block import we passed
the already known extrinsics root. This was no problem, as we removed
this value at the end of the block. However when you all the storage
root in between, that changes the storage root between block building
and block import.
This pr changes this behavior. It removes the `ExtrinsicsRoot` storage
entry and also doesn't pass it anymore to `System::initialize`. By doing
it, we remove the difference in the storage and fix the storage root mismatch.
* Fix bug with incorrectly calculating the extrinscs root
* Review feedback
* Leave some system data for inspection
There is not much benefit in being active when removing this data. It's
actively harmful when one tries to read the block number in runtime
APIs in the context of a block.
* Update the expected root hash
This is excepted since now we persist new members.
* Revert extrinsics_root to `take`
It's going away in one of the following PRs anyway
* Update the state root once again
* Update the comment on the storage items that are left in the storage
Excluding ExtrinsicsRoot since it's going away