Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions specs/gloas/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,9 @@ def get_forkchoice_store(anchor_state: BeaconState, anchor_block: BeaconBlock) -
# [New in Gloas:EIP7732]
payloads={},
# [New in Gloas:EIP7732]
payload_timeliness_vote={
anchor_root: Vector[boolean, PTC_SIZE](True for _ in range(PTC_SIZE))
},
payload_timeliness_vote={},
# [New in Gloas:EIP7732]
payload_data_availability_vote={
anchor_root: Vector[boolean, PTC_SIZE](True for _ in range(PTC_SIZE))
},
payload_data_availability_vote={},
)
```

Expand Down
10 changes: 3 additions & 7 deletions specs/heze/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,10 @@ def get_forkchoice_store(anchor_state: BeaconState, anchor_block: BeaconBlock) -
checkpoint_states={justified_checkpoint: copy(anchor_state)},
unrealized_justifications={anchor_root: justified_checkpoint},
payloads={},
payload_timeliness_vote={
anchor_root: Vector[boolean, PTC_SIZE](True for _ in range(PTC_SIZE))
},
payload_data_availability_vote={
anchor_root: Vector[boolean, PTC_SIZE](True for _ in range(PTC_SIZE))
},
payload_timeliness_vote={},
payload_data_availability_vote={},
# [New in Heze:EIP7805]
payload_inclusion_list_satisfaction={anchor_root: True},
payload_inclusion_list_satisfaction={},
)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,11 @@ def test_genesis(spec, state):
# Verify Gloas store fields
assert hasattr(store, "payloads")
assert hasattr(store, "payload_timeliness_vote")
assert anchor_root not in store.payloads # genesis payload is EMPTY
assert anchor_root in store.payload_timeliness_vote

# Check PTC vote initialization
ptc_vote = store.payload_timeliness_vote[anchor_root]
assert len(ptc_vote) == spec.PTC_SIZE
assert all(ptc_vote)

# Check data availability vote initialization
assert anchor_root in store.payload_data_availability_vote
da_vote = store.payload_data_availability_vote[anchor_root]
assert len(da_vote) == spec.PTC_SIZE
assert all(da_vote)
assert hasattr(store, "payload_data_availability_vote")
# Anchor has no observed payload envelope or PTC votes
assert anchor_root not in store.payloads
assert anchor_root not in store.payload_timeliness_vote
assert anchor_root not in store.payload_data_availability_vote

# get_head returns ForkChoiceNode
head = spec.get_head(store)
Expand Down
5 changes: 1 addition & 4 deletions tests/formats/fork_choice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,7 @@ Each file is an SSZ-snappy encoded `SignedExecutionPayloadEnvelope`.

1. Deserialize `anchor_state.ssz_snappy` and `anchor_block.ssz_snappy` to
initialize the local store object with
`get_forkchoice_store(anchor_state, anchor_block)` helper. For Gloas and
later forks: the anchor block's payload state is initialized by seeding
`payload_states[anchor_root]` from `anchor_state`, as specified in
`get_forkchoice_store`.
`get_forkchoice_store(anchor_state, anchor_block)` helper.
2. Iterate sequentially through `steps.yaml`
- For each execution, look up the corresponding ssz_snappy file. Execute the
corresponding helper function on the current store.
Expand Down