Dan Shields
fa359fd1f7
Rococo rm uneeded migrations, as network reset to "2.1" ( #5115 )
...
* rm uneeded migrations, rococo reset to "2.1"
* rm unimplimented generics
README update
* rm unused imports
* Randomness rm
2022-03-15 01:49:17 -05:00
Dan Shields
1b985c5d36
Rococo to use BABE randomness, Westend & Rococo runtime synchronization in file format ( #5082 )
...
* * Rococo to use BABE randomness
* Westend & Rococo runtime syncronization in file format (starting)
* explicit frame_support::weights::Weight
2022-03-15 00:34:34 +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
Andronik
55e2ddd91c
CI: add rococo to the runtime check ( #5013 )
...
* ci: add rococo for runtime changes check
* rococo: bump spec_version to 9180
* Update Rococo to 1-day lease (#4761 )
* changed lease period to 1 day
* bumped version
* bumped version again
* changed 356 to 365 days to mimic one year
Co-authored-by: Santi Balaguer <santibalaguer@Santis-MacBook-Pro.local >
* rococo: bump spec_version to 9170 for consistency
Co-authored-by: Santi Balaguer <santiago.balaguer@gmail.com >
Co-authored-by: Santi Balaguer <santibalaguer@Santis-MacBook-Pro.local >
2022-03-02 09:14:38 +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
Shawn Tabrizi
d5f5127354
Allow two Parachains to swap ( #4772 )
...
* add support for parachain to parachain swap
* enable swaps on kusama
* sanity test in paras_registrar
* express more errors
* finish up tests
* fmt
* make fields pub
* refactor integration tests to use real accounts
* Update Crowdloan Account to FundIndex (#4824 )
* update fund account to use index
* fix integration tests
* Update runtime/common/src/crowdloan.rs
* finish parachain swap test
* format
* fix warning
* fix spacing
* fix formatting
* write migrations
* add migration
* fixes
* more fixes to migration
* Update runtime/common/src/crowdloan/mod.rs
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
* Update runtime/common/src/paras_registrar.rs
* Update migration.rs
* extract swap function
Co-authored-by: Zeke Mostov <z.mostov@gmail.com >
2022-02-12 17:16:22 +00: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]
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
Oliver Tale-Yazdi
cc1201ef27
Use define_benchmarks! ( #4760 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-01-21 17:12:45 +00: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
Oliver Tale-Yazdi
3d61cc01db
co #10662 : Require MaxEncodedLen per default ( #4746 )
...
* Add `without_storage_info`
The MaxEncodedLen trait is now enforced by default in Substrate.
All pallets missing an implementation need to be marked with
`without_storage_info` now.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove `generate_storage_info`
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add more `without_storage_info`
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
2022-01-20 12:36:22 +00:00
zqhxuyuan
c0ed54f1df
make xcm_config public ( #4731 )
2022-01-17 18:39:17 +00:00
Alexander Popiak
401540eefc
Add fast-runtime Cargo Feature for Quick Test Runs ( #4332 )
...
* add fast-runtime feature for reduced session times
* make democracy periods fast on fast-runtime
* propagate fast-runtime feature through cargo.toml files
* add fast motion and term durations to Kusama
* Update runtime/westend/Cargo.toml
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* set session time to 2 minutes to avoid block production issues
* formatting
* update Substrate
* set democracy fast periods back to 1min
* set launch period and enactment period to 1 block in fast-runtime
* remove unnecessary westend period configs
* add prod_or_test macro to allow specifying prod, test and env values for parameter types
* move prod_or_test macro into common module and use it consistently
* rename macro to prod_or_fast
* cargo +nightly fmt
* bump impl_versions
* newline
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* add note that env variable is evaluated at compile time
* newline
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* newline
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* cargo fmt
* impl_version: 0
* impl_version: 0
* use prod_or_fast macro for LeasePeriod and LeaseOffset
* use prod_or_fast macro in WND and ROC constants
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Giles Cope <gilescope@gmail.com >
2022-01-13 20:08:24 +00:00
Keith Yeung
185e301fdd
Move XCM runtime configurations into their own files ( #4644 )
...
* Move XCM runtime configurations into their own files
* Update copyright year
* Fix compilation errors
* Import XCM types in westend runtime unit tests
2022-01-11 09:09:34 +00:00
Sergei Shulepov
4bf62d85a6
paras: add governance control dispatchables ( #4575 )
...
* paras: add governance control dispatchables
Adds a couple of functions for governance control for the paras module
in the anticipation of PVF pre-checking enabling.
Specifically, this commit adds a function for pre-registering a PVF that
governance trusts enough. This function will come in handy in case there
is a parachain that does not follow the GoAhead signal. That is, does
not include https://github.com/paritytech/cumulus/pull/517 .
This may be not an exhaustive list of the functions that may come in
handy. Any suggestions to add more are welcome.
* 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=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=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
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-29 15:42:10 +01: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
Bastian Köcher
1d80a05ff0
Relaunch Rococo ( #4577 )
...
* changed Rococos epoch to 1h
* Changed assigned_slots parameters to match ecosystem needs
* Update rococo chain spec
Co-authored-by: Santi Balaguer <santiago.balaguer@gmail.com >
2021-12-25 08:46:51 +01: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
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
Gavin Wood
ca72ad636c
Companion #10403 : Remove Default for AccountId ( #4500 )
...
* Some work
* Fixes
* Tests builds
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Formatting
* Formatting
* Fix
* Fixes
* Fixes
* Fixes
* Fixes
* Update Cargo.lock
* Bump
* Fixes
2021-12-14 08:17:26 +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
Svyatoslav Nikolsky
97203dfc6f
Restore Rococo <> Wococo bridges (headers + messages) ( #4452 )
...
* restore Rococo <> Wococo bridge
* accept messages from lane 00000000 only
* remove commented code
* fixed pallets order
2021-12-07 07:51:22 +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
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
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
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
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
Martin Pugh
08b8929c32
bump versions ( #4285 )
2021-11-15 14:05:12 +01:00