Commit Graph

4722 Commits

Author SHA1 Message Date
Bastian Köcher 9d43568e4e Use unreleased trybuild to fix CI (#7656) 2020-12-02 16:53:44 +01:00
André Silva b737ebba6d fork-tree: fix tree rebalancing (#7616)
* fork-tree: rebalance tree when inserting inner node

* fork-tree: fix tests for new rebalancing behavior

* fork-tree: fix node iterator initial state

* grandpa: fix tests
2020-12-01 18:49:09 +00:00
Tomasz Drwięga 6079fabdd3 Remove a stray file. (#7649) 2020-12-01 13:40:53 -05:00
Benjamin Kampmann e2b486cfb1 minor fix and improvements on localkeystore (#7626)
* minor fixes and improvements on localkeystore

* fixing tests

* update docs
2020-12-01 14:35:06 +00:00
Andronik Ordian e0016473a9 remove unused deps pulled by parity-util-mem (#7635)
* remove unused deps pulled by parity-util-mem

* fix a warning about unused Cargo key
2020-12-01 12:50:27 +00:00
jolestar 22a28db957 Fix cargo clippy warning in peerset. (#7641)
* Fix cargo clippy warning in peerset.

* Update client/peerset/src/lib.rs

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

* Apply suggestions from code review

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-12-01 10:58:00 +00:00
Shawn Tabrizi 762b4b25d0 Fix CI Link Check (#7639)
* fix trigger fingers

* more

* Update frame/example-offchain-worker/README.md

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2020-11-30 22:01:18 +00:00
Guillaume Thiolliere 15b0dece54 Renames of Trait to Config in README.md, weight templates and few minor ones (#7636)
* manual rename

* renamse in README.md

* fix template
2020-11-30 20:33:49 +00:00
Pierre Krieger 35efc8e4b0 Fix bad state transition with DisabledPendingEnable+OpenDesiredByRemote (#7638) 2020-11-30 17:43:47 +00:00
Bernhard Schuster 4ccf6672b1 resolve unresolved error nits of #7617 (#7631)
* handle executor should_panic test better

* Revert "reduce should panic, due to extended error messages"

This reverts commit c0805940184a62cd9302603ad911c3591e70a60c.

* remove excessive constraints

* remove duplicate documentation messages for error variants

* reduce T: constraints to the abs minimum

* whoops

* fewer bounds again

Co-authored-by: Bernhard Schuster <bernhard@parity.io>
2020-11-30 16:53:33 +01:00
Guillaume Thiolliere 1cbfc9257f Rename pallet trait Trait to Config (#7599)
* rename Trait to Config

* add test asserting using Trait is still valid.

* fix ui tests
2020-11-30 14:34:54 +00:00
Pierre Krieger dd3c84c362 Fix wrong value put for pending_opening (#7633)
* Fix wrong value put for pending_opening

* Oops, didn't even try compiling it
2020-11-30 15:05:01 +01:00
Shawn Tabrizi 7753a2250f sudo_as should return a result (#7620) 2020-11-30 13:57:15 +01:00
dependabot[bot] 007254c957 Bump console_log from 0.1.2 to 0.2.0 (#7623)
Bumps [console_log](https://github.com/iamcodemaker/console_log) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/iamcodemaker/console_log/releases)
- [Commits](https://github.com/iamcodemaker/console_log/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-30 13:51:54 +01:00
Pierre Krieger a2b14d10fb sc-network: Log outgoing notifications too (#7624)
* Log outgoing notifications too

* Update client/network/src/protocol/generic_proto/handler.rs

Co-authored-by: Max Inden <mail@max-inden.de>

Co-authored-by: Addie Wagenknecht <addie@nortd.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-11-30 10:52:08 +00:00
Andrew Plaza f6dc35284f Change TRACING_SET to static (#7607)
* change TRACING_SET to static

* Update primitives/io/src/lib.rs

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

* modify test with nested spans

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-11-28 09:40:24 +01:00
André Silva 96461be248 network: don't force send block announcements (#7601) 2020-11-27 22:37:38 +00:00
Bernhard Schuster 8c7d217091 chore/error: remove from str conversion and add deprecation notificat… (#7472)
* chore/error: remove from str conversion and add deprecation notifications

* fixup changes

* fix test looking for gone ::Msg variant

* another test fix

* one is duplicate, the other is not, so duplicates reported are n-1

* darn spaces

Co-authored-by: Andronik Ordian <write@reusable.software>

* remove pointless doc comments of error variants without any value

* low hanging fruits (for a tall person)

* moar error type variants

* avoid the storage modules for now

They are in need of a refactor, and the pain is rather large
removing all String error and DefaultError occurences.

* chore remove pointless error generic

* fix test for mocks, add a bunch of non_exhaustive

* max line width

* test fixes due to error changes

* fin

* error outputs... again

* undo stderr adjustments

* Update client/consensus/slots/src/lib.rs

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

* remove closure clutter

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

* more error types

* introduce ApiError

* extract Mock error

* ApiError refactor

* even more error types

* the last for now

* chore unused deps

* another extraction

* reduce should panic, due to extended error messages

* error test happiness

* shift error lines by one

* doc tests

* white space

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

* Into -> From

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

* remove pointless codec

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

* avoid pointless self import

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

Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-11-27 18:37:53 +00:00
Bastian Köcher 6722a83ba6 Forward storage changes in manual seal (#7614)
This prevents nodes from executing the same block 2 times.
2020-11-27 17:36:58 +01:00
Benjamin Kampmann 07c173af63 Add Key Subcommand to node-template (#7615) 2020-11-27 16:54:45 +01:00
Roman Borschel b4ee48ee18 Upgrade to libp2p-0.31. (#7606)
* Upgrade to libp2p-0.31.

* Address line width.

* Add generous incoming connection limit.

* Remove old noise configuration.
2020-11-27 14:29:18 +00:00
Bastian Köcher 4f97481da7 Remove RpcMetrics weirdness (#7608)
* Remove `RpcMetrics` weirdness

The metrics was returning an error when prometheus was not given. This
was a really weird setup, especially when compared to all other metrics
that just do nothing if there is no registry.

* Fix browser build
2020-11-27 10:24:34 +01:00
dependabot[bot] 6af3283bc4 Bump directories from 2.0.2 to 3.0.1 (#7609)
Bumps [directories](https://github.com/soc/directories-rs) from 2.0.2 to 3.0.1.
- [Release notes](https://github.com/soc/directories-rs/releases)
- [Commits](https://github.com/soc/directories-rs/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-27 09:40:11 +01:00
Bastian Köcher d698d01378 Inform sync explicitly about new best block (#7604)
* Inform sync explicitly about new best block

Instead of "fishing" the new best block out of the processed blocks, we
now tell sync directly that there is a new best block. It also makes
sure that we update the corresponding sync handshake to the new best
block. This is required for parachains as they first import blocks and
declare the new best block after being made aware of it by the relay chain.

* Adds test

* Make sure async stuff had time to run
2020-11-26 16:33:17 +00:00
Arkadiy Paronyan 769f1981cb Add small header cache (#7516)
* Remove header query

* Header cache

* Fix potential race issue

* Simplify status query
2020-11-25 23:07:51 +00:00
Alexander Popiak f590b06fab remove std feature flags for assert macros (#7600)
* remove std feature flags for assert macros

* re-add note about availability in no_std envs
2020-11-25 23:48:47 +01:00
dependabot[bot] 5774fea2f7 Bump rpassword from 4.0.5 to 5.0.0 (#7597)
Bumps [rpassword](https://github.com/conradkleinespel/rpassword) from 4.0.5 to 5.0.0.
- [Release notes](https://github.com/conradkleinespel/rpassword/releases)
- [Commits](https://github.com/conradkleinespel/rpassword/compare/v4.0.5...v5.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-25 10:59:13 +01:00
Pierre Krieger 31f9a6812a Fix notifications sometimes not being sent (#7594)
* Fix notifications sometimes not being sent

* Add comment
2020-11-25 09:15:37 +00:00
André Silva 4885992d7b node-template: add aura to light block import pipeline (#7595)
added aura to block import pipeline
2020-11-25 09:50:13 +01:00
Denis Pisarev 3e6a26c329 CI: build docs after test; publish docs after build (#7591)
docs time test/build success on master pub
2020-11-25 09:48:10 +01:00
Max Inden e3608da5fa */Cargo.toml: Remove unused dependencies (#7590)
* */Cargo.toml: Remove unused dependencies

Using cargo-udeps to detect unused dependencies.

* client/network/Cargo: Revert dependency removal

* Cargo.lock: Update
2020-11-24 19:56:21 +01:00
Alexander Theißen c3ca78fae3 contracts: Add salt argument to contract instantiation (#7482)
* pallet-contracts: Fix seal_restore_to to output proper module errors

Those errors where part of the decl_error for some time but where
never actually returned. This allows proper debugging of failed
restorations. Previously, any error did return the misleading
`ContractTrapped`.

* Bind UncheckedFrom<T::Hash> + AsRef<[u8]> everywhere

This allows us to make assumptions about the AccoutId
that are necessary for testing and in order to benchmark
the module properly.

This also groups free standing functions into inherent functions
in order to minimize the places where the new bounds need to
be specified.

* Rework contract address determination

* Do not allow override by runtime author
* Instantiate gained a new parameter "salt"

This change is done now in expecation of the upcoming code rent
which needs to change the instantiation dispatchable and
host function anyways.

The situation in where we have only something that is like CREATE2
makes it impossible for UIs to help the user to create an arbitrary
amount of instantiations from the same code.

With this change we have the same functionality as ethereum with
a CREATE and CREATE2 instantation semantic.

* Remove TrieIdGenerator

The new trait bounds allows us to remove this workaround
from the configuration trait.

* Remove default parameters for config trait

It should be solely the responsiblity to determine proper values for
these parameter. As a matter of fact most runtime weren't using these
values anyways.

* Fix tests for new account id type

Because of the new bounds on the trait tests can't get away by using
u64 as accound id. Replacing the 8 byte value by a 32 byte value
creates out quite a bit of code churn.

* Fix benchmarks

The benchmarks need adaption to the new instantiate semantics.

* Fix compile errors caused by adding new trait bounds
* Fix compile errors caused by renaming storage and rent functions
* Adapt host functions and dispatchables to the new salt
* Add tests for instantiate host functions (was not possible before)

* Add benchmark results

* Adapt to the new WeightInfo

The new benchmarks add a new parameter for salt "s" to the instantiate weights
that needs to be applied.

* Fix deploying_wasm_contract_should_work integration test

This test is adapted to use the new instantiate signature.

* Break overlong line

* Break more long lines

Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
2020-11-24 10:42:20 +00:00
dependabot[bot] 26830a20df Bump tracing from 0.1.21 to 0.1.22 (#7589)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.21 to 0.1.22.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-24 09:44:01 +00:00
Bastian Köcher 923cb8eea1 Wasm-builder 3.0 (#7532)
* Build every wasm crate in its own project with wasm-builder

Building all wasm crates in one workspace was a nice idea, however it
just introduced problems:

1. We needed to prune old members, but this didn't worked for old git
deps.
2. We locked the whole wasm workspace while building one crate. This
could lead to infinitely locking the workspace on a crash.

Now we just build every crate in its own project, this means we will
build the dependencies multiple times. While building the dependencies
multiple times, we still decrease the build time by around 30 seconds
for Polkadot and Substrate because of the new parallelism ;)

* Remove the requirement on wasm-builder-runner

This removes the requirement on wasm-builder-runner by using the new
`build_dep` feature of cargo. We use nightly anyway and that enables us
to use this feature. This solves the problem of not mixing
build/proc-macro deps with normal deps. By doing this we get rid off
this complicated project structure and can depend directly on
`wasm-builder`. This also removes all the code from wasm-builder-runner
and mentions that it is deprecated.

* Copy the `Cargo.lock` to the correct folder

* Remove wasm-builder-runner

* Update docs

* Fix deterministic check

Modified-by: Bastian Köcher <git@kchr.de>

* Try to make the ui test happy

* Switch to `SKIP_WASM_BUILD`

* Rename `SKIP_WASM_BINARY` to the correct name...

* Update utils/wasm-builder/src/builder.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update utils/wasm-builder/src/builder.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-11-24 10:18:36 +01:00
Bastian Köcher e6a6ed9a16 Bump linregress and do some other cleanups (#7580) 2020-11-23 19:43:54 +01:00
Qinxuan Chen 22bd5a9b15 sc-network: update some dependencies (#7582)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-11-23 19:29:41 +01:00
Max Inden d692d173f2 client/authority-discovery: Publish and query on exponential interval (#7545)
* client/authority-discovery: Publish and query on exponential interval

When a node starts up publishing and querying might fail due to various
reasons, for example due to being not yet fully bootstrapped on the DHT.
Thus one should retry rather sooner than later. On the other hand, a
long running node is likely well connected and thus timely retries are
not needed. For this reasoning use an exponentially increasing interval
for `publish_interval`, `query_interval` and
`priority_group_set_interval` instead of a constant interval.

* client/authority-discovery/src/interval.rs: Add license header

* .maintain/gitlab: Ensure adder collator tests are run on CI
2020-11-23 16:34:37 +00:00
André Silva 1871a95088 grandpa: remove light-client specific block import pipeline (#7546)
* grandpa: remove light-client specific block import

* consensus, network: remove finality proofs
2020-11-23 14:28:55 +00:00
dependabot[bot] cd2490f56d Bump wasm-timer from 0.2.4 to 0.2.5 (#7578)
Bumps [wasm-timer](https://github.com/tomaka/wasm-timer) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/tomaka/wasm-timer/releases)
- [Commits](https://github.com/tomaka/wasm-timer/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-23 13:16:43 +01:00
dependabot[bot] d30b914124 Bump wasm-bindgen-test from 0.3.17 to 0.3.18 (#7579)
Bumps [wasm-bindgen-test](https://github.com/rustwasm/wasm-bindgen) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-23 12:06:56 +01:00
dependabot[bot] da9e599512 Bump lru from 0.4.3 to 0.6.1 (#7577)
Bumps [lru](https://github.com/jeromefroe/lru-rs) from 0.4.3 to 0.6.1.
- [Release notes](https://github.com/jeromefroe/lru-rs/releases)
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.4.3...0.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-23 12:05:14 +01:00
dependabot[bot] ee78dd3d0e Bump wasm-bindgen-futures from 0.4.17 to 0.4.18 (#7572)
Bumps [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen) from 0.4.17 to 0.4.18.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-22 21:04:39 +01:00
dependabot[bot] 8716c70a97 Bump secrecy from 0.6.0 to 0.7.0 (#7568)
* Bump secrecy from 0.6.0 to 0.7.0

Bumps [secrecy](https://github.com/iqlusioninc/crates) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/iqlusioninc/crates/releases)
- [Commits](https://github.com/iqlusioninc/crates/compare/secrecy/v0.6.0...secrecy/v0.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix compilation errors

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-11-22 12:57:21 +01:00
Wei Tang 5693a1b88a pallet-evm: move to Frontier (Part IV) (#7573) 2020-11-22 10:01:05 +01:00
dependabot[bot] dfb922d5d8 Bump wasm-bindgen-test from 0.3.12 to 0.3.17 (#7567)
* Bump wasm-bindgen-test from 0.3.12 to 0.3.17

Bumps [wasm-bindgen-test](https://github.com/rustwasm/wasm-bindgen) from 0.3.12 to 0.3.17.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot[bot] <support@github.com>

* Update wasm-bindgen pin to 0.2.68

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-11-20 21:45:51 +01:00
Kian Paimani b64b17536a Thread-local parameter_types for testing. (#7542)
* Thread-local parameter_types for testing.

* Better docs.

* Some minors

* Merge'em

* Update frame/support/src/lib.rs

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

* Align more to basti's trick

* Update frame/support/src/lib.rs

* Update frame/support/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2020-11-20 17:54:19 +00:00
Max Inden 52d261e3c7 .github: Add dependabot config and thus enable dependabot (#7509)
* .github: Add dependabot config and thus enable dependabot

* Update .github/dependabot.yml

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-11-20 13:34:19 +00:00
Max Inden 124b954fad Cargo.lock: Run cargo update (#7553)
* Cargo.lock: Run cargo update

* Cargo.lock: Downgrade cc to v1.0.62

* Cargo.lock: Revert wasm-* updates
2020-11-20 13:59:02 +01:00
Alexander Theißen f06625f03c Fix weight template to remove ugliness in rust doc (#7565)
fixed weight template
2020-11-20 13:24:02 +01:00
Shawn Tabrizi 4637100ac7 More Extensible Multiaddress Format (#7380)
* More extensible multiaddress format

* update name

* Don't depend on indices to define multiaddress type

* Use MultiAddress in Node Template too!

* reduce traits, fix build

* support multiple `StaticLookup`

* bump tx version

* feedback
2020-11-19 11:40:12 +00:00