Skip to content

Conversation

anupsv
Copy link
Contributor

@anupsv anupsv commented May 22, 2025

Why are these changes needed?

Adding blacklisting ability of disperser by validators.
This essentially gives the nodes a way to blacklist dispersers based on criteria defined. This PR implements one such criteria which is to blacklist disperser in the case of a bad BlobCert in a batch. While validating blobs in the given batch, if the validation as performed by the functionvalidateDispersalRequest by the node fails, then the disperser is added to the blacklist on the node.
The disperser is blacklisted beginning with 1 hour for 1st offense, 1 day for the 2nd and 1 week for the 3rd. This is done to give the disperser some leeway incase of genuine mistakes and a tradeoff with disperser's who would potentially be malicious. After a blanket 2 weeks of wait time irrespective of the number of offense, the disperser entry is cleaned up to give the disperser another chance to disperse.

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@anupsv anupsv requested a review from hopeyen May 22, 2025 18:46
@anupsv anupsv changed the title Validator blacklisting dispersers feat: Validator blacklisting dispersers May 27, 2025
@anupsv anupsv marked this pull request as ready for review June 9, 2025 19:56
@anupsv anupsv requested a review from ian-shim June 9, 2025 19:58
@hopeyen hopeyen requested a review from dmanc June 9, 2025 20:53
@hopeyen hopeyen self-requested a review June 13, 2025 17:37
Copy link
Contributor

@hopeyen hopeyen left a comment

Choose a reason for hiding this comment

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

📓

@anupsv anupsv merged commit e964f35 into master Jun 18, 2025
12 of 13 checks passed
@anupsv anupsv deleted the validator-blacklisting branch June 18, 2025 17:42
hopeyen pushed a commit that referenced this pull request Jun 23, 2025
* initial implementation of the blacklist addition

* adding the blacklist struct and funcs

* checking if the blacklist was hit or not

* changing to use disperser id

* removing api

* add explicit flags

* fixing naming

* small changes

* adding basic unit tests

* interfaces and comments

* small changes, logs

* fixing mock calls

* linter fix

* adding more test

* naming fix

* testing validator e2e

* adding latest block

* unmerged

* getting test working

* final all parts tested

* Update golangci-lint.yml

* Update kms_fuzz_test.go

* Update config.go

* adding cleanup

* merge conflict fixes

* clean up, comments and old tests

* adding deletions after 2 weeks

* fixing share state problem in tests

* fixing test

* cleanup of test

---------

Co-authored-by: anupsv <[email protected]>
Co-authored-by: anupsv <[email protected]>
hopeyen pushed a commit that referenced this pull request Jun 23, 2025
* initial implementation of the blacklist addition

* adding the blacklist struct and funcs

* checking if the blacklist was hit or not

* changing to use disperser id

* removing api

* add explicit flags

* fixing naming

* small changes

* adding basic unit tests

* interfaces and comments

* small changes, logs

* fixing mock calls

* linter fix

* adding more test

* naming fix

* testing validator e2e

* adding latest block

* unmerged

* getting test working

* final all parts tested

* Update golangci-lint.yml

* Update kms_fuzz_test.go

* Update config.go

* adding cleanup

* merge conflict fixes

* clean up, comments and old tests

* adding deletions after 2 weeks

* fixing share state problem in tests

* fixing test

* cleanup of test

---------

Co-authored-by: anupsv <[email protected]>
Co-authored-by: anupsv <[email protected]>
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.

3 participants