Skip to content

Conversation

@ypatil12
Copy link
Collaborator

@ypatil12 ypatil12 commented Jan 5, 2026

Motivation:

Address informational findings from the Certora audit of EigenLayer Slashing UX Improvements (PR-1645/PR-544). These are quality-of-life and documentation improvements that enhance code clarity and prevent potential edge case issues.

Modifications:

  1. Fix I-01: Re-proposing same pending slasher is now a no-op

    • Added check in _updateSlasher() to skip processing if the proposed slasher is already pending and hasn't taken effect
    • Prevents accidentally restarting the delay countdown when re-proposing the same slasher
  2. Fix I-02: Add NatSpec documentation for getSlasher/getPendingSlasher

    • Updated interface and implementation NatSpec to document that these functions return address(0)/0 for non-existent operator sets
    • Helps callers understand expected behavior without validation
  3. Fix I-03: Add separate SLASHER_CONFIGURATION_DELAY constant

    • Added new SLASHER_CONFIGURATION_DELAY immutable in AllocationManagerStorage
    • Currently set to same value as ALLOCATION_CONFIGURATION_DELAY but can be changed independently in future upgrades
    • Updated _updateSlasher() to use the new constant
    • Added interface getter
  4. Fix I-05: Add gas warning documentation for migrateSlashers

    • Added NatSpec warning about O(appointees) gas cost per operator set
    • PermissionController.getAppointees() enumerates full appointee set which can be expensive
    • Documented that large appointee sets may cause block gas limit issues

Result:

  • updateSlasher is idempotent when re-proposing the same slasher
  • Clearer documentation on view function return values
  • Slasher delay can be configured independently in future upgrades
  • Users are warned about potential gas issues with migrateSlashers

🤖 Generated with Claude Code

@ypatil12 ypatil12 force-pushed the fix/slashing-commitments-informationals branch from 1681f10 to 5dbff68 Compare January 6, 2026 17:41
Comment on lines +43 to +48
/// @notice Delay before allocation delay modifications take effect.
uint32 public immutable ALLOCATION_CONFIGURATION_DELAY;

/// @notice Delay before slasher changes take effect.
/// @dev Currently set to the same value as ALLOCATION_CONFIGURATION_DELAY.
uint32 public immutable SLASHER_CONFIGURATION_DELAY;
Copy link
Member

Choose a reason for hiding this comment

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

Note sure I agree with their solution, strange to have to two constants with the same value but different names, will lead to confusion down the road.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mainly just due to separation of concerns - it's not clear that the ALLOCATION_CONFIGURATION_DELAY var should also be used for the slasher delay

Copy link
Member

@0xClandestine 0xClandestine left a comment

Choose a reason for hiding this comment

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

one comment, lgtm otherwise

ypatil12 and others added 3 commits January 8, 2026 11:55
- Fix I-01: Re-proposing same pending slasher is now a no-op (delay countdown not restarted)
- Fix I-02: Add NatSpec documentation for getSlasher/getPendingSlasher return values on non-existent operator sets
- Fix I-03: Add separate SLASHER_CONFIGURATION_DELAY constant (currently same as ALLOCATION_CONFIGURATION_DELAY)
- Fix I-05: Add gas warning documentation for migrateSlashers regarding O(appointees) cost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ypatil12 ypatil12 force-pushed the fix/slashing-commitments-informationals branch from 5dbff68 to d44717b Compare January 8, 2026 17:02
@ypatil12 ypatil12 merged commit 9959779 into feat/slashing-improvements-audit-fixes Jan 8, 2026
15 checks passed
@ypatil12 ypatil12 deleted the fix/slashing-commitments-informationals branch January 8, 2026 18:13
ypatil12 added a commit that referenced this pull request Jan 8, 2026
…1689)

**Motivation:**

Address informational findings from the Certora audit of EigenLayer
Slashing UX Improvements (PR-1645/PR-544). These are quality-of-life and
documentation improvements that enhance code clarity and prevent
potential edge case issues.

**Modifications:**

1. **Fix I-01: Re-proposing same pending slasher is now a no-op**
- Added check in `_updateSlasher()` to skip processing if the proposed
slasher is already pending and hasn't taken effect
- Prevents accidentally restarting the delay countdown when re-proposing
the same slasher

2. **Fix I-02: Add NatSpec documentation for
getSlasher/getPendingSlasher**
- Updated interface and implementation NatSpec to document that these
functions return `address(0)`/`0` for non-existent operator sets
   - Helps callers understand expected behavior without validation

3. **Fix I-03: Add separate SLASHER_CONFIGURATION_DELAY constant**
- Added new `SLASHER_CONFIGURATION_DELAY` immutable in
`AllocationManagerStorage`
- Currently set to same value as `ALLOCATION_CONFIGURATION_DELAY` but
can be changed independently in future upgrades
   - Updated `_updateSlasher()` to use the new constant
   - Added interface getter

4. **Fix I-05: Add gas warning documentation for migrateSlashers**
   - Added NatSpec warning about O(appointees) gas cost per operator set
- `PermissionController.getAppointees()` enumerates full appointee set
which can be expensive
- Documented that large appointee sets may cause block gas limit issues

**Result:**

- `updateSlasher` is idempotent when re-proposing the same slasher
- Clearer documentation on view function return values
- Slasher delay can be configured independently in future upgrades
- Users are warned about potential gas issues with `migrateSlashers`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
ypatil12 added a commit that referenced this pull request Jan 13, 2026
**Motivation:**

Address findings from the Certora audit of EigenLayer Slashing UX
Improvements. This branch consolidates fixes for low-severity findings
(L-01) and informational findings (I-01 through I-05) across
AllocationManager and ProtocolRegistry contracts.

**Modifications:**

### AllocationManager Fixes

**L-01: State inconsistency fixes**
- Update `slasher` field immediately when `instantEffectBlock=true` to
prevent stale storage (#1687)
- Update `delay` and `isSet` fields immediately for newly registered
operators to ensure storage consistency (#1688)

**I-01: Re-proposing same pending slasher is now a no-op** (#1689)
- Added check in `_updateSlasher()` to skip processing if the proposed
slasher is already pending
- Prevents accidentally restarting the delay countdown

**I-02: Add NatSpec documentation for getSlasher/getPendingSlasher**
(#1689)
- Document that these functions return `address(0)`/`0` for non-existent
operator sets

**I-03: Add separate SLASHER_CONFIGURATION_DELAY constant** (#1689)
- New immutable allows independent configuration of slasher delay in
future upgrades
- Currently set to same value as `ALLOCATION_CONFIGURATION_DELAY`

**I-05: Add gas warning documentation for migrateSlashers** (#1689)
- Document O(appointees) gas cost per operator set
- Warn about potential block gas limit issues with large appointee sets

### ProtocolRegistry Fixes

**I-01: ship() lacks validation** (#1690)
- Added array length validation for addresses, configs, and names
- Added zero address validation with new `ArrayLengthMismatch()` and
`InputAddressZero()` errors

**I-02: Orphaned configs on name overwrite** (#1690)
- Delete old address's `DeploymentConfig` when re-shipping a name with a
new address
- Added `DeploymentConfigDeleted(address)` event

**I-03: configure() for unshipped addresses** (#1690)
- Updated `configure` to require a name parameter
- Added validation that address must be a shipped deployment

**I-04: Fix misleading NatSpec** (#1690)
- Clarified `ship()` behavior when re-shipping names
- Updated `configure()` NatSpec for address requirements

**I-05: Document pauseAll blocking** (#1690)
- Added warning that `pauseAll()` reverts if ANY pausable deployment
fails

### Other Changes
- v1.9.0 upgrade script fixes for testnet deploy (#1677)
- Added Claude skills for development workflow (#1686)

**Result:**

- Audit fixes complete
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