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

Unify bounds for the maximum number of validators across pallets #6972

Open
re-gius opened this issue Dec 20, 2024 · 0 comments
Open

Unify bounds for the maximum number of validators across pallets #6972

re-gius opened this issue Dec 20, 2024 · 0 comments
Assignees

Comments

@re-gius
Copy link
Contributor

re-gius commented Dec 20, 2024

Currently, there are several constants or storage items bounding the maximum number of validators:

This may introduce incoherent behavior in benchmarking and tests.

Proposed solution
@kianenigma suggested here to expose integrity checks as a part of a trait SessionManager.

This trait can expose a trat SessionManager { type MaxAuthorities = }. Then, within the pallet-session, who consumes SessionManager, you can do:

fn integrity_check() { 
    /// A way to express within pallet-session that whoever implements `SessionManager` should have a compatible `MaxAuthorities`. 
    assert!(T::SessionManager::MaxAuthoritiet::get() >= T::MaxAuthorities::get())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant