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

Separate type for unaggregated network attestations #3900

Merged
merged 9 commits into from
Oct 31, 2024
14 changes: 13 additions & 1 deletion specs/electra/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- [`WithdrawalRequest`](#withdrawalrequest)
- [`ConsolidationRequest`](#consolidationrequest)
- [`PendingConsolidation`](#pendingconsolidation)
- [`SingleAttestation`](#singleattestation)
- [Modified Containers](#modified-containers)
- [`AttesterSlashing`](#attesterslashing)
- [Extended Containers](#extended-containers)
Expand Down Expand Up @@ -258,6 +259,17 @@ class PendingConsolidation(Container):
target_index: ValidatorIndex
```


#### `SingleAttestation`

```python
class SingleAttestation(Container):
committee_index: CommitteeIndex
attester_index: ValidatorIndex
data: AttestationData
signature: BLSSignature
jtraglia marked this conversation as resolved.
Show resolved Hide resolved
```

### Modified Containers

#### `AttesterSlashing`
Expand Down Expand Up @@ -875,7 +887,7 @@ def process_pending_balance_deposits(state: BeaconState) -> None:
if processed_amount + deposit.amount > available_for_processing:
break
# Deposit fits in the churn, process it. Increase balance and consume churn.
else:
else:
increase_balance(state, deposit.index, deposit.amount)
processed_amount += deposit.amount
# Regardless of how the deposit was handled, we move on in the queue.
Expand Down
5 changes: 3 additions & 2 deletions specs/electra/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ The following validations are added:

##### `beacon_attestation_{subnet_id}`

The topic is updated to propagate `SingleAttestation` objects.

The following convenience variables are re-defined
- `index = get_committee_indices(attestation.committee_bits)[0]`
- `index = attestation.committee_index`

The following validations are added:
* [REJECT] `len(committee_indices) == 1`, where `committee_indices = get_committee_indices(attestation)`.
* [REJECT] `attestation.data.index == 0`