Skip to content

fix: lookahead period constraint #463

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

Merged
merged 2 commits into from
May 1, 2025

Conversation

ypatil12
Copy link
Collaborator

Motivation:

The StakeRegistry is missing a constraint check for modification of lookahead time
of slashable quorum. This results in the Lookahead period potentially being invalid.

Modifications:

Update _setLookAheadPeriod to revert if the _lookaheadBlocks is greater than the DEALLOCATION_DELAY. Note that we'll also have to update this check in _createQuorum since it does a >= check. Operators are slashable for the entire delay, inclusive of the last block.

Result:

Proper constraints.

@ypatil12 ypatil12 requested review from wadealexc and pakim249CAL May 1, 2025 02:33
Copy link
Member

@wadealexc wadealexc left a comment

Choose a reason for hiding this comment

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

LGTM

@ypatil12 ypatil12 merged commit 107541d into hexens-slashing/audit-fixes May 1, 2025
5 checks passed
@ypatil12 ypatil12 deleted the hexens/eigen2-4 branch May 1, 2025 18:29
ypatil12 added a commit that referenced this pull request May 1, 2025
**Motivation:**

An operator is slashable for at least `DEALLOCATION_DELAY`. The check
for the lookahead period should be exactly this amount, not less.

**Modifications:**

Update check for `lookAheadPeriod` to be `<=DEALLOCATION_DELAY`. 

**Result:**

Symmetric checks with #463
ypatil12 added a commit that referenced this pull request May 7, 2025
**Motivation:**

Middleware slashing audit fixes from Hexens and Dedaub. 

**Modifications:**

**Medium Sev**
- #467

**Low Sev**
- #462
- #463
- #468
- #474 - note: this removes stale stakes checks from the `BLSSignatureChecker` 

**Informational/Docs**
- #465
- #466
- #472

**Result:**

Audit fixes applied to slashing.
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