Skip to content

chore(Distributor): Dead code — pre-Pectra permissionless distributeFor path #25

@sailorpepe

Description

@sailorpepe

Summary

The Pectra11 hard fork (timestamp 1756915200, Sept 3 2025) made distributeFor(uint64, uint64, bytes, bytes32[], bytes32[]) permanently unreachable. The function contains a guard that always reverts post-Pectra. Only the system-call distributeFor(bytes pubkey) path remains active.

Dead code inventory

Item Location
distributeFor(uint64, uint64, bytes, bytes32[], bytes32[]) Distributor.sol
PECTRA11_HARD_FORK_TIMESTAMP Distributor.sol
MANAGER_ROLE Distributor.sol
setZeroValidatorPubkeyGIndex / setProposerIndexGIndex overrides Distributor.sol
5-arg distributeFor declaration IDistributor.sol
Distributor MANAGER_ROLE grants 3_DeployPoL.s.sol, 4_TransferPOLOwnership.s.sol

Constraints

  • BeaconRootsHelper.sol must remain in the inheritance chain — Distributor_V0.sol depends on it, and removing it would break UUPS proxy storage layout compatibility.
  • The base BeaconRootsHelper setters (setZeroValidatorPubkeyGIndex, setProposerIndexGIndex) are public virtual with no access control. Removing the onlyRole(MANAGER_ROLE) overrides from Distributor exposes them. They should be locked with revert overrides.

Proposal

Remove the dead code, migrate all test coverage to the system-call path, and add revert overrides for the unprotected base setters. I have a PR ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions