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 EIP: Elected block proposer has not been slashed #6988

Merged
merged 5 commits into from
May 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions EIPS/eip-6987.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
eip: 6987
mkalinin marked this conversation as resolved.
Show resolved Hide resolved
title: Slashed validator cannot be elected as a block proposer
description: Prevents a slashed validator from being elected as a block proposer
author: Mikhail Kalinin (@mkalinin)
discussions-to: <URL>
mkalinin marked this conversation as resolved.
Show resolved Hide resolved
status: Draft
type: Standards Track
category: Core
created: 2023-05-04
---

## Abstract

Introduces a modificaiton to the consensus layer specification which ensures that slashed validator cannot be elected as block proposer.
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

## Motivation

A block proposed by a slashed validator is invalidated by the corresponding check in the [`phase0/process_block_header`](https://github.com/ethereum/consensus-specs/blob/3115d1140b23dd4c9c23fbd9e2428186cf816bde/specs/phase0/beacon-chain.md#block-header) function as it is defined in the consensus layer specification.
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

At the same time the definition of the [`phase0/compute_proposer_index`](https://github.com/ethereum/consensus-specs/blob/3115d1140b23dd4c9c23fbd9e2428186cf816bde/specs/phase0/beacon-chain.md#compute_proposer_index) allows for a slashed validator to be elected as a proposer. This contradiction may effectively lead to an empty slot if a block is supposed to be proposed by a slahed validator.
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

An impact of the proposed fix in the case of a single slashing on Ethereum Mainnet is negligible, while it becomes significant in the case of correlated slashings. For instance, a correlated slashing of `1/10th` of a validator set can lead to `1/10th` of missed proposals during a number of epochs after the slashing.
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

## Specification

The proposed change is specified in [the consensus layer specification](https://github.com/ethereum/consensus-specs/blob/82cd2f1f2317f664b7e179acdd898a327e1fe77e/specs/deneb/beacon-chain.md#modified-compute_proposer_index).

_TODO: move specification to `/_features` and provide a link._
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

## Rationale

### Modifying `get_beacon_proposer_index`

This function is modified to read a proposer index from a beacon state if a slot of a latest block header is the same as the `state.slot`.

This modification is done to make the function return correct proposer index in the case when the proposer of a given block is being slashed during processing of the block.

## Backwards Compatibility

This fix changes proposer election mechanism in a backwards incompatible way and requires a hard fork to be deployed.

## Test Cases

_TODO: provide a link to the tests written as a part of consensus layer specification._

## Reference Implementation

_TODO: provide a link to consensus layer specification._

## Security Considerations

There are no observed security issues introduced by the proposed change.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).