Skip to content

Commit a35d783

Browse files
authored
Merge pull request #3543 from etan-status/gv-finstore
Use fork choice to determine `finalized_checkpoint` in gossip validation
2 parents 8983893 + e30e8af commit a35d783

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

specs/deneb/p2p-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ The following validations MUST pass before forwarding the `blob_sidecar` on the
175175
- _[REJECT]_ The sidecar's index is consistent with `MAX_BLOBS_PER_BLOCK` -- i.e. `blob_sidecar.index < MAX_BLOBS_PER_BLOCK`.
176176
- _[REJECT]_ The sidecar is for the correct subnet -- i.e. `compute_subnet_for_blob_sidecar(blob_sidecar.index) == subnet_id`.
177177
- _[IGNORE]_ The sidecar is not from a future slot (with a `MAXIMUM_GOSSIP_CLOCK_DISPARITY` allowance) -- i.e. validate that `block_header.slot <= current_slot` (a client MAY queue future sidecars for processing at the appropriate slot).
178-
- _[IGNORE]_ The sidecar is from a slot greater than the latest finalized slot -- i.e. validate that `block_header.slot > compute_start_slot_at_epoch(state.finalized_checkpoint.epoch)`
178+
- _[IGNORE]_ The sidecar is from a slot greater than the latest finalized slot -- i.e. validate that `block_header.slot > compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)`
179179
- _[REJECT]_ The proposer signature of `blob_sidecar.signed_block_header`, is valid with respect to the `block_header.proposer_index` pubkey.
180180
- _[IGNORE]_ The sidecar's block's parent (defined by `block_header.parent_root`) has been seen (via both gossip and non-gossip sources) (a client MAY queue sidecars for processing once the parent block is retrieved).
181181
- _[REJECT]_ The sidecar's block's parent (defined by `block_header.parent_root`) passes validation.

specs/phase0/p2p-interface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ The following validations MUST pass before forwarding the `signed_beacon_block`
330330
i.e. validate that `signed_beacon_block.message.slot <= current_slot`
331331
(a client MAY queue future blocks for processing at the appropriate slot).
332332
- _[IGNORE]_ The block is from a slot greater than the latest finalized slot --
333-
i.e. validate that `signed_beacon_block.message.slot > compute_start_slot_at_epoch(state.finalized_checkpoint.epoch)`
333+
i.e. validate that `signed_beacon_block.message.slot > compute_start_slot_at_epoch(store.finalized_checkpoint.epoch)`
334334
(a client MAY choose to validate and store such blocks for additional purposes -- e.g. slashing detection, archive nodes, etc).
335335
- _[IGNORE]_ The block is the first block with valid signature received for the proposer for the slot, `signed_beacon_block.message.slot`.
336336
- _[REJECT]_ The proposer signature, `signed_beacon_block.signature`, is valid with respect to the `proposer_index` pubkey.
@@ -696,9 +696,9 @@ The fields are, as seen by the client at the time of sending the message:
696696
- `current_fork_version` is the fork version at the node's current epoch defined by the wall-clock time
697697
(not necessarily the epoch to which the node is sync)
698698
- `genesis_validators_root` is the static `Root` found in `state.genesis_validators_root`
699-
- `finalized_root`: `state.finalized_checkpoint.root` for the state corresponding to the head block
699+
- `finalized_root`: `store.finalized_checkpoint.root` according to [fork choice](./fork-choice.md).
700700
(Note this defaults to `Root(b'\x00' * 32)` for the genesis finalized checkpoint).
701-
- `finalized_epoch`: `state.finalized_checkpoint.epoch` for the state corresponding to the head block.
701+
- `finalized_epoch`: `store.finalized_checkpoint.epoch` according to [fork choice](./fork-choice.md).
702702
- `head_root`: The `hash_tree_root` root of the current head block (`BeaconBlock`).
703703
- `head_slot`: The slot of the block corresponding to the `head_root`.
704704

0 commit comments

Comments
 (0)