Skip to content

Commit 2cb9ba1

Browse files
authored
Merge 5672cd9 into 686bc3c
2 parents 686bc3c + 5672cd9 commit 2cb9ba1

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

EIPS/eip-6987.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
eip: 6988
3+
title: Elected block proposer is not slashed
4+
description: Prevents a slashed validator from being elected as a block proposer
5+
author: Mikhail Kalinin (@mkalinin)
6+
discussions-to: <URL>
7+
status: Draft
8+
type: Standards Track
9+
category: Core
10+
created: 2023-05-04
11+
---
12+
13+
## Abstract
14+
15+
Introduces a modification to the consensus layer specification which ensures that slashed validator cannot be elected as block proposer.
16+
17+
## Motivation
18+
19+
A block proposed by a slashed validator is rejected by the corresponding validity check in the [`phase0/process_block_header`](https://github.com/ethereum/consensus-specs/blob/3115d1140b23dd4c9c23fbd9e2428186cf816bde/specs/phase0/beacon-chain.md#block-header) function as defined in the consensus layer specification.
20+
21+
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 effectively leads to a missed proposal if it is supposed to be made by a slashed validator.
22+
23+
The impact of the proposed fix in the case of a single slashing on Ethereum Mainnet is negligible but 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 in a number of epochs after the slashing.
24+
25+
## Specification
26+
27+
Specification of the proposed change can be found in [`/_features/eip6988/beacon-chain.md`](https://github.com/ethereum/consensus-specs/blob/0ad3972725e7c22e8edf3bab2dd7730acbe3c272/specs/_features/eip6988/beacon-chain.md).
28+
29+
## Rationale
30+
31+
### Modifying `get_beacon_proposer_index`
32+
33+
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`.
34+
35+
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.
36+
37+
## Backwards Compatibility
38+
39+
This fix changes proposer election mechanism in a backwards incompatible way and requires a hard fork to be deployed.
40+
41+
## Test Cases
42+
43+
The following test cases were added to cover this change:
44+
* [`test_slashed_proposer_rewarded_for_sync_aggregate_inclusion`](https://github.com/ethereum/consensus-specs/blob/0ad3972725e7c22e8edf3bab2dd7730acbe3c272/tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py#L712)
45+
* [`test_slashed_proposer_rewarded_for_attestation_inclusion`](https://github.com/ethereum/consensus-specs/blob/0ad3972725e7c22e8edf3bab2dd7730acbe3c272/tests/core/pyspec/eth2spec/test/altair/block_processing/test_process_attestation.py#L17)
46+
* [`test_slashed_validator_not_elected_for_proposal`](https://github.com/ethereum/consensus-specs/blob/0ad3972725e7c22e8edf3bab2dd7730acbe3c272/tests/core/pyspec/eth2spec/test/eip6988/unittests/validator/test_validator.py#L9)
47+
* [`test_slashed_validator_elected_for_proposal`](https://github.com/ethereum/consensus-specs/blob/0ad3972725e7c22e8edf3bab2dd7730acbe3c272/tests/core/pyspec/eth2spec/test/phase0/unittests/validator/test_validator_unittest.py#L520)
48+
49+
## Reference Implementation
50+
51+
Reference implementation is in the same place as [Specification](#specification).
52+
53+
## Security Considerations
54+
55+
There are no observed security issues introduced by the proposed change.
56+
57+
## Copyright
58+
59+
Copyright and related rights waived via [CC0](../LICENSE.md).

0 commit comments

Comments
 (0)