* Fixed logic of the storage migration to triple reference counting. The previous behaviour made it impossible for any chain not already upgraded to dual reference counting to upgrade the runtime.
* +Removed the on_runtime_upgrade() function from frame-system.
+Removed the specific migration .anciallaries from the frame-system pallet level.
+Introducted a new module that hosts self-contained ancillary functions and logic to perform the storage migration. The current logic attempts to infer the state of the storage based on whether or not a given migration can be conducted.
* Formatting.
* + Removed specific AccountData struct. AccountData must now be provided during the runtime implementation of the trait V2ToV3.
+ Removed apply function.
+ Made the individual translation function self-sufficient.
* + Removed unused decorators.
* pallet-bags-list: Add `put_in_front_of` extrinsic
This PR adds the extrinsic `put_in_front_of` which allows the user to specify a `lighter` and `heavier` account within the same bag. The extrinsic will move `heavier` directly in front of `lighter`. The parameter names refer to the fact that `lighter` must have a lower `VoteWeight` then `heavier`.
In the ideal use case, where a user wants to improve the position of their account within a bag, the user would iterate the bag, starting from the head, and find the first node who's `VoteWeight` is less than theirs. They would then supply the `id` of the node as the `lighter` argument and their own `id` as the `heavier` argument.
* Test & Benchmarks
* Respect line width
* Remove List::put_in_fron_of tests; Remove AlreadyHigher error
* The dispatch origin for this call must be ...
* Add some periods
* Add back test to list module: put_in_front_of_exits_early_if_bag_not_found
* add test tests::pallet::heavier_is_head_lighter_is_not_terminal
* Cater for edge case of heavier being head
* Add ExtBuilder::add_aux_data; try to make some tests use simpler data
* Update frame/bags-list/src/list/tests.rs
* make insert_at_unchecked infallible
* Make it permissioned - only callable by heavier
* Add test cases for insert_at_unchecked
* Move counter update to insert_at; fix comments
* Address some feedback
* Make voteweight constructed with parameter_types
* Always set vote weight for Ids in build
* Add skip_genesis_ids
* Do not pass weight fn to List put_in_front_of
* Remove remants of CounterForListNodes
* fmt
* 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
* Delete messed up weights file
* Some place holder stuff so we can run bench in CI
* Fix
* 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/list/mod.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* fmt
* Log + debug assert when refetching an Id
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* grandpa: allow authority set hard forks to be forced
* grandpa: fix authority set hard forks in warp proof provider
* grandpa: make AuthoritySetHardFork public
* grandpa: extend comment
* Frame no longer needs to be mutable (refactoring artifact)
* Remove Contract/Tombstone deposit
* Add StorageMeter
* cargo fmt
* Fix weight annotation
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Simplify keep check for contract accounts
- Make sure that the "base deposit" for each contract >= ed
- Remove now obsolete checks when sneding away free balance
* Remove unused imports and functions
* Rename storage_limit to storage_deposit_limit
* cargo fmt
* Fix typo
Co-authored-by: Michael Müller <michi@parity.io>
* Finish up rename of storage_limit
* Fix rpc tests
* Make use of `StorageDepositLimitTooHigh`
* Add tests and fix bugs discovered by tests
* Add storage migration
* Don't use u128 in RPC
* Fix weight of migration
* Rename `endowment` to `value`
* Fix bug where contract couldn't get funded by a storage deposit
- Make sure that contract gets funded from deposits before value is transferred
- Don't reserve value at origin because otherwise funding isn't possible
- Just transfer free balance and reserve it after the transfer
- When refunding make sure that this refund can't dust the contract
- Can only happen after a runtime upgrade where costs where upped
- Add more tests
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Remove unused `fn storage_meter`
* Fix copy pasta doc error
* Import `MaxEncodeLen` from codec
* Beautify RPC trait bounds
* Add re-instrument behaviour to dispatchable doc
* Make sure a account won't be destroyed a refund after a slash
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Update `Storage::write` docs
* Improve doc
* Remove superflous conditional
* Typos
* Remove superflous clone (refactoring artifact)
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Consolidating test and production code
* Signing/verifying authority discovery records with PeerId
Unsigned records cannot be rejected yet, they just produce
a warning in the log.
* Upgrading to libp2p 0.40
* libp2p::identity and sp_core::crypto Ed25519 are compatible
* Rejecting authority records unsigned by peer id can be configured
* Fixes based on review comments
* No command-line argument needed
* info was still too much spam in the logs
* Added tests for both strict and loose validation
* Fixing based on review comments
* Pierre preferred a signing method
* Ooops, I need to slow down
* Update bin/node/cli/src/service.rs
* Reexport libp2p crypto used in sc-network
* Added proto3 compatibility tests. And import noise.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This adds support to the wasm-override feature to compare the spec_name. If the spec_name doesn't
match, a warning will be printed and the override will be ignored.
* Account for transaction priority when enforcing limits
* Improve `enforce_limits` comment
* Explanation comment on why comparison impl is not used for limit enforcement
* fix order
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* format
* more accurate description
* format
* better explicit types
* fix tests
* address feedback
* add a type to ease non breaking implementation
* add comment about constraint
* fix test
* add test for generated types
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* [ci] Added ssh token for publishing gh-pages
* changed ssh commands for gh-pages
* return github_token back to vault secrets
* check simnet-tests-quick without vault secrets
* remove vault secrets from simnet jobs