mikolaichuk
c193fa9a60
change impl FnOnce() to generic type + trait bound ( #11534 )
...
* change impl FnOnce() to generic type + trait bound
with_transaction() function can not be used with explicit generic arguments because of this issue: https://github.com/rust-lang/rust/issues/83701
* make the same changes elsewhere
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-05-31 13:34:41 +00:00
Bastian Köcher
31bff68f94
Require signed authority discovery records ( #5591 )
...
Nodes are already publishing signed records since 0.9.17, but now we
also enable the validation of the signature.
2022-05-31 14:43:49 +02:00
Gavin Wood
5f350d4d69
Companion for #11124 ( #5615 )
...
* Bump
* Formatting
2022-05-31 11:59:54 +01:00
Gavin Wood
7808b0c349
Several tweaks needed for Governance 2.0 ( #11124 )
...
* Add stepped curve for referenda
* Treasury SpendOrigin
* Add tests
* Better Origin Or-gating
* Reciprocal curve
* Tests for reciprical and rounding in PerThings
* Tweaks and new quad curve
* Const derivation of reciprocal curve parameters
* Remove some unneeded code
* Actually useful linear curve
* Fixes
* Provisional curves
* Rejig 'turnout' as 'support'
* Use TypedGet
* Fixes
* Enable curve's ceil to be configured
* Formatting
* Fixes
* Fixes
* Fixes
* Remove EnsureOneOf
* Fixes
* Fixes
* Fixes
* Formatting
* Fixes
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Grumbles
* Formatting
* Fixes
* APIs of VoteTally should include class
* Fixes
* Fix overlay prefix removal result
* Second part of the overlay prefix removal fix.
* Formatting
* Fixes
* Add some tests and make clear rounding algo
* Fixes
* Formatting
* Revert questionable fix
* Introduce test for kill_prefix
* Fixes
* Formatting
* Fixes
* Fix possible overflow
* Docs
* Add benchmark test
* Formatting
* Update frame/referenda/src/types.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Docs
* Fixes
* Use latest API in tests
* Formatting
* Whitespace
* Use latest API in tests
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-05-31 11:12:34 +01:00
Squirrel
f157bf7adb
Add rockmine json ( #1290 )
2022-05-31 10:06:42 +00:00
yjh
c808340d9a
sp-core: impl serde for some offchain types ( #11512 )
...
* sp-core: impl serde for some offchain types
* Update primitives/core/src/offchain/mod.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* remove serde impls from OpaqueNetworkState/OpaqueMultiaddr
* derive default
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-05-31 09:25:52 +02:00
Robert Klotzner
72723c8a9f
Request backed candidates unbounded. ( #5610 )
...
We are awaiting on the oneshot anyways, so we have back pressure. By
using the unbounded channel make log messages like the following less
likely (due to higher priority):
2022-05-30 13:46:38
2022-05-30 11:46:38.565 WARN tokio-runtime-worker parachain::provisioner: failed to assemble or send inherent data err=CanceledBackedCandidates(Canceled)
2022-05-30 22:04:12 +02:00
Bastian Köcher
aaa7b59c6a
Ensure we send the correct polkadot node version to telemetry ( #1307 )
...
This is basically a hack, but with the current way we initialize the node this is the easiest
solution to ensure we send the correct version etc.
2022-05-30 19:50:00 +02:00
Gavin Wood
02d9eb0883
Companion to Substrate #11490 ( #1305 )
...
* Fix warnings
* Bump
* Fix build
* Fix the build
* Fixes
* Formatting
Co-authored-by: Bastian Köcher <info@kchr.de >
2022-05-30 19:47:28 +02:00
Gavin Wood
96809dcac7
Use loops rather than backend for compatibility. ( #11542 )
...
* Use `loops` rather than `backend` for compatibility.
* Move over other converters
2022-05-30 16:07:00 +01:00
Mara Robin B
3ea40ba1f7
update weights ( #5601 )
...
* polkadot: update weights
* kusama: update weights
* westend: update weights
* rococo: update weights
2022-05-30 12:41:11 +02:00
Gavin Wood
026848c932
Companion to Substrate #11490 ( #5603 )
...
* Fix warnings
* Bump
2022-05-30 11:21:03 +01:00
Xiliang Chen
9349f0ffaa
use RuntimeDebug ( #1306 )
2022-05-30 12:11:21 +02:00
Egor_P
27bd0755ed
bringing back repo checkout and adding a temp dir to avoid name duplication between binary and repo dir ( #1299 )
...
* bringing back repo checkout and adding a temp dir to avoid name duplication between binary and repo dir
* added hash to the action
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
* adjusted extrinsic ordering action
* addressed comments from PR
* addressed comments from PR
* variables reoredering
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
2022-05-30 08:47:25 +00:00
Mara Robin B
f814695d5d
[ci] Upstream benchmark script changes from https://github.com/paritytech/substrate/pull/11493 ( #5586 )
...
* [ci] Upstream benchmark script changes from https://github.com/paritytech/substrate/pull/11493
* Update scripts/ci/run_benches_for_runtime.sh
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update scripts/ci/run_benches_for_runtime.sh
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
2022-05-30 08:45:32 +00:00
Gavin Wood
ecbd65fb95
Safe and sane multi-item storage removal ( #11490 )
...
* Fix overlay prefix removal result
* Second part of the overlay prefix removal fix.
* Report only items deleted from storage in clear_prefix
* Fix kill_prefix
* Formatting
* Remove unused code
* Fixes
* Fixes
* Introduce clear_prefix host function v3
* Formatting
* Use v2 for now
* Fixes
* Formatting
* Docs
* Child prefix removal should also hide v3 for now
* Fixes
* Fixes
* Formatting
* Fixes
* apply_to_keys_whle takes start_at
* apply_to_keys_whle takes start_at
* apply_to_keys_whle takes start_at
* Cursor API; force limits
* Use unsafe deprecated functions
* Formatting
* Fixes
* Grumbles
* Fixes
* Docs
* Some nitpicks 🙈
* Update primitives/externalities/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Formatting
* Fixes
* cargo fmt
* Fixes
* Update primitives/io/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Formatting
* Fixes
Co-authored-by: Bastian Köcher <info@kchr.de >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-05-29 12:56:26 +01:00
Alexander Gryaznov
189a310e4c
fix broken links ( #11536 )
2022-05-29 08:28:03 +00:00
Sergej Sakac
ccbab1beea
Fixed pruning docs ( #11519 )
2022-05-28 11:55:51 +02:00
Vsevolod Stakhov
6fa4a0e3c7
Check unbounded channel first when polling for subsystem mesages ( #5566 )
...
* Prefer unbounded channel when selecting rx events
* Fix tests
* Forgotten fmt recursion
* Extract strategy functor to allow easier modifications
2022-05-27 18:17:33 +02:00
Davide Galassi
678fd0f52f
Fork-Tree import requires post-order DFS traversal ( #11531 )
...
* Fork-tree insert requires post-order dfs traversal
* Add dedicated test for methods requireing post-order traversal
2022-05-27 13:29:31 +02:00
Squirrel
586ba3b26b
transfer ownership of uniques looks cheaper. ( #1302 )
...
batch all now looking a bit expensive compared to batch. no big changes.
2022-05-27 10:49:55 +00:00
Vsevolod Stakhov
13900dfeea
Improve forceApprove logging ( #5595 )
...
* Add some meaningful logging to the force approval to understand why it fails
* Add original block into the log to simplify logs lurking
* Update node/core/approval-voting/src/import.rs
Co-authored-by: asynchronous rob <rphmeier@gmail.com >
Co-authored-by: asynchronous rob <rphmeier@gmail.com >
2022-05-27 09:32:24 +00:00
Denis Pisarev
182b775b94
CI: github no longer checks whitelisted actions this way ( #11507 )
...
* CI: github no longer checks whitelisted actions this way
* CI: actually this one is needed and no one knows it's related to a Markdown Link Check
2022-05-27 10:44:57 +02:00
Mara Robin B
7eba8f2162
bump to 0.9.23 ( #5593 )
...
* bump version to 0.9.23
* bump spec_version to 9230
2022-05-27 10:18:23 +02:00
Shawn Tabrizi
8e7adaf283
Storage Layer for All FRAME Extrinsics ( #11431 )
...
* add new trait
* implement DispatchableWithStorageLayer
* at least one transactional
* all dispatch is at least transactional
* storage_layer api
* add test
* storage layer tests
* deprecate transactional tag
* i guess no reason to deprecate
* remove transactional from batch_all
* update tests
* extend trait
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix copy paste name
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Create run_all_benchmarks.sh
* uncomment build
* update number of steps and repeats
* add skip build
* Update run_all_benchmarks.sh
* Update run_all_benchmarks.sh
* new benchmarks
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/test/tests/storage_layers.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/test/tests/storage_layers.rs
* weights
* Update dispatch.rs
* doc link
* decl_macro support
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2022-05-26 19:28:32 +00:00
Chris Sosnin
c9316799ea
Remove Job trait ( #5600 )
2022-05-26 14:26:51 -05:00
Sergejs Kostjucenko
37db8aec2d
change ci rule to run benchmarks ( #1301 )
2022-05-26 16:06:48 +03:00
Alexander Theißen
bcc7ccb594
contracts: Update bootnodes ( #1294 )
2022-05-26 10:57:40 +00:00
Davide Galassi
ea469886f8
Test for the fork-tree post-order DFS traversal requirement ( #11521 )
...
* Test for the fork-tree post-order DFS traversal requirement
* Fixed typo
2022-05-25 20:24:33 +00:00
Kian Paimani
dc4a455911
remove pallet-nicks from everywhere ( #5587 )
...
* remove pallet-nicks from everywhere
* Update Cargo.lock
* Update Cargo.lock
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-05-25 15:25:43 +00:00
Egor_P
9e6d216e26
deleted unnecessary repo checkout to fix fetch binary step ( #1296 )
...
* deleted unnecessary repo checkout to fix fetch binary step
* Update .github/workflows/extrinsic-ordering-check-from-bin.yml
Co-authored-by: Mara Robin B. <mara@broda.me >
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
Co-authored-by: Mara Robin B. <mara@broda.me >
2022-05-25 14:46:37 +00:00
Squirrel
ba4975a690
renamed to align with cumulus ( #5570 )
2022-05-25 11:46:16 +00:00
Nazar Mokrynskyi
c090fb4c2e
Companion for #11415 (WeightToFee) ( #5525 )
...
* Companion for https://github.com/paritytech/substrate/pull/11415
* Rename `WeightToFee::calc()` to `WeightToFee::wight_to_fee()`
* Fix typo
* Fix compile errors
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
2022-05-25 10:06:01 +02:00
Davide Galassi
6b9904c1bf
Fix node lookup on fork-tree after a warp-sync ( #11476 )
...
* Fix node lookup on fork-tree after a warp-sync
After a warp-sync, the error condition was triggered by the absence
of the parent node of the first imported block.
The previous lookup implementation was traversing the tree using a
recursive **post-order** DFS, this technique doesn't trigger the issue.
In the last iterative implementation we were using a BFS instead.
* Added internal doc warning
* Small optimization
* Specify post-order DFS in the comment
2022-05-25 07:40:37 +00:00
Nazar Mokrynskyi
0c25a2ee40
Introduce WeightToFee trait instead of WeightToFeePolynomial and make WeightToFeePolynomial implement it instead ( #11415 )
...
* Introduce `WeightToFee` trait instead of `WeightToFeePolynomial` and make `WeightToFeePolynomial` implement it instead
* Rename `WeightToFee::calc()` to `WeightToFee::wight_to_fee()`
* Fix typo
2022-05-25 05:32:11 +00:00
Oliver Tale-Yazdi
29474f9893
Document benchmarking CLI ( #11246 )
...
* Decrese default repeats
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add benchmarking READMEs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update README
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fixes
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: parity-processbot <>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-05-25 03:47:21 +00:00
Davide Galassi
35af8fd726
Fix Babe revert when last finalized block is a leaf ( #11500 )
...
* Fix Babe revert when a leaf is the last finalized block
Without this fix the last finalized block weight data is wrongly removed
on revert scenario where the last finalized block is a leaf.
* Remove redundant check
* Added test to exercise the fix
* Rename test
* Give variables better names
2022-05-24 17:24:55 +00:00
Niklas Adolfsson
69aa11f680
fix: --feature fast-runtime on westend ( #5585 )
...
The westend runtime was missing the fast runtime for `EpochDuration`
which caused the epoch be 1 hour which isn't fast.
This PR changes the `EpochDuration` to 2 minutes when `--fast-runtime`
is enabled, the same as polkadot and kusama.
2022-05-24 15:24:43 +00:00
Achim Schneider
f744a1a01b
Contracts pallet: removal on idle ( #11202 )
...
* on_initialize -> on_idle
* use remaining_weight info
* no weight_limit for on_idle
* call on_idle in tests
* attempt to fix tests
* run on_initiaize when queue full
* add on_idle to weight info
* add on_idle weight info to on_idle hook
* add basic test for on_initialize with full queue
* disbale check for all keys gone in full queue, full block test
* queue_deth as usize, add comment
* comment was removed by accident
* Update frame/contracts/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* cargo +nightly fmt
* update lazy_removal_does_no_run_on_full_queue_and_full_block
* remove changes in weights.rs
* weights on_idle -> on_process_deletion_queue_batch
* use block number for on_idle
* use BlockNumber for on_initialize
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/contracts/src/lib.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* remove outcommented code
* add check that queue still full for test
* cargo fmt
* cargo +nightly fmt
* Update frame/contracts/src/benchmarking/mod.rs
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com >
* fix weights.rs
* add lazy_removal_does_no_run_on_low_remaining_weight test
* Apply suggestions from code review
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com >
2022-05-24 14:17:23 +00:00
Squirrel
545dfe327d
sudo was removed but we were still pulling in the crate. ( #1289 )
2022-05-24 12:13:31 +00:00
Bernhard Schuster
032d623e8c
orchestra license headers ( #5588 )
2022-05-24 13:10:03 +02:00
joe petrowski
97a97965b6
Runtime Documentation ( #1282 )
...
* add docs to parachain runtimes
* update and add top readme
* clarify docs
* review plus licenses
* Update parachains/README.md
* Update parachains/runtimes/assets/README.md
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io >
* Update parachains/runtimes/assets/README.md
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io >
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io >
2022-05-24 12:58:39 +02:00
Sergejs Kostjucenko
6198a5fb06
add rule to the ci job ( #11511 )
2022-05-24 13:10:13 +03:00
Bernhard Schuster
fd51ecbe70
prepare orchestra crate publishing ( #5579 )
2022-05-24 11:06:47 +02:00
Kian Paimani
494167a05b
Optimize offchain worker memory usage a bit. ( #11454 )
...
* add missing events to elections fallback
* Merged
* add some logs and stuff
* undo a bunch of things
* undo lock file
* remove unused err
* fix build
2022-05-24 06:23:05 +00:00
Koute
4f393171d7
Adjust maximum memory pages hard limit for the pooling instantiation strategy ( #11482 )
...
* Run `sc-executor-wasmtime` unit tests for all instantiation strategies
* Adjust maximum memory pages hard limit for the pooling instantiation strategy
2022-05-24 05:37:04 +00:00
Chris Sosnin
d0453cf24d
Migrate provisioner subsystem ( #5568 )
2022-05-23 14:43:58 -05:00
Shawn Tabrizi
d9f33dc7e9
Create Script to Run All Benchmarks ( #11493 )
...
* Create run_all_benchmarks.sh
* Update run_all_benchmarks.sh
* Update run_all_benchmarks.sh
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update scripts/run_all_benchmarks.sh
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* add default for $1
* Typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update run_all_benchmarks.sh
* new weights on benchmarking machine
* prefer `--chain=dev`
* fix compile
* fix command
* fmt
* dont use square brackets
* Extend doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove +nightly
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add error file an run execute everything optimistically
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-05-23 16:56:42 +00:00
Keith Yeung
8d3f692e0c
Introduce #[pallet::call_index] attribute to dispatchables ( #11381 )
...
* Introduce #[pallet::call_index] attribute to dispatchables
* cargo fmt
* Add more docs and prevent duplicates of call indices
* Add UI test for conflicting call indices
* cargo fmt
Co-authored-by: parity-processbot <>
2022-05-23 16:47:36 +00:00
Chevdor
86e777d646
Node bump to v0.9.220 ( #1284 )
...
* Node bump to v0.9.220
* Runtime version bump to 922 (#1283 )
* Runtime version bump to 922
* Switch to 9220
* Update cargo.lock
2022-05-23 14:03:39 +00:00