When messing with the signature, we need to make sure that we acutally
mess-up the signature. As the generated private/public key is random,
the signature is random as well. It can happen that `bytes[0] ==
bytes[2]` which makes the test fail. We fix this problem by just
inverting the bytes at `0` and `2`.
* block_import: switch to Box<dyn Any> for intermediates representation
* Use Cow and return Error instead of Option
* Remove unused error
* Distinguish NoIntermediate/InvalidIntermediate
* Initially scoping out of the problem
* Remove need for exiry in balance locks.
* Remove expiry from locks.
* Remove supefluous balance test
* Amalgamate pieces of balance module
* Split out vesting
* Fix tests
* Fixes for vesting.
* Docs.
* Weight docs.
* Refactor things in terms of set_balances.
* Switch out ED to be free + reserved.
* Remove on_free_balance_zero and some docs.
* Build fixes
* Update frame/vesting/src/lib.rs
Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>
* Update frame/vesting/src/lib.rs
Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>
* Migration
* Remove superfluous code.
* Test fixes
* Fix some tests
* Fix repatriate reserve
* Fixes
* Add test for migration
* Final cleanups
* Fix
* Indentation.
* Undo unneeded referencing
* Bump runtime version
* Fixes
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
* client/finality-grandpa: Add regression test observer polling network
Ensure `Future` implementation of `ObserverWork` is polling its
`NetworkBridge`. Regression test for bug introduced in d9837d7dd and
fixed in 504b4e89e.
When polled, `NetworkBridge` forwards reputation change requests from
the `GossipValidator` to the underlying `dyn Network`. This test
triggers a reputation change by calling `GossipValidator::validate` with
an invalid gossip message. After polling the `ObserverWork` which should
poll the `NetworkBridge`, the reputation change should be forwarded to
the test network.
* Nits
Co-authored-by: Max Inden <mail@max-inden.de>
* Adding Serde:Deserialise to UncheckExtrinsics
to be able to use the ChainApi RPC from the client side
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Small follow-up docs improvements in rent module
* Update frame/contracts/src/rent.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
* Use a shorter version of the sentence
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Expose information about the extrinsic in the metadata
This pr exposes some information about the extrinsic used in the runtime
via metadata. The following information are exposed:
- Version of the extrinsic
- List of all signed extensions used by the extrinsic.
* Increment `spec_version`
It changes the way we extended the CLI functionalities of substrate to allow more flexibility. (If this was not clear, here is another version: it changes the `sc_cli` API to allow more flexibility).
This touches a few important things:
- the startup of the async task with tokei:
This was in node and node-template and I moved it to substrate. The idea is to have 1 time the code that handles unix signals (SIGTERM and SIGINT) properly. It is however possible to make this more generic to wait for a future instead and provide only a helper for the basic handling of SIGTERM and SIGINT.
- increased the version of structopt and tokei
- no more use of structopt internal's API
- less use of generics
Related to #4643 and https://github.com/paritytech/cumulus/pull/42: the implementation of "into_configuration" and "get_config" are similar but with better flexibility so it is now possible in cumulus to have the command-line arguments only of the run command for polkadot if we want
Related to https://github.com/paritytech/cumulus/issues/24 and https://github.com/paritytech/cumulus/issues/34 : it will now be possible to make a configuration struct for polkadot with some overrides of the default parameters much more easily.
I don't see any good reason to build with --release to test this but this step takes 8-8:30 min on the CI and I suspect we would save some time by using the debug build instead.
Patch d9837d7dd reintegrated the periodic neighbor packet worker, by
moving its logic into a `Future` implementation on `NetworkBridge` which
needs to be polled by its upper layer.
Polling by the upper layer was implemented within the `Future`
implementation of the `VoterWork` struct but not within the `Future`
implementation of the `ObserverWork` struct. This patch adds polling of
the `NetworkBridge` to the latter.