Commit Graph

374 Commits

Author SHA1 Message Date
Robert Habermeier ec98120f0e Disputes runtime (#2947)
* disputes module skeleton and storage

* implement dispute module initialization logic

* implement disputes session change logic

* provide dispute skeletons

* deduplication & ancient check

* fix a couple of warnings

* begin provide_dispute_data impl

* flesh out statement set import somewhat

* move ApprovalVote to shared primitives

* add a signing-payload API to explicit dispute statements

* implement statement signature checking

* some bitflags glue for observing changes in disputes

* implement dispute vote import logic

* flesh out everything except slashing

* guide: tweaks

* declare and use punishment trait

* punish validators for inconclusive disputes

* guide: tiny fix

* guide: update docs

* add disputes getter fn

* guide: small change to spam slots handling

* improve spam slots handling and fix some bugs

* finish API of disputes runtime

* define and deposit `RevertTo` log

* begin integrating disputes into para_inherent

* use precomputed slash_for/against

* return candidate hash from process_bitfields

* implement inclusion::collect_disputed

* finish integration into rest of runtime

* add Disputes to initializer

* address suggestions

* use pallet macro

* fix typo

* Update runtime/parachains/src/disputes.rs

* add test: fix pruning

* document specific behavior

* deposit events on dispute changes

* add an allow(unused) on fn disputes

* add a dummy PunishValidators implementation

* add disputes module to Rococo

* add disputes module to westend runtime

* add disputes module to test runtime

* add disputes module to kusama runtime

* guide: prepare for runtime API for checking frozenness

* remove revert digests in favor of state variable

* merge reversions

* Update runtime/parachains/src/disputes.rs

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

* Update runtime/parachains/src/disputes.rs

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

* Update runtime/parachains/src/disputes.rs

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

* add byzantine_threshold and supermajority_threshold utilities to primitives

* use primitive helpers

* deposit revert event when freezing chain

* deposit revert log when freezing chain

* test revert event and log are generated when freezing

* add trait to decouple disputes handling from paras inherent handling

* runtime: fix compilation and setup dispute handler

* disputes: add hook for filtering out dispute statements

* disputes: add initializer hooks to DisputesHandler

* runtime: remove disputes pallet from all runtimes

* tag TODOs

* don't import any dispute statements just yet...

* address grumbles

* fix spellcheck, hopefully

* maybe now?

* last spellcheck round

* fix runtime tests

* fix test-runtime

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <andrerfosilva@gmail.com>
2021-07-19 16:49:19 +00:00
Tomasz Drwięga 79174e0b7e Update BEEFY+MMR integration. (#3480)
* Update MMR leaf.

* Revert to older substrate.

* Add version docs.

* Fix spellcheck.
2021-07-16 15:13:20 +02:00
Denis Pisarev fc253e6e4d WIP: CI: add spellcheck (#3421)
* CI: add spellcheck

* revert me

* CI: explicit command for spellchecker

* spellcheck: edit misspells

* CI: run spellcheck on diff

* spellcheck: edits

* spellcheck: edit misspells

* spellcheck: add rules

* spellcheck: mv configs

* spellcheck: more edits

* spellcheck: chore

* spellcheck: one more thing

* spellcheck: and another one

* spellcheck: seems like it doesn't get to an end

* spellcheck: new words after rebase

* spellcheck: new words appearing out of nowhere

* chore

* review edits

* more review edits

* more edits

* wonky behavior

* wonky behavior 2

* wonky behavior 3

* change git behavior

* spellcheck: another bunch of new edits

* spellcheck: new words are koming out of nowhere

* CI: finding the master

* CI: fetching master implicitly

* CI: undebug

* new errors

* a bunch of new edits

* and some more

* Update node/core/approval-voting/src/approval_db/v1/mod.rs

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

* Update xcm/xcm-executor/src/assets.rs

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

* Apply suggestions from code review

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

* Suggestions from the code review

* CI: scan only changed files

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-07-14 19:22:58 +02:00
Qinxuan Chen f6305d29be runtime(rococo): remove useless Call of pallet-mmr (#3350)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2021-07-14 09:26:12 +00:00
Alexander Theißen 2d102308de Companion for #9276: Remove Filter impl on () (#3420)
* Switch from () to AllowAllFilter

* Rename AllowAllFilter -> AllowAll

* update Substrate

Co-authored-by: parity-processbot <>
2021-07-12 21:12:52 +00:00
Svyatoslav Nikolsky 04ac35e127 Enable over-bridge-messaging in Rococo/Wococo runtime (#3377)
* bridges in W<>R

* fix node compilation

* Update runtime/rococo/src/bridge_messages.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update runtime/rococo/src/bridge_messages.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update runtime/rococo/src/bridge_messages.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update runtime/rococo/src/bridge_messages.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* long line fix

* comment/remove -> comment/#[ignore]

* explicit instances

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
2021-07-06 10:03:12 +00:00
ferrell-code 39969ca536 paras.rs to FRAME V2 (#3403)
* to v2 macro

* line width

* fix mock

* actually compile moxk

* compile tests

* add hooks

* origin back in mocks

* assimilate_storage

* add generic

* maybe mock compiles now

* origin between parachain and system causing problem

* change origin

* type alias as origin

* keep origin

* add aliases to tests

* remove unnecessary imports

* Parachain -> Paras

* paras test

* nvm

* use genesis build in mock
2021-07-06 00:24:27 +00:00
Igor Matuszewski 037f22342b Use MaxEncodedLen trait from new parity-scale-codec v2.2 (#3412)
* Use MaxEncodedLen trait from new parity-scale-codec v2.2

* update Substrate

Co-authored-by: parity-processbot <>
2021-07-05 21:11:03 +00:00
Bastian Köcher ad46aadb1a Companion for Substrate#8953 (#3140)
* Companion

* Update branch

* Update to correspond to substrate fixes

* Update cargo.lock

* Remove patches

* update Substrate

Co-authored-by: parity-processbot <>
2021-07-01 16:21:51 +00:00
Shawn Tabrizi 6b1baba490 Use max_code_size and max_wasm_data_size from Parachains Configuration (#3329)
* use `configuration::config()` for max bytes

* Update integration_tests.rs

* Update paras_registrar.rs

* remove consts

* add asserts for non-zero

* more const clean up

* 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=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

* add checks to `MAX_CODE_SIZE`

* re-pot MAX_POV_SIZE

* check pov limit in runtime

* POV_BOMB_LIMIT multiplier

* fix compile

* Update configuration.rs

* Update node/primitives/src/lib.rs

* fix test

Co-authored-by: Parity Bot <admin@parity.io>
2021-06-21 17:24:49 +00:00
Andreas Doerr be2d1ce01b Bump BEEFY (#3302) 2021-06-19 17:46:06 +02:00
Shawn Tabrizi 0282ad3128 fix xcm pallet origin (#3272) 2021-06-16 21:57:29 +01:00
Keith Yeung 7d82d93f34 Companion for #8949 (#3216)
* Remove Call part imports of the offences and authority discovery pallets

* Remove non-existent Call enum variants

* Move ValidateUnsigned impl to be under #[pallet::validate_unsigned] in claims pallet

* Remove unused imports

* Remove Call part import for randomness collective flip pallet

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-16 04:13:21 +00:00
André Silva 097cadca19 create newtype for ValidationCodeHash (#3212)
* create newtype for ValidationCodeHash

* pvf: fix tests compilation

* primitives: fix test compilation
2021-06-12 16:44:07 +00:00
André Silva 8c3bc2b2bb replace HistoricalValidationCode usages with ValidationCodeByHash (#3210)
* replace HistoricalValidationCode usages with ValidationCodeByHash

* runtime-api: tabify tests file

* update implementers guide
2021-06-11 18:00:57 +00:00
Keith Yeung 99d49ad7c9 Companion for #8990 (#3194)
* Use new naming scheme for all Event enums generated by construct_runtime

* Use new naming scheme for all GenesisConfig fields generated by construct_runtime

* Fix overlooked GenesisConfig field renaming

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-09 10:07:04 +00:00
Gavin Wood 3d6df31cbe Named reserve companion (#3176)
* fix build

* fix tests

* update

* fix

* update

* Bump

Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
2021-06-04 11:17:59 +02:00
Gavin Wood 53de6871e0 Fix teleport accounting and add some events (#3167)
* Stuff to help inspect the DMP activity

* Fix teleport accounting

* Fixes

* Fixes

* Fixes

* Fixes
2021-06-03 15:39:08 +02:00
Shawn Tabrizi b7c2cfc1e4 Companion for #8793 (Simple MaxEncodedLen) (#3118)
* ProxyType MaxEncodedLen

* import

* import

* fix dep and bump substrate

* Update Cargo.lock
2021-05-28 20:50:16 +00:00
Jon Häggblad 0a024e30b0 Companion for substrate#8724 (#2994)
* runtime: create migrations for grandpa storage prefix

* runtime: address review comments

* runtime: update spec_version

* westend: fix incorrect merge

* runtime: change to v3.1 from v4 for grandpa migrations

* cargo.lock: manually specify pallet-grandpa in lock file

* cargo.lock: fix typo

* update substrate

* update substrate

Co-authored-by: André Silva <andrerfosilva@gmail.com>
2021-05-26 19:12:46 +00:00
André Silva e3edb71ed7 grandpa: enable observer for light client (#3019)
* grandpa: enable observer for light client

* update Substrate

* service: fix missing import

* runtime: bump spec versions

Co-authored-by: parity-processbot <>
2021-05-26 17:22:15 +00:00
Bastian Köcher 14f5d314f4 New Rococo genesis (#3065) 2021-05-20 11:44:13 +00:00
Hernando Castano 9507266960 Add Bridge Header Sync to Rococo Runtime (#2983)
* Add bridges code to workspace

* Add Rococo and Wococo bridge instances to Rococo runtime

* Add Rococo and Wococo runtime APIs

* Add GenesisConfig parameters for bridge pallet

* Update Rococo spec_version used by bridge relayer

* Add scripts for running Rococo and Wococo dev nodes

* Add scripts for running Rococo<>Wococo header sync

* Apply patch for build artifact location

* Remove bridges crates from workspace

* Downgrade async related dependencies

* Change bridge pallet owner to be `root_key`

* Bump number of `MaxRequests` allowed

* Revert changes in `bridges` subtree folder

* Use correct account for Sudo

* Add comment explaining duplicate bridge pallets

* Remove WeightInfo comment.

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
2021-05-13 15:09:17 +00:00
Sergei Shulepov 0e6c96a8b6 Support opening HRMP channels in genesis (#3003) 2021-05-13 10:54:30 +02:00
Gavin Wood dcae333e82 Introduce reserve-asset transfer extrinsic (#3010)
* Introduce reserve-asset transfer extrinsic

* Fixes
2021-05-12 21:07:20 +02:00
Gavin Wood 41a93127a9 Check out/in assets when teleporting to maintain total issuance (#3007)
* Check out/in assets when teleporting to maintain total issuance

* Fixes

* Fixes

* Fixes

* Fixes

* Update xcm/xcm-executor/src/traits/transact_asset.rs

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

* Docs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-12 08:39:16 +02:00
Shawn Tabrizi c68903f3bb Add Auctions and Crowdloans to Kusama and Westend (#2999)
* add to westend

* fixes

* fix runtime tests

* add to kusama

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

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

* fix auctions benchmarks

* add benchmark to kusama

* update weights

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

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

* update to use weights

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

* Initiate auctions with 2/3 council

* add check and docs

* update crowdloan deposits

* move tests

* move other tests

* update ending period

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

* fix origin

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

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Gavin Wood <gavin@parity.io>
2021-05-11 22:29:01 +02:00
Gavin Wood 36b9d23923 Dispatchable for teleporting assets (#2995)
* Dispatchable for teleporting assets

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Update node/network/protocol/src/peer_set.rs

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

* Update xcm/src/v0/traits.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-10 16:13:46 +02:00
Gavin Wood ce4edd0398 Make ParaId value of public paras non-discretionary (#2988)
* Make ParaId value of public paras non-discretionary

* Fixes

* Fixes

* fix tests

* fix benchmark tests

* dont use hardcoded number

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-07 17:52:26 +02:00
Gavin Wood e33e74525e Enable Pallet XCM for Kusama & Westend (#2970)
* Enable Pallet XCM for Kusama & Westend

* Fixes

Co-authored-by: André Silva <andrerfosilva@gmail.com>
2021-05-04 16:49:31 +00:00
joe petrowski 26ac14f04e change statemint id (not system para) (#2974) 2021-05-04 11:21:40 -05:00
André Silva c6df9fcb11 runtime: remove random_seed from BlockBuilder API (#2968)
* runtime: remove random_seed from BlockBuilder API

* update Substrate

* runtime: remove unused imports

* revert Cargo.lock version 3 removal, update sp-io

Co-authored-by: parity-processbot <>
Co-authored-by: Andronik Ordian <write@reusable.software>
2021-05-04 11:01:33 +00:00
Lohann Paterno Coutinho Ferreira 9bbc0b4460 Companion PR for #8414 - Remove OffencesWeightSoftLimit (#2966)
* Remove OffencesWeightSoftLimit

* update Substrate

Co-authored-by: parity-processbot <>
2021-05-03 09:12:39 +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
Gavin Wood f36d8efb3d Allow normal accounts to execute XCM for withdraw+teleport (#2953)
* Allow normal accounts to execute XCM for withdraw+teleport

* Bump Substrate
2021-04-28 23:13:19 +02:00
Guillaume Thiolliere 41e57c4509 change junction parachain id from named field to unnamed field (#2940)
* use unnamed field for parachain variant in junction

* remove outdated comment
2021-04-27 14:49:55 +02:00
Gavin Wood 9194219586 Add XCM Origin and converter (#2896)
* Add XCM Origin and converter

* IsMajority filter can be location-prefixed

* Update xcm/pallet-xcm/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/src/v0/multi_location.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Introduce UsingComponents to allow reuse of fee payment in XCM

* Use Drop rather than finalize

* Add errors for weight.

* Apply suggestions from code review

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Fixes

* Update xcm/xcm-builder/src/weight.rs

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

* Various XCM fixes and improvements

* Fixes

* Update xcm/xcm-builder/src/weight.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/weight.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/weight.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Fixes

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2021-04-27 14:33:40 +02:00
Ricardo Rius 8e0963e533 Add Statemint teleport (#2934)
* Add Statemint teleport

* Fixes
2021-04-26 20:19:29 +02:00
Kian Paimani c384f70067 Companion for substrate/pull/8596 (#2895)
* Add weight types

* Add missing types

* update Substrate

* Fix build

* Fix bench build

* 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-processbot <>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
2021-04-18 09:39:34 +01: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
Guillaume Thiolliere d0055b1af8 remove unused and sometime invalid type alias (#2876) 2021-04-12 20:33:46 +02:00
Gavin Wood 359ade2b89 Dedupe some code and companion for #8589 (#2873)
* Dedupe some code and companion for #8589

* Bump Substrate
2021-04-11 12:22:45 +00:00
Gavin Wood 025200fb25 Rococo allows ROC to be teleported from Tick, Trick and Track (#2872)
Also allows unpaid messages from them.
2021-04-10 12:59:50 +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
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
Gavin Wood c9102c11a4 XCM Revamp Continued (#2865)
* Introduce plurality XCM locations

* Add RelayedFrom

* DMP dispatch weight handling.

* Add pallet for XCM sending, add routing logic.

* Update error types & doc

* Fix warnings.

* Fixes

* Fixes

* Fixes

* Bump Substrate

* Fixes

* Docs

* Docs

* Docs

* Fixes

* Fixes

* Fixes

* Update xcm/pallet-xcm/src/lib.rs

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

* Docs

* Fixes

* Update lib.rs

* Fixes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-04-09 20:34:28 +02:00
Shawn Tabrizi 322e1f3dff ModuleId to PalletId (#2864)
* lock substrate version for testing

* `ModuleId` to `PalletId`

* release substrate version

* Update Cargo.lock

Co-authored-by: Xavier Lau <c.estlavie@icloud.com>
2021-04-09 12:33:21 +02:00
André Silva 68626198f8 runtime: fix the session keys migration that includes the beefy key type (#2855)
Co-authored-by: Andronik Ordian <write@reusable.software>
2021-04-08 21:51:46 +02:00
Robert Habermeier cfb8dfa4fe bump spec versions across the board (#2856) 2021-04-08 19:14:19 +00:00