-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare pallets for async backing #471
base: 03-14-upgrade_to_stable2412-2
Are you sure you want to change the base?
Prepare pallets for async backing #471
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Graphite Automations"Auto-assign PRs to author" took an action on this PR • (03/14/25)1 assignee was added to this PR based on Juan Ignacio Rios's automation. |
a021c92
to
e07c1a9
Compare
e07c1a9
to
cbc803c
Compare
0ca5002
to
891799a
Compare
cbc803c
to
4317213
Compare
891799a
to
d116e92
Compare
4317213
to
8c9017b
Compare
d116e92
to
2828880
Compare
8c9017b
to
d1e02ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 nits, but the approach seems straightforward!
|
||
#[frame_support::pallet] | ||
pub mod pallet { | ||
use super::BlockNumberFor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this also part of the use super::*;
two lines below?
@@ -115,6 +115,9 @@ pub mod pallet { | |||
/// The Whitelisted policy for the dispenser. Users' credentials should have the same | |||
/// policy to be eligible for token dispensing. | |||
type WhitelistedPolicy: Get<Cid>; | |||
|
|||
// /// Block number provider. | |||
// type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened here?
What?
Introduces
BlockNumberProvider
type for palletsWhy?
So that we can use a more reliable, consistent notion of block number, since with async backing system block number becomes nondeterministic
How?
Relay chain's block number is used where possible, i.e funding, linear-release, and we rely on system block number in other cases
Testing?
Changes were made to
Instantiator
so that it works for both integration and unit tests, since now integration tests Runtime uses relay chain's block number instead of chain'sScreenshots (optional)
Anything Else?
#469