mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-05 07:14:41 +00:00
Move whisk_opening_proof to block body (#3408)
This commit is contained in:
parent
76214c7cae
commit
efd2429b3f
@ -19,7 +19,6 @@
|
|||||||
- [`BeaconState`](#beaconstate)
|
- [`BeaconState`](#beaconstate)
|
||||||
- [Block processing](#block-processing)
|
- [Block processing](#block-processing)
|
||||||
- [Block header](#block-header)
|
- [Block header](#block-header)
|
||||||
- [`BeaconBlock`](#beaconblock)
|
|
||||||
- [Whisk](#whisk)
|
- [Whisk](#whisk)
|
||||||
- [`BeaconBlockBody`](#beaconblockbody)
|
- [`BeaconBlockBody`](#beaconblockbody)
|
||||||
- [Deposits](#deposits)
|
- [Deposits](#deposits)
|
||||||
@ -235,23 +234,11 @@ def process_epoch(state: BeaconState) -> None:
|
|||||||
|
|
||||||
### Block header
|
### Block header
|
||||||
|
|
||||||
#### `BeaconBlock`
|
|
||||||
|
|
||||||
```python
|
|
||||||
class BeaconBlock(Container):
|
|
||||||
slot: Slot
|
|
||||||
proposer_index: ValidatorIndex
|
|
||||||
parent_root: Root
|
|
||||||
state_root: Root
|
|
||||||
body: BeaconBlockBody
|
|
||||||
whisk_opening_proof: WhiskTrackerProof # [New in Whisk]
|
|
||||||
```
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def process_whisk_opening_proof(state: BeaconState, block: BeaconBlock) -> None:
|
def process_whisk_opening_proof(state: BeaconState, block: BeaconBlock) -> None:
|
||||||
tracker = state.whisk_proposer_trackers[state.slot % WHISK_PROPOSER_TRACKERS_COUNT]
|
tracker = state.whisk_proposer_trackers[state.slot % WHISK_PROPOSER_TRACKERS_COUNT]
|
||||||
k_commitment = state.validators[block.proposer_index].whisk_k_commitment
|
k_commitment = state.validators[block.proposer_index].whisk_k_commitment
|
||||||
assert IsValidWhiskOpeningProof(tracker, k_commitment, block.whisk_opening_proof)
|
assert IsValidWhiskOpeningProof(tracker, k_commitment, block.body.whisk_opening_proof)
|
||||||
```
|
```
|
||||||
|
|
||||||
Removed `assert block.proposer_index == get_beacon_proposer_index(state)` check in Whisk.
|
Removed `assert block.proposer_index == get_beacon_proposer_index(state)` check in Whisk.
|
||||||
@ -303,6 +290,8 @@ class BeaconBlockBody(capella.BeaconBlockBody):
|
|||||||
execution_payload: ExecutionPayload
|
execution_payload: ExecutionPayload
|
||||||
# Capella operations
|
# Capella operations
|
||||||
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES]
|
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES]
|
||||||
|
# Whisk
|
||||||
|
whisk_opening_proof: WhiskTrackerProof # [New in Whisk]
|
||||||
whisk_post_shuffle_trackers: Vector[WhiskTracker, WHISK_VALIDATORS_PER_SHUFFLE] # [New in Whisk]
|
whisk_post_shuffle_trackers: Vector[WhiskTracker, WHISK_VALIDATORS_PER_SHUFFLE] # [New in Whisk]
|
||||||
whisk_shuffle_proof: WhiskShuffleProof # [New in Whisk]
|
whisk_shuffle_proof: WhiskShuffleProof # [New in Whisk]
|
||||||
whisk_shuffle_proof_M_commitment: BLSG1Point # [New in Whisk]
|
whisk_shuffle_proof_M_commitment: BLSG1Point # [New in Whisk]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user