From 991d6d5609c6b4b429524a6e809218214bd021af Mon Sep 17 00:00:00 2001 From: danny Date: Thu, 19 Oct 2023 20:58:20 -0600 Subject: [PATCH 1/3] add note about not invalidating valid and available blocks --- specs/deneb/fork-choice.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specs/deneb/fork-choice.md b/specs/deneb/fork-choice.md index 5a700cc7a..e0b0c0fef 100644 --- a/specs/deneb/fork-choice.md +++ b/specs/deneb/fork-choice.md @@ -47,6 +47,8 @@ Initially, verification requires every verifying actor to retrieve all matching The block MUST NOT be considered valid until all valid `Blob`s have been downloaded. Blocks that have been previously validated as available SHOULD be considered available even if the associated `Blob`s have subsequently been pruned. +*Note*: Extraneous or invalid Blobs received on the p2p network MUST NOT invalidate a block that is otherwise valid and available. + ```python def is_data_available(beacon_block_root: Root, blob_kzg_commitments: Sequence[KZGCommitment]) -> bool: # `retrieve_blobs_and_proofs` is implementation and context dependent From 16498c60aab06fabeb9d86175e79ee4aa12540af Mon Sep 17 00:00:00 2001 From: danny Date: Fri, 20 Oct 2023 12:06:47 -0600 Subject: [PATCH 2/3] Update fork-choice.md --- specs/deneb/fork-choice.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/deneb/fork-choice.md b/specs/deneb/fork-choice.md index e0b0c0fef..501ce95bb 100644 --- a/specs/deneb/fork-choice.md +++ b/specs/deneb/fork-choice.md @@ -47,7 +47,7 @@ Initially, verification requires every verifying actor to retrieve all matching The block MUST NOT be considered valid until all valid `Blob`s have been downloaded. Blocks that have been previously validated as available SHOULD be considered available even if the associated `Blob`s have subsequently been pruned. -*Note*: Extraneous or invalid Blobs received on the p2p network MUST NOT invalidate a block that is otherwise valid and available. +*Note*: Extraneous or invalid Blobs (in addition to KZG expected/referenced valid blobs) received on the p2p network MUST NOT invalidate a block that is otherwise valid and available. ```python def is_data_available(beacon_block_root: Root, blob_kzg_commitments: Sequence[KZGCommitment]) -> bool: @@ -95,6 +95,9 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None: # If not, this block MAY be queued and subsequently considered when blob data becomes available assert is_data_available(hash_tree_root(block), block.body.blob_kzg_commitments) + # *Note*: Extraneous or invalid Blobs (in addition to the expected/referenced valid blobs) + # received on the p2p network MUST NOT invalidate a block that is otherwise valid and available + # Check the block is valid and compute the post-state state = pre_state.copy() block_root = hash_tree_root(block) From ce387d65c9b0b9ac73afabd1f2e00a19e2210e33 Mon Sep 17 00:00:00 2001 From: danny Date: Mon, 23 Oct 2023 09:15:06 -0600 Subject: [PATCH 3/3] shift wehre warning is in comments --- specs/deneb/fork-choice.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specs/deneb/fork-choice.md b/specs/deneb/fork-choice.md index 501ce95bb..10cf2bacd 100644 --- a/specs/deneb/fork-choice.md +++ b/specs/deneb/fork-choice.md @@ -93,10 +93,9 @@ def on_block(store: Store, signed_block: SignedBeaconBlock) -> None: # [New in Deneb:EIP4844] # Check if blob data is available # If not, this block MAY be queued and subsequently considered when blob data becomes available - assert is_data_available(hash_tree_root(block), block.body.blob_kzg_commitments) - # *Note*: Extraneous or invalid Blobs (in addition to the expected/referenced valid blobs) # received on the p2p network MUST NOT invalidate a block that is otherwise valid and available + assert is_data_available(hash_tree_root(block), block.body.blob_kzg_commitments) # Check the block is valid and compute the post-state state = pre_state.copy()