Joshy Orndorff
a01004e143
Add vote and seconded events to Democracy pallet. ( #10352 )
...
* add the events
* spec_version
* Update bin/node/runtime/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Alan Sapede <alan.sapede@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-11-30 14:02:32 +01:00
Lldenaurois
2243121401
Revert "remove provisioner checks ( #4254 )" ( #4375 )
...
* Revert "remove provisioner checks (#4254 )"
This reverts commit d5d916a915 .
* Remove TODO in implementer's guide
2021-11-30 11:01:55 +00:00
Chevdor
6af739a85a
Pin changelogerator to the latest compatible version for the current flow ( #4392 )
2021-11-30 11:52:40 +01:00
Sergei Shulepov
5e5aa6689b
pvf-precheck: Add PvfCheckStatement to polkadot-primitives ( #4406 )
...
* pvf-precheck: Add `sign` in subsystem-util
Right now, most of operations that sign stuff in polkadot protocol are
handled by a very convenient tool - `Signed`. However `Signed` assumes
that whatever is signed is anchored to some `parent_hash` which works
for most cases, but does not work for others.
One instance of such a case is pre-checking (#3211 ). There validators
submit signed votes on-chain. A vote is valid for the entire session. If
we were to use `Signed` we would have to root a vote in some block of
that session and during vote verification check that this block is
indeed within the session. This is especially annoying since we agreed
to use unsigned extrinsics to submit votes and we need to make the
unsigned extrinsic validation as slim as possible.
(FWIW, the definition of a pre-checking vote can be seen in the next
diff in the stack)
That's the reason why we opted-out from using `Signed` for pre-checking
and decided to go with the manual signing approach. Almost every piece
of machinery is in place except for signing which is presented in this
PR.
* pvf-precheck: Add `PvfCheckStatement` to polkadot-primitives
This is an insubstantial PR that just unlocks PRs down the line. This PR
is a part of #3211 .
Regarding the `PvfCheckStatement` struct itself: this is a structure
that will be used to convert from/into the binary representation and
ultimately will be used to sign and submit votes onto chain.
2021-11-30 11:32:04 +01:00
Sergei Shulepov
9f778ccfa4
pvf-precheck: Add sign in subsystem-util ( #4407 )
...
Right now, most of operations that sign stuff in polkadot protocol are
handled by a very convenient tool - `Signed`. However `Signed` assumes
that whatever is signed is anchored to some `parent_hash` which works
for most cases, but does not work for others.
One instance of such a case is pre-checking (#3211 ). There validators
submit signed votes on-chain. A vote is valid for the entire session. If
we were to use `Signed` we would have to root a vote in some block of
that session and during vote verification check that this block is
indeed within the session. This is especially annoying since we agreed
to use unsigned extrinsics to submit votes and we need to make the
unsigned extrinsic validation as slim as possible.
(FWIW, the definition of a pre-checking vote can be seen in the next
diff in the stack)
That's the reason why we opted-out from using `Signed` for pre-checking
and decided to go with the manual signing approach. Almost every piece
of machinery is in place except for signing which is presented in this
PR.
2021-11-30 11:31:42 +01:00
Bernhard Schuster
13f0e5d734
make chain selection typed and more explicit in naming and logging ( #4345 )
...
* minor: assure conditions match
This simplifies visual integrity checks that an overseer is connected
when it has to be.
* fix: avoid printing a misleading log in case of the disabled disputes feature
* chore: comments
* add expressive types for the selection algorithm
2021-11-30 06:36:50 +00:00
dependabot[bot]
eb3d681c90
Bump derive_more from 0.99.16 to 0.99.17 ( #4394 )
...
Bumps [derive_more](https://github.com/JelteF/derive_more ) from 0.99.16 to 0.99.17.
- [Release notes](https://github.com/JelteF/derive_more/releases )
- [Changelog](https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md )
- [Commits](https://github.com/JelteF/derive_more/compare/v0.99.16...v0.99.17 )
---
updated-dependencies:
- dependency-name: derive_more
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-30 00:18:35 +01:00
Bastian Köcher
49d78d99f7
rococo-runtime: Switch to latest construct_runtime! syntax ( #4389 )
...
* rococo-runtime: Switch to latest `construct_runtime!` syntax
Besides that it fixes pallet macro errors in other crates that popped up
because of this switch.
* FMT
2021-11-29 21:36:19 +01:00
ferrell-code
9418860126
Tips Benchmarking to be Runtime Agnostic ( #10368 )
...
* use config traits instead of constants
* bounties too
* do bounties too
* update docs
2021-11-29 18:38:07 +00:00
Javier Viola
b64caf97bf
increment within time for dispute tests ( #4403 )
2021-11-29 17:21:37 +00:00
Andronik Ordian
5442e7a928
cargo update -p polkadot-primitives ( #809 )
2021-11-29 18:12:59 +01:00
Sergei Shulepov
172f355ca4
Treat non-deterministic prep errors as internal errors ( #4364 )
...
Closes https://github.com/paritytech/polkadot/issues/4293
This PR changes the way how we treat a certain subset of PVF preparation
errors. Specifically, now only the deterministic errors are treated as
invalid candidates. That is, the errors that are easily
attributable to either the the PVF contents or the wasmtime code, but
not e.g. I/O errors that could be triggered by the OS (insufficient
memory, disk failure, too much load, etc). The latter are treated as
internal errors and thus do not trigger the disputes.
2021-11-29 15:42:43 +01:00
Guillaume Thiolliere
d91125389a
ignoring errors and some fix ( #10344 )
2021-11-29 08:16:23 +00:00
Kian Paimani
55f58760f2
companion for substrate/10377 ( #4379 )
...
* companion for substrate/10377
* udpate substrate (cargo update -p sp-io)
* fmt
2021-11-28 15:21:18 +01:00
Kian Paimani
2fafb9546e
Reduce the execution time of some tests ( #10377 )
...
* Reduce the execution time of some tests
* Fix
* Fix build
* fmt
2021-11-28 12:47:33 +00:00
Bastian Köcher
a093ee03c9
Update Substrate & Polkadot ( #803 )
2021-11-28 07:43:50 +01:00
dependabot[bot]
659beec4c9
Bump syn from 1.0.81 to 1.0.82 ( #4368 )
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.81...1.0.82 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-27 23:03:07 +01:00
dependabot[bot]
c839268dbe
Bump serde_json from 1.0.71 to 1.0.72 ( #4366 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.71 to 1.0.72.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.71...v1.0.72 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-27 22:52:07 +01:00
Sergei Shulepov
7c49545315
Fix typo: ambigious -> ambiguous ( #4380 )
...
* Do not log PVF prunning every hour
This lowers the level of the PVF pruning.
Closes https://github.com/paritytech/polkadot/issues/4361
* Fix typo: ambigious -> ambiguous
The correct spelling is ambiguous
([dictionary](https://dictionary.cambridge.org/dictionary/english/ambiguous ))
2021-11-27 10:14:00 +01:00
Sergei Shulepov
f6b4215100
Do not log PVF prunning every hour ( #4372 )
...
This lowers the level of the PVF pruning.
Closes https://github.com/paritytech/polkadot/issues/4361
2021-11-26 16:41:58 +01:00
Sergei Shulepov
bce0e5ac7f
Impose new restrictions on paras init and cleanup ( #4360 )
...
* Impose new restrictions on paras init and cleanup
For upcoming PVF pre-checking feature we will need to impose a couple of
new restrictions for:
- `schedule_para_initialize`.
- `schedule_para_cleanup`.
Specifically, for the former we do not want to allow registration of
wasm blob that is empty, i.e. 0 bytes. While that currently already
does not make a lot of sense, it allows us to simplify the PVF
pre-checking logic: if this PR is deployed before the following changes
for PVF prechecking then we can be sure that no paras onboarding have to
have to go through the PVF pre-checking. In case, we deploy it
altogether this property will allow us to distingush paras that came in
before PVF pre-checking.
For `schedule_para_cleanup` we do not want to allow offboarding of paras
that are undergoing the upgrade process. While this is not a harsh
restriction this change allows us to avoid making the PVF prechecking
more complicated than it has to be.
* Add a test for schedule_para_initialize
* Link to `ParaLifecycle::is_stable` in docs.
* `schedule_para_{init,cleanup}` docs
Now they link to their original declarations in the pallet for more
details.
2021-11-26 12:53:23 +01:00
sandreim
e4e22f405d
Fix Provisioner dispute metrics naming ( #4374 )
...
* update dispute metric names
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* update
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
2021-11-26 11:31:22 +01:00
Keith Yeung
1fed3540ba
Update W3F URL links ( #10374 )
2021-11-26 08:58:00 +00:00
Keith Yeung
bbde75e8eb
Update W3F URL links ( #4376 )
2021-11-26 08:49:51 +00:00
dharjeezy
e0c47c48b2
remove base weight annotations ( #10373 )
...
* remove base weight annotations
* Update frame/scheduler/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Damilare <dakinlose@teamapt.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-11-26 04:38:21 +00:00
Andreas Doerr
f12e22a62d
BEEFY add tests for rounds (#10328 )
...
* new_rounds()
* WIP
* test add_vote()
* test drop()
* learn to spell
* go get some coffee
* cargo fmt
* lump everythings together again
2021-11-25 11:26:10 +01:00
Shawn Tabrizi
a33b7c2e36
REAL fix for min-square for --steps=1 --repeats=1 ( #10323 ) ( #10369 )
...
* Revert "frame-benchmarking: Fix `min-square` for `--steps=1` (#10323 )"
This reverts commit 2d0e858b81 .
* actual fix
2021-11-25 11:24:45 +01:00
Alexander Popiak
e23b384763
Add Statemine as parachain 1000 to rococo trusted teleporters ( #4312 )
...
* add Statemine as parachain 1000 to rococo trusted teleporters
* remove Rockmine/parachain 1001 from Rococo runtime
2021-11-25 10:25:59 +01:00
Alexander Samusev
2744faf6f0
[ci] Add ssh token for publishing gh-pages ( #4347 )
...
* [ci] Added ssh token for publishing gh-pages
* returned github_token
* fix ssh commands for publish-rustdoc
* fix ssh command for publish-docs
* Fix publish-rustdoc, remove clear /tmp
2021-11-25 10:18:38 +01:00
Roman
c5ae5190b2
Bump libp2p to 0.40.0 ( #10035 )
...
* Bump libp2p to 0.40.0-rc.1
* Fix PingFailure import
* Reduce the number of compilation errors (this is a FIXME commit)
* Bump libp2p to 0.40.0-rc.2
* Fix sc-network::Behaviour to inject events into fields
* Fix some NetworkBehaviourAction types
* More fixes
* More fixes
* More fixes
* Fix DiscoveryBehaviour
* Fix PeerInfoBehaviour
* Fix RequestResponsesBehaviour
* Fix RequestResponsesBehaviour
* Fix Notifications
* Fix NetworkWorker
* Fix Behaviour
* Please borrowchk
* Please borrowchk
* Please borrowchk
* Fix fmt
* Cover all cases in matches
* Fix some clippy warnings
* Fix into_peer_id -> to_peer_id
* Fix some warnings
* Fix some inject_dial_failure FIXMEs
* Fix DiscoveryBehaviour::inject_dial_failure
* Fix RequestResponsesBehaviour::inject_dial_failure
* Fix the order of inject_connection_closed PeerInfoBehaviour events
* Make KademliaEvent with filtering unreachable
* Fix Notifications::inject_dial_failure
* Use concurrent_dial_errors in NetworkWorker
* Remove commented-out RequestResponsesBehaviour::inject_addr_reach_failure
* Fix tests
* Dont report new PendingConnectionError and DialError variants to metrics
* Bump libp2p to 0.40.0
* Add fn inject_listen_failure and inject_address_change
* Review fixes
2021-11-25 08:33:33 +00:00
Pierre Krieger
5e2b93c2ea
Don't send ForceClose repeatedly in send_sync_notification ( #10348 )
2021-11-25 08:30:07 +00:00
Bastian Köcher
d94027edb4
Enable wasmtime for aarch64 as well ( #10367 )
2021-11-24 20:46:28 +01:00
Alexander Theißen
6a8c22aafd
Stabilize "seal1" seal_call ( #10366 )
2021-11-24 17:20:55 +00:00
Chevdor
0e48d6c504
CI: Release start ( #788 )
...
* Initial version
* Fix branch pattern
* Fix template
* Update .github/ISSUE_TEMPLATE/release.md
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update .github/ISSUE_TEMPLATE/release.md
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Rebase master and fmt
* Swap out Polkadot JS section for integration tests + remove tags
* remove tags
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-11-24 18:15:43 +01:00
Robert Habermeier
093c55cf00
add disputes to Kusama runtime ( #4356 )
...
* add disputes to Kusama runtime
* Update DisputesHandler
* fmt
* add the benchmarks
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::disputes --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_disputes.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
2021-11-24 17:33:44 +01:00
sandreim
0912d6a95e
Fix spellcheck ( #4363 )
...
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
2021-11-24 16:15:04 +01:00
Gavin Wood
dcd65eabda
Bump ( #792 )
2021-11-24 16:14:04 +01:00
Alexander Samusev
48b03c3732
[ci] Fix publish-rustdoc ( #10364 )
2021-11-24 16:00:03 +01:00
sandreim
66aed0d0a4
fix provisioner metric docs ( #4359 )
...
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
2021-11-24 15:12:08 +01:00
Bernhard Schuster
10961815cb
add additional assurances to create_inherent ( #4349 )
...
* minor: move checks into separate fn
* add additional validity checks
* simplify shuffling
* Closes potential OOB weight
* improve docs
* fooo
* remove obsolete comment
* move filtering into the rollback-transaction
Technically this is not necessary but avoids future footguns.
* move check up and avoid duplicate checks
* refactor: make sure backed candidates are sane, even more
* doc wording
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* refactor: avoid const generics for sake of wasm size
`true` -> `FullCheck::Skip`, `false` -> `FullCheck::Yes`.
* chore: unify `CandidateCheckContext` instance names
* refactor: introduce `IndexedRetain` for `Vec<T>`
* chore: make tests prefix free
* doc: re-introduce removed comment
* refactor: remove another const generic to save some wasm size
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
2021-11-24 14:11:06 +00:00
Alexander Popiak
3675d87f51
derive Debug for CrateVersion and StorageVersion ( #10355 )
2021-11-24 13:39:11 +00:00
Sergei Shulepov
48f6c17e77
OCD: Remove ,) in PVF ( #4362 )
2021-11-24 14:27:30 +01:00
Gavin Wood
e8669aeff8
Fix use of weight limit errors ( #791 )
2021-11-24 13:26:45 +01:00
Gavin Wood
c699ca9c7b
Fix use of weight limit errors ( #4358 )
2021-11-24 13:26:33 +01:00
Vladimir Istyufeev
bf1b93c9bd
Introduce temporary GitLab & GHA benchmarking jobs ( #10311 )
...
* Introduce temporary bench job
* Add runner label
* CI: bench GHA
* CI: bench GHA
* CI: docs
* CI: more docs
* CI: run on master only
Co-authored-by: Denis P <denis.pisarev@parity.io >
2021-11-24 12:10:40 +01:00
sandreim
e08b0fb506
Add Provisioner dispute metrics ( #4352 )
...
* Metrics for InherentDataProvider
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Integrate metrics
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* more changes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fix
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* avoid naming confusion
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Move to Provisioner.
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Add metric documentation
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
2021-11-24 10:35:46 +00:00
Alexander Samusev
e92a7402ef
[ci] Fix publish-rustdoc job ( #10363 )
2021-11-24 10:42:44 +01:00
Bastian Köcher
485b16984f
Update Substrate & Polkadot ( #789 )
2021-11-24 09:25:53 +01:00
Xiliang Chen
f00a161384
add missing feature ( #4355 )
2021-11-24 01:16:57 +01:00
Zeke Mostov
90e1273462
Inherent filtering follow up ( #4305 )
...
* Add feature more feature gating for benchmarking + tests
* New line
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs
* Do not assume we use max validators per core
* Use kusama weights for rococo (hopefully temp)
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs
* Add more validity votes when neccesary
* Some fixes for the last commit
* Restore westend weights
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs
* Revert bad westend weights write
* Make sure to update val idx before skipping
* Fix validity vote range to max at group size'
* Temp setup for rococo
* cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_paras_inherent.rs --header=./file_header.txt
* Augment generated Rococo weights
* Make it compile
* Revert range for enter_backed_candidates_variable
* Delete runtime/kusama/src/weights/runtime_paras_paras_inherent.rs
Co-authored-by: Parity Bot <admin@parity.io >
2021-11-23 23:46:37 +00:00