Skip to content

Conversation

@dhaval-supraoracles
Copy link

No description provided.

Copy link

@isaacdoidge isaacdoidge left a comment

Choose a reason for hiding this comment

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

A good start, the config pattern is nice. There's still quite a bit to do in the registry itself though. If you haven't already read the Rust code thoroughly then please do so.

Copy link

@isaacdoidge isaacdoidge left a comment

Choose a reason for hiding this comment

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

Looking good! A few more things to adjust though.

Copy link

@isaacdoidge isaacdoidge left a comment

Choose a reason for hiding this comment

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

A few things need to be fixed.

Copy link

@isaacdoidge isaacdoidge left a comment

Choose a reason for hiding this comment

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

Looks good, but please extend the e2e test. It should cover more functionality.

@dhaval-supraoracles dhaval-supraoracles marked this pull request as ready for review October 24, 2025 05:40
@dhaval-supraoracles dhaval-supraoracles changed the title WIP: adding leader ban registry module in supra framework Adding leader ban registry module in supra framework Oct 24, 2025
Copy link

@isaacdoidge isaacdoidge left a comment

Choose a reason for hiding this comment

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

Nice work! Just a couple more things to address.

});
if (is_banned) {
let bans = vector::borrow_mut(&mut ban_registry.bans, index);
bans.consecutive_bans = bans.consecutive_bans + 1;

Choose a reason for hiding this comment

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

We need to reset all fields of bans.active here as well. The ban duration should reset each time the validator is banned.

Choose a reason for hiding this comment

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

Then the test cases that I have written will not work
is it intended?

Choose a reason for hiding this comment

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

Your test cases should test ban expiry by incrementing the current view without re-banning the validator that should be re-admitted to the validator set. Each time a validator is banned, its ban period should reset, so a validator can only be reinstated if it does not earn any new bans until its current ban period ends.

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