dependabot[bot]
b0a4f78edc
Bump serde from 1.0.131 to 1.0.132 ( #4551 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.131 to 1.0.132.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.131...v1.0.132 )
---
updated-dependencies:
- dependency-name: serde
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-12-17 15:25:17 +01:00
Sergei Shulepov
47810dcac9
pvf-precheck: Integrate PVF pre-checking into paras module ( #4457 )
...
* pvf-precheck: Integrate PVF pre-checking into paras module
Closes #4009
This is the most of the runtime-side change needed for #3211 .
Here is how it works.
The PVF pre-checking can be triggered either by an upgrade or by
onboarding (i.e. calling `schedule_para_initialize`). The PVF
pre-checking process is identified by the PVF code hash that is being
voted on. If there is already PVF pre-checking process running, then no
new PVF pre-checking process will be started. Instead, we just subscribe
to the existing one.
If there is no PVF pre-checking process running but the PVF code hash
was already saved in the storage, that necessarily means (I invite the
reviewers to double-check this invariant) that the PVF already passed
pre-checking. This is equivalent to instant approving of the PVF.
The pre-checking process can be concluded either by obtaining a
supermajority or if it expires.
Each validator checks the list of PVFs available for voting. The vote is
binary, i.e. accept or reject a given PVF. As soon as the supermajority
of votes are collected for one of the sides of the vote, the voting is
concluded in that direction and the effects of the voting are enacted.
Only validators from the active set can participate in the vote. The set
of active validators can change each session. That's why we reset the
votes each session. A voting that observed a certain number of sessions
will be rejected.
The effects of the PVF accepting depend on the operations requested it:
1. All onboardings subscribed to the approved PVF pre-checking process will
get scheduled and after passing 2 session boundaries they will be onboarded.
2. All upgrades subscribed to the approved PVF pre-checking process will
get scheduled very similarly to the existing process. Upgrades with
pre-checking are really the same process that is just delayed by the
time required for pre-checking voting. In case of instant approval the
mechanism is exactly the same. This is important from parachains
compatibility standpoint since following the delayed upgrade requires
the parachain to implement
https://github.com/paritytech/cumulus/pull/517 .
In case, PVF pre-checking process was concluded with rejection, then all
the requesting operations get cancelled. For onboarding it means it gets
without movement: the lifecycle of such parachain is terminated on the
`Onboarding` state and after rejection the lifecycle is none. That in
turn means that the caller can attempt registering the parachain once
more. For upgrading it means that the upgrade process is aborted: that
flashes go-ahead signal with `Abort` flag.
Rejection leads to removing the allegedly bad validation code from the
chain storage. Among other things, this implies that the operation can
be re-requested. That allows for retrying an operation in case there was
some bug. At the same time it does not look as a DoS vector due to the
caching performed by the nodes.
PVF pre-checking can be enabled and disabled. Initially, according to
the changes in #4420 , this mechanism is disabled. Triggering the PVF
pre-checking when it is disabled just means that we insta approve the
requesting operation. This should lead to the behavior being unchanged.
Follow-ups:
- expose runtime APIs
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras.rs
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras.rs
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras.rs
* cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs
* Review fixes
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-16 17:14:40 +01:00
sandreim
e75ad88ae8
Add support for wasm runtime metrics try #2 ( #4483 )
...
* Add runtime metrics provider
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Runner changes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Some sample metrics in paras_inherent
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* update cargo toml
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* bug
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* more fmt after merge
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Refactor metric prefix override
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* remove bug comment
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Add runtime metric primitives
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Impl trace event parsing
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update metrics
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo lock
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Fix target check
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Runtime metrics primitives
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Review feedback
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Runtime metrics crate
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Node side runtime metric changes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* use runtime CounterVec instead of macro
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt nice
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* remove dead code
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* base58 decoding
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* base58 encoding
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fix warn
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* typo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Review feedback
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Finish label support
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* please compile
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* add feature gate
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Comment cargo toml
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Fix cargo toml description
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update doc.
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* switch to `runtime-metrics` feature
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo toml
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fix tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fixes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* better ux
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* from_utf8_unchecked is safe
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Add Counter and refactor
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Fixes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* review fixes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* more fixes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* add integration test
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* dev deps
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* gitlab script update
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* review fixes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* fix merge damage
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Run tests twice
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* small fix
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* typo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo lock
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* spellcheck happy ?
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* more fixes
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Guard tracing init
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* missing copyright
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* update lockfile for substrate
Co-authored-by: parity-processbot <>
2021-12-16 11:56:25 +00:00
brenzi
edab23936c
introduce trusted parachain Encointer for rococo and westend ( #4213 )
2021-12-15 09:46:16 +01:00
dependabot[bot]
a21ffd18eb
Bump serde_json from 1.0.72 to 1.0.73 ( #4523 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.72 to 1.0.73.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.72...v1.0.73 )
---
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-12-15 03:23:04 +00:00
Bastian Köcher
9a94aa5a09
Substrate companion for #10470 ( #4515 )
...
* Substrate companion for #10470
https://github.com/paritytech/substrate/pull/10470
* cargo update -p sp-io
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-12-13 08:06:48 +00:00
Keith Yeung
54423f8b8a
Add CheckNonZeroSender to runtime configs ( #4493 )
...
* Add CheckNonZeroSender to runtime configs
* cargo fmt
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
2021-12-12 11:22:08 +01:00
Gavin Wood
0755ad39d3
Companion for #10356 : Preimage registrar and Scheduler integration ( #4384 )
...
* Make build
* Formatting
* Add migrations
* Fixes
* Fixes
* Bump
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* Fixes
* Fixes
* Fixes
* Missing files
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
* Fixes
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
* Fixes
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
* Fixes
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-12 10:27:03 +01:00
Doordashcon
11d343e258
Extract Runtime Constants into Separate Crates ( #4456 )
...
* kusama-runtime-constants created
* polkadot_runtime_constants added
* runtime constants extracted
* update node
* cargo +nightly fmt
* Delete constants.rs
* update Cargo.toml
* 2021
* runtime constants update
* utils
* utils
* node test service
* Update runtime/rococo/constants/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* runtime-native
* bridge messages
* re-export DOLLARS
* Update runtime/westend/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update runtime/test-runtime/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* std feature
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-12-11 08:10:32 +01:00
dependabot[bot]
e910a3f80f
Bump serde from 1.0.130 to 1.0.131 ( #4496 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.130 to 1.0.131.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.130...v1.0.131 )
---
updated-dependencies:
- dependency-name: serde
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-12-10 14:37:06 +01:00
Gavin Wood
bc58b46962
Companion for #10382 (Insufficient asset quotas and deposits) ( #4390 )
...
* MaxConsumers
* Fixes
* fixes
* one more fix
* Bump Substrate
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-09 14:42:39 +01:00
Zeke Mostov
96b2981c79
Companion to Substrate #9829 (Add put_in_front_of extrinsic to bags-list) ( #3899 )
...
* Companion to Substrate #9829 (Add put_in_front_of)
* Add back weight impl for polkadot
* cargo update -p sp-io
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet-bags-list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-08 05:38:46 +00:00
Zeke Mostov
39310088b0
Run paras inherent benchmarks ( #4454 )
...
* Some new lines
* 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=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
* 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
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-06 20:12:12 +00:00
Guillaume Thiolliere
a3c60b245f
companion for #10231 ( #4306 )
...
* fix renames
* fix test
* cargo update -p sp-io
* bump implement version
* bumpd spec version, to be safe
* bump version correctly
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-03 07:00:49 +00:00
Steve Degosserie
b3d08c0a8e
Rococo: ability to programatically assign slots to teams ( #3943 )
...
* Permanent & Temp parachain slots on Rococo - WIP
* Revert test change
* Revert test change
* Fix formatting
* Extract logic to separate assigned_slots pallet
* Formatting
* Parachain downgrade logic
* Pallet doc comment
* Revert unnecessary changes
* Fix few issues, tweak temp slots allocation logic; add a bunch of tests
* Address review comments; track active temp slots
* Update runtime/common/src/assigned_slots.rs
* Update runtime/common/src/assigned_slots.rs
* Remove assigned_slots calls from paras_sudo_wrapper
* Unassign is a perfectly valid verb
* Remove unneeded collect
* Update code following #3980
* Cleanup
* Generate storage info for pallet
* Address review comments
* Add ForceOrigin to slots pallet
* Track permanent slot duration in storage
* Fix tests build
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-12-02 22:23:45 +01:00
Martin Pugh
243014db2c
bump tx versions ( #4447 )
2021-12-02 13:18:44 +01:00
Kian Paimani
96820bef83
Companion for substrate/10347 ( #4413 )
...
* companion for substrate/10347
* Fix stuff
* udpate substrate (cargo update -p sp-io)
2021-12-02 11:22:19 +01:00
Shawn Tabrizi
bf5808eb7f
XCM Benchmarks for Generic Instructions ( #3940 )
...
* initial stuff
* quick fixes
* move to individual tests
* dont need these
* Update benchmarking.rs
* add to westend
* make benchmarks execute
* fix compile
* add post_execute
* ClaimAsset benchmark working
* subscribe and unsubscribe benchmarks
* benchmark for initiate reserve withdraw
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* fix spell check
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* update worst case for query_holding
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* move verification logic below
* introduce worst case holding to initiate reserve withdraw
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* feedback
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* Revert "cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs"
This reverts commit 277903944be620dc57d83b9bcf3b462d2fb73ab5.
* fix benchmark template
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* use response::version
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* refactor worst case holding
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::generic --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
* fmt
* one more todo needs to be labeled
* change option to result with benchmark error
* fmt and fix import
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-01 23:52:18 +00:00
Guillaume Thiolliere
e16f71b7b6
companion for pallet order fix. ( #4181 )
...
* companion
* remove no-op duplicated function
* fmt
* add comment on constraint
* Run cargo update
* fix integration test
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-01 03:00:20 +00:00
zjb0807
a7843702a9
Companion for #10324 - update frame-benchmarking/runtime-benchmarks ( #4387 )
...
* update frame-benchmarking/runtime-benchmarks
* Update Substrate
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-11-30 15:39:37 +00: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
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
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
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
Cheng JIANG
c6231e13e0
export hrmp config ( #4324 )
...
* export hrmp config
* fix build
2021-11-19 13:26:10 +01:00
dependabot[bot]
946bd0953b
Bump serde_json from 1.0.70 to 1.0.71 ( #4316 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.70 to 1.0.71.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.70...v1.0.71 )
---
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-18 09:45:38 +00:00
Qinxuan Chen
6664019e9d
Companion for substrate#9878 ( #3949 )
...
* Companion for substrate#9878
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* update substrate
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2021-11-17 17:09:03 +09:00
Bernhard Schuster
1aa6a4aba4
move paras inherent filtering to runtime ( #4028 )
...
* move things around, add filter methods
* validator keys, modify availability bitfields according to disputes
* simplify, keep the filter -> sanitize generic for both usecases
* minor
* assure tests still work, reduce changeset
* integration
* start entropy passing
* fixins
* compile, 1 failing test
* filter with coverage
* fixins
* Update runtime/parachains/src/paras_inherent.rs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
* slip of the pen
* improve test cases
* misc
* fix
* fixins
* test avoid extra into() calls in assert_noop!
* chores
* ff
* test fixup superfluous into call
* chore: pfmt
* improve apply_block_weight_limit to try to maximize the number of sufficiently backed
blocks and add extra bitfields in a round-robin fashion
* new code treats the lack of backed candidates as ok
* Use vrf based entropy
* fixup vrf random
* add warn
* slip of the pen
* fixup
* assure ordering
* rethink apply_weights
* mock
* use a closure as predicate check
* extract and use DisputedBitfield
* chore: simplify
* remove stray dbg
* chore: fmt
* address feedback
* fix test, halfway there
* stage1
* dbg stuff
* make group selection align
* fix session index
* fix wrongly returned candidates
* cleanup
* chore fmt
* fix ensure check
* make good case test work
* more tests for bitfields
* create sanitize_backed_candidates
* fixup tests
* update guide
* add check referenced in the guide
* improve weights code
* fmt
* fixins
* Update roadmap/implementers-guide/src/runtime/inclusion.md
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
* compiling + address review
* add comments
* fix weight calc
* address review comments and test failure
* fix
* fix: condition
* Fix random_sel function
* Fix overlength block check
* Zeke + Ladi commit for disputes filtering + integration test builder + runtime benchmarks + integration tests
* Add benchmarks for code upgrades
* Code upgrade bench; Feature gate TestWeightInfo
* Try and make CI happier
* Feature gate enter test to not(benchmarks)
* Make sure no unused imports/fn
* refactor, re-use, the beginning
* Fix issue with frame benchmarking dep compilation
* More precise feature gating for some derives
* integrate piece-wise
* foo
* fixins
* chore fmt
* fixins
* rename const generic
* Update runtime/parachains/src/paras_inherent.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* Fix compilation
* limit to test
* remove unused spam slots
* spellcheck
* remove a tick, fix a typo
* Add Code upgrade weights
* comment improvements + >=
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* remove another tick
* Update runtime/parachains/src/paras_inherent/benchmarking.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* saturating fixins + some spaces
* fix
* benchmarking - preliminary results
* Add training wheels
* Refactor some early exit logic for enter
* Gracefully handle filtering bitfields & candidates (#4280 )
This updates the logic for sanitize_bitfields and sanitize_backed_candidates to never error when there is an issue, but instead to simply skip the problematic items.
* Refactor inherent data weight limiting logic (#4287 )
* Apply suggestions from code review
* Update runtime/parachains/src/builder.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* Update runtime/parachains/src/builder.rs
* Update runtime/parachains/src/paras_inherent.rs
* final pass
* Run cargo +nightly-2021-10-29 fmt
* Update implementors guide with `sanitize_*` & `enter` (#4294 )
* Make spell check happier
* Make wasm runtimes compile with benchmarks enabled (#4303 )
* comment stuff out, use old toml
* Seems to be working?
* Remove feature gating from builder
* Remove commented out stuff
* Remove generic from digest
* Update weight files for runtime
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com >
Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com >
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-11-16 18:39:39 +00:00
dependabot[bot]
02c6ed32e4
Bump serde_json from 1.0.69 to 1.0.70 ( #4284 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.69 to 1.0.70.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.69...v1.0.70 )
---
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-16 09:32:07 +01:00
Martin Pugh
08b8929c32
bump versions ( #4285 )
2021-11-15 14:05:12 +01:00
dependabot[bot]
43ffe16e4c
Bump hex-literal from 0.3.3 to 0.3.4 ( #4264 )
...
Bumps [hex-literal](https://github.com/RustCrypto/utils ) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.3...hex-literal-v0.3.4 )
---
updated-dependencies:
- dependency-name: hex-literal
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-13 21:58:04 +00:00
Kian Paimani
ea16b72e0b
Enable full use of pallet-bags-list in westend and kusama runtimes ( #4195 )
2021-11-12 13:13:53 +00:00
dependabot[bot]
c33b065b53
Bump serde_json from 1.0.68 to 1.0.69 ( #4236 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.68...v1.0.69 )
---
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-09 22:24:26 +01:00
Xiliang Chen
d639d461a5
implement dispatch_as ( #4075 )
...
* support dispatch_as
* add weight
* Update Cargo.lock
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-11-04 17:11:27 +01:00
Bastian Köcher
e0d6b95a90
Introduce OriginPrivilegeCmp ( #4166 )
...
* Introduce `OriginPrivilegeCmp`
Make use of the new `OriginPrivilegeCmp` feature of pallet scheduler.
The idea is to make sure that a council origin with more yes votes has
higher privileges than a council origin with less yes votes. This solves
a problem that happened recently on Kusama where the council tried to
cancel a scheduled task, but that required that the same council origin
was used while the cancel motion had more yes votes than the origin
motion that scheduled this task. With this origin privilege compare it
should now be solved by checking the yes votes directly.
* Feedback
* update lockfile for substrate
Co-authored-by: parity-processbot <>
2021-10-29 16:53:32 +00:00
Shawn Tabrizi
1031a57d8b
Fix XCM Teleport Benchmark ( #4146 )
...
* fix xcm benchmark
* fix overflow
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
* fix spelling
* fmt
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_xcm_benchmarks::fungible --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --template=./xcm/pallet-xcm-benchmarks/template.hbs --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
Co-authored-by: Parity Bot <admin@parity.io >
2021-10-27 15:13:39 +02:00
Gavin Wood
d7513f5313
Allow Queries and Subscriptions ( #4150 )
...
* Allow Queries and Subscriptions
* Formatting
* Formatting
2021-10-27 15:13:12 +02:00
Bastian Köcher
af18e90d70
Bump spec versions ( #4142 )
2021-10-25 14:24:45 +02:00
Kian Paimani
f9bd3c576f
Enable bags-list pallet in polkadot ( #4080 )
...
* Enable bags-list pallet in polkadot
* add files
* Remove trailing semicolon
* more fixes
* Update runtime/polkadot/src/lib.rs
* add features
* remove par
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-10-25 10:18:17 +00:00
Chris Sosnin
ad33b8749b
Introduce new Runtime API endpoint for fetching the validation data ( #3728 )
...
* Introduce new Runtime API endpoint
`persisted_validation_data_with_code_hash` that will be used
by the candidate validation subsystem in order to decrease amount
of runtime API requests.
* Node-side part of new runtime API request
* Define code hash getter via macro
* Rename new endpoint to `assumed_validation_data`
* Docs for runtime API impl of new endpoint
* AssumedValidationData specialized request function
* fmt
2021-10-22 12:49:26 +00:00
Cheng JIANG
228977fd52
export xcm_pallet config ( #4116 )
...
* export xcm_pallet config
Signed-off-by: Cheng JIANG <alex_cj96@foxmail.com >
* run format
Signed-off-by: Cheng JIANG <alex_cj96@foxmail.com >
* fix typo
Signed-off-by: Cheng JIANG <alex_cj96@foxmail.com >
* add generic parameter to support different runtimes
* Revert "add generic parameter to support different runtimes"
This reverts commit 4405ea9fab24307318ffc20a833010fe864b3be3.
2021-10-22 02:25:57 +00:00
Martin Pugh
cf09a894e6
Remove stale migrations ( #4107 )
...
* remove stale migrations
* fix warnings
* Update runtime/westend/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-10-20 05:50:20 +02:00
Martin Pugh
5f00ecbff2
Bump version to v0.9.12 ( #4089 )
...
* bump version
* update Cargo.lock
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-10-15 16:28:20 +02:00
Shawn Tabrizi
622ffbd808
Fix XCM Weights on Westend ( #4066 )
...
* found issue
* fix up
* remove printlns
2021-10-12 15:18:32 +00:00
Gavin Wood
533cdb6e7c
Dispatchable XCMs should translate to v0 ( #4062 )
...
* Dispatchable XCMs should translate to v0
* Formatting
* Update Westend's XCM WrapVersion
2021-10-12 15:35:10 +02:00
Bastian Köcher
da67fd9312
Bump spec_versions ( #4041 )
2021-10-08 16:31:25 +02:00
Bernhard Schuster
30bdc8f5d4
collect included disputes from on-chain ( #3924 )
...
* dummy: impl another runtime API
* query the on chain disputes, and inform self
* make use of the refactor
* minro
* SPLIT ME
* write dispute values
* wip
* impl for all runtimes
* chore: fmt
* [] -> get
* fixup mock runtime
* fixup
* fixup discovery for overseer init
* chore: fmt
* spellcheck
* rename imported_on_chain_disputes -> on_chain_votes
* reduction
* make it mockable
* rename and refactor
* don't query on chain info if it's not needed
* yikes
* fmt
* fix test
* minimal fix for existing tests
* attempt to fetch the session info from the rolling window before falling back
* moved
* comments
* comments
* test for backing votes
* rename
* Update runtime/polkadot/src/lib.rs
* chore: spellcheck + dict
* chore: fmt
* fixup cache size
* add warning
* logging, rationale, less defense
* introduce new unchecked, that still checks in debug builds
* fix
* draft alt approach
* fix unused imports
* include the session
* Update node/core/dispute-coordinator/src/real/mod.rs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
* provide where possible
* expand comment
* fixin
* fixup
* ValidityVote <-> ValidityAttestation <-> CompactStatement has a 1:1 representation
* mark TODO
* Update primitives/src/v1/mod.rs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
* address review comments
* update docs
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2021-10-06 19:16:23 +00:00
André Silva
9bdded5fe4
Companion for substrate#9448 ( #3527 )
...
* Companion for substrate#9448
* fix on_disabled
* use temporary beefy branch
* revert beefy updates
* update Substrate
Co-authored-by: Andronik Ordian <write@reusable.software >
Co-authored-by: parity-processbot <>
2021-10-06 17:06:53 +00:00
Kian Paimani
7f3cfa124e
Re-configure offchain repeat frequency for elections ( #3966 )
2021-10-06 15:51:47 +00:00
Shawn Tabrizi
d6d37621b0
Allow an Offset to Lease Periods ( #3980 )
...
* add slot offset for slots
* trying things out
* fix test
* improve api to return the first block of a new lease period
* add an integration test with offset
* de-duplicate test
* hide lease period_period_length from public api
* fix benchmarks
* Update runtime/common/src/slots.rs
* support the exact same range of crowdloans
* fix docs
* fix docs again
* introduce offset to runtimes
* fix and check edge case w/ offset and lease period first block
* remove newline
* turn into an option
* fix benchmarks
Co-authored-by: Robert Habermeier <rphmeier@gmail.com >
2021-10-05 09:07:47 -05:00