mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 11:44:41 +00:00
reverse params in get_aggregate_and_proof to match ssz type
This commit is contained in:
parent
d2e08c0cdf
commit
f7181adece
@ -468,12 +468,12 @@ Selection proofs are provided in `AggregateAndProof` to prove to the gossip chan
|
|||||||
|
|
||||||
`AggregateAndProof` messages are signed by the aggregator and broadcast inside of `SignedAggregateAndProof` objects to prevent a class of DoS attacks and message forgeries.
|
`AggregateAndProof` messages are signed by the aggregator and broadcast inside of `SignedAggregateAndProof` objects to prevent a class of DoS attacks and message forgeries.
|
||||||
|
|
||||||
First, `aggregate_and_proof = get_aggregate_and_proof(state, aggregate_attestation, validator_index, privkey)` is contructed.
|
First, `aggregate_and_proof = get_aggregate_and_proof(state, validator_index, aggregate_attestation, privkey)` is constructed.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def get_aggregate_and_proof(state: BeaconState,
|
def get_aggregate_and_proof(state: BeaconState,
|
||||||
aggregate: Attestation,
|
|
||||||
aggregator_index: ValidatorIndex,
|
aggregator_index: ValidatorIndex,
|
||||||
|
aggregate: Attestation,
|
||||||
privkey: int) -> AggregateAndProof:
|
privkey: int) -> AggregateAndProof:
|
||||||
return AggregateAndProof(
|
return AggregateAndProof(
|
||||||
aggregator_index=aggregator_index,
|
aggregator_index=aggregator_index,
|
||||||
@ -503,11 +503,6 @@ class AggregateAndProof(Container):
|
|||||||
selection_proof: BLSSignature
|
selection_proof: BLSSignature
|
||||||
```
|
```
|
||||||
|
|
||||||
Where
|
|
||||||
* `aggregator_index` is the validator's `ValidatorIndex`.
|
|
||||||
* `aggregate` is the `aggregate_attestation` constructed in the previous section.
|
|
||||||
* `selection_proof` is the signature of the slot (`get_slot_signature()`).
|
|
||||||
|
|
||||||
##### `SignedAggregateAndProof`
|
##### `SignedAggregateAndProof`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
Loading…
x
Reference in New Issue
Block a user