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

Improve xstaking election #639

Merged
merged 2 commits into from
Oct 18, 2022
Merged

Improve xstaking election #639

merged 2 commits into from
Oct 18, 2022

Conversation

icodezjb
Copy link
Member

@icodezjb icodezjb commented Jun 2, 2022

The current qualified validator election sets two conditions

1. has the desire to win the election.
2. meets the threshold of a valid candidate.

Even if the candidate satisfies the above 2 conditions, the candidate will be discarded by Session module,
because the session keys are not set (call pallet-session::set_keys) (without any prompt log message).

To avoid this low-level error, we add a third condition

3. has set session keys by calling pallet_session set_keys.

Determine whether this candidate has set session keys by the trait ValidatorRegistration,

@icodezjb icodezjb merged commit a77a67d into develop-2022 Oct 18, 2022
@icodezjb icodezjb deleted the improve_xstaking_election branch October 18, 2022 07:27
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

Successfully merging this pull request may close these issues.

2 participants