This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Aura: Skip initialize block & remove cache #9132
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This instructs the Aura runtime api to skip initialize block, when requesting the authorities. This is important, as we don't want to use the new authorities that should be used from the next block on. Besides that, it removes the caching stuff. The cache is not available on full nodes anyway. In the future we should store the authorities probably in the aux store.
bkchr
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
labels
Jun 16, 2021
andresilva
approved these changes
Jun 16, 2021
bot merge |
Trying merge. |
Bot will approve on the behalf of @bkchr, since they are a team lead, in an attempt to reach the minimum approval count |
ghost
approved these changes
Jun 17, 2021
ghost
deleted the
bkchr-aura-skip
branch
June 17, 2021 07:27
bkchr
added a commit
that referenced
this pull request
Jun 17, 2021
This instructs the Aura runtime api to skip initialize block, when requesting the authorities. This is important, as we don't want to use the new authorities that should be used from the next block on. Besides that, it removes the caching stuff. The cache is not available on full nodes anyway. In the future we should store the authorities probably in the aux store.
ordian
added a commit
that referenced
this pull request
Jun 17, 2021
AurevoirXavier
pushed a commit
to darwinia-network/substrate
that referenced
this pull request
Sep 2, 2021
commit 9c572625f6557dfdb19f47474369a0327d51dfbc Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Fri Jun 18 09:24:50 2021 +0100 fix build commit 87e38e45d5c0dba66f0a4e95f4606b5179b4333f Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Thu Jun 17 16:37:43 2021 +0200 Make it possible to override maximum payload of RPC (#9019) * Make it possible to override maximum payload of RPC * Finish it. * remove todo. * Update client/cli/src/commands/run_cmd.rs * Apply suggestions from code review Co-authored-by: David <dvdplm@gmail.com> * Apply suggestions from code review Co-authored-by: David <dvdplm@gmail.com> * Incorporate suggestions * Thread rpc_max_payload from configuration to trace_block * Try obey line gitlab/check_line_width.sh * update state rpc tests * Improve readbility * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> Co-authored-by: David <dvdplm@gmail.com> commit 811cbb821c08f34167ecca7cc54921fb18a771b4 Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Wed Jun 16 15:19:10 2021 +0100 Make backwards compatible with CountedMap (#9126) commit 8fb89f411469adba41f846fc268f68726d45788c Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Wed Jun 16 05:57:14 2021 +0100 Merge 8920 commit 159a5aade9a6104fa70779a38a326b2cddc69da3 Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Thu Jun 17 18:01:27 2021 +0200 double the allocator limit (#9102) * double the allocator limit * 32 MiB should be enough for everybody. * Update doc Co-authored-by: Sergei Shulepov <sergei@parity.io> commit 3bb42b9aaba65e956aea7aaef2c2fb3468fa3aaf Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Thu Jun 17 09:27:53 2021 +0200 Aura: Skip initialize block & remove cache (#9132) This instructs the Aura runtime api to skip initialize block, when requesting the authorities. This is important, as we don't want to use the new authorities that should be used from the next block on. Besides that, it removes the caching stuff. The cache is not available on full nodes anyway. In the future we should store the authorities probably in the aux store. commit c666a251691300c1651075a3b59ba1cf59c5a664 Author: Guillaume Thiolliere <gui.thiolliere@gmail.com> Date: Mon Jun 14 16:02:45 2021 +0200 staking/election: prolonged era and emergency mode for governance submission. (#8912) * Implementation but weird initial era in tests * Emergency mode for elections. (#8918) * do some testing, some logging. * some testing apparatus * genesis election provider (#8970) * genesis election provider * fix historical stuff * Fix test * remove dbg * Apply suggestions from code review Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * capitalize comment and name without conflict * fix log * Update frame/election-provider-multi-phase/src/lib.rs * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * apply suggestion on tests * remove testing modifications * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Dmitry Kashitsyn <korvin@deeptown.org> * apply suggestion * fix master merge Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by: Dmitry Kashitsyn <korvin@deeptown.org> commit ea960d6c5350f381f4748b628079691794055610 Author: h4x3rotab <h4x3rotab@gmail.com> Date: Mon Jun 14 19:22:39 2021 +0800 Improve construct_runtime doc (#9096) - Mention when the pallet definition parts are needed - Rename "module" to "pallet" commit a4b0fd8fa5939879e5a3f9a1a009323ccb4d4a30 Author: Qinxuan Chen <koushiro.cqx@gmail.com> Date: Mon Jun 14 19:00:32 2021 +0800 Migrate pallet-randomness-collective-flip to pallet attribute macro (#9061) * migrate pallet-randomness-collective-flip to pallet attribute macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * fix some nits Signed-off-by: koushiro <koushiro.cqx@gmail.com> * remove some spacing things Signed-off-by: koushiro <koushiro.cqx@gmail.com> * remove space Signed-off-by: koushiro <koushiro.cqx@gmail.com> * use tabs Signed-off-by: koushiro <koushiro.cqx@gmail.com> commit a7b641fc25d8d157b2dddccb7f459c4f166596e2 Author: Keith Yeung <kungfukeith11@gmail.com> Date: Mon Jun 14 03:07:09 2021 -0700 Allow renaming storage item prefixes (#9016) * Implement parsing for #[pallet::storage_name] on storage items * Rename storage prefix when a #[pallet::storage_name] is supplied * Fix test_storage_info * Rename storage_name to storage_prefix * Check for duplicates when renaming storage prefixes * Allow only string literals for storage_prefix renames * Use proper spans for attribute errors * Check for valid identifiers when parsing storage prefix renames commit f4cccc08110bd1c516f2dcc6fe86682cb6118184 Author: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Date: Mon Jun 14 09:16:14 2021 +0200 fix ordering of staking weight arguments (#9063) Closes #9054. commit 6b3c76a23ed18c5d4f2149edebd85063a85a8218 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Sun Jun 13 12:41:13 2021 +0100 pallet-authorship: Fixing some nitpicks (#9095) As reviewing the pallet yesterday, I have found some nitpicks that I fixed. commit 125c4b365f21e60e3d284e3c73cbf0585bfc7342 Author: chenwei <chenwei_767@qq.com> Date: Sun Jun 13 18:27:54 2021 +0800 Make find_proxy public. (#9094) export `pallet_proxy::find_prox` and `ProxyDefinition`. commit 11d5eff647a54a70e87f805b3dabca458faca283 Author: Lldenaurois <ljdenaurois@gmail.com> Date: Sun Jun 13 06:24:05 2021 -0400 Add function to test whether function is exported in wasm blob (#9093) * Add function to test whether function is exported in wasm blob * Address Feedback * Update based on feedback commit c8d5796ae2b0ee5c71e2ee585fc05b3fa94ac84f Author: Xiliang Chen <xlchen1291@gmail.com> Date: Sun Jun 13 18:26:42 2021 +1200 remove Default from AssetId trait bound (#9062) * update AssetId trait * try again commit 3a41701a675b81a264cccf6b2771bfff74f6674a Author: Andrew Jones <ascjones@gmail.com> Date: Sun Jun 13 01:36:36 2021 +0100 Allow additional trait bounds for `#[pallet::constant]` (#9050) * Allow additional trait bounds for constants * Add ui test for constants with additional trait bounds * Update trait constant ui test * Import syn::Error * Use reference instead of cloning * Add extra invalid bound ui test * Out or order valid bounds * Fix ui test * Fix ui test * Apply review suggestion about error message commit ab84c8cfe8511ef9f8e5ffb8a497383f4b008daa Author: Alan Sapede <alan@purestake.com> Date: Sat Jun 12 20:31:53 2021 -0400 Adds moonbeam, moonriver to ss58 registry (#9028) * Adds moonream, moonriver to ss58 registry * Fixes names commit 9e42949aeb8779a36a4c1f8cff037570815f9aff Author: Guillaume Thiolliere <gui.thiolliere@gmail.com> Date: Sat Jun 12 18:15:21 2021 +0200 Enforce pub calls in pallets (#9085) * make all extrinsics public so they are available from outside * Impl * fix * more fix * more pub * few more * merge fix * fix ui test * fix ui test Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Bastian Köcher <info@kchr.de> commit 1f16a6a41b973bbdd800ce07ac68c6055400a321 Author: André Silva <123550+andresilva@users.noreply.github.com> Date: Sat Jun 12 16:58:36 2021 +0100 im-online: send heartbeats at a random period (#8819) * im-online: send heartbeats at a random period * support: use permill to represent session progress * im-online: increase probability of heartbeating with session progress * babe, session: fix tests * babe: fix test commit 350ba1293319713f0587d7260863108c7e6e200e Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Sat Jun 12 15:59:56 2021 +0100 Fixes in Assets Pallet (#9059) * upper bound witness with refund * simple test * track approvals * dont allow approvals when asset is frozen * destroy returns approval deposit * update `NonTransfer` proxies * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io> commit 2c210396dbf67968a5f631912fa4addefdc8d11a Author: Alexander Popiak <alexander.popiak@parity.io> Date: Sat Jun 12 12:43:08 2021 +0200 make all extrinsics public so they are available from outside (#9078) Co-authored-by: thiolliere <gui.thiolliere@gmail.com> commit 6d82c02611c51a5c54d60e02c3c104b10aa3ae71 Author: Andronik Ordian <write@reusable.software> Date: Sat Jun 12 02:47:22 2021 +0200 disable unused schnorrkel feature (#9084) commit 3325b100195539427e6b828f7ea4a36341df2c8e Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Sat Jun 12 01:38:17 2021 +0100 pallet-offences: Switch to partition_point (#9049) This changes the code to use `partition_point` instead of `binary_search_by_key`, because this was very likely the problematic pallet 2 weeks ago on polkadot. commit 561dbcff78fcbeb3848cbeb35c8f0397335d7df4 Author: Shaun Wang <spxwang@gmail.com> Date: Sat Jun 12 12:22:40 2021 +1200 Migrate pallet-staking to pallet attribute macro (#9083) * Migrate staking pallet to pallet attribute macro. * HistoryDepth default value. * Make all calls public. * Update frame/staking/src/lib.rs * remove externalities again * Update lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> commit b9f7b588c8ba35ede3bfcce955ddc4712377245e Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Fri Jun 11 18:24:30 2021 +0100 Transaction pool: Remove futures-diagnose and thread pool (#9074) * Transaction pool: Remove futures-diagnose and thread pool This pr removes `futures-diagnose` as this isn't used anymore. Besides that the pr also removes the thread pool that was used to validate the transactions in the background. Instead of this thread pool we now spawn two separate long running tasks that we use to validate the transactions. All tasks of the transaction pool are now also spawned as essential tasks. This means, if any of these tasks is stopping, the node will stop as well. * Update client/transaction-pool/src/api.rs commit 41ab01a8cb2a43f7d743778c066ad91453e0c883 Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Fri Jun 11 16:45:13 2021 +0100 Implement `transfer_all` in Balances Pallet (#9018) * transfer_all * benchmark * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs * update * add note * typo Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> commit 155ac5bcadc3143c60ffded6a3af47bce3fb12e8 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Fri Jun 11 16:12:57 2021 +0100 Try fix ui tests (#9082) * Try fix ui tests * More commit 218bd4ffb20565e29a8fcca2f8f3ed005fc7d6cc Author: Pierre Krieger <pierre.krieger1708@gmail.com> Date: Fri Jun 11 14:36:37 2021 +0200 Don't connect to reserved nodes if they're banned (#9020) commit 8f99b4bb177b8cf57b624a10481b6a1e2ea72809 Author: André Silva <123550+andresilva@users.noreply.github.com> Date: Fri Jun 11 12:18:41 2021 +0100 grandpa: ignore justifications from other consensus engines (#9075) commit 2c84b31c86a62353ad3dbf04fae971b18470c9f5 Author: Folyd <lyshuhow@gmail.com> Date: Fri Jun 11 01:31:49 2021 +0800 Migrate ProfilingLayer to tracing registry API (#8943) * Migrate ProfilingLayer to tracing registry API * Remove the `current_span` field from `BlockSubscriber`. * Bump the `tracing-subscriber` version * Fix Gitlab CI commit eb9033b826b9e8115c20707fe66af0ceb177e99c Author: Zeke Mostov <32168567+emostov@users.noreply.github.com> Date: Wed Jun 9 15:05:28 2021 -0700 [try-runtime-cli] Offchain worker support (#8966) * make remote-ext work with ws and safe RPCs * Update docs. * Update utils/frame/remote-externalities/Cargo.toml Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * Fix test * Update lock file * Update utils/frame/remote-externalities/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Fix build again. * checkpoint, merging the paged rpc now * revert lifetime stuff * WIP: remote client init not working * Small cleanups * use jsonrpsee alpha.7 * WIP * Executiing without errors * Reorg & cleanup * Trivial cleaning * Add txpool & keystore extension * Small cleaning * More :cleaning * Flags: page-size, override-code * WIP * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Remove heap_pages * Dry code extraction from state * Formatting * More formatting * Add issue todo * Use jsonrpsee 0.2.0 * Try trigger gitlab * Fix "block_import_works" test * fix native_big_block_import_fails_on_fallback test * fix commit should work * Rewrite UI tests * Revert "Rewrite UI tests" This reverts commit ada7f670f701c21fb399946a3f6918453f537bcb. * try again with UI * Use const for legacy heap pages val * Move parse module to its own file * Move rpc_api module to its own file * Apply suggestions from code review Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * trait names: Block, not B * Corect HEAP_PAGES_TEST_LEGACY export * Update utils/frame/remote-externalities/src/rpc_api.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Revert test_ext heap_page insert; adjust storage root instead * Doc comments for try_runtime::cli::Command * TryRuntime stub * trailing comma * Remove unused dev dep in frame-executive * Improve parse::hash variable name & error index * Use Result for rpc_api fns * Richer err messagges * Remove HEAP_PAGE_TEST_LEGACY * Update bin/node/executor/tests/basic.rs Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> commit 3e5b4a2444c22561f5d4a995dec28d7ddc01865f Author: Joshy Orndorff <JoshOrndorff@users.noreply.github.com> Date: Wed Jun 9 10:36:41 2021 -0400 remove explicit unit return type (#9053) commit 4d64381801d6df6567d261f319b2c5981a692f72 Author: radupopa2010 <radupopa2010@yahoo.com> Date: Wed Jun 9 15:51:27 2021 +0200 READY Update simnet tests to v5 (#8946) * Update simnet tests to v4 * enable simnet tests for PRs * add stage to job "test-linux-stable-int" * v2.0.0simnet * alow build-for-simnet option * Fix passing of IMAGE_TAG to downstream * forgot to build-for-simnet * build-for-simnet * build-for-simnet * build-for-simnet * build-for-simnet * build-for-simnet * take a shortcut build-for-simnet * build-for-simnet * update triggering script to polkadot version * "revert me" * "revert me" build-for-simnet * add simnet version as arg to script * revert me build-for-simnet * build-for-simnet * remove triggering simnet for PRs for now * Add suggestions from Vladimir * Add suggestions from Vladimir commit a2f48bf96eecbb5cd1f45bd5319ba814595eaaef Author: Squirrel <gilescope@gmail.com> Date: Wed Jun 9 10:56:31 2021 +0100 Stop sending network_state to telemetry (#9026) (We send network information to prometheus) commit d6ac9f551b71d9c7b69afcebfc68ace310ef74ee Author: Keith Yeung <kungfukeith11@gmail.com> Date: Wed Jun 9 02:31:29 2021 -0700 Use pallet names to name enum variants (#8990) * Remove unused event_metadata variable * Eliminate mod_name and use pallet names to name enum variants * Rename field name `pallet` to `path` * Use only the pallet name to generate variant names * Use new naming scheme for Event enum in sudo pallet tests * Use new naming scheme for Event enum in offences pallet tests * Use new naming scheme for Event enum in contracts pallet tests * Use new naming scheme for Event enum in collective pallet tests * Use new naming scheme for Event enum in bounties pallet tests * Use new naming scheme for Event enum in balances pallet tests * Use new naming scheme for Event enum in assets pallet tests * Use new naming scheme for Event enum in frame support tests * Use new naming scheme for Event enum in tips pallet tests * Use new naming scheme for Event enum in transaction payment pallet tests * Use new naming scheme for GenesisConfig fields in example pallet tests * Use new naming scheme for GenesisConfig fields in elections pallet tests * Use new naming scheme for Event enum in election provider multi-phase pallet tests * Use new naming scheme for Event enum in elections phragmen pallet tests * Use new naming scheme for GenesisConfig fields in chain spec * Use new naming scheme for Event enum in staking pallet mock * Use new naming scheme for GenesisConfig fields in node-template chain spec * Use new naming scheme for GenesisConfig fields in node-testing chain spec * Use new naming scheme for Event enum in node executor tests * Use new naming scheme for GenesisConfig fields in transaction storage pallet mock * Refactor match conditions commit 6749c701900747accaa35eaf2101586f09baef9e Author: Guillaume Thiolliere <gui.thiolliere@gmail.com> Date: Tue Jun 8 22:54:06 2021 +0200 put the validate_unsigned implementation inside the pallet definition (#9044) Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> commit f775d0de6bddeba53ab35bc662fb076291e5260e Author: David <dvdplm@gmail.com> Date: Tue Jun 8 20:10:16 2021 +0200 Misc telemetry polish (#8484) * Remove TelemetryWorker::with_transport Make logging more useful * Re-instate TelemetryWorker::with_transport * Fix typo, don't spam commit b493dd3fa5d7f07c369562004870046a53a3f3c8 Author: Zeke Mostov <32168567+emostov@users.noreply.github.com> Date: Tue Jun 8 10:26:08 2021 -0700 Small doc updates to `election-provider-multi-phase` (#9041) * Small doc updates to election-provider-multi-phase * small change * Improve challenge phase docs * An honest commit 5f5fbea7a787d8b5db6133530e1dbb0606c08cf1 Author: Niklas Adolfsson <niklasadolfsson1@gmail.com> Date: Tue Jun 8 18:17:25 2021 +0200 deps(jsonrpsee): update to 0.2.0 to avoid alpha (#9036) The motivation is a couple of bug fixes and not to pin to certain alpha versions. commit 07a1af348f76e08be36341f8a1b6039765b665bc Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Tue Jun 8 10:02:57 2021 -0400 Emit `Bonded` event when rebonding (#9040) * Emit `Bonded` event when rebonding * fix borrow checker * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io> commit 0a2472d8364bc103a0a13c8e2dcb7f6ed3e44342 Author: tgmichel <telmo@purestake.com> Date: Tue Jun 8 13:18:57 2021 +0200 `rpc-http-threads` cli arg (#8890) * Add optional `rpc-http-threads` cli arg * Update `http::ServerBuilder`threads commit 0af6df59aab21d5a23907faf236be1ff235b7581 Author: Andrew Jones <ascjones@gmail.com> Date: Tue Jun 8 12:16:56 2021 +0100 Delete legacy runtime metadata macros (#9043) commit d0891796ed48acfad7445b884c8d035dc4a2487a Author: Xiliang Chen <xlchen1291@gmail.com> Date: Tue Jun 8 20:59:19 2021 +1200 fix unreserve_all_named (#9042) commit fa26ce6b4b59710cb402d76b9c4577c93d2f65d0 Author: Alexander Theißen <alex.theissen@me.com> Date: Mon Jun 7 19:40:23 2021 +0200 contracts: Add new `seal_call` that offers new features (#8909) * Add new `seal_call` that offers new features * Fix doc typo Co-authored-by: Michael Müller <michi@parity.io> * Fix doc typos Co-authored-by: Michael Müller <michi@parity.io> * Fix comment on assert * Update CHANGELOG.md Co-authored-by: Michael Müller <michi@parity.io> commit 5d89967d7cc12d620bda9c9c042dbf7fcc4beb89 Author: Pierre Krieger <pierre.krieger1708@gmail.com> Date: Mon Jun 7 15:00:03 2021 +0200 Periodically call `Peerset::alloc_slots` on all sets (#9025) * Periodically call alloc_slots on all slots * Add test commit 1fa8cf7cf9dbfe1b093b3e7e116dc3435c7f3f7b Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Mon Jun 7 11:26:31 2021 +0200 Don't inlucde nominaotrs that back no one in the snapshot. (#9017) commit 1085a9021134f39d527c1bc828e7904959b3cc1a Author: cheme <emericchevalier.pro@gmail.com> Date: Mon Jun 7 11:06:38 2021 +0200 Compact proof utilities in sp_trie. (#8574) * validation extension in sp_io * need paths * arc impl * missing host function in executor * io to pkdot * decode function. * encode primitive. * trailing tab * multiple patch * fix child trie logic * restore master versionning * bench compact proof size * trie-db 22.3 is needed * line width * split line * fixes for bench (additional root may not be needed as original issue was with empty proof). * revert compact from block size calculation. * New error type for compression. * Adding test (incomplete (failing)). Also lacking real proof checking (no good primitives in sp-trie crate). * There is currently no proof recording utility in sp_trie, removing test. * small test of child root in proof without a child proof. * remove empty test. * remove non compact proof size * Missing revert. * proof method to encode decode. commit 24a92c32680258275926021ae4da7db126ddf1d8 Author: André Silva <123550+andresilva@users.noreply.github.com> Date: Sun Jun 6 09:07:29 2021 +0100 arithmetic: fix PerThing pow (#9030) * arithmetic: add failing test for pow * arithmetic: fix PerThing::pow * Revert back to previous optimisations Co-authored-by: Gav Wood <gavin@parity.io> commit 37bb3ae7eb559afaf9c7dbf7fd99e08b282c8127 Author: André Silva <123550+andresilva@users.noreply.github.com> Date: Fri Jun 4 22:31:06 2021 +0100 consensus: handle justification sync for blocks authored locally (#8698) * consensus: add trait to control justification sync process * network: implement JustificationSyncLink for NetworkService * slots: handle justification sync in slot worker * babe: fix slot worker instantiation * aura: fix slot worker instantiation * pow: handle justification sync in miner * babe: fix tests * aura: fix tests * node: fix compilation * node-template: fix compilation * consensus: rename justification sync link parameter * aura: fix test compilation * consensus: slots: move JustificationSyncLink out of on_slot commit 2cff60c3be7b84d940b219399b1d2c8aa2e4b31d Author: Andreas Doerr <adoerr@users.noreply.github.com> Date: Fri Jun 4 16:46:16 2021 +0200 Bump parity-db (#9024) commit d27dea95712696fcc5dd1fcc93f22926e0b9e57f Author: Arkadiy Paronyan <arkady.paronyan@gmail.com> Date: Fri Jun 4 13:27:05 2021 +0200 Fixed build (#9021) commit e98aca335f066d84d7a5cbabf280392f39e1cc99 Author: Jakub Pánik <jakub.panik@gmail.com> Date: Fri Jun 4 11:01:05 2021 +0200 update ss58 type to u16 (#8955) commit 0495ead464cc632237d0f9d1687b1ebbb579c7a7 Author: Xiliang Chen <xlchen1291@gmail.com> Date: Fri Jun 4 19:32:46 2021 +1200 Named reserve (#7778) * add NamedReservableCurrency * move currency related trait and types into a new file * implement NamedReservableCurrency * remove empty reserves * Update frame/support/src/traits.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * fix build * bump year * add MaxReserves * repatriate_reserved_named should put reserved fund into named reserved * add tests * add some docs * fix warning * Update lib.rs * fix test * fix test * fix * fix * triggier CI * Move NamedReservableCurrency. * Use strongly bounded vec for reserves. * Fix test. * remove duplicated file * trigger CI * Make `ReserveIdentifier` assosicated type * add helpers * make ReserveIdentifier assosicated type * fix * update * trigger CI * Apply suggestions from code review Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * trigger CI * Apply suggestions from code review Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Gavin Wood <i@gavwood.com> Co-authored-by: Shaun Wang <spxwang@gmail.com> commit 7d8a9b6d9862f208e34a7f715448b21250b653e2 Author: Andronik Ordian <write@reusable.software> Date: Fri Jun 4 09:05:21 2021 +0200 more useful error message (#9014) commit a57bc4445a4e0bfd5c79c111add9d0db1a265507 Author: Arkadiy Paronyan <arkady.paronyan@gmail.com> Date: Fri Jun 4 08:50:59 2021 +0200 Storage chain: Runtime module (#8624) * Transaction storage runtime module * WIP: Tests * Tests, benchmarks and docs * Made check_proof mandatory * Typo * Renamed a crate * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Added weight for on_finalize * Fixed counter mutations * Reorganized tests * Fixed build * Update for the new inherent API * Reworked for the new inherents API * Apply suggestions from code review Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Store transactions in a Vec * Added FeeDestination * Get rid of constants * Fixed node runtime build * Fixed benches * Update frame/transaction-storage/src/lib.rs Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> commit ea5d3570673d125dfe0b7da33b345c3c13195380 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Thu Jun 3 16:04:29 2021 +0200 Transaction pool: Ensure that we prune transactions properly (#8963) * Transaction pool: Ensure that we prune transactions properly There was a bug in the transaction pool that we didn't pruned transactions properly because we called `prune_known`, instead of `prune`. This bug was introduced by: https://github.com/paritytech/substrate/pull/4629 This is required to have stale extrinsics being removed properly, so that they don't fill up the tx pool. * Fix compilation * Fix benches * ... commit d6e4db6c30667bf3524abced8428401ab141b07a Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Thu Jun 3 09:05:02 2021 -0400 Add Call Filter That Prevents Nested `batch_all` (#9009) * add filter preventing nested `batch_all` * more tests * fix test * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io> commit 2562dda0e0476e7522e89a7f4524a0dfced7e105 Author: Dmitry Kashitsyn <korvin@deeptown.org> Date: Thu Jun 3 18:25:02 2021 +0700 Removes unused import (#9007) commit b14fdf5c8b205a5dd00e4c54a32d62f18555c0d8 Author: Gavin Wood <gavin@parity.io> Date: Thu Jun 3 13:20:34 2021 +0200 Non-fungible token traits (#8993) * Non-fungible token traits * Docs * Fixes * Implement non-fungible trait for Uniques * Update frame/uniques/src/impl_nonfungibles.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/uniques/src/impl_nonfungibles.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> commit 48aea1b2f4774c975e2e3f8bf044c9b3f4a1b0ce Author: Andreas Doerr <adoerr@users.noreply.github.com> Date: Thu Jun 3 11:46:43 2021 +0200 Add ecdsa::Pair::verify_prehashed() (#8996) * Add ecdsa::Pair::verify_prehashed() * turn verify_prehashed() into an associated function * add Signature::recover_prehashed() commit 94679ebd37f4989f8f7803d4f9aa403b7ba9aead Author: Shaun Wang <spxwang@gmail.com> Date: Thu Jun 3 20:30:21 2021 +1200 Migrate pallet-democracy to pallet attribute macro (#8824) * Migrate pallet-democracy to pallet attribute macro. * Metadata fix. * Trigger CI. commit 437c83817805c39f0f5f5101dfa26f13cc4a4758 Author: Pierre Krieger <pierre.krieger1708@gmail.com> Date: Wed Jun 2 20:41:21 2021 +0200 Discard notifications if we have failed to parse handshake (#8806) commit 538b15fa8dd61f77254abebd5a3336835f4aebe0 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Wed Jun 2 20:13:47 2021 +0200 Transactionpool: Make `ready_at` return earlier (#8995) `ready_at` returns when we have processed the requested block. However, on startup we already have processed the best block and there are no transactions in the pool on startup anyway. So, we can set `updated_at` to the best block on startup. Besides that `ready_at` now returns early when there are no ready nor any future transactions in the pool. commit 4652f9e00f0e3079b9ed40ff806829f17fd1ddcf Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Wed Jun 2 00:30:53 2021 -0400 also fix bounded vec (#8987) commit 9f621a936eb5c692ad8efea22a9bb9ecf3bd93d3 Author: MOZGIII <mike-n@narod.ru> Date: Tue Jun 1 23:48:31 2021 +0300 Convert another instance of Into impl to From in the macros (#8986) * Convert another instance of Into impl to From in the macros * Convert another location commit 45f16302d233a70b2e2a8f9b9316b9a2c0e60d04 Author: Boiethios <Boiethios@users.noreply.github.com> Date: Tue Jun 1 22:27:30 2021 +0200 Update WeakBoundedVec's remove and swap_remove (#8985) Co-authored-by: Boiethios <felix-dev@daudre-vignier.fr> commit d8b3fce28513169d8ee1315dd9a4cd92d95753cc Author: Gavin Wood <gavin@parity.io> Date: Tue Jun 1 17:03:13 2021 +0100 Uniques: An economically-secure basic-featured NFT pallet (#8813) * Uniques: An economically-secure basic-featured NFT pallet * force_transfer * freeze/thaw * team management * approvals * Fixes * force_asset_status * class_metadata * instance metadata * Fixes * use nmap * Fixes * class metadata has information field * Intiial mock/tests and a fix * Remove impl_non_fungibles * Docs * Update frame/uniques/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/uniques/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/uniques/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/uniques/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Reserve, don't transfer. * Fixes * Tests * Tests * refresh_deposit * Tests and proper handling of metdata destruction * test burn * Tests * Update impl_fungibles.rs * Initial benchmarking * benchmark * Fixes * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Attributes * Attribute metadata * Fixes * Update frame/uniques/README.md * Docs * Docs * Docs * Simple metadata * Use BoundedVec * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update frame/uniques/src/lib.rs Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev> * Update frame/uniques/src/lib.rs Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev> * Update frame/uniques/src/lib.rs Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev> * Update frame/uniques/src/lib.rs Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev> * Update frame/uniques/src/lib.rs Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev> * Fixes * Update frame/uniques/README.md Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Update frame/uniques/README.md Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Update frame/uniques/README.md Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Docs * Bump Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Lohann Paterno Coutinho Ferreira <developer@lohann.dev> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> commit fa23b18e28d9d22824e2edfb76042297aae83efe Author: Ashley <ashley.ruglys@gmail.com> Date: Tue Jun 1 17:14:33 2021 +0200 Revert "Use `SpawnTaskHandle`s for spawning tasks in the tx pool (#8958)" (#8983) This reverts commit bfef07c0d22ead3ab3c4e0e90ddf9b0e3537566e. commit 24750eafb691517e3aec70fcd9554cd91d7e4974 Author: Sergei Shulepov <sergei@parity.io> Date: Tue Jun 1 16:43:29 2021 +0200 Do not spend time on verifying the signatures before calling Runtime (#8980) commit bfef07c0d22ead3ab3c4e0e90ddf9b0e3537566e Author: Ashley <ashley.ruglys@gmail.com> Date: Tue Jun 1 16:28:03 2021 +0200 Use `SpawnTaskHandle`s for spawning tasks in the tx pool (#8958) * Remove futures-diagnose * Use `SpawnTaskHandle`s for spawning tasks in the tx pool * Box the spawner * Fix tests * Use the testing task executor commit 408e803f91790b1a128a964985de26f2bdf11eea Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Tue Jun 1 14:49:06 2021 +0200 Inject hashed prefix for remote-ext (#8960) * Inject for remote-ext * Update utils/frame/remote-externalities/src/lib.rs Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> * Update utils/frame/remote-externalities/src/lib.rs Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> commit 04aa0e96b951de3bf0d4282446f19a03e2c70dec Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Tue Jun 1 13:57:35 2021 +0200 Dependabot use correct label (#8973) commit e1d93fb3f08d71ce01d32ab49fed56d6e87f40b7 Author: Squirrel <gilescope@gmail.com> Date: Tue Jun 1 11:51:38 2021 +0100 Spellling corrections (no code changes) (#8971) * Spelling corrections * As this might break let's do as a separate PR commit 5ceb0b0b6fbd57b181f53c5791a372ccccc72cba Author: Sergei Shulepov <sergei@parity.io> Date: Tue Jun 1 12:02:10 2021 +0200 Update wasmtime to 0.27 (#8913) * Update wasmtime to 0.27 A couple of notes: - Now we are fair about unsafeness of runtime creation via an compiled artifact. This change was prompted by the change in wasmtime which made `deserialize` rightfully unsafe. Now `CodeSupplyMode` was hidden and the `create_runtime` now takes the blob again and there is now a new fn for creating a runtime with a compiled artifact. - This is a big change for wasmtime. They switched to the modern backend for code generation. While this can bring performance improvements, it can also introduce some problems. In fact, 0.27 fixed a serious issue that could lead to sandbox escape. Hence we need a proper burn in. This would require a change to PVF validation host as well. * Filter regalloc logging commit f87609ad8d9d974962c49c0c9c0eeca8017b7133 Author: Squirrel <gilescope@gmail.com> Date: Tue Jun 1 10:26:10 2021 +0100 Reduce cargo doc warnings (#8947) Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> commit da051b11ce46a00c1b5d53401ee69ad7ddae355f Author: Keith Yeung <kungfukeith11@gmail.com> Date: Tue Jun 1 02:23:41 2021 -0700 Allow usage of path in construct_runtime! (#8801) * Allow usage of path in construct_runtime! * Fix whitespace * Fix whitespace * Make expand_runtime_metadata accept slice instead of Iterator * Include Call and Event in construct_runtime for testing * Migrate impl_outer_event to proc macro * Fix integrity_test_works * Update UI test expectations * Factor in module path while generating enum variant or fn names * Use ParseStream::lookahead for more helpful error messages * Remove generating outer_event_metadata * Ensure pallets with different paths but same last path segment can coexist * Remove unnecessary generated function * Migrate decl_outer_config to proc macro * Add default_filter test for expand_outer_origin * Allow crate, self and super keywords to appear in pallet path * Add UI test for specifying empty pallet paths in construct_runtime commit 7ba4e4ced0c0ed4ce8ccba6b36f6d53d7de3db89 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 31 18:40:36 2021 +0000 Bump getrandom from 0.2.2 to 0.2.3 (#8952) Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.2.2 to 0.2.3. - [Release notes](https://github.com/rust-random/getrandom/releases) - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/getrandom/compare/v0.2.2...v0.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 25388397aab20a24e2be55103dda95011aa04d7c Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Mon May 31 20:17:56 2021 +0200 Add deserialize for TransactionValidityError in std. (#8961) * Add deserialize for TransactionValidityError in std. * Fix derives commit 6d43761487c36b0b1d3fff0d538d134d0620ce04 Author: Bastian Köcher <bkchr@users.noreply.github.com> Date: Mon May 31 20:17:15 2021 +0200 Optimize `next_storage_key` (#8956) * Optimize `next_storage_key` - Do not rely on recursion - Use an iterator over the overlay to not always call the same method * Fix bug commit fc29e14efd84d34ef4362b9671300611fb41b52b Author: Roman Proskuryakov <humbug@deeptown.org> Date: Mon May 31 16:05:50 2021 +0000 Refactor code a little bit (#8932) commit 61aa8dc17d2bdde36f0c0e1078cde5b79408cb62 Author: Seun Lanlege <seun@parity.io> Date: Mon May 31 16:31:47 2021 +0100 Use correct CreateInherentDataProviders impl for manual seal (#8852) * use correct CreateInherentDataProviders impl for manual seal * add babe inherent provider * move client into factory fn commit 87e63fa7c70be29383cb95ff52d71874f1db908a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 31 07:39:35 2021 +0000 Bump retain_mut from 0.1.2 to 0.1.3 (#8951) Bumps [retain_mut](https://github.com/upsuper/retain_mut) from 0.1.2 to 0.1.3. - [Release notes](https://github.com/upsuper/retain_mut/releases) - [Commits](https://github.com/upsuper/retain_mut/compare/v0.1.2...v0.1.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 88021e9db4d2e4f2bf88121f1eaace5b7cf640cf Author: Shaun Wang <spxwang@gmail.com> Date: Mon May 31 17:57:20 2021 +1200 Migrate pallet-scored-pool to pallet attribute macro (#8825) * Migrate pallet-scored-pool to pallet attribute macro. * Remove dummy event. * Apply review suggestions. commit be1b8ef0eefd6e8fbc7abb3d33262d139277da13 Author: Gavin Wood <gavin@parity.io> Date: Sat May 29 11:17:26 2021 +0100 Session key should be settable at genesis even for non-endowed accounts (#8942) * Session key should be settable at genesis even for non-endowed accounts * Docs commit 6aaa03130da8abbe7c0aa5cf4c3f10557713f9d6 Author: Alexander Theißen <alex.theissen@me.com> Date: Sat May 29 11:58:26 2021 +0200 Make `Schedule` fields public to allow for customization (#8924) * Make `Schedule` fields public for customization * Fix doc typo Co-authored-by: Andrew Jones <ascjones@gmail.com> Co-authored-by: Andrew Jones <ascjones@gmail.com> commit ac277db0f5467187a5f54a27c01851a59e791961 Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Sat May 29 06:20:25 2021 +0200 make remote ext use batch ws-client (#8916) * make remote ext use batch ws-client * Add debug log for key length * better assertions * new sanity_checl * try and make it work with batch * update test * remove exctra uri * add missing at * remove unused rpc stuff * improve Co-authored-by: emostov <32168567+emostov@users.noreply.github.com> commit 4b99c7fef5b6baa9fc10cf3304d36fd453554154 Author: Sebastian Müller <sebastian@web3.foundation> Date: Fri May 28 23:32:00 2021 +0200 weather -> whether (#8938) commit 6a63f282a5c0fb608569137ed464a23583d2d7de Author: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Fri May 28 21:22:49 2021 +0200 remove duplicate Issued/Burned events (#8935) commit 050e4ace716b24df43b5742e44773f5c11b16538 Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Fri May 28 14:35:15 2021 -0400 Simple `MaxBoundedLen` Implementations (#8793) * implement max_values + storages info * some formatting + doc * sudo sanity check * timestamp * assets (not working) * fix assets * impl for proxy * update balances * rename StoragesInfo -> PalletStorageInfo * merge both StorageInfoTrait and PalletStorageInfo I think it is more future proof. In the future some storage could make use of multiple prefix. Like one to store how much value has been inserted, etc... * Update frame/support/procedural/src/storage/parse.rs Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Update frame/support/procedural/src/storage/storage_struct.rs Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * Fix max_size using hasher information hasher now expose `max_len` which allows to computes their maximum len. For hasher without concatenation, it is the size of the hash part, for hasher with concatenation, it is the size of the hash part + max encoded len of the key. * fix tests * fix ui tests * Move `MaxBoundedLen` into its own crate (#8814) * move MaxEncodedLen into its own crate * remove MaxEncodedLen impl from frame-support * add to assets and balances * try more fixes * fix compile Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * nits * fix compile * line width * fix max-values-macro merge * Add some derive, needed for test and other purpose * use weak bounded vec in some cases * Update lib.rs * move max-encoded-len crate * fix * remove app crypto for now * width * Revert "remove app crypto for now" This reverts commit 73623e9933d50648e0e7fe90b6171a8e45d7f5a2. * unused variable * more unused variables * more fixes * Add #[max_encoded_len_crate(...)] helper attribute The purpose of this attribute is to reduce the surface area of max_encoded_len changes. Crates deriving `MaxEncodedLen` do not need to add it to `Cargo.toml`; they can instead just do ```rust \#[derive(Encode, MaxEncodedLen)] \#[max_encoded_len_crate(frame_support::max_encoded_len)] struct Example; ``` * fix a ui test * use #[max_encoded_len_crate(...)] helper in app_crypto * remove max_encoded_len import where not necessary * update lockfile * fix ui test * ui * newline * fix merge * try fix ui again * Update max-encoded-len/derive/src/lib.rs Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> * extract generate_crate_access_2018 * Update lib.rs * compiler isnt smart enough Co-authored-by: thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by: Peter Goodspeed-Niklaus <peter.r.goodspeedniklaus@gmail.com> commit c2ec5bc8f12bb5a084b976f2dc1280796e9c1b23 Author: Alexander Theißen <alex.theissen@me.com> Date: Fri May 28 13:06:16 2021 +0200 Bump parity-wasm and pwasm-utils to the newest versions everywhere (#8928) commit 426d57b0a0c2f407fade5ea204bd133e76956404 Author: Alexander Theißen <alex.theissen@me.com> Date: Fri May 28 11:33:22 2021 +0200 Fix check runtime CI (#8930) * Fix check_runtime.sh script * contracts: Remove confusing "Related Modules" doc commit 925f170d1a1f588cf61d7a366c2d744dd16392a6 Author: MOZGIII <mike-n@narod.ru> Date: Thu May 27 23:32:22 2021 +0300 More sc-service config reexports (#8887) * Reexport ExecutionStrategies and ExecutionStrategy * Reexport more of the network * Reexport the ExecutionStrategy as it's used within ExecutionStrategies commit 27cc30e88788f6b423d790e34ca39ad0d7fa4219 Author: Denis Pisarev <denis.pisarev@parity.io> Date: Thu May 27 20:31:29 2021 +0200 CI: fix simnet trigger (#8927) * CI: chore * CI: pin simnet version commit 14fcad989c168e34c494ac752a7f40ff8f627dcc Author: Roman Proskuryakov <humbug@deeptown.org> Date: Thu May 27 12:54:37 2021 +0000 Remove: (#8748) * `NetworkStatusSinks` * `sc_service::SpawnTasksParams::network_status_sinks` Also: * `sc_service::build_network()` does not return `network_status_sinks` commit 1cbf0e16832eca5e0733d65279872ce79ddfe9f2 Author: Shawn Tabrizi <shawntabrizi@gmail.com> Date: Thu May 27 01:52:05 2021 -0400 Fix Compiler Warnings (new rustc) (#8907) * unused mmr * more unused * dyn in executor * remove `doc(inline)` * fix dyn for sp-api-test * update benchmarks * Update primitives/core/benches/bench.rs * Update primitives/core/benches/bench.rs * update another bench * fix benchmark? Co-authored-by: adoerr <0xad@gmx.net> commit 25db73e7e44b1507c3dc8834e6219da20ba2fc50 Author: Keith Yeung <kungfukeith11@gmail.com> Date: Wed May 26 16:22:35 2021 -0700 Convert impl_key_prefix_for to proc macro (#8844) * Convert impl_key_prefix_for to proc macro * Reduce the number of let bindings * Remove parsing of inputs for impl_key_prefix_for_tuples * Replace unwrap with expect * Remove unnecessary array of idents * Use numeric identifiers * Simplify ident generation * Fix whitespacing * Add documentation for impl_key_prefix_for_tuple proc macro Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> commit 69e2e0b536cea67f1c7a12c2b3709102ffa63d80 Author: Shumo Chu <stechu@users.noreply.github.com> Date: Wed May 26 13:58:41 2021 -0700 Manta Network ss58 address registration (#8706) * manta network ss58 address registration * minor commit af69a8f8890dc4e411baa00fdbc9f9d35736cdf6 Author: Jakub Pánik <jakub.panik@gmail.com> Date: Wed May 26 19:47:56 2021 +0100 Add Basilisk ss58 (#8882) commit 15731fec6d9e835e4f67b0399894672f4c81798e Author: Jon Häggblad <jon.haggblad@gmail.com> Date: Wed May 26 18:26:15 2021 +0200 Migrate pallet-grandpa to attribute macros (#8724) * frame/grandpa: migrate Config * frame/grandpa: migrate decl_module * frame/grandpa: migrate decl_event * frame/grandpa: migrate decl_error * frame/grandpa: migrate decl_storage * frame/grandpa: make report_equivocation_unsigned pub(super) * frame/grandpa: remove unused imports * frame/grandpa: replace deprecated Module with Pallet * frame/grandpa: add RawEvent for compatibility * frame/grandpa: create migration to new storage prefix * frame/grandpa: bump version to 4.0.0 * frame/grandpa: address review comments * Try using version 3.1 instead * frame/grandpa: tweak log text to say cancelled commit 1f3a89090aecff1aa532c54e78d3fa4eec564b01 Author: Denis Pisarev <denis.pisarev@parity.io> Date: Wed May 26 13:51:28 2021 +0200 Revert "Fix stderr in new Rust nightly (#8904)" (#8910) This reverts commit c46ffcc6882c58c8e9d76584712841cf94899e36. commit de95ba50d10683d8aaaad351b6ce0cd3339c9f6f Author: André Silva <123550+andresilva@users.noreply.github.com> Date: Wed May 26 12:33:11 2021 +0100 grandpa: enable light clients to participate in gossip (#8796) * network: allow gossiping to light clients * grandpa: gossip global messages to light clients * grandpa: don't send neighbor packets to light clients * grandpa: fix tests * grandpa: export run_grandpa_observer * node: run grandpa observer on light client * node: start network at end * Use wasm_timer in finality-grandpa Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com> commit cb308ac8d289b3089560a61a2bb6b6093af26f53 Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Wed May 26 10:49:45 2021 +0200 add an absolute measure of election score on-chain as a parameter (#8903) * add an absolute measure of election score on-chain as a parameter * make it storage item * line width * some nits * Apply suggestions from code review Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * make a few more things pub Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> commit 2c713b5f6a42bda48f6b482c375c8e9df4595d03 Author: MOZGIII <mike-n@narod.ru> Date: Wed May 26 10:16:53 2021 +0300 Convert Into to From to make clippy happy (#8900) commit 7fe74c4563a02a37b8546a378625e8fee1e8056b Author: Alexander Theißen <alex.theissen@me.com> Date: Wed May 26 00:29:55 2021 +0200 contracts: Fix some minor bugs around instantiation (#8879) * Fix output of wrongly outputted error The "Tombstoned a contract that is below the subsistence threshold: {:?}" was triggered when too few balance was provided. It was a false alarm. * Fix return of wrong code_len * Split up `NotCallable` into more fine grained errors * Fix typos in docs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * RentNotPayed -> RentNotPaid * Fix typo: payed -> paid It is OK to change the in-storage field name because: 1. The SCALE encoding is not based on names only on position. 2. The struct is not public (only to the crate). Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> commit 1305ec84b7789f5eee120913ed94dd17a1e5a76f Author: Denis Pisarev <denis.pisarev@parity.io> Date: Tue May 25 23:01:00 2021 +0200 Fix build job (#8905) * CI: fix node-template packaging * add explicit deps versions commit c46ffcc6882c58c8e9d76584712841cf94899e36 Author: Denis Pisarev <denis.pisarev@parity.io> Date: Tue May 25 22:58:42 2021 +0200 Fix stderr in new Rust nightly (#8904) * CI: revert me * fix stderr * CI: revert me * typo * more stderr fixes * Revert "CI: revert me" This reverts commit 5f47effc4965fa5c0c2a6ed92e434a6adb6b1dce. * Revert "CI: revert me" This reverts commit 7f785660c797b703dd36272cbe313056dd7a1858. commit 9eac3bfaab3e931e52903534ad9a3ba14d689f66 Author: Frederik Schulz <mustermeiszer@posteo.de> Date: Tue May 25 21:50:12 2021 +0200 Removes unnecessary blank impl for Backend (#8897) * Removes unnecessary blank impl for Backend This commit removes a from my perspective unneccessary implementation for &T which implement Backend. The current implementation exists (again from my perspective) solely to satisfy a methods &mut self parameters (i.e. allows to satisfy this for an & reference via using &mut &Backend). As all implementors use a RefCell with borrow_mut() where actually calling the mentioned &mut self method and then forwad to the {} implementation of either TrieBackend or ProvingBackend, the current &mut self seems to be not needed. * Fixed tests client commit fb90219bffdead9278b6a7880bebf676e5a071af Author: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Tue May 25 20:00:50 2021 +0200 make remote-ext work with ws and safe RPCs (#8889) * make remote-ext work with ws and safe RPCs * Update docs. * Update utils/frame/remote-externalities/Cargo.toml Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * Fix test * Update lock file * Update utils/frame/remote-externalities/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Fix build again. * revert lifetime stuff Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
AndreiNavoichyk
pushed a commit
to Cerebellum-Network/pos-network-node
that referenced
this pull request
Sep 9, 2022
This instructs the Aura runtime api to skip initialize block, when requesting the authorities. This is important, as we don't want to use the new authorities that should be used from the next block on. Besides that, it removes the caching stuff. The cache is not available on full nodes anyway. In the future we should store the authorities probably in the aux store.
bkchr
added a commit
that referenced
this pull request
Oct 13, 2022
In #9132 we changed the way how we get the authorities from the runtime. Before this mentioned pr we would call `initialize_block` before calling the authorities runtime function. The problem with this was that when you have a block X that would switch the authority set, it would already be signed by an authority of the new set. This was wrong, as a block should only be signed by the current authority set. As this change is a hard fork, this pr brings back the possibility for users that have a chain running with this old logic to upgrade. They will need to use: ``` CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future } ``` Using this compatibility mode will make the node behave like the old nodes, aka calling `initialize_block` before doing the actual runtime call to `authorities`. Then when the given `until` block is being build/imported the node switches to the new behaviour of not calling `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a point where all nodes in the network have upgraded.
paritytech-processbot bot
pushed a commit
that referenced
this pull request
Oct 28, 2022
* Aura: Adds some compatibility mode to support old chains In #9132 we changed the way how we get the authorities from the runtime. Before this mentioned pr we would call `initialize_block` before calling the authorities runtime function. The problem with this was that when you have a block X that would switch the authority set, it would already be signed by an authority of the new set. This was wrong, as a block should only be signed by the current authority set. As this change is a hard fork, this pr brings back the possibility for users that have a chain running with this old logic to upgrade. They will need to use: ``` CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future } ``` Using this compatibility mode will make the node behave like the old nodes, aka calling `initialize_block` before doing the actual runtime call to `authorities`. Then when the given `until` block is being build/imported the node switches to the new behaviour of not calling `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a point where all nodes in the network have upgraded. * Fixes * Make docs ready * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * FMT Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
devdanco
added a commit
to gasp-xyz/substrate
that referenced
this pull request
Feb 14, 2023
* BlockId removal: refactor: ProofProvider (#12519) * BlockId removal: refactor: ProofProvider It changes the arguments of methods of `ProofProvider` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * LightClientRequestHandler: excessive BlockIdTo bound removed * imports cleanup * formatting * args tyeps cleanup * registrar: Avoid freebies in provide_judgement (#12465) * evaluate repatriate reserved error in pallet identity * fix benchmarks * add repatriate reserved error test * benchmark fix * undo lock * include balance to use for benchmarks * rename test * Update frame/identity/src/benchmarking.rs * Update frame/identity/src/benchmarking.rs Co-authored-by: Bastian Köcher <git@kchr.de> * EPM: allow duplicate submissions (#12237) * allow for duplicate signed submissions * Fix a bunch of things, seems all good now * fmt * Fix * Update frame/election-provider-multi-phase/src/signed.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update frame/election-provider-multi-phase/src/signed.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * add migratin * fmt * comment typo * some review comments * fix bench Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by: Ross Bulat <ross@parity.io> * CI check against Rust feature bleed (#12341) * CI check for rust feature bleed Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cargo not available Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Handle missing programs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Check for deps Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add doc Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use correct CI image Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove --offline Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Install cargo-workspaces Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove cargo-workspaces dep Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix try-runtime feature Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix more features... Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use pipeline-script Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * 🤡 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make stupid change to test the CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * This reverts commit ad2746aa117fa7cb473521113a9bec89aaf26484. * Use correct branch Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Allow failure Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make stupid change to test the CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Make stupid change to test the CI" This reverts commit 16ec00e1675c7ec57c988315549ff71e832a3093. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * contracts: Decrease the interation count on slow benchmarks (#12526) * Decrease amount of benchmark iterations for long slow ones * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts Co-authored-by: command-bot <> * BlockId removal: refactor: Finalizer (#12528) * BlockId removal: refactor: Finalizer It changes the arguments of methods of `Finalizer` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * minor corrections * failing test corrected * minor rework * BlockId removal: refactor: BlockImportOperation+Bknd::finalize_block (#12535) * BlockId removal: refactor: BlockImportOperation+Bknd::finalize_block It changes the arguments of methods of `BlockImportOperation` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash` `Backend::finalize_block` was also changed. This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * Review suggestion applied thx to @davxy * trigger CI job * Remove multiple DHTs support from `Discovery` (#12524) * CI: Enable debug assertions in Wasmer sandbox test (#12540) * CI: Enable debug assertions in Wasmer sandbox test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix feature dependant import Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Force base weights to be the minimum only when the intercept is negative (#12482) * Force base weights to be the minimum only when the intercept is negative; emit minimum execution times * Add an `assert` making sure the intercept is zero when it's supposed to be zero * Fix template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/bench-bot.sh" pallet dev pallet_assets * ".git/.scripts/bench-bot.sh" pallet dev pallet_uniques 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: command-bot <> * Add `DefensiveTruncateFrom` (#12515) * Add DefensiveTruncateFrom Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Map_err in preimage Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Map_err in beefy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make test dependant in debug-assertions Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <> * Refactor service tests in `sc-network` (#12517) * Refactor service tests in `sc-network` Create a separate directory for the tests and move common network instantion related code to `mod.rs` from where it can be used by both service and chainsync tests. Use the builder pattern when creating the `TestNetwork` object to reduce code duplication between the test files. * Update client/network/src/service/tests/mod.rs Co-authored-by: Dmitrii Markin <dmitry@markin.tech> Co-authored-by: Dmitrii Markin <dmitry@markin.tech> Co-authored-by: parity-processbot <> * Actually fix major sync detection (#12114) * Actually fix major sync detection * Introduce `SyncState::Importing` state * Add target to SyncState enum variants and add `is_major_syncing` method on it * Remove unnecessary duplicated `best_seen_block` from `SyncState` struct * Revert "Remove unnecessary duplicated `best_seen_block` from `SyncState` struct" This reverts commit bb8abd458c939881c049f69d59f3acba47c97c5c. * Add missing `websocket` feature to `libp2p` Co-authored-by: parity-processbot <> * BlockId removal: refactor: Backend::begin_state_operation (#12541) It changes the arguments of `Backend::begin_state_operation` from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * use headers on templates (#12546) * Make `NetworkService` callable for `ChainSync` (#12542) Introduce a middleware called `NetworkServiceProvider` which the `ChainSync` can use to communicate with `NetworkService`. `ChainSync` is given a `NetworkServiceHandle` which it uses to call `NetworkServiceProvider` which then dispatches the calls to `NetworkService` on behalf of `ChainSync`. This change will allow `ChainSync` to disconnect and report peers and in the future it'll be possible to send requests and notifications through the `NetworkServiceProvider`. `NetworkServiceProvider` is needed only until the `ChainSync` object has been removed from `Protocol`. After that, a normal `NetworkService` handle can be passed onto `ChainSync` and these changes can be deprecated. Co-authored-by: parity-processbot <> * Base Kademlia protocol name on genesis hash and fork ID (#12545) * contracts: Allow indeterministic instructions off-chain (#12469) * Allow indetermistic instructions off-chain * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * fmt Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Normalize keystore type and its usage across tests (#12553) * Normalize keystore type and usage across tests * Extract peer index from array index * Update template pallet to latest enum syntax (#12552) * feat: generalize some functions in sp-trie (#12376) * feat: add to_memory_db to StorageProof * feat: add iter method and generalize iter_nodes * fmt * feat: generalize `encode_compact` like `decode_compact`, add to_compact_proof to StorageProof * fix to_compact_proof * improve by suggestions * improve by suggestions Co-authored-by: Bastian Köcher <git@kchr.de> * Make Multisig Pallet Bounded (#12457) * Bounded multisig * just use u32 Co-authored-by: parity-processbot <> * Fix error during build: failed to run custom build command for sc-network-bitswap (#12494) * Update `pallet-multisig` benches (#12558) * Typo Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/bench-bot.sh" pallet dev pallet_multisig * remove functions * ".git/.scripts/bench-bot.sh" pallet dev pallet_multisig Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * [ci] cargo-check-benches against different base branches (#12557) * Fix typo (#12571) * replaced println with log Closes #12338 (#12348) * replaced println with log Closes #12338 * fixed println * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * Update utils/frame/benchmarking-cli/src/pallet/command.rs * Apply suggestions from code review * ".git/.scripts/fmt.sh" 1 Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <> * Aura: Adds some compatibility mode to support old chains (#12492) * Aura: Adds some compatibility mode to support old chains In https://github.com/paritytech/substrate/pull/9132 we changed the way how we get the authorities from the runtime. Before this mentioned pr we would call `initialize_block` before calling the authorities runtime function. The problem with this was that when you have a block X that would switch the authority set, it would already be signed by an authority of the new set. This was wrong, as a block should only be signed by the current authority set. As this change is a hard fork, this pr brings back the possibility for users that have a chain running with this old logic to upgrade. They will need to use: ``` CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future } ``` Using this compatibility mode will make the node behave like the old nodes, aka calling `initialize_block` before doing the actual runtime call to `authorities`. Then when the given `until` block is being build/imported the node switches to the new behaviour of not calling `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a point where all nodes in the network have upgraded. * Fixes * Make docs ready * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * FMT Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * bump ed25519-zebra; fixes `full_crypto` feature flag in `no_std` (#12576) * Utility: add more tests for batch/batchAll/forceBatch (#12506) * Utility: add more tests for batch/batchAll/forceBatch * remove unnecessary * batch works with council * add more tests * better call examples * shorter code * Update frame/utility/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/utility/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/utility/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * update TestBaseCallFilter * fix * fix? * fix Co-authored-by: Bastian Köcher <git@kchr.de> * Treat near-zero intercept values as zero when calculating weights (#12573) * Treat near-zero intercept values as zero when calculating weights * Simplify comparison Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update contract weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * [Enhancement] Convert fast-unstake to use StakingInterface, decouplin… (#12424) * [Enhancement] Convert fast-unstake to use StakingInterface, decoupling it from Staking * Update primitives/staking/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update primitives/staking/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * fix validator comment * remove todo * ideas from Kian (#12474) Co-authored-by: kianenigma <kian@parity.io> * Rename StakingInterface -> Staking for nomination-pools * Staking fixes * StakingInterface changes * fix fast-unstake * fix nomination-pools * Fix fast-unstake tests * Fix benches for fast-unstake * fix is_unbonding * fix nomination pools * fix node code * add mock comments * fix imports * remove todo * more fixes * more fixes * bench fixes * more fixes * more fixes * import fix * more fixes * more bench fix * refix * refix * Update primitives/staking/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * is_unbonding returns a result * fix * review fixes * more review fixes * more fixes * more fixes * Update frame/fast-unstake/src/benchmarking.rs Co-authored-by: Squirrel <gilescope@gmail.com> * remove redundant CurrencyBalance from nom-pools * remove CB * rephrase * Apply suggestions from code review * Update frame/nomination-pools/src/tests.rs * finish damn renamed * clippy fix * fix Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Squirrel <gilescope@gmail.com> * nomination-pools: allow pool-ids to be reused (#12407) * initial * logic check * do_create * cargo fmt * fixes * ensure_signed * update * cargo fmt * remove unused import * WIP: Replace `wasm-gc` with `wasm-opt` (#12280) * Use wasm-opt on runtime * Optimize for size * Simplify fn compact_wasm_file * Run a lighter pass for non production builds * Disable optimizations and keep name section * Update wasm-opt * Remove dward sections * Update wasm-opt * Update wasm-opt * Use minimum_nominator_bond instead of nominator_bond (#12585) Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * BlockId removal: refactor: Backend::append_justification (#12551) * BlockId removal: refactor: Backend::append_justification It changes the arguments of `Backend::append_justification` from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of `BlockId::Number` refactoring analysis (paritytech/substrate#11292) * Error message improved Co-authored-by: Adrian Catangiu <adrian@parity.io> * single error message in beefy::finalize * println removed Co-authored-by: Adrian Catangiu <adrian@parity.io> * fix some typos (#12584) * Added test for Client::block (#12590) * client/beefy: fix incorrect BEEFY justifications import test (#12593) Signed-off-by: Adrian Catangiu <adrian@parity.io> * BlockId removal: refactor: Backend::body (#12587) It changes the arguments of `Backend::body` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) Co-authored-by: parity-processbot <> * fix: construct_runtime multiple features (#12594) * fix: construct_runtime multiple features * Update frame/support/procedural/src/construct_runtime/mod.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Fix fungible unbalanced trait (#12569) * Fix fungible unbalanced trait * Add simple decrease_balance test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix decrease_balance_at_most * Fix decrease_balance_at_most in fungibles * Rename free_balanceto balance_on_free * Use reducible_balance instead of balance_on_free Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * [ci] allow fail skip-if-draft job (#12604) * BlockId removal: refactor: Backend::justifications (#12602) * BlockId removal: refactor: Backend::justifications It changes the arguments of `Backend::justifications` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * trigger CI job * trigger CI job * bug fix * match -> if Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Adrian Catangiu <adrian@parity.io> * use associated iterator types for InspectEnumerable (#12389) * use associated iterator types for InspectEnumerable * Update frame/uniques/src/impl_nonfungibles.rs Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <git@kchr.de> * Add map and try_map methods (#12581) Co-authored-by: parity-processbot <> * stabilize 4 storage host funcs (#12611) * Collective benchmark respects DefaultVote configuration (#12612) * Collective benchmark respects DefaultVote configuration * ".git/.scripts/bench-bot.sh" pallet dev pallet_collective Co-authored-by: command-bot <> * BlockId removal: refactor: Backend::block_indexed_body (#12609) * BlockId removal: refactor: Backend::block_indexed_body It changes the arguments of `Backend::block_indexed_body` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * trigger CI job * Introduce DefensiveMin and DefensiveMax (#12554) * traits for defensive min and defensive max * defensive min and strict min with tests * defensive max and strict max with tests * include docs * implement partial ord on defensive min and max * Update frame/support/src/traits/misc.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * wrap lines * Fix traits Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/support/src/traits/misc.rs * Update frame/support/src/traits/misc.rs 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: parity-processbot <> * pallet-sudo: add `CheckOnlySudoAccount` signed extension (#12496) * pallet-sudo: add `CheckSudoKey` signed extension Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Rename CheckSudoKey => CheckOnlySudo Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Rename extension name and Add some docs * Apply review suggestions * Update frame/sudo/src/extension.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Update frame/sudo/src/extension.rs Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * Move Throughput into `sc-sysinfo` (#12368) * move Throughput to sc-sysinfo * replace u64 * fix in tests * change Throughput * refactored Throughput * fixes * moved tests & fixes * custom serializer * note * fix serializer * forgot to remove * deserialize * functioning deserialization :) * try to make clipply happy * Serialize as function * test HwBench * rename * fix serialization * deserialize as function * unused import * move serialize/deserialize * don't serialize none * remove nonsense * remove nonsense comment :P * fixes * remove all the todos * return enum * fixes * fix nit * improve docs & readability * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix all the nits * rename * fix * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * remove unit from serialization * Update utils/frame/benchmarking-cli/src/machine/hardware.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Bump `k256` from `0.10.4` to `0.11.4` (#12085) * Bump `k256` from `0.10.4` to `0.11.4` * Update Cargo.lock * Update Co-authored-by: Bastian Köcher <info@kchr.de> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Guard some invalid node for proof decoding. (#12417) * Guard some invalid node for proof decoding. * only forbid bitmap with no children. * change format * scale error. * small test Co-authored-by: parity-processbot <> * Bump regex from 1.5.5 to 1.6.0 (#12117) Bumps [regex](https://github.com/rust-lang/regex) from 1.5.5 to 1.6.0. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.5.5...1.6.0) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: parity-processbot <> * Make `--db` case insensitive again (#12630) This was broken in the switch to Clap v4. * txpool: enactment state forced update (#12632) * txpool: enactment state forced update When `tree_route` computation fails, we still need to update the `enactment_state` to be aligned with last known finalized/best block. We do not execute enactment phase of maintain procedure, but we do update the state. * error -> debug * test added * Add pallet dev mode (#12536) * stub for construct_dev_runtime! * revert * stub for dev_mode proc macro * preliminary docs for pallet::dev_mode (attribute) proc macro * add dev_mode to pallet_macros module * add docs item for dev_mode to frame_support * parsing of #[pallet(dev_mode)] * strip out dev_mode stub since it will be an arg for pallet instead * make pallet Def struct aware of dev mode * WIP * revert changes to call.rs * pass dev_mode to pallet parsing code * auto-specify default weights when in dev mode if not specified * add proof / expect for syn::parse in dev mode weight processing * set all storages to unbounded when in dev mode * just use 0 Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * add invalid pallet arg test * add passing dev mode pallet test * add test confirming that dev mode features only work in dev mode * cargo fmt + clean up * bump CI * fix pallet ui test * add docs for dev mode * add warning about using dev mode in production circumstances * remove comment about no other attributes being supported * fix unneeded assignment * make warning more explicit * more explicit warning about using dev mode in production * simpler assignment for dev_mode boolean Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * add note about MEL requirement Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * add comment specifying why weights can be omitted in example Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * tweak wording of comments * bump ci Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * BlockId removal: &Hash to Hash (#12626) It changes &Block::Hash argument to Block::Hash. This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * Do not update peer information if ancestor search is in progress (#12631) * Do not update peer information if ancestor search is in progress If block announcement is received from a peer while ancestor search for that same peer is still in progress, do not update the peer's best hash and best number as that causes the ancestor search to yield different information from what was expected and can cause, for example, a fork of lower height not be be downloaded. * Block until peers are in sync * Pipeline with ci image with rust 1.65 (#12628) * Pipeline with ci image with rust 1.65 * fix tests * use image with sha * `sp_trie::Recorder`: Fix recording the same key for different tries (#12636) With `StateVersion::V1` values over a certain size are not inlined and being put into the backend with their own hash. When accessing a value in the trie with a recorder, we check if the value is maybe already recorded and thus, we can check the cache. To check if a value is already recorded, we use the key of the value to differentiate them. The problem is when there are multiple tries, like multiple child tries that all have different values under the same key. Before this pull request we didn't have differentiated for which trie we already had recorded a (key, value) pair. This is now done by also taking the storage root into account in the recorder to differentiate the different (key, value) pair in the tries. * Fix UI tests (#12642) * `payment_queryInfo`: Make it work with `WeightV2` (#12633) * `payment_queryInfo`: Make it work with `WeighV2` The runtime api for querying the payment info depends on the `Weight` type and broke for old runtimes that still use the `WeighV1`. This pull requests fixes this by: 1. Bumping the version of the runtime api. 2. Making the node side code use the correct runtime api function depending on the version of the runtime api. 3. Make the RPC always return `WeighV1`. Users of the api should switch to `state_call` and decide based on the version of the runtime api which `Weight` type is being returned. * Fix tests * Review comment * State-db refactoring (#12239) * Prune discarded blocks immediately * state-db refactoring part 1 * Some renames * Get rid of pending state * Revert "Prune discarded blocks immediately" This reverts commit 790f54038b52ff379a573ed0806f38d09af098ec. * Cleanup * Make clippy happy * Minor changes * Remove duplicate units (#12634) Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add batching to fast-unstake pallet (#12394) * implement a brand new batch with all tests passing. * fix benchmarks as well * make benchmarks more or less work * fix migration * add some testing * Update frame/fast-unstake/src/benchmarking.rs Co-authored-by: Roman Useinov <roman.useinov@gmail.com> * review comments * some fixes * fix review comments * fix build * fmt * fix benchmarks * fmt * update Co-authored-by: Roman Useinov <roman.useinov@gmail.com> * [ci] Use ci-linux:production image in ci (#12648) * New Weights for All Pallets (#12325) * new weights for everything * fix * fmt * new batch * fmt * new batch * Update run_all_benchmarks.sh * add headers * update weights * Update lib.rs * block and extrinsic weight * Remove partial key size limit from trie codec (#12566) * remove size limit from trie codec * test previous upper limit is not enforced anymore * fmt * restore test * Keep the same name (#12616) Co-authored-by: x <x@localhost.localdomain> * Do not finalize parent twice (#12653) If the parent block is alread finalized, we don't need to do this again. * update paritydb and remove dev deps on rocksdb (#12641) * update paritydb and remove dev deps on rocksdb * feature rocksdb for node testing * feature decl in node-bench * revert change to rocksdb inclusion logic * Update bin/node/bench/Cargo.toml Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <git@kchr.de> * Epoch-Changes tree pruning was lagging by one epoch (#12567) * Remove all not required nodes from the epoch-changes tree Some outdated nodes were left there because of the predicate * Test to excercise the fix * Add a fork on genesis to the test * Fix typo in comments * Bound Election and Staking by MaxActiveValidators (#12436) * bounding election provider with kian * multi phase implement bounded election provider * election provider blanket implementation * staking compiles * fix test for election provider support * fmt * fixing epmp tests, does not compile yet * fix epmp tests * fix staking tests * fmt * fix runtime tests * fmt * remove outdated wip tags * add enum error * sort and truncate supports * comment * error when unsupported number of election winners * compiling wip after kian's suggestions * fix TODOs * remove,fix tags * ensure validator count does not exceed maxwinners * clean up * some more clean up and todos * handle too many winners * rename parameter for mock * todo * add sort and truncate rule if there are too many winners * fmt * fail, not swallow emergency result bound not met * remove too many winners resolution as it can be guaranteed to be bounded * fix benchmark * give MaxWinners more contextual name * make ready solution generic over T * kian feedback * fix stuff * Kian's way of solvign this * comment fix * fix compile * remove use of BoundedExecution * fmt * comment out failing integrity test * cap validator count increment to max winners * dont panic * add test for bad data provider * Update frame/staking/src/pallet/impls.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * fix namespace conflict and add test for onchain max winners less than desired targets * defensive unwrap * early convert to bounded vec * fix syntax * fmt * fix doc * fix rustdoc * fmt * fix maxwinner count for benchmarking * add instant election for noelection * fmt * fix compile * pr feedbacks * always error at validator count exceeding max winners * add useful error message * pr comments * import fix * add checked_desired_targets * fmt * fmt * fix rust doc Co-authored-by: parity-processbot <> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update some dependencies to prune duplicated crates with different version (#12560) * sc-client-babe/sp-arithmetic-fuzzer: update num-bigint and num-rational to v0.4 * update lru 0.7.5 ==> v0.8.1 * pallet-example-offchain-worker: update lite-json v0.1.3 ==> v0.2.0 * update hyper 0.14.16 ==> 0.14.20, num-fromat 0.4.0 ==> 0.4.3 * pallet-mmr: update ckb-merkle-mountain-range v0.3.2 ==> v0.5.2 * update handlebars v4.2.2 ==> v4.3.5 * `runtime_cache_size` must always be at least 1 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * default cache size with .min(1) Signed-off-by: koushiro <koushiro.cqx@gmail.com> * update hyper 0.14.20 ==> 0.14.22 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * update lru 0.8.0 ==> 0.8.1 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Apply suggestions from code review * Apply suggestions from code review * Fix Cargo.lock Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <info@kchr.de> * Consolidate and deduplicate MMR API methods (#12530) * histor. batch proof: make best block arg optional * correct testing range * make generate_batch_proof stub for historical * merge generate_{historical_}batch_proof functions * merge generate_{batch_}proof functions * merge verify_{batch_}proof functions * merge verify_{batch_}proof_stateless functions * remove {Leaf}Proof Not utilized by API anymore, so superfluous. Removal consistent with prior changes to just use "batch" proof API. * rename BatchProof->Proof no need to qualify if only one universal proof type. * cleanup * expose verify_proof rpc api * document verify_proof * expose verify_proof_stateless rpc api * add optional BlockHash to mmr_root rpc api * fixup! expose verify_proof rpc api * fix documentation phrasing Co-authored-by: Adrian Catangiu <adrian@parity.io> * documentation grammar Co-authored-by: Adrian Catangiu <adrian@parity.io> * define mmr error msgs together with error enum Co-authored-by: Serban Iorga <serban@parity.io> * fixup! define mmr error msgs together with error enum * map decoding errors to CallError::InvalidParams Co-authored-by: Serban Iorga <serban@parity.io> * fixup! map decoding errors to CallError::InvalidParams Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Serban Iorga <serban@parity.io> * Bump ss58-registry from 1.29.0 to 1.34.0 (#12659) Bumps [ss58-registry](https://github.com/paritytech/ss58-registry) from 1.29.0 to 1.34.0. - [Release notes](https://github.com/paritytech/ss58-registry/releases) - [Changelog](https://github.com/paritytech/ss58-registry/blob/main/CHANGELOG.md) - [Commits](https://github.com/paritytech/ss58-registry/compare/v1.29.0...v1.34.0) --- updated-dependencies: - dependency-name: ss58-registry dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add `CreateOrigin` to Assets Pallet (#12586) * add CreateOrigin to Assets pallet * fix asset-tx-payment test * use AccountId > u64 in test * Update frame/assets/src/benchmarking.rs Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * `sp-runtime`: make `parity-util-mem` dependency optional (#12657) * `sp-runtime`: make `parity-util-mem` dependency optional * Use default-features = false for sp-runtime in sp-keyring * Remove parity-util-mem from sp-core * Cargo.lock * Restore default-features for keyring dependency * GrandpaJustification: Feature gate `Debug` (#12664) The grandpa crate is deriving `Debug` only when the `std` feature is enabled. `RuntimeDebug` can be forced to derive `Debug` also in `no_std` and that doesn't work together. So, we should feature gate `Debug` on `no_std`. * More testing and fuzzing and docs for pools (#12624) * move pools fuzzing to hongfuzz * merge more small fixes * fix all tests * Update frame/nomination-pools/fuzzer/src/call.rs Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com> * remove transactional * fmt * fix CI * fmt * fix build again * fix CI Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com> * Remove `sp_tasks::spawn` API and related code + host functions (#12639) * Remove `sp_tasks::spawn` API and related code * Remove `RuntimeTasks::{spawn, join}` host functions * remove unused * Remove a few more tests that I forgot to remove Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Contracts pallet: Bump Runtime API (#12677) * Fix typo (#12680) * Move `WeightCounter` to `sp-weights` (#12603) * Move WeightCounter to sp_weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename to WeightMeter and test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix pallet-scheduler for new usage Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update primitives/weights/src/weight_meter.rs Co-authored-by: David <dvdplm@gmail.com> * More tests for can_accrue Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Clippy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove defensive_accrue and fixup consumed_ratio I dont think there is a good use-case for defensive_accrue without saturation. Only in tests maybe, will remove for now until we have a use-case. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: David <dvdplm@gmail.com> Co-authored-by: Gavin Wood <gavin@parity.io> * Allow other pallets to check asset ids. (#12666) * Make it easier for other pallets to check asset ids. * Avoid boxing * cargo fmt * derive type info for some grandpa types (#12683) * Safe TreeRoute constructor (#12691) * Safe TreeRoute constructor * Remove test duplicate * Better tree route error info * New `root_testing` pallet (#12451) * Move fill_block to RootOffences * docs * new pallet * new line * fix * Update frame/root-testing/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/root-testing/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update bin/node/runtime/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/root-testing/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/root-testing/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/root-testing/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * fixes * problem solved * revert * fix dependency * hopefully making the CI happy * ... * dummy call * remove dummy * fix warning Co-authored-by: Bastian Köcher <git@kchr.de> * [ci] Add DAG for build-rustdoc and check-dependent-project (#12687) * [ci] Debug ci runner * try gha * allow mac jobs fail * add dags * install protoc * fix protobuf name * fix dags * remove allow fail for mac jobs * remove gha * adjust cargo-check-macos * Collective: Benchmark with greater `MaxProposals` (#12454) * Collective: Benchmark with greated * fix * remove bs * id_to_remark_data * fix * remove hardcoded * clean up * simplify * questionable renaming * better variable name * better solution * no need for large length * better solution * Update frame/collective/src/benchmarking.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix * test * remove test Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * [ci] fix buildah for publishing docker (#12703) * Make public is_passing and ReferendumStatus (#12667) * init * clean * remove manual getter for ReferendumStatus in favor of changing pub crate to pub for ReferendumStatus DecidingStatus Deposit types * rm status getters because fields are pub now * Asset Pallet: Support repeated destroys to safely destroy large assets (#12310) * Support repeated destroys to safely destroy large assets * require freezing accounts before destroying * support only deleting asset as final stage when there's no assets left * pre: introduce the RemoveKeyLimit config parameter * debug_ensure empty account in the right if block * update to having separate max values for accounts and approvals * add tests and use RemoveKeyLimit constant * add useful comments to the extrinsics, and calculate returned weight * add benchmarking for start_destroy and finish destroy * push failing benchmark logic * add benchmark tests for new functions * update weights via local benchmarks * remove extra weight file * Update frame/assets/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/assets/src/types.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update frame/assets/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * effect some changes from codereview * use NotFrozen error * remove origin checks, as anyone can complete destruction after owner has begun the process; Add live check for other extrinsics * fix comments about Origin behaviour * add AssetStatus docs * modularize logic to allow calling logic in on_idle and on_initialize hooks * introduce simple migration for assets details * reintroduce logging in the migrations * move deposit_Event out of the mutate block * Update frame/assets/src/functions.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Update frame/assets/src/migration.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * move AssetNotLive checkout out of the mutate blocks * rename RemoveKeysLimit to RemoveItemsLimit * update docs * fix event name in benchmark * fix cargo fmt. * fix lint in benchmarking * Empty commit to trigger CI * Update frame/assets/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/assets/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/assets/src/functions.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/assets/src/functions.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/assets/src/functions.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/assets/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/assets/src/functions.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * effect change suggested during code review * move limit to a single location * Update frame/assets/src/functions.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * rename events * fix weight typo, using rocksdb instead of T::DbWeight. Pending generating weights * switch to using dead_account.len() * rename event in the benchmarks * empty to retrigger CI * trigger CI to check cumulus dependency * trigger CI for dependent cumulus * Update frame/assets/src/migration.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * move is-frozen to the assetStatus enum (#12547) * add pre and post migration hooks * update do_transfer logic to add new assert for more correct error messages * trigger CI * switch checking AssetStatus from checking Destroying state to checking live state * fix error type in tests from Frozen to AssetNotLive * trigger CI * change ensure check for fn reducible_balance() * change the error type to Error:<T,I>::IncorrectStatus to be clearer * Trigger CI Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: parity-processbot <> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * `seal_reentrant_count` returns contract reentrant count (#12695) * Add logic, test, broken benchmark * account_entrance_count * Addressing comments * Address @agryaznov's comments * Add test for account_entrance_count, fix ci * Cargo fmt * Fix tests * Fix tests * Remove delegated call from test, address comments * Minor fixes and indentation in wat files * Update test for account_entrance_count * Update reentrant_count_call test * Delegate call test * Cargo +nightly fmt * Address comments * Update reentrant_count_works test * Apply weights diff * Add fixture descriptions * Update comments as suggested * Update reentrant_count_call test to use seal_address * add missing code * cargo fmt * account_entrance_count -> account_reentrance_count * fix tests * fmt * normalize signatures Co-authored-by: yarikbratashchuk <yarik.bratashchuk@gmail.com> * Assets Pallet: reintroduce fungibles::Destroy trait (#12708) * update docs formatting * reintroduce the destroy trait * copy changes from original PR * remove witness * Trigger CI * Trigger CI * release `sp-core 7.0.0` and `sp-runtime 7.0.0` (#12599) * chore(release): sp-core v7.0.0 * chore(release): sp-runtime v7.0.0 * fix bad merge * Release `sp-keyring` and `pallet-contracts-primitives` `7.0.0` (#12716) * Bump sp-keyring * Bump pallet-contracts-primitives * Cargo.lock * Fix `cargo check` for `pallet-contracts-proc-macro` (#12706) * fix `cargo check` for pallet-contracts-proc-macro * add test for cargo-check of pallet-contracts-proc-macro * remove cargo-check-contracts-proc-macro https://github.com/paritytech/substrate/pull/12706/files#r1022783937 * [ci] Improve pipeline stopper (#12717) * [ci] Improve pipeline stopper * break test-linux-stable 1/3 * break test-linux-stable 2/3 * break test-linux-stable 3/3 * break cargo-check-benches 1/2 * break cargo-check-benches 2/2 * fix benches * sc-chainspec: Switch to `assimilate_storage` (#12720) Before it was using `build_storage` and `assimilate_storage` was returning an error. However, there was no real reason for `assimilate_storage` to return an error. This pr implements `assimilate_storage` and uses the default `build_storage` of the trait. * [Cleanup] Remove obsolete event from fast-unstake (#12725) Trivial, just removing unused code. * [Fix] Deposit for fast-unstake has to be define as pallet::constant (#12729) Fixes https://github.com/paritytech/substrate/issues/12618 * Add event testing example to pallet template (#12722) Add an example of how to test for events into the example pallet. Right now, the information is pretty hard to find without looking into pallet tests or finding some particular posts on the stackoverflow. * Remove the `wasmtime` feature flag (#12684) * Remove the `wasmtime` feature flag * rustfmt * Fix the light client protocol protobuf schema (#12732) * Fix the light client protocol protobuf schema * Add another test * Remove unused protobuf struct * Ok you have to use the nightly rustfmt apparently * Update template to remove clippy warnings (#12670) * Update template to remove clippy warnings * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery * Update templates from child project This should remove clippy warnings on generated files * Update after review * Update frame-weight-template.hbs Commit suggestion * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery * Rerun linter on linked project Updates from child project * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery Co-authored-by: command-bot <> * Check all crates (#12709) * check all crates individually It's relevant to check workspace crates individually because otherwise their compilation problems due to feature misconfigurations won't be caught, as exemplified by https://github.com/paritytech/substrate/issues/12705 * adapt to lack of multiple macos runners https://github.com/paritytech/substrate/pull/12709#discussion_r1022868752 * fix cancel-pipeline-cargo-check-each-crate-macos * fix cargo-check-each-crate-macos again * time command execution * fix YAML anchors * add explanation for rounding division * ensure the minimum of one crate per group * collect artifacts for pipeline stopper * revert hardcoded crates_per_group * re-add crates_per_group=1 * client/beefy: persist voter state (#12712) * client/beefy: prepare worker for persisting state * client/beefy: persist voter state * client/beefy: initialize persistent state * client/beefy: try to vote from the very beginning Now that voter is initialized from persistent state, it makes sense that it can attempt voting right away. This also helps the genesis case when we consider block `One` as mandatory. * client/beefy: add tests for voter state db * client/beefy: persist voter state as soon as initialized * client/beefy: make sure min-block-delta is at least 1 * client/beefy: persist state after voting Persist state after handling self vote to avoid double voting in case of voter restarts. * client/beefy: persist state after handling mandatory block vote For mandatory blocks we want to make sure we're not losing votes in case of crashes or restarts, since voter will not make further progress without finalizing them. * frame/beefy: use GENESIS_AUTHORITY_SET_ID on pallet genesis * client/beefy: initialize voter at either genesis or last finalized To guarantee unbroken chain of mandatory blocks justifications, voter will always resume from either last BEEFY-justified block or `pallet-beefy` genesis, whichever is more recent. Initialization walks back the chain from latest GRANDPA finalized block looking for one of the above. Along the way, it also records and enqueues for processing any BEEFY mandatory blocks that have been already GRANDPA finalized but not BEEFY finalized. * client/beefy: decouple voter init from aux db state load * client/beefy: fix voter init tests * remove debug prints * gadget future must be type () * fix init from last justification Signed-off-by: Adrian Catangiu <adrian@parity.io> * [Fix] Get target count from TargetList instead of storage (#12748) Co-authored-by: parity-processbot <> * Move block/state/warpc sync requests/responses to `ChainSync` (#12739) * Move block/state/warpc sync requests/responses to `ChainSync` * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * Apply review suggestions * cargo-fmt + doc fix * Fix tests Co-authored-by: Bastian Köcher <git@kchr.de> * perf: generate_initial_session_keys: load runtime only if its relevant (#12651) * perf: generate_initial_session_keys: load runtime only if its relevant * apply review suggestion * Update primitives/session/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <git@kchr.de> * Prevent epochs pruning while finalizing blocks on epoch 0 (#12758) * Prevent epochs pruning while on epoch 0 * return error instead of expect in `feasibility_check` (#12745) * Update lib.rs * make defensive * fmt * fix batching migration * fix * fix Co-authored-by: parity-processbot <> * BEEFY: optimize voter event loop for fewer 'active' wakeups (#12760) * client/beefy: remove high-freq network events from main loop Network events are many and very frequent, remove the net-event-stream from the main voter loop and drastically reduce BEEFY voter task 'wakeups'. Instead have the `GossipValidator` track known peers as it already has callbacks for that coming from `GossipEngine`. Signed-off-by: acatangiu <adrian@parity.io> * Sort crates before splitting them into groups (+ some improvements) (#12755) * sort crates before splitting them into groups this is useful so that crates always get routed to a specific group for a given version of the source code, which means that jobs for each batch can be reliably retried individually * more verbose output * misc improvements * put uniq after sort uniq filters by adjacent lines * shellcheck * rm useless backlashes * handle edge case of no crates detected * contracts: Replace `sp-sandbox` and `wasmi-validation` by newest wasmi (#12501) * Replace sp-sandbox and wasmi-validation by just wasmi * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Re-check original code on re-instrumentation * Fix clippy * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Apply suggestions from code review Co-authored-by: Robin Freyler <robin.freyler@gmail.com> * Replace wasmi by ::wasmi * Bump wasmi to 0.20 * Add explanation for `unreachable` * Change proof * Fixup master merge * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Fixup naming inconsistencies introduced by reentrancy PR * Fix `scan_imports` docs * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Fixup suggestions * Remove unnecessary &mut * Fix test * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Fix benchmark merge fail * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Fix docs as suggested by code review * Improve docs for `CodeRejected` * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Fix logic bug when setting `deterministic_only` * Don't panic when module fails to compile * Apply suggestions from code review Co-authored-by: Robin Freyler <robin.freyler@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Robin Freyler <robin.freyler@gmail.com> Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * update DefaultNoBound derive macro (#12723) fix derive for empty enums Update derive & ui tests clean up Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> rename variable formatting & clippy formatting Co-authored-by: parity-processbot <> * Fix rustdoc (#12777) * Fix table formatting Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix sp-runtime-interface table Using HTML now since multi-line tables are not a thing and fmt destroys them. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * More rustdoc fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix tags Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * More fixes... Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use Bastis patch Co-authored-by: Bastian Köcher <git@kchr.de> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add more backticks Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * change ci image Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: alvicsam <alvicsam@gmail.com> * Allow Alliance Fellows to Give Up Voting Rights (#12730) * allow fellows to abdicate voting rights * rename founders to founding fellows, give equal power * Drop FoundingFellow role and veto call (#12762) * drop FoundingFellow role * drop veto call * Storage migration to remove founder role (#12766) * storage migration to remove founder role * skip migration if no members * truncate the final fellows set if overflows * change log - action order * MemberAbdicated -> FellowAbdicated Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Add total nb to trie migration rpc (#12770) * Add total nb to trie migration rpc * fix and format * Use struct instead of tuple * fixes Co-authored-by: parity-processbot <> * add EnsureWithSuccess (#12775) * add EnsureWithSuccess * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * add docs Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <> * Explicitly unset RUSTC_WRAPPER=sccache environment variable (#12771) * CI: Explicitly unset RUSTC_WRAPPER=sccache environment variable * Try with `rusty-cachier` disabled * Re-enable `rusty-cachier` and try with the staging image * Bring back `production` image * Sort crates before splitting them into groups (+ some improvements) (#12755) * sort crates before splitting them into groups this is useful so that crates always get routed to a specific group for a given version of the source code, which means that jobs for each batch can be reliably retried individually * more verbose output * misc improvements * put uniq after sort uniq filters by adjacent lines * shellcheck * rm useless backlashes * handle edge case of no crates detected * Revert "Sort crates before splitting them into groups (+ some improvements) (#12755)" This reverts commit fde839183a12a2bd51efc7143ebcddeed81ea6fa. Co-authored-by: João Paulo Silva de Souza <77391175+joao-paulo-parity@users.noreply.github.com> * contracts: Don't put unstable functions in special module (#12781) * Don't put unstable functions in special module * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * cargo fmt Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * ed25519_verify: Support using dalek for historical blocks (#12661) * ed25519_verify: Support using dalek for historical blocks The switch from `ed25519-dalek` to `ed25519-zebra` was actually a breaking change. `ed25519-zebra` is more permissive. To support historical blocks when syncing a chain this pull request introduces an externalities extension `UseDalekExt`. This extension is just used as a signaling mechanism to `ed25519_verify` to use `ed25519-dalek` when it is present. Together with `ExtensionBeforeBlock` it can be used to setup a node in way to sync historical blocks that require `ed25519-dalek`, because they included a transaction that verified differently as when using `ed25519-zebra`. This feature can be enabled in the following way. In the chain service file, directly after the client is created, the following code should be added: ``` use sc_client_api::ExecutorProvider; client.execution_extensions().set_extensions_factory( sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED) ); ``` * Fix doc * More fixes * Update client/api/src/execution_extensions.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Fix merge and warning * Fix docs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * client/beefy: fix on-demand justifications sync for old blocks (#12767) * client/beefy: fix on-demand justif sync for old blocks When receiving BEEFY justifications for old blocks the state might be pruned for them, in which case justification verification fails because BEEFY validator set cannot be retrieved from runtime state. Fix this by having the voter give the validator set to the `OnDemandJustificationsEngine` as request information. On receiving a BEEFY justification for requested block, the provided validator set will be used to validate the justification. Signed-off-by: acatangiu <adrian@parity.io> * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * impl review suggestions * client/beefy: fail initialization if state unavailable * beefy: remove spammy log Signed-off-by: acatangiu <adrian@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <git@kchr.de> * Remove Default, HasCompact, and TypeInfo trait bounds on AssetId (#12740) * Remove Default, HasCompact, and TypeInfo trait bounds on AssetId * don't use default in benchmarking * add helper trait * add helper to assets tx payment test * docs fixes * i'm confused * aha, cargo * move affected dispatchable calls into new indices * Helper -> BenchmarkHelper * benchmark use of helper * actually, don't break every call interface * use into on AssetIdParameter * Remove From from AssetIdParameter and use it in BenchmarkHelper * include from Co-authored-by: parity-processbot <> * pallet-mmr: move offchain logic to client-side gadget (#12753) * Move MMR utils methods from pallet to primitives Signed-off-by: Serban Iorga <serban@parity.io> * Add method to MmrApi * Move forks expanding logic from babe to primitives * Implement MMR gadget * Remove prunning logic from the MMR pallet * Code review changes: 1st iteration * Replace MaybeCanonEngine with CanonEngineBuilder * fix mmr_leaves_count() for kitchen sink demo * Update client/merkle-mountain-range/src/canon_engine.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Code review changes: 2nd iteration * fix INDEXING_PREFIX * impl review comments * add documentation and minor rename Signed-off-by: Serban Iorga <serban@parity.io> Co-authored-by: Adrian Catangiu <adrian@parity.io> * Require rust-features check (#12796) * Typo Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Move rust feature check to docker and require not to fail Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add .docker-env Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Move test-rust-features check back to kubernetes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * MMR: move RPC code from frame/ to client/ (#12805) * mmr: move MMR RPC from frame/ to client/ Signed-off-by: Adrian Catangiu <adrian@parity.io> * client/mmr: adjust logging levels to avoid spam * cargo fmt * remove unused imports Signed-off-by: Adrian Catangiu <adrian@parity.io> * chore: remove unused traits for wasm interface (#12792) * sc-transaction-handler: Fix potential crashes on exit (#12807) This fixes some potential crashes in the stream handling in `sc-transaction-handler`. * Don't announce blocks in `sync_to_tip_when_we_sync_together_with_multiple_peers` (#12783) * Fix syncing test * cargo fmt * Fix test * contracts: Replace cargo feature `unstable-interface` with config (#12787) * Replace cargo feature with config * Update frame/contracts/proc-macro/src/lib.rs Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Bounties use SpendOrigin (#12808) * Bounties use SpendOrigin * Fix tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * tests: increase spend limits Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix benchmarks Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix child-bounties tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/bench-bot.sh" pallet dev pallet_bounties 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: command-bot <> * Reduce provisioner work (#12749) * Move create_inherent_data call to use side * Make provide_inherent_data async * Fix tests * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * Log errors * Fix test * Fix test * fix * Deduplicate test code * fix * flag * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Revert "Deduplicate test code" This reverts commit ba46adbe089329c78cd69ccdb08e27ed67bd77cf. * Fix test * remove commented out code * minor to start CI run * start CI * Update client/consensus/slots/src/lib.rs Co-authored-by: Marcin S. <marcin@bytedude.com> * Apply PR suggestions * Apply PR suggestions * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * minor * kickoff CI * PR suggestions * Compute remaining duration instead of using slot_info.duration * Don't rely on sub implementat…
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
…12492) * Aura: Adds some compatibility mode to support old chains In paritytech#9132 we changed the way how we get the authorities from the runtime. Before this mentioned pr we would call `initialize_block` before calling the authorities runtime function. The problem with this was that when you have a block X that would switch the authority set, it would already be signed by an authority of the new set. This was wrong, as a block should only be signed by the current authority set. As this change is a hard fork, this pr brings back the possibility for users that have a chain running with this old logic to upgrade. They will need to use: ``` CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future } ``` Using this compatibility mode will make the node behave like the old nodes, aka calling `initialize_block` before doing the actual runtime call to `authorities`. Then when the given `until` block is being build/imported the node switches to the new behaviour of not calling `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a point where all nodes in the network have upgraded. * Fixes * Make docs ready * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/aura/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * FMT Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This instructs the Aura runtime api to skip initialize block, when
requesting the authorities. This is important, as we don't want to use
the new authorities that should be used from the next block on.
Besides that, it removes the caching stuff. The cache is not available
on full nodes anyway. In the future we should store the authorities
probably in the aux store.