Skip to content

Commit

Permalink
Move whisk_opening_proof to block body (#3408)
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion authored Jun 9, 2023
1 parent 76214c7 commit efd2429
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions specs/_features/whisk/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
- [`BeaconState`](#beaconstate)
- [Block processing](#block-processing)
- [Block header](#block-header)
- [`BeaconBlock`](#beaconblock)
- [Whisk](#whisk)
- [`BeaconBlockBody`](#beaconblockbody)
- [Deposits](#deposits)
Expand Down Expand Up @@ -235,23 +234,11 @@ def process_epoch(state: BeaconState) -> None:

### 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
def process_whisk_opening_proof(state: BeaconState, block: BeaconBlock) -> None:
tracker = state.whisk_proposer_trackers[state.slot % WHISK_PROPOSER_TRACKERS_COUNT]
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.
Expand Down Expand Up @@ -303,6 +290,8 @@ class BeaconBlockBody(capella.BeaconBlockBody):
execution_payload: ExecutionPayload
# Capella operations
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_shuffle_proof: WhiskShuffleProof # [New in Whisk]
whisk_shuffle_proof_M_commitment: BLSG1Point # [New in Whisk]
Expand Down

0 comments on commit efd2429

Please sign in to comment.