Commit Graph

523 Commits

Author SHA1 Message Date
Gavin Wood bc6efb0480 Initial integration of Gilts pallet (Kusama) (#2587)
* Initial integration of Gilts pallet (Kusama)

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_gilt --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

* Use real weights

* Update lock

* Merge

* Fixes

* Add working.

* Add proper curve arithmetic

* Fixes

* Fixes

* Make build

* Fixes

* Fixes

* Fix build

* remove dep.

* undo dep.

* upadte substrate

* Fix

* Bump Substrate

* Fixes

* Fixes

* Fix test

* Remove cap and some tests

* Fixes

* Fixes

* Update runtime/kusama/src/lib.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* bump the lock file

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-11 15:40:24 +02:00
Martin Pugh 25cd67436c Bump version to v0.9.1 and spec_version to v9010 (#3001)
* bump version and spec_version

* fix generate_release_text.rb

* Revert "fix generate_release_text.rb"

This reverts commit 9e01e0ae4f6db2155d123f69063db7d7564588e0.

* fix publish_draft_release

* fix publish_draft_release

* update target cache
2021-05-11 15:27:52 +02:00
Andreas Doerr aa51cddf47 Add --no-beefy CLI flag (#2981)
* Add --disable-beefy CLI flag

* Update cli/src/command.rs

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

* Update node/test/service/src/lib.rs

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

* Update parachain/test-parachains/adder/collator/src/main.rs

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

* Update cli/src/command.rs

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

* Update cli/src/cli.rs

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

* Update cli/src/cli.rs

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

* Update cli/src/cli.rs

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

Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-05-10 17:13:21 +00:00
Robert Klotzner 1e5f193765 Fix flaky test (#3002)
* Reporting peer might come first

before trying to request data, depending on scheduler.

* Better test.
2021-05-10 15:16:08 +00:00
Robert Klotzner c0df140ec6 Flood protection for large statements. (#2984)
* Flood protection for large statements.

* Add test for flood protection.

* Doc improvements.
2021-05-06 20:41:05 +02:00
Pierre Krieger 64c8b913c3 Companion PR for #8682 (#2958)
* Companion PR for #8682

* Compilation fix

* Update beefy

* update Substrate

Co-authored-by: parity-processbot <>
2021-05-06 16:41:28 +02:00
Robert Klotzner 1508024a47 Some overdue cleanup (#2989)
* Cleanup obsolete code.

* Move session cache to requester.
2021-05-06 16:15:23 +02:00
Robert Klotzner 601a3781c1 Always connect in collator protocol. (#2980)
* Always connect in collator protocol.

* Fix unused import.

* We always issue connection requests now.

* Fix stupid boolean logic with one variable.

* Fix CI.
2021-05-06 12:54:54 +02:00
André Silva bbf0812994 runtime: remove beefy and mmr from westend (again) (#2972)
* runtime: remove beefy and mmr from westend (again)

* node: add borked westend runtime upgrade as bad block
2021-05-04 10:16:20 +00:00
Robert Klotzner 795a526e6d Do peer connect later (as it happens in reality). (#2971)
Otherwise peer connect events occassionally happen before
`StatementFetchingReceiver` message.
2021-05-03 21:50:32 +02:00
Robert Klotzner 0dbdfef95e More secure Signed implementation (#2963)
* Remove signature verification in backing.

`SignedFullStatement` now signals that the signature has already been
checked.

* Remove unused check_payload function.

* Introduced unchecked signed variants.

* Fix inclusion to use unchecked variant.

* More unchecked variants.

* Use unchecked variants in protocols.

* Start fixing statement-distribution.

* Fixup statement distribution.

* Fix inclusion.

* Fix warning.

* Fix backing properly.

* Fix bitfield distribution.

* Make crypto store optional for `RuntimeInfo`.

* Factor out utility functions.

* get_group_rotation_info

* WIP: Collator cleanup + check signatures.

* Convenience signature checking functions.

* Check signature on collator-side.

* Fix warnings.

* Fix collator side tests.

* Get rid of warnings.

* Better Signed/UncheckedSigned implementation.

Also get rid of Encode/Decode for Signed! *party*

* Get rid of dead code.

* Move Signed in its own module.

* into_checked -> try_into_checked

* Fix merge.
2021-05-03 21:41:14 +02:00
Bastian Köcher 7830bae524 Companion for Substrate#8526 (#2845)
* Update branch

* Make it compile

* Compile

* gate approval-checking logic (#2470)

* Fix build

* Updates

* Fix merge

* Adds missing crate

* Companion for Substrate#8386

https://github.com/paritytech/substrate/pull/8386

* Fix fix fix

* Fix

* Fix compilation

* Rewrite to `ParachainsInherentDataProvider`

* Make it compile

* Renamings

* Revert stuff

* Remove stale file

* Guide updates

* Update node/core/parachains-inherent/src/lib.rs

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

* Update node/core/parachains-inherent/src/lib.rs

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

* Apply suggestions from code review

* Reset accidental changes

* More

* Remove stale file

* update Substrate

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: parity-processbot <>
2021-05-03 15:21:13 +00:00
Robert Habermeier 2d18b26151 Add parachains modules to Westend and Kusama runtimes (#2854)
* add `force_set_active_config`

* add parachains modules to Westend

* add parachains modules to Kusama runtime

* use real runtime API impl

* add module indices and remove auctions, crowdloan

* add benchmarks

* remove previous migrations and add host configuration set migration

* make compile

* Add Call Filter for Registrar and Slots except Root

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/

* fix build

* update `add_benchmark`

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_slots.rs

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_paras_registrar.rs

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_slots.rs

* fix weights

* tweak more constants

* Fix up the kusama runtime

* Westend runtime fixups

* Fix MMR & Beefy for westend

* Fixes

* fix tests

* Update runtime/polkadot/src/constants.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update runtime/westend/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
Co-authored-by: Gav Wood <gavin@parity.io>
2021-05-01 17:36:11 +02:00
Andreas Doerr 99b10213a0 Make KeyStore optional (#2964) 2021-05-01 12:59:08 +02:00
Martin Pugh 7a99a18d1d v0.9.0 prep (#2959)
* bump version and unify spec version

* bump substrate

* spec_version to 900
2021-04-29 18:21:58 +02:00
Bernhard Schuster 1ef8eac8ec feat: add proc macro to reduce overseer mock boilerplate (#2949) 2021-04-29 12:07:28 +02:00
Martin Pugh 9c60982989 Bump version, bump substrate & update benchmarks in preparation for v0.8.31 (#2938)
* bump version

* bump cargo

* update benchmarks

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
2021-04-28 13:23:54 +02:00
Robert Klotzner c86a774b9d Send statements to own backing group first (#2927)
* Factor out runtime module into utils.

* First fatal error design.

* Better error handling infra.

* Error handling cleanup.

* Send to peers of our group first.

* Finish backing group prioritization.

* Little cleanup.

* More cleanup.

* Forgot to checkin error.rs.

* Notes.

* Runtime -> RuntimeInfo

* qed in debug assert.

* PolkaErr -> Fault.
2021-04-27 21:47:32 +02:00
Hernando Castano 470383ce67 Add Dev Config for Rococo and Wococo (#2928)
* Add `rococo-dev` chain option

* Add `wococo-dev` CLI option

* Sort Chain ID match arms
2021-04-27 17:46:55 +02:00
François Garillot d4ddf8d7e8 Simplify some Option / Result / ? operator patterns (#2920)
* Simplify some Option / Result / ? operator patterns

When they identically match a combinator on those types.

Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).

* adjust review comments

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-04-25 20:51:01 +00:00
André Silva ae558997a8 Introduce Wococo testnet (#2918)
* runtime: remove mmr and beefy from westend runtime

* runtime: westend: remove pallet_beefy config

* node: only start beefy gadget on rococo

* node: remove beefy keys from westend chain spec

* node: add wococo testnet chain spec

* node: add comments about beefy gadget task

* runtime: update wococo chainspec

* Remove stale comment

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Co-authored-by: adoerr <0xad@gmx.net>
2021-04-22 15:28:23 +00:00
André Silva c25e79d8c4 runtime: remove mmr and beefy from westend runtime (#2916)
* runtime: remove mmr and beefy from westend runtime

* runtime: westend: remove pallet_beefy config

* node: only start beefy gadget on rococo

* node: remove beefy keys from westend chain spec
2021-04-21 20:31:06 +00:00
Kian Paimani 47889d845c Fix bench bot (#2900)
* Fix bench bot

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_membership --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/

* Fix weights files

* Fix'

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_membership --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
2021-04-21 01:38:19 +00:00
André Silva eca26ac5d0 Bump BEEFY (#2906)
* bump substrate

* bump beefy

* bump beefy again

* bump beefy
2021-04-20 16:54:16 +00:00
Pierre Krieger a7d678179a Companion for substrate#8643 (#2908)
* Companion for substrate#8643

* Update node/service/src/lib.rs

* update Substrate

Co-authored-by: parity-processbot <>
2021-04-20 14:07:37 +00:00
Robert Klotzner dacde443f7 Infrastructure improvements (#2897)
* Factor out runtime module into utils.

* Add maybe_authority information to `PeerConnected` event.

We already gather this information in authority discovery, so we might
as well share it with others.

This opens up an easy path to trigger validators differently from normal
nodes, e.g. for prioritization. This change has become more important
now, that we just connect to all validators and therefore just have a
long peer list without any information about those nodes.

* Test fix.
2021-04-16 21:42:20 +02:00
Joshy Orndorff 196b9a94c6 Expose paras config in rococo runtime (#2886)
* Add it in rococo runtime

* Add to rococo chain spec

* bump spec version

* Update runtime/rococo/src/lib.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-04-15 00:43:19 +02:00
Robert Klotzner d31c8a0dac Only accept requests from peers that got notified by us. (#2889) 2021-04-14 23:32:37 +02:00
Bastian Köcher 2cddcfe1fb Companion for Substrate#8588 (#2883)
* Companion for Substrate#8588

https://github.com/paritytech/substrate/pull/8588

* update Substrate

Co-authored-by: parity-processbot <>
2021-04-14 20:23:49 +02:00
Robert Klotzner d1d33abdf8 More tests for new request based statement distribution (#2875)
* More test coverage.

* Preserve peer order.

* Better test coverage.

* Even more test coverage.

* Add doc comment to `IndexMap`.

* Fix flaky test.

* Review remarks.

* Review remarks.
2021-04-12 16:15:25 +02:00
Robert Klotzner dd3733261b Max notification size -> 100k. (#2735) 2021-04-12 10:26:11 +02:00
Andronik Ordian e62939ad7a distribution: handle sqrt peer view updates (#2871)
* distribution: handle sqrt peer view updates

* someone please put rustc into my brain

* guide updates
2021-04-10 00:45:25 +02:00
Robert Habermeier 23cfd0edb9 update rococo and remove cursed BEEFY migration (#2870)
* update rococo and remove cursed BEEFY migration

* remove migration

* tweak VERSION
2021-04-10 00:10:14 +02:00
Pierre Krieger af5a158e72 Remove hack around Yamux window size (#2692)
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
2021-04-09 22:02:49 +00:00
Robert Klotzner 305375e1e4 Req/res optimization for statement distribution (#2803)
* Wip

* Increase proposer timeout.

* WIP.

* Better timeout values now that we are going to be connected to all nodes. (#2778)

* Better timeout values.

* Fix typo.

* Fix validator bandwidth.

* Fix compilation.

* Better and more consistent sizes.

Most importantly code size is now 5 Meg, which is the limit we currently
want to support in statement distribution.

* Introduce statement fetching request.

* WIP

* Statement cache retrieval logic.

* Review remarks by @rphmeier

* Fixes.

* Better requester logic.

* WIP: Handle requester messages.

* Missing dep.

* Fix request launching logic.

* Finish fetching logic.

* Sending logic.

* Redo code size calculations.

Now that max code size is compressed size.

* Update Cargo.lock (new dep)

* Get request receiver to statement distribution.

* Expose new functionality for responding to requests.

* Cleanup.

* Responder logic.

* Fixes + Cleanup.

* Cargo.lock

* Whitespace.

* Add lost copyright.

* Launch responder task.

* Typo.

* info -> warn

* Typo.

* Fix.

* Fix.

* Update comment.

* Doc fix.

* Better large statement heuristics.

* Fix tests.

* Fix network bridge tests.

* Add test for size estimate.

* Very simple tests that checks we get LargeStatement.

* Basic check, that fetching of large candidates is performed.

* More tests.

* Basic metrics for responder.

* More metrics.

* Use Encode::encoded_size().

* Some useful spans.

* Get rid of redundant metrics.

* Don't add peer on duplicate.

* Properly check hash

instead of relying on signatures alone.

* Preserve ordering + better flood protection.

* Get rid of redundant clone.

* Don't shutdown responder on failed query.

And add test for this.

* Smaller fixes.

* Quotes.

* Better queue size calculation.

* A bit saner response sizes.

* Fixes.
2021-04-09 21:30:12 +00:00
Gavin Wood 69bd6d8ef2 Introduce/integrate a collective into Rococo Relay (#2869)
* Introduce a collective into Rococo runtime

* Intregrate Rococo Collective into XCM

* Fixes

* Update runtime/rococo/src/lib.rs

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2021-04-09 22:16:32 +02:00
Andronik Ordian 8961628e7c bitfield-dist: check signatures once (#2868) 2021-04-09 17:31:34 +00:00
Robert Habermeier bc7761a3da set groups correctly even if not validator (#2863)
shows what I get for being hasty last time. i added a test this time, which would have caught this issue last time.
2021-04-09 12:21:39 +02:00
Robert Habermeier 234d0df515 no backing job early exit if not validator (#2860)
with the MaxValidators parameter set, this meant that only validators participating in parachain consensus would be able to author relay-chain blocks containing backed candidates
2021-04-08 22:35:23 +00:00
Andronik Ordian 78a46da384 silence some parachain warnings (#2859)
* silence some parachain warnings

* that was actually a bug that Rob is fixing
2021-04-09 00:25:46 +02:00
Sergei Shulepov 59b4d6511f New PVF validation host (#2710)
* Implement PVF validation host

* WIP: Diener

* Increase the alloted compilation time

* Add more comments

* Minor clean up

* Apply suggestions from code review

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

* Fix pruning artifact removal

* Fix formatting and newlines

* Fix the thread pool

* Update node/core/pvf/src/executor_intf.rs

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

* Remove redundant test declaration

* Don't convert the path into an intermediate string

* Try to workaround the test failure

* Use the puppet_worker trick again

* Fix a blip

* Move `ensure_wasmtime_version` under the tests mod

* Add a macro for puppet_workers

* fix build for not real-overseer

* Rename the puppet worker for adder collator

* play it safe with the name of adder puppet worker

* Typo: triggered

* Add more comments

* Do not kill exec worker on every error

* Plumb Duration for timeouts

* typo: critical

* Add proofs

* Clean unused imports

* Revert "WIP: Diener"

This reverts commit b9f54e513366c7a6dfdd117ac19fbdc46b900b4d.

* Sync version of wasmtime

* Update cargo.lock

* Update Substrate

* Merge fixes still

* Update wasmtime version in test

* bastifmt

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

* Squash spaces

* Trailing new line for testing.rs

* Remove controversial code

* comment about biasing

* Fix suggestion

* Add comments

* make it more clear why unwrap_err

* tmpfile retry

* proper proofs for claim_idle

* Remove mutex from ValidationHost

* Add some more logging

* Extract exec timeout into a constant

* Add some clarifying logging

* Use blake2_256

* Clean up the merge

Specifically the leftovers after removing real-overseer

* Update parachain/test-parachains/adder/collator/Cargo.toml

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Andronik Ordian <write@reusable.software>
2021-04-09 00:09:56 +02:00
Robert Habermeier 896ec8dbc3 Code, PoV compression and remove CompressedPoV struct (#2852)
* use compressed blob in candidate-validation

* add some tests for compressed code blobs

* remove CompressedPoV and apply compression in collation-generation

* decompress BlockData before executing

* don't produce oversized collations

* add test for PoV decompression failure

* fix tests and clean up

* fix test

* address review and fix CI

* take this )
2021-04-08 22:09:36 +02:00
Robert Habermeier 57038b2e46 Remove real-overseer 🎉 (#2834)
* remove real-overseer

* overseer: only activate leaves which support parachains

* integrate HeadSupportsParachains into service

* remove unneeded line
2021-04-08 20:24:06 +02:00
e.g. magical unicorn 5b3e5ff8d1 add new chainspec for rococo (#2851) 2021-04-07 23:10:53 +00:00
Robert Habermeier 8eae0fa443 check for lost race before warning (#2833) 2021-04-07 22:04:15 +02:00
Robert Habermeier 5a9e8b9956 update rococo genesis (#2830) 2021-04-07 10:08:43 +02:00
Andronik Ordian dbb09ac9f4 parachain db versioning (#2829)
* move parachains_db.rs to a module

* parachain versioning

* fixes

* more fixes

* Update node/service/src/parachains_db/upgrade.rs

* fix web-wasm check

* suggested style fixes

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

* Update node/service/src/parachains_db/upgrade.rs

* compilation fixes

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-04-07 00:23:32 +02:00
Andronik Ordian 936f0d7c59 statement-distribution: do not verify signatures for duplicate statements (#2823)
* stmnt-dist: do not verify signature on duplicates

* renames

* more renames
2021-04-06 17:32:57 +02:00
Andronik Ordian 1244378d50 parachain_db: fix incorrect config cache sizes (#2827) 2021-04-06 16:47:38 +02:00
Pierre Krieger fa0142ac8f Properly remove peers from sets and merge the two Network traits (#2821)
* Properly remove peers from sets

* Actually rename all, I guess

* Merge the two Network traits

* Rename function

* Update node/network/bridge/src/network.rs

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

* Fix erroneous change

* Update node/network/bridge/src/network.rs

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-04-05 21:46:39 +02:00