Skip to content

Perform the deduplication of the validators set#1621

Merged
MOZGIII merged 7 commits intointegrate-fixed-validators-setfrom
integrate-fixed-validators-set-next
Oct 9, 2025
Merged

Perform the deduplication of the validators set#1621
MOZGIII merged 7 commits intointegrate-fixed-validators-setfrom
integrate-fixed-validators-set-next

Conversation

@MOZGIII
Copy link
Contributor

@MOZGIII MOZGIII commented Oct 7, 2025

This PR resolves the issue of incorrect duplication of the validators when they are present in more than one "source"; while we only had bootnodes this was hardly an issue, but it becomes quite important when we have both bioauth and fixed validators set.

There is, however, an alternative solution that wouldn't require deduplication - that is, if we have an explicit switch at the pallet-humanode-session on which mode to use. As in either we use bioauth or fixed validators set.

@MOZGIII MOZGIII force-pushed the integrate-fixed-validators-set-next branch from 160ccdd to 8c04f1b Compare October 7, 2025 23:19
@MOZGIII MOZGIII force-pushed the integrate-fixed-validators-set-next branch from 8c04f1b to c66dc16 Compare October 7, 2025 23:22
@MOZGIII MOZGIII changed the title Perform the deduplication of the validator set Perform the deduplication of the validators set Oct 8, 2025
Copy link
Contributor

@dmitrylavrenov dmitrylavrenov left a comment

Choose a reason for hiding this comment

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

LGTM!

@MOZGIII MOZGIII merged commit b444450 into integrate-fixed-validators-set Oct 9, 2025
21 checks passed
@MOZGIII MOZGIII deleted the integrate-fixed-validators-set-next branch October 9, 2025 15:17
MOZGIII added a commit that referenced this pull request Dec 4, 2025
* Add dedupe utils

* Implement validator deduplication based on account id and the first-in order

* Fix the doc comment on the DedupeKeyExtractor::Output

* Fixed doc comment on DedupeIter::dedupe_key_extractor

* Apply suggestion from @dmitrylavrenov

Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>

* Add a test

* Remove the broken impl (doesn't work either way)

---------

Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2026
* Integrate pallet-fixed-validators-set with pallet-humanode-session

* Integrate pallet-fixed-validators-set into pallet-humanode-offences

* Integrate pallet-fixed-validators-set into humanode-runtime

* Integrate pallet-fixed-validators-set into humanode-peer

* Recompute the benches

* Use computed benches

* Add more checks to verify slashing logic at a corresponding runtime test (#1620)

Add more checks to verify slashin logic at a corresponding runtime test

* Adjust the preexisting tests to include fixed validators set

* Add duplicates test

* Perform the deduplication of the validators set (#1621)

* Add dedupe utils

* Implement validator deduplication based on account id and the first-in order

* Fix the doc comment on the DedupeKeyExtractor::Output

* Fixed doc comment on DedupeIter::dedupe_key_extractor

* Apply suggestion from @dmitrylavrenov

Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>

* Add a test

* Remove the broken impl (doesn't work either way)

---------

Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>

* Add the check for the fixed validators set

---------

Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants