Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Preimage registrar and Scheduler integration #10356

Merged
merged 70 commits into from
Dec 11, 2021
Merged

Conversation

gavofyork
Copy link
Member

@gavofyork gavofyork commented Nov 23, 2021

Subsumes #10153
Polkadot companion: paritytech/polkadot#4384

Downstream Code Changes Required

Scheduler config trait (pallet_scheduler::Config) now requires two additional parameters Preimages and NoPreimagePostponement. For equivalent functionality to before, use:

impl pallet_scheduler::Config for Runtime {
  /* snip */
  type PreimageProvider = ();
  type NoPreimagePostponement = ();
}

However, in general you will probably want to take advantage of the new functionality and include the Preimage pallet into your runtime and then use type PreimageProvider = Preimage;.

Migrations

A migration is needed for Scheduler pallet. To do so, just introduce the migration struct into your runtime's src/lib.rs:

// Migration for scheduler pallet to move from a plain Call to a CallOrHash.
pub struct SchedulerMigrationV3;
impl OnRuntimeUpgrade for SchedulerMigrationV3 {
	fn on_runtime_upgrade() -> frame_support::weights::Weight {
		Scheduler::migrate_v2_to_v3()
	}

	#[cfg(feature = "try-runtime")]
	fn pre_upgrade() -> Result<(), &'static str> {
		Scheduler::pre_migrate_to_v3()
	}

	#[cfg(feature = "try-runtime")]
	fn post_upgrade() -> Result<(), &'static str> {
		Scheduler::post_migrate_to_v3()
	}
}

And then add SchedulerMigrationV3 into your migrations tuple with which Executive is configured, e.g.:

pub type Executive = frame_executive::Executive<
	Runtime,
	Block,
	frame_system::ChainContext<Runtime>,
	Runtime,
	AllPallets,
	(/* other migrations */, SchedulerMigrationV3),
>;

Changes

  • New utility function ensure_signed_or_root.
  • New implementations for () for Currency traits (just a null impl for testing).
  • New trait MaybeHashed and a scheduler::v2 module with Anon/Named traits which use it. This is what Scheduler pallet now implements.
  • New traits PreimageProvider and PreimageRecipient allowing an abstract interface to new Preimage pallet. This is what Preimage pallet implements and Scheduler pallet now makes use of.
  • New Preimage pallet which allows hash preimages to be requested via the PreimageProvider abstract interface and uploaded via a transaction. Includes tests and benchmarks.
  • Added support for Scheduler pallet to use a PreimageProvider (e.g. Preimage pallet) in order to allow call hashes to be used rather than plain calls and then resolved into plain calls right at execution time.
  • Repotted Scheduler pallet's mock and tests.
  • Added tests for Scheduler pallet for use of new "schedule by call-hash" interface.
  • Added benchmarks for Scheduler pallet to properly benchmark on_initialize (including for the new schedule-by-call-hash interface) and avoid manual (and inaccurate) weight determination for other branches (e.g. named and periodic tasks).

TODO:

  • Test new functionality in pallet_scheduler
  • Update weights for new functionality in pallet_scheduler
  • Weights for pallet_preimage
  • Fix up runtimes with new params.

@gavofyork gavofyork added the A3-in_progress Pull request is in progress. No review needed at this stage. label Nov 23, 2021
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Nov 23, 2021
@gavofyork gavofyork added A3-in_progress Pull request is in progress. No review needed at this stage. and removed A0-please_review Pull request needs code review. labels Nov 24, 2021
@gavofyork gavofyork marked this pull request as draft November 24, 2021 00:37
Parity Bot added 2 commits December 10, 2021 02:15
…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/src/weights.rs --template=./.maintain/frame-weight-template.hbs
@shawntabrizi
Copy link
Member

/benchmark runtime pallet pallet_preimage

@parity-benchapp
Copy link

parity-benchapp bot commented Dec 10, 2021

Benchmark Runtime Pallet for branch "gav-schedule-by-hash" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results
Pallet: "pallet_preimage", Extrinsic: "note_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage PreimageFor (r:1 w:1)
Storage: Preimage StatusFor (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + s    0.002
              µs

Reads = 2 + (0 * s)
Writes = 2 + (0 * s)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0     40.01     0.111    0.2%
83886     212.9      2.04    0.9%
167772       383     0.746    0.1%
251658     554.4     4.294    0.7%
335544     735.2     13.18    1.7%
419430     905.3     14.17    1.5%
503316      1072     12.48    1.1%
587202      1243     13.53    1.0%
671088      1430     10.42    0.7%
754974      1593      14.1    0.8%
838860      1767     14.88    0.8%
922746      1941     15.79    0.8%
1006632      2106      15.6    0.7%
1090518      2301     12.87    0.5%
1174404      2483     14.75    0.5%
1258290      2673     23.89    0.8%
1342176      2819     11.36    0.4%
1426062      3011     19.43    0.6%
1509948      3186     17.79    0.5%
1593834      3354     12.57    0.3%
1677720      3544     12.78    0.3%
1761606      3726     24.85    0.6%
1845492      3921     15.04    0.3%
1929378      4105     21.61    0.5%
2013264      4282     12.55    0.2%
2097150      4469     15.22    0.3%
2181036      4634     6.133    0.1%
2264922      4892     7.659    0.1%
2348808      5002      13.8    0.2%
2432694      5172     20.58    0.3%
2516580      5372     20.92    0.3%
2600466      5541     16.97    0.3%
2684352      5714        17    0.2%
2768238      5920     25.26    0.4%
2852124      6107     11.98    0.1%
2936010      6282     11.46    0.1%
3019896      6476     17.43    0.2%
3103782      6647      15.2    0.2%
3187668      6813     16.38    0.2%
3271554      7001     25.77    0.3%
3355440      7178     9.671    0.1%
3439326      7379     17.22    0.2%
3523212      7548     10.51    0.1%
3607098      7737     16.34    0.2%
3690984      7909     23.55    0.2%
3774870      8095     13.59    0.1%
3858756      8287     9.703    0.1%
3942642      8514     30.77    0.3%
4026528      8678     31.42    0.3%
4110414      8840     12.48    0.1%
4194300      9011     22.73    0.2%

Quality and confidence:
param     error
s             0

Model:
Time ~=        0
    + s    0.002
              µs

Reads = 2 + (0 * s)
Writes = 2 + (0 * s)

Pallet: "pallet_preimage", Extrinsic: "note_requested_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage PreimageFor (r:1 w:1)
Storage: Preimage StatusFor (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + s    0.002
              µs

Reads = 2 + (0 * s)
Writes = 1 + (0 * s)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0     23.15      0.15    0.6%
83886     194.3     0.463    0.2%
167772       365      0.32    0.0%
251658     535.4     0.777    0.1%
335544     709.3     10.71    1.5%
419430     892.1      9.92    1.1%
503316      1048     8.952    0.8%
587202      1219     12.14    0.9%
671088      1415     1.401    0.0%
754974      1572     16.05    1.0%
838860      1737     16.02    0.9%
922746      1933     11.14    0.5%
1006632      2084     12.28    0.5%
1090518      2265     12.28    0.5%
1174404      2453     7.727    0.3%
1258290      2646     14.39    0.5%
1342176      2802     9.566    0.3%
1426062      2983     8.137    0.2%
1509948      3158     9.053    0.2%
1593834      3338     9.365    0.2%
1677720      3516     17.22    0.4%
1761606      3708     15.86    0.4%
1845492      3886     11.88    0.3%
1929378      4063      12.4    0.3%
2013264      4252     12.79    0.3%
2097150      4409     12.42    0.2%
2181036      4626     17.63    0.3%
2264922      4804      14.1    0.2%
2348808      4974     13.61    0.2%
2432694      5163     16.04    0.3%
2516580      5338     18.73    0.3%
2600466      5515     17.71    0.3%
2684352      5697     17.66    0.3%
2768238      5871     12.92    0.2%
2852124      6079     15.35    0.2%
2936010      6237     12.05    0.1%
3019896      6431     26.43    0.4%
3103782      6623     38.17    0.5%
3187668      6788     16.38    0.2%
3271554      6957     11.16    0.1%
3355440      7196     56.95    0.7%
3439326      7356     24.09    0.3%
3523212      7557     17.79    0.2%
3607098      7700     18.12    0.2%
3690984      7915     22.56    0.2%
3774870      8063     19.42    0.2%
3858756      8246       8.4    0.1%
3942642      8427     10.36    0.1%
4026528      8631     14.63    0.1%
4110414      8826     24.48    0.2%
4194300      8986     17.78    0.1%

Quality and confidence:
param     error
s             0

Model:
Time ~=        0
    + s    0.002
              µs

Reads = 2 + (0 * s)
Writes = 1 + (0 * s)

Pallet: "pallet_preimage", Extrinsic: "note_no_deposit_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage PreimageFor (r:1 w:1)
Storage: Preimage StatusFor (r:1 w:0)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + s    0.002
              µs

Reads = 2 + (0 * s)
Writes = 1 + (0 * s)

Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0     21.74     0.132    0.6%
83886     192.8     0.824    0.4%
167772     374.4     6.562    1.7%
251658       547      1.51    0.2%
335544     718.8     0.778    0.1%
419430       882     12.82    1.4%
503316      1044     1.111    0.1%
587202      1227     14.27    1.1%
671088      1399     14.81    1.0%
754974      1562     10.78    0.6%
838860      1748     17.02    0.9%
922746      1918     16.35    0.8%
1006632      2091     19.25    0.9%
1090518      2275     14.25    0.6%
1174404      2458     19.72    0.8%
1258290      2640     13.53    0.5%
1342176      2812     13.62    0.4%
1426062      2978     16.25    0.5%
1509948      3182     11.32    0.3%
1593834      3335     7.342    0.2%
1677720      3535     13.99    0.3%
1761606      3728     11.42    0.3%
1845492      3899      11.7    0.3%
1929378      4101     17.85    0.4%
2013264      4255     12.67    0.2%
2097150      4407     13.61    0.3%
2181036      4623     15.17    0.3%
2264922      4803     20.31    0.4%
2348808      5003     15.54    0.3%
2432694      5155     12.57    0.2%
2516580      5333     18.77    0.3%
2600466      5505     11.53    0.2%
2684352      5687     9.854    0.1%
2768238      5869     19.06    0.3%
2852124      6071     15.68    0.2%
2936010      6247     17.92    0.2%
3019896      6437     22.03    0.3%
3103782      6605     20.58    0.3%
3187668      6817     14.81    0.2%
3271554      6972     13.81    0.1%
3355440      7131     10.66    0.1%
3439326      7335     13.82    0.1%
3523212      7517     19.09    0.2%
3607098      7697     17.08    0.2%
3690984      7874     15.43    0.1%
3774870      8070     15.14    0.1%
3858756      8258     24.98    0.3%
3942642      8445     18.97    0.2%
4026528      8619     10.71    0.1%
4110414      8794     18.86    0.2%
4194300      9018     23.58    0.2%

Quality and confidence:
param     error
s             0

Model:
Time ~=        0
    + s    0.002
              µs

Reads = 2 + (0 * s)
Writes = 1 + (0 * s)

Pallet: "pallet_preimage", Extrinsic: "unnote_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)
Storage: Preimage PreimageFor (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    60.56
              µs

Reads = 1
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    60.56
              µs

Reads = 1
Writes = 2

Pallet: "pallet_preimage", Extrinsic: "unnote_no_deposit_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)
Storage: Preimage PreimageFor (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.57
              µs

Reads = 1
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.57
              µs

Reads = 1
Writes = 2

Pallet: "pallet_preimage", Extrinsic: "request_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    56.86
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    56.86
              µs

Reads = 1
Writes = 1

Pallet: "pallet_preimage", Extrinsic: "request_no_deposit_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.05
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.05
              µs

Reads = 1
Writes = 1

Pallet: "pallet_preimage", Extrinsic: "request_unnoted_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     21.5
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=     21.5
              µs

Reads = 1
Writes = 1

Pallet: "pallet_preimage", Extrinsic: "request_requested_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    7.798
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    7.798
              µs

Reads = 1
Writes = 1

Pallet: "pallet_preimage", Extrinsic: "unrequest_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)
Storage: Preimage PreimageFor (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.77
              µs

Reads = 1
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    37.77
              µs

Reads = 1
Writes = 2

Pallet: "pallet_preimage", Extrinsic: "unrequest_unnoted_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)
Storage: Preimage PreimageFor (r:0 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    22.91
              µs

Reads = 1
Writes = 2

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    22.91
              µs

Reads = 1
Writes = 2

Pallet: "pallet_preimage", Extrinsic: "unrequest_multi_referenced_preimage", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Raw Storage Info
========
Storage: Preimage StatusFor (r:1 w:1)

Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    7.608
              µs

Reads = 1
Writes = 1

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    7.608
              µs

Reads = 1
Writes = 1


…path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Comment on lines +413 to +416
let index = Agenda::<T>::decode_len(next).unwrap_or(0);
Lookup::<T>::insert(id, (next, index as u32));
}
})
.for_each(|unused| {
let next = now + One::one();
Agenda::<T>::append(next, unused);
Agenda::<T>::append(next, Some(s));
Copy link
Member

@shawntabrizi shawntabrizi Dec 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ignores the max scheduled per block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it already did. It shouldn't break anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay. we will need to fix that up in the future, but shouldnt block here

@gavofyork gavofyork merged commit 4d24ae0 into master Dec 11, 2021
@gavofyork gavofyork deleted the gav-schedule-by-hash branch December 11, 2021 14:55
seunlanlege pushed a commit to seunlanlege/substrate that referenced this pull request Dec 17, 2021
* initial idea

* more

* fix compile

* add clear and request logic

* improve some docs

* Add and implement trait

* continuing to improve

* refcount type

* infallible system preimage upload

* fmt

* fix requests

* Make it simple

* Make it simple

* Formatting

* Initial draft

* request when scheduled

* Docs

* Scheduler good

* Scheduler good

* Scheduler tests working

* Add new files

* Missing stuff

* Repotting, add weights.

* Add some tests to preimage pallet

* More tests

* Fix benchmarks

* preimage benchmarks

* All preimage benchmarks

* Tidy cargo

* Update weights.rs

* Allow hash provision in benchmarks

* Initial work on new benchmarks for Scheduler

* Tests working, refactor looks good

* Tests for new Scheduler functionality

* Use real weight, make tests work with runtimes without Preimage

* Rename

* Update benchmarks

* Formatting

* Formatting

* Fix weird formatting

* Update frame/preimage/src/lib.rs

* Fix try-runtime build

* Fixes

* Fixes

* Update frame/support/src/traits/tokens/currency.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/support/src/traits/tokens/currency/reservable.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/support/src/traits/tokens/imbalance.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/preimage/src/mock.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/scheduler/src/lib.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/preimage/src/lib.rs

* Fixes

* Fixes

* Formatting

* Fixes

* Fixes

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: Parity Bot <[email protected]>
@jakoblell jakoblell added D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Jan 6, 2022
wischli added a commit to KILTprotocol/kilt-node that referenced this pull request Jan 31, 2022
wischli added a commit to KILTprotocol/kilt-node that referenced this pull request Feb 9, 2022
* chore: bump Polkadot dependencies to v0.9.16

* refactor: use AllPalletsWithSystem hook

* chore: remove crowdloan pallet

* fix: apply no DefaultAccount check

* fix: switch to default MaxEncodedLen

paritytech/substrate#10662

* fix: apply asset quota + runtime state_version

quota: paritytech/substrate#10382
state: paritytech/substrate#9732

* fix: Preimage registrar and Scheduler integration

Scheduler: paritytech/substrate#10356
OriginPriviligeCmp: paritytech/polkadot#4166

* fix: OrderedSet

* fix: apply new fork_id to chainspecs

paritytech/substrate#10463

* fix: apply no default account for SudoConfig

* fix: apply name changes for GrandPa

paritytech/substrate#10463

* fix: EnsureOneOf

paritytech/substrate#10379

* fix: preimage weights

* fix: parachain client

* fix: clippy copied weights

* fix: bump deps

* tests: attempt staking fix

* bench: attempt to fix default accountid for dids

* fix: staking unit test pallet order execution

* fix: did unit benchmarks

* fix: fmt

* fix: revert to old hook order execution

* bench: run manually for preimage + scheduler

* fix: only import TaskManager for try-runtime feature

* fix: use correct scheduler migration + add logs

* refactor: use explicit para runtime executors

* fix: apply code review by @Diiaablo95

* chore: apply suggestion from @weichweich review

* chore: bump deps

* fix: deps
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* initial idea

* more

* fix compile

* add clear and request logic

* improve some docs

* Add and implement trait

* continuing to improve

* refcount type

* infallible system preimage upload

* fmt

* fix requests

* Make it simple

* Make it simple

* Formatting

* Initial draft

* request when scheduled

* Docs

* Scheduler good

* Scheduler good

* Scheduler tests working

* Add new files

* Missing stuff

* Repotting, add weights.

* Add some tests to preimage pallet

* More tests

* Fix benchmarks

* preimage benchmarks

* All preimage benchmarks

* Tidy cargo

* Update weights.rs

* Allow hash provision in benchmarks

* Initial work on new benchmarks for Scheduler

* Tests working, refactor looks good

* Tests for new Scheduler functionality

* Use real weight, make tests work with runtimes without Preimage

* Rename

* Update benchmarks

* Formatting

* Formatting

* Fix weird formatting

* Update frame/preimage/src/lib.rs

* Fix try-runtime build

* Fixes

* Fixes

* Update frame/support/src/traits/tokens/currency.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/support/src/traits/tokens/currency/reservable.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/support/src/traits/tokens/imbalance.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/preimage/src/mock.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/scheduler/src/lib.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/preimage/src/lib.rs

* Fixes

* Fixes

* Formatting

* Fixes

* Fixes

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: Parity Bot <[email protected]>
AurevoirXavier added a commit to darwinia-network/darwinia-common that referenced this pull request Sep 20, 2022
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* initial idea

* more

* fix compile

* add clear and request logic

* improve some docs

* Add and implement trait

* continuing to improve

* refcount type

* infallible system preimage upload

* fmt

* fix requests

* Make it simple

* Make it simple

* Formatting

* Initial draft

* request when scheduled

* Docs

* Scheduler good

* Scheduler good

* Scheduler tests working

* Add new files

* Missing stuff

* Repotting, add weights.

* Add some tests to preimage pallet

* More tests

* Fix benchmarks

* preimage benchmarks

* All preimage benchmarks

* Tidy cargo

* Update weights.rs

* Allow hash provision in benchmarks

* Initial work on new benchmarks for Scheduler

* Tests working, refactor looks good

* Tests for new Scheduler functionality

* Use real weight, make tests work with runtimes without Preimage

* Rename

* Update benchmarks

* Formatting

* Formatting

* Fix weird formatting

* Update frame/preimage/src/lib.rs

* Fix try-runtime build

* Fixes

* Fixes

* Update frame/support/src/traits/tokens/currency.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/support/src/traits/tokens/currency/reservable.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/support/src/traits/tokens/imbalance.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/preimage/src/mock.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/scheduler/src/lib.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Update frame/preimage/src/lib.rs

* Fixes

* Fixes

* Formatting

* Fixes

* Fixes

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: Parity Bot <[email protected]>
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. C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants