Skip to content
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

Add attestation correlated penalties spec #3780

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

dapplion
Copy link
Collaborator

Implements correlated penalties proposal from https://ethresear.ch/t/a-concrete-proposal-for-correlated-attester-penalties/19341 with multi-dimensional net_excess_penalties

Quantitative analysis with past mainnet data show that known large operators see their cumulative penalties increased. This proposal is meant to either incentivize operational distribution or reduce the profit margins of scaled operations.

This notebook includes some charts to visualize the behavior of this gadget https://colab.research.google.com/drive/1mOsM-cEibQAqQBtlIdlpS6h5sahOzXEw?usp=sharing

image

Participation penalties of offline validators are now scaled by an extra penalty_factor. As participation drops (exaggerated in this chart for reference) penalty_factor temporarily increases to > 1. net_excess_penalties is a moving average that asymptotically tends to some value until penalty_factor = 1.

I would like to consider splitting the participation bits into correctness and timeliness. Otherwise a proposer playing timing games can cause a fraction of attesters to suffer increased penalties without any fault of their own. We need more research to understand what behaviors can be attributed to individual setup operations and which can be induced by other network participants.

Joint effort from of EthBerlin04 with @nerolation and @igorline

igorline added a commit to igorline/lighthouse that referenced this pull request May 26, 2024
igorline added a commit to igorline/lighthouse that referenced this pull request May 26, 2024
@hwwhww hwwhww added the general:enhancement New feature or request label May 28, 2024
pending_balance_deposits: List[PendingBalanceDeposit, PENDING_BALANCE_DEPOSITS_LIMIT]
pending_partial_withdrawals: List[PendingPartialWithdrawal, PENDING_PARTIAL_WITHDRAWALS_LIMIT]
pending_consolidations: List[PendingConsolidation, PENDING_CONSOLIDATIONS_LIMIT]
net_excess_penalties: Vector[uint64, TIMELY_HEAD_FLAG_INDEX] # [New in correlated_penalties]
Copy link
Contributor

Choose a reason for hiding this comment

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

A little finicky. Wonder if we can set the length to be dynamic len(PARTICIPATION_FLAG_WEIGHTS) instead. There is no precedence on this though

def committee_slot_of_validator(state: BeaconState, index: ValidatorIndex, epoch: Epoch) -> Slot:
committees_per_slot = get_committee_count_per_slot(state, epoch)
for slot in range(epoch * SLOTS_PER_EPOCH, (epoch + 1) * SLOTS_PER_EPOCH):
for committee_index in range(committees_per_slot):
Copy link
Contributor

Choose a reason for hiding this comment

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

if validator_index in get_slot_committees(state, slot):
    return slot

Will be cleaner this way without the extra for loop

elif flag_index != TIMELY_HEAD_FLAG_INDEX:
# [New in correlated_penalties]
slot = committee_slot_of_validator(state, index, previous_epoch)
penalty_factor = compute_penalty_factor(state, slot, flag_index)
Copy link
Contributor

Choose a reason for hiding this comment

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

penalty_factor, _ = compute_penalty_factor(state, slot, flag_index)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants