Commit Graph

3165 Commits

Author SHA1 Message Date
André Silva db4c8c03bb node: disable grandpa automatic finality fallback (#4835)
* node: disable grandpa automatic finality fallback

* node: bump spec_version
2020-02-06 00:10:35 +01:00
André Silva d53bb5ec50 grandpa: bump version to v0.11.1 (#4813) 2020-02-05 21:47:11 +01:00
Sergei Pepyakin 1af9e4f3ee executor: Simplify the SandboxCapabilities interface (#4825)
* Don't require `store` and `store_mut` in `SandboxCapabilities`.

* Simplify the sandbox a bit
2020-02-05 18:20:25 +01:00
Gavin Wood 9202cd87e0 Additional RPC for dumping all main storage key pairs under a prefix (#4803)
* Merge branch 'gav-split-balanecs-vesting' into gav-upsub

# Conflicts:
#	Cargo.lock
#	cli/Cargo.toml
#	collator/Cargo.toml
#	primitives/Cargo.toml
#	runtime/common/Cargo.toml
#	runtime/common/src/claims.rs
#	runtime/kusama/Cargo.toml
#	runtime/polkadot/Cargo.toml
#	service/Cargo.toml

* Update client/src/client.rs

* Update client/src/client.rs

* Fix merge conflict

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-05 17:27:50 +01:00
Sergei Pepyakin 1185f3ea30 Get rid of in-substrate usages of core_intrinsics feature (#4823)
* Remove usage of unneeded Rust feature core_intrinsics

* core::intrinsics::abort -> arch::wasm32::unreachable

* Don't publish `core::intrinsics`.

* Disable panic_handler and alloc_error_handler for no_std non wasm builds
2020-02-05 17:26:48 +01:00
Wei Tang c0af995362 Avoid losing values in intermediate take (#4833) 2020-02-05 17:26:07 +01:00
Pierre Krieger 54c10893ab Print an error if listener is closed (#4830)
* Print an error if listener is closed

* Oops, forgot to commit this
2020-02-05 17:25:14 +01:00
Pierre Krieger a3439999cf Remove support for secio (#4831) 2020-02-05 16:56:49 +01:00
Pierre Krieger 39c037ab22 Fix missing overrides of NetworkBehaviour (#4829) 2020-02-05 11:56:59 +01:00
Wei Tang 710ffebcca pallet-evm: log created address (#4821)
* pallet-evm: log created address

* Bump spec_version

* Only emit Created event when ExitReason is Succeed
2020-02-04 16:58:23 +01:00
Demi Obenour 0ab013bddb Bump parking_lot (#4817)
Hopefully this can be merged if the tests pass.
2020-02-04 16:56:50 +01:00
Bastian Köcher cd0d2fd791 Fix flaky messed signature test (#4819)
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`.
2020-02-04 12:39:56 +01:00
Gautam Dhameja 78006d0523 Added GetCallMetadata for extrinsic calls. (#4791)
* Added GetCallMetadata for extrinsic calls.

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Improved test for outer call metadata.

* fixed review comments

* removed dead code

* fixed review suggestions

* Update frame/support/src/dispatch.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-04 11:25:04 +01:00
Xiliang Chen febb6e29b2 add state_getKeysPaged (#4718)
* add storage_getNextKey

* RPC storage_getKeysPages

* respect count

* use iterator

* improve

* add tests

* improve

* add doc comments

* Make prefix optional

* update error

* improve
2020-02-04 10:44:40 +01:00
cheme 900295b020 Fix call to backend in child_storage_hash (#4815)
* Fix call to backend in child_storage_hash

* child storage test.
2020-02-03 20:28:10 +01:00
Demi Obenour 28275fee96 Switch to the new lockfile format (#4816)
This will hopefully reduce merge conflicts in the future
2020-02-03 20:19:33 +01:00
Wei Tang bff1f4a18d block_import: switch to Box<dyn Any> for intermediates representation (#4809)
* block_import: switch to Box<dyn Any> for intermediates representation

* Use Cow and return Error instead of Option

* Remove unused error

* Distinguish NoIntermediate/InvalidIntermediate
2020-02-03 09:55:09 +01:00
Demi Obenour b390f51c2a Bump dependencies (#4808)
This pulls in the latest release of *ring* and also removes some
duplicate dependencies.
2020-02-03 09:13:55 +01:00
Gavin Wood 1c9418d748 Don't attempt to upgrade balances module on chain start (#4802)
* Introduce vesting to node, debug message for upgrades and fix them

* Bump spec version
2020-02-01 18:08:39 +00:00
Wei Tang 98255bd37e fork-tree: add support for find_node_mut_where (#4784)
* fork-tree: add support for find_node_mut_where

* Update utils/fork-tree/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Update utils/fork-tree/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Update utils/fork-tree/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Fix calling name

* Update utils/fork-tree/src/lib.rs

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

* doc: be precise what is "least significant" index

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2020-02-01 16:35:05 +01:00
Gav Wood 2b41fe2856 Urgent patch 2020-02-01 13:28:37 +00:00
Gavin Wood d52d8692f9 Refactor the balances module (#4649)
* 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>
2020-02-01 13:20:16 +00:00
Pierre Krieger b6e8fba179 Remove warning about connecting to non-Substrate nodes (#4797) 2020-02-01 14:02:10 +01:00
Nikolay Volf 8a3caaeb68 update prost-build (#4789) 2020-02-01 12:33:13 +01:00
Nikolay Volf 63ad759c69 Increase transaction pool default limits (#4792)
* increase limits, improve logging

* format in kB
2020-02-01 00:27:53 -08:00
Gavin Wood adde404e41 client/finality-grandpa: Add regression test for observer polling network (was #4778) (#4795)
* 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>
2020-01-31 19:12:03 +00:00
Benjamin Kampmann 111207afe8 Adding Serde Deserialisation to UncheckExtrinsics (#4793)
* 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>
2020-01-31 19:01:32 +00:00
Tomasz Drwięga 2f9315cc02 Refactor im-online and print more debug info. (#4771)
* Initial version.

* Fix tests.

* Refactor using StorageValueRef.

* Add tests and apply review suggestions.

* Bump runtime.

Co-authored-by: Gavin Wood <github@gavwood.com>
2020-01-31 18:59:49 +00:00
thiolliere a36a170c15 remove ambiguous into_iter (#4794) 2020-01-31 18:49:02 +01:00
Sergei Pepyakin 4cbd03f62b Small follow-up docs improvements in rent module (#4790)
* 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>
2020-01-31 17:27:10 +01:00
Sergei Pepyakin df6ef1780f pallet-contracts: Rent projection RPC (#4754)
* Initial approach

* Introduce the pallet-contracts-common crate

* Add rent::compute_rent_projection

* Wire everything together

* Fix build error.

* Rename EvictionDate → EvictionAt.

* Clean.

* Renaming and cleaning.

* Add documentation for rent_projection RPC.

* Add documentation for rent_projection runtime API.

* Refactor rent_budget.

Merge it with subsistence_treshold.

* Bump impl_version

* Constrain RPC impl with Block::Header::Number.

* Rename pallet-contracts-common into -primitives

* Add a comment for `compute_rent_projection` on the usage

* Small tidying
2020-01-31 15:22:25 +01:00
Eric 3018bfe0e9 Update to the latest crate names (#4783)
* Update to the latest crate names

* Add to post initial rename fixes
2020-01-31 13:59:11 +01:00
Nikolay Volf 42dd01cbbd add negative tests for signatures (#4788) 2020-01-31 04:26:36 -08:00
Bastian Köcher 709a899f9d Cleanup transaction pool deps (#4782)
* Cleanup transaction pool deps

* Fix it properly

* Fix doc test
2020-01-31 12:40:32 +01:00
Cecile Tonglet ce47bfa2ba Removed a few warnings (#4786) 2020-01-31 12:32:12 +01:00
Bastian Köcher 4de44129cf Fix ui tests with rust 1.41.0 (#4787) 2020-01-31 11:46:05 +01:00
Bastian Köcher 45938d8033 Expose information about the extrinsic in the metadata (#4774)
* 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`
2020-01-30 16:41:03 +01:00
Sergei Pepyakin 6272b8d2c7 Remove notices regarding wasm file in check_runtime.sh (#4779)
To my knowledge, we don't keep wasm blobs checked in anymore.
2020-01-30 15:26:04 +01:00
Cecile Tonglet 605f643eed CLI API refactoring and improvement (#4692)
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.
2020-01-30 11:40:08 +01:00
Cecile Tonglet 506f9c29d9 Remove --release from check_for_exit.sh (#4775)
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.
2020-01-30 09:54:10 +01:00
Tomasz Drwięga fd03f4e950 Fix warnings. (#4768) 2020-01-29 21:37:26 +01:00
Max Inden 504b4e89e8 client/finality-grandpa/src/observer: Poll NetworkBridge (#4766)
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.
2020-01-29 18:42:21 +01:00
Gavin Wood 907fd8c2fa Identity should bound additional fields (#4770)
* Identity should bound additional fields

* ump rutnime
2020-01-29 18:41:51 +01:00
Gavin Wood a9100449dc RPC calls should execute with configured strategy (#4772) 2020-01-29 17:57:50 +01:00
Bastian Köcher 4c36143375 Add get_global for Sandbox (#4756)
* Add `get_global` for `Sandbox`

This pr adds `get_global` to retrieve a `global` variable from an
instantiated sandbox wasm blob.

* Bump `spec_version`

* Update primitives/wasm-interface/src/lib.rs

Co-Authored-By: Sergei Pepyakin <sergei@parity.io>

* `get_global` -> `get_global_val`

Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
Co-authored-by: Gavin Wood <github@gavwood.com>
2020-01-29 16:24:40 +01:00
Pierre Krieger ae1e9002d7 Order network dependencies alphabetically (#4763) 2020-01-29 15:32:45 +01:00
brenzi b6dc02decc adding a ss58 format for SubstraTEE (#4764) 2020-01-29 15:30:25 +01:00
Gavin Wood 5c1c31ccd4 Revamp some of the weights (#4759)
* Remove free transaction dos vectors.

* Bump spec version

* Indentation.

* Update frame/support/src/weights.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-01-29 13:38:46 +01:00
thiolliere 556c80e792 LinkedMap doesn't implement StoragePrefixedMap (#4760)
* LinkedMap doesn't implement StoragePrefixedMap

* fix test
2020-01-29 13:36:52 +01:00
Sergei Pepyakin 2c90562818 Clean up indentation problems (#4762) 2020-01-29 13:27:23 +01:00