Tsvetomir Dimitrov
fd020c07e5
Add staging runtime api ( #5048 )
...
* Move `trait ParachainHost` to a separate version independent module
`trait ParachainHost` is no longer part of a specific primitives
version. Instead there is a single trait for stable and staging api
versions. The trait contains stable AND staging methods. The latter are
explicitly marked as unstable.
* Fix `use` primitives
`polkadot_primitives::v2` becomes `polkadot_primitives::runtime_api`
* Staging API declaration and stubs
Introduces the concept for 'staging functions' in runtime API. These
functions are still in testing and they are meant to be used only
within test networks (Westend).
They coexist with the stable calls for technical reasons - maintaining
different runtime APIs for different networks is hard to implement.
Check the doc comments in source files for more details how the staging
API should be used.
* Add new staging method - get_session_disputes()
Add `staging_get_session_disputes` to `ParachainHost` as the first
method of the staging API.
* Hide vstaging runtime api implementations behind feature flag
* Fix test runtime
* fn staging_get_session_disputes() is renamed to fn staging_get_disputes()
2022-04-12 15:47:46 +00:00
Mara Robin B
7ed275bff8
bump version to 0.9.19 ( #5290 )
2022-04-08 11:48:43 +00:00
Stephen Shelton
2433de588a
Replace TransactionByteFee with LengthToFee ( #5028 )
...
* Replace TransactionByteFee with LengthToFee
* s/ConstantModifierFee/ConstantMultiplier/
* fmt
* Remove duplicate import
* fmt
* Update runtime/test-runtime/src/lib.rs
* update lockfile for {"substrate"}
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: parity-processbot <>
2022-04-07 13:13:32 +00:00
Qinxuan Chen
74078d8eb9
Comanion for substrate#11136 ( #5218 )
...
* Comanion for substrate#11136
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* revert changes in bridge
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-04-04 11:13:34 +02:00
dependabot[bot]
d9f454f903
Bump log from 0.4.14 to 0.4.16 ( #5187 )
...
Bumps [log](https://github.com/rust-lang/log ) from 0.4.14 to 0.4.16.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/commits )
---
updated-dependencies:
- dependency-name: log
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>
2022-03-30 13:23:27 +02:00
Georges
7793796bd2
Adding Fallback on election failure ( #5093 )
...
* Adding `Fallback` on election failure
Use the newly introduced `BoundedOnChainSequentialPhragmen`
and `UnboundedOnChainSequentialPhragmen`
* Adding `BoundedOnchainExecution`
after changes in substrate
* Introducing `ExecutionConfig`
from `frame_election_provider_support::onchain`
* `OnChainSequentialPhragmen` > `OnChainSeqPhragmen`
Renaming to have a shorter name
* `BoundedOnchainExecution` -> `BoundedExecution`
And `UnboundedOnchainExecution` -> `UnboundedExecution`
* `Fallback` back to `NoFallback`
`UnboundedExecution` for `GovernanceFallback`
* Update runtime/test-runtime/src/lib.rs
* update lockfile for {"substrate"}
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: parity-processbot <>
2022-03-26 14:27:39 +00:00
Kian Paimani
b1f9fb2aaa
companion for validator self-vote in bags ( #5088 )
...
* companion for validator self-vote in bags
* fix
* cargo update -p sp-io
2022-03-23 15:31:03 +00:00
dependabot[bot]
61a6004cf1
Bump parity-scale-codec from 3.1.0 to 3.1.2 ( #5153 )
...
Bumps [parity-scale-codec](https://github.com/paritytech/parity-scale-codec ) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/paritytech/parity-scale-codec/releases )
- [Changelog](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/parity-scale-codec/commits )
---
updated-dependencies:
- dependency-name: parity-scale-codec
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>
2022-03-18 10:32:49 +00:00
dependabot[bot]
3335ddc0da
Bump parity-scale-codec from 3.0.0 to 3.1.0 ( #5096 )
...
Bumps [parity-scale-codec](https://github.com/paritytech/parity-scale-codec ) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/paritytech/parity-scale-codec/releases )
- [Changelog](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/parity-scale-codec/compare/v3.0...parity-scale-codec-v3.1.0 )
---
updated-dependencies:
- dependency-name: parity-scale-codec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 19:34:46 +01:00
Oliver Tale-Yazdi
eec58039f1
Parachain runtime dependent weights ( #5091 )
...
* Prepare for parachain runtime dependent weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Lockfile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-03-12 19:37:24 +00:00
Oliver Tale-Yazdi
2b8f6e9d0a
Runtime dependent weights ( #5064 )
...
* Copy Substrate weights into each runtime
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Define weights per runtime
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Do the same for test-runtime
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Generate multiplier tests via macro
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Change rococo tests to use ExtrinsicBaseWeight
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Spellcheck on
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Spellcheck on
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Spellcheck
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Re-Export weight constants in the runtime
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Prepare for cumulus companion
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-03-11 16:36:08 +00:00
Dan Shields
6fc2da146f
Bump all spec version to 9180 and versions to 0.9.18 ( #5083 )
...
* bump all spec version to 9180 and versions to 0.9.18
* all to 0.9.18
* lock update
2022-03-11 10:19:47 +01:00
Robert Habermeier
49f7e5cce4
Finish migration to v2 primitives ( #5037 )
...
* remove v0 primitives from polkadot-primitives
* first pass: remove v0
* fix fallout in erasure-coding
* remove v1 primitives, consolidate to v2
* the great import update
* update runtime_api_impl_v1 to v2 as well
* guide: add `Version` request for runtime API
* add version query to runtime API
* reintroduce OldV1SessionInfo in a limited way
2022-03-09 14:01:13 -06:00
Zeke Mostov
c73d76b50d
Add MaxUnlockingChunks to staking configs; Companion to #10670 ( #4823 )
...
* Add MaxUnlockingChunks to staking configs; Companion #10670
* Try fix tracing dep
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
2022-03-02 00:26:55 +00:00
Falco Hirschenberger
fc919376ba
Add benchmarking for parachain runtime ump pallet ( #3889 )
...
* Claim grounds, not working yet.
* still wip, nothing to see
* Module visibility problem
* Add benchmarks for all parachain-enabled chains
* Add missing mock weights
* Fix mock weight info
* Add max-weight to extrinsic weight
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
* sorting declarations
* Use a maximum size message to benchmark worst-case
* remove warning
* Fix msg size overflow in tests
* Use benchmarked weight in PostInfo
* Update runtime/parachains/src/ump.rs
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
* Delete obsolete file
* Compile fix
* Fix spelling
* Add benchmark for `UmpSink::process_upward_message`
It benchmarks the time to process a message, mainly the size-dependent
decoding time. This is used interally for refunding weight from
`service_overweight`
* Fix warning
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_ump.rs
* Update runtime/parachains/src/ump.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Give mock weights for tests a name instead of ()
* Add benchmark for `initializer_on_new_session` aka.
`perform_outgoing_para_cleanup`
* Remove unnescessary pub specifier and change folding to a for loop
suggestions by @pepyakin
* Update runtime/parachains/src/ump.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update runtime/parachains/src/ump.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Add comment on weight calculation and expected slight overestimation
* Introduce a size bound constant for upward messages
* Use KiB not kB for message size bound
* Enforce max-message size bound
* Use a const for upward message size bound.
* Decrease max_upward_message_sizes to 50KiB as suggested by @pepyakin
* Fix creating overweight messages
* cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs
* cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_ump.rs
* cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
* Remove unused variable
* Rename benchmark function to the function actually benchmarked and some
code cleanup
* cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_ump.rs
* cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs
* cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_ump.rs
* Better variable naming
* Fix build
* Fix build
* Fix some remarks from @pepyakin
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: emostov <32168567+emostov@users.noreply.github.com >
2022-02-26 08:52:55 +00:00
wigy
e8cb6cdaac
Companion to "Updating scale to v3" ( #4958 )
...
* Updating dependencies
* Adapting code to scale v3
* Upgrade bitvec to 1.0.0
* Fix bitvec arithmetics
* Update Cargo.lock
* Update sp-io
* Fixing the build
* Yanked scale-info 2.0.0
Co-authored-by: Bastian Köcher <info@kchr.de >
2022-02-25 13:07:06 +01:00
Bastian Köcher
d9d53c17a1
Switch to edition 2021 ( #4976 )
...
* Switch to edition 2021
* Reset bridges
* Fix compilation
* Fix test-runtime
* Fix malus
2022-02-24 10:20:58 +00:00
dependabot[bot]
71c1388290
Bump serde_json from 1.0.78 to 1.0.79 ( #4916 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.78...v1.0.79 )
---
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>
2022-02-14 12:54:41 +01:00
dependabot[bot]
85f4740591
Bump smallvec from 1.7.0 to 1.8.0 ( #4898 )
...
Bumps [smallvec](https://github.com/servo/rust-smallvec ) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases )
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.7.0...v1.8.0 )
---
updated-dependencies:
- dependency-name: smallvec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-12 00:09:01 +01:00
Mara Robin B
167df32561
Bump version ( #4904 )
...
* Bump spec_version
* Bump version to 0.9.17
2022-02-11 20:43:39 +01:00
dependabot[bot]
94caa93a14
Bump serde_json from 1.0.74 to 1.0.78 ( #4889 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.74 to 1.0.78.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.74...v1.0.78 )
---
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>
2022-02-10 10:03:01 +01:00
dependabot[bot]
2ffcb55609
Bump serde from 1.0.132 to 1.0.136 ( #4869 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.132 to 1.0.136.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.136 )
---
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>
2022-02-08 20:14:22 +01:00
Chevdor
7e9a58fc99
Version bumps to v0.9.16 and 9160 ( #4767 )
...
* Bump spec_version
* Bump version to 0.9.16
2022-02-02 15:22:32 +01:00
Georges
922eb606c3
Companion for Use proper bounded vector type for nominations #10601 ( #4709 )
...
* Fixing polkadot after subtrate changes
`MAX_NOMINATIONS` was changed to `MaxNominations`
* Fixing some more places
* Apply suggestions from code review
* update lockfile for {"substrate"}
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: parity-processbot <>
2022-01-25 20:38:47 +01:00
Kian Paimani
3cb2d62665
HRMP benchmarks ( #3876 )
...
* wip template for hrmp benchmarks
* add all of the benchmarks, first draft
* File was not saved :/
* cargo +nightly fmt
* Use configs
* add configs
* Fix rococo
* Final touches
* revert fmt changes, one last time
* Fix wrappings
* Fix a bunch of tests
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs
* add to westend
* actually use everything
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs
* Update runtime/parachains/src/hrmp.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* use real weight in wnd
* reorg
* minor cleanup
* weigh some of the internal stuff as well
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_hrmp.rs
* cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_hrmp.rs
* add files
* Master.into()
* add validation
* fmt
* fmt
* final fixes
* all runtimes build
* undo formatting
* Update runtime/parachains/src/hrmp.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* non-controversial changes
* do it the parachain-way: use const instead of type configs for simplicity.
* borrow assert_storage_consistency_exhaustive
* move assert_storage_consistency_exhaustive to Pallet, so it can be reused for benchmarks as well.
* fix typo
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Sergey Shulepov <s.pepyakin@gmail.com >
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
2022-01-21 13:42:39 +00:00
Zeke Mostov
7ef476c241
Change EraIndex import path: companion #10671 ( #4728 )
...
* Change EraIndex import path: companion #10671
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
2022-01-17 03:09:43 +00:00
sandreim
0da05cac26
Remove sleep from tests ( #4639 )
...
* Remove sleep and use polkadot test service
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* updates
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Fix other tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Run metrics tests separately
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* copy some substrate utilities
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* update runtime metric test
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Remove sleep from cli tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Polkadot companion for Substrate#10463 (#4519 )
* Grandpa and Beefy protocol names include chain id
Signed-off-by: acatangiu <adrian@parity.io >
* chain_spec: include fork id
* use simplified protocol name
* fix after merge
* avoid using hash default, even for protocol names
* update lockfile for substrate
Co-authored-by: parity-processbot <>
* configuration: Update upgrade validation delay doc (#4662 )
* typo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* review feedback
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo lock
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* use testnet profile
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Don't run with runtime-benchmark feature
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* conditional compile up one level
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
Co-authored-by: Sergei Shulepov <sergei@parity.io >
2022-01-10 11:00:46 +00:00
Adrian Catangiu
8a6ca36ad0
Bump serde_json from 1.0.73 to 1.0.74 ( #4659 )
...
Signed-off-by: acatangiu <adrian@parity.io >
2022-01-05 15:09:21 +02:00
Sergei Shulepov
91aff5d341
runtime-api: add validation_code_hash API ( #4629 )
...
This is the first step to close
https://github.com/paritytech/polkadot/issues/4524
2021-12-28 20:16:03 +00:00
Andronik Ordian
b342ae11d3
session-info: add new fields + migration ( #4545 )
...
* session_info: v2 + migration
* use primitives::v2
* use polkadot_primitives::v2
* impl primitives::v2
* fix approval-voting tests
* fix other tests
* hook storage migration up
* backwards compat (1)
* backwards compat (2)
* fmt
* fix tests
* FMT
* do not reexport v1 in v2
* fmt
* set storage version to 1
Co-authored-by: Javier Viola <javier@parity.io >
2021-12-27 08:01:30 +00:00
cheme
48dc675047
Companion for substrate#9732 ( #4104 )
...
* merge master (do not compile)
* fix
* lock
* update lock
* Update to refactoring.
* runtime version
* fmt
* remove trie patch
* remove patch
* No layout alias for bridge proof.
* update depupdate depss
* No switch until migration.
* master lock
* test
* test
* Revert "test"
This reverts commit 57325ef73332bf4b054aa4a667bb716fcf8a0d89.
* Revert "test"
This reverts commit ce74d0e2062806f72c0e9e9ca07b14165f43521e.
* rename feature
* state version as parameter, use the feature only on runtimes.
* update
* update to state version in runtime
* state version from storage
* update lockfile for substrate
Co-authored-by: parity-processbot <>
2021-12-24 09:27:35 +00:00
Adrian Catangiu
30423f796b
Companion for Substrate#10445 ( #4506 )
...
* runtimes: use updated BeefyApi
* update lockfile for substrate
2021-12-21 18:08:49 +02:00
Sergei Shulepov
3cb138d236
pvf-precheck: hook up runtime API ( #4542 )
...
This commit hooks up the API provided by #4457 to the runtime API
subsystem. In a following PR this API will be consumed by the PVF
pre-checking subsystem.
Co-authored-by: Chris Sosnin <chris125_@live.com >
Co-authored-by: Chris Sosnin <chris125_@live.com >
2021-12-21 15:15:30 +01:00
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
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
Gavin Wood
32bb94afff
Reanchor should return canonical location ( #4470 )
...
* Reanchor should return canonical
* Formatting
* Formatting
* Update xcm/src/v1/multilocation.rs
* Formatting
* Fixes
* Don't discard unreanchorable assets
* Formatting
* Docs
* Fixes
* Fixes
* tidy
2021-12-14 09:21:34 +01: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
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
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
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
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
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