Skip to content
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

Deprecate frame_system::block_number #6245

Open
gupnik opened this issue Oct 26, 2024 · 1 comment
Open

Deprecate frame_system::block_number #6245

gupnik opened this issue Oct 26, 2024 · 1 comment
Assignees
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@gupnik
Copy link
Contributor

gupnik commented Oct 26, 2024

With the addition of BlockNumberProvider to all pallets as being tracked in #3268, we should deprecate frame_system::block_number as suggested by @kianenigma in #5723 (comment)

@gupnik gupnik added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Oct 26, 2024
@gupnik gupnik self-assigned this Oct 26, 2024
@kianenigma kianenigma changed the title Depricate frame_system::block_number Deprecate frame_system::block_number Oct 28, 2024
@kianenigma
Copy link
Contributor

kianenigma commented Oct 29, 2024

Reading my comment in #5723 (comment) again, I wonder if a unified type BlockNumber: trait BlockNumberProvider

with

trait BlockNumberProvider {
    fn current_block_number() -> u32;
    /// None if solochain, Some(_) if para. 
    fn relay_block_number() -> Option<u32>;
}

Is acceptable? This would remove the need to alter every single pallet.

we're def leaking the idea of "relay" chain to all solo chains, but our aim is to make polkadot-sdk parachain-first anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

No branches or pull requests

2 participants