* Remove all stale on_runtime_upgrade hooks in the runtime
* add docs
* cleanup
* fix warn
* fix more warnings
* fix offence test
* overwrite the damn UItest
* 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>
* use free balance rather than total balance
* Docs
* Migration for over-locked phrag voters
* New line
* comment
* Update frame/elections-phragmen/src/migrations/v5.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Only set lock, don't remove it
* delete commented out
* docs
* Update migration to just take a set of accounts
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Gav wrote this code in pull #10195. Extracting to simplify that PR.
* fix potential panics
* prevent panics in slide
* update doc
* fmt
* Update frame/support/src/storage/bounded_vec.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Gav Wood <gavin@parity.io>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* runtime-interface: Implement `register_only` functions
The runtime interface supports versioning of functions. Currently, if you add a new function it will
be used by the runtime automatically. This results in requiring all nodes of a network to upgrade
before the runtime is upgraded, otherwise they will fail to instantiate the new runtime because of
missing host functions. This pr introduces `register_only` functions. This can be used when a new
runtime interface function should be introduced, but the actual usage can be deferred. This means
that nodes will have the host function for this, but the runtime will still use the old version of
the function when being compiled for wasm. However, when a runtime is enacted that uses the new host
function, the "old nodes" will already have the host function and will continue to work.
* Update primitives/runtime-interface/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update primitives/runtime-interface/proc-macro/src/utils.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* FMT
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
`runtime_print!` is printed by default using `debug`, aka not being visible. With `log::error!` it
will be printed directly to the user. Production networks like Polkadot disable logging, but for
them we run special nodes that have logging enabled.
* beefy: add dummy latest_finalized() RPC
* beefy: rpc latest_best_beefy() using shared mem
* beefy: rpc populate latest_best_beefy()
* beefy: rpc handle readiness
* beefy: best block over channel - wip
Not working because channel can't be simply opened and receiver passed
to `rpc_extensions_builder` because `rpc_extensions_builder` has to be
`Fn` and not `FnOnce`... and and Receiver side of mpsc can't be cloned
yay!..
* beefy: make notification channels payload-agnostic
* beefy: use notification mechanism instead of custom channel
* beefy: add tracing key to notif channels
* sc-utils: add notification channel - wip
* beefy: use sc-utils generic notification channel
* grandpa: use sc-utils generic notification channel
* fix grumbles
* beefy-rpc: get best block header instead of number
* beefy-rpc: rename to `beefy_getFinalizedHead`
* fix nitpicks
* client-rpc-notifications: move generic Error from struct to fn
* beefy: use header from notification instead of getting from database
* beefy-rpc: get best block hash instead of header
* beefy-rpc: fix and improve latestHead test
* beefy-rpc: bubble up errors from rpc-handler instantiation
* update lockfile
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* fix errors and warnings
* fix nit
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* some improvements to bounded vec
* revert license tweak
* more tests
* fix
* Update frame/support/src/storage/bounded_vec.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* add the same stuff for btree map and set as well
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.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>
The keystore would print "Invalid password" when a key was stored using an incorrect public key.
This pr improves the error message to communicate better to the user on what is wrong.