From 1a53dbbf96944f88412fbe3f0394b15264774dc2 Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Wed, 25 Oct 2023 22:05:57 +0800 Subject: [PATCH 1/3] Update p2p-interface.md --- specs/deneb/p2p-interface.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/deneb/p2p-interface.md b/specs/deneb/p2p-interface.md index a81e5d0bb..831f90606 100644 --- a/specs/deneb/p2p-interface.md +++ b/specs/deneb/p2p-interface.md @@ -155,6 +155,7 @@ The following validations MUST pass before forwarding the `signed_blob_sidecar` - _[IGNORE]_ The sidecar's block's parent (defined by `sidecar.block_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). - _[REJECT]_ The sidecar's block's parent (defined by `sidecar.block_parent_root`) passes validation. - _[REJECT]_ The sidecar is from a higher slot than the sidecar's block's parent (defined by `sidecar.block_parent_root`). +- _[REJECT]_ The current finalized_checkpoint is an ancestor of the sidecar's block's parent -- i.e. `get_checkpoint_block(store, sidecar.block_parent_root, store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root`. - _[REJECT]_ The proposer signature, `signed_blob_sidecar.signature`, is valid as verified by `verify_blob_sidecar_signature`. - _[IGNORE]_ The sidecar is the only sidecar with valid signature received for the tuple `(sidecar.block_root, sidecar.index)`. - _[REJECT]_ The sidecar is proposed by the expected `proposer_index` for the block's slot in the context of the current shuffling (defined by `block_parent_root`/`slot`). From 56f8c2bb06a99fac7aebbacf5e8a3de2398b2dc0 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sat, 28 Oct 2023 10:39:54 -0600 Subject: [PATCH 2/3] Update validator.md Align block production description using the latest APIs with corresponding symbols. --- specs/deneb/validator.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specs/deneb/validator.md b/specs/deneb/validator.md index 7b8a81b19..2a8c832c7 100644 --- a/specs/deneb/validator.md +++ b/specs/deneb/validator.md @@ -128,10 +128,8 @@ def prepare_execution_payload(state: BeaconState, *[New in Deneb:EIP4844]* -1. After retrieving the execution payload from the execution engine as specified above, -use the `payload_id` to retrieve `blobs`, `blob_kzg_commitments`, and `blob_kzg_proofs` -via `get_payload(payload_id).blobs_bundle`. -2. Set `block.body.blob_kzg_commitments = blob_kzg_commitments`. +1. The execution payload is obtained from the execution engine as defined above using `payload_id`. The response also includes a `blobs_bundle` entry containing the corresponding `blobs`, `commitments`, and `proofs`. +2. Set `block.body.blob_kzg_commitments = commitments`. #### Constructing the `SignedBlobSidecar`s From 35e22702f34a612e1c0a7f1c39bc10c1aff81e01 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sat, 28 Oct 2023 11:11:27 -0600 Subject: [PATCH 3/3] remove `BLOB_TX_TYPE` from spec (and move to tests) --- specs/deneb/beacon-chain.md | 1 - tests/core/pyspec/eth2spec/test/helpers/sharding.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/specs/deneb/beacon-chain.md b/specs/deneb/beacon-chain.md index b98ac1259..852f98308 100644 --- a/specs/deneb/beacon-chain.md +++ b/specs/deneb/beacon-chain.md @@ -77,7 +77,6 @@ Deneb is a consensus-layer upgrade containing a number of features. Including: | Name | Value | | - | - | -| `BLOB_TX_TYPE` | `uint8(0x03)` | | `VERSIONED_HASH_VERSION_KZG` | `Bytes1('0x01')` | ## Preset diff --git a/tests/core/pyspec/eth2spec/test/helpers/sharding.py b/tests/core/pyspec/eth2spec/test/helpers/sharding.py index 25b4dea59..c06b1aa9c 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/sharding.py +++ b/tests/core/pyspec/eth2spec/test/helpers/sharding.py @@ -7,6 +7,7 @@ from eth2spec.utils.ssz.ssz_typing import ( Union, boolean, uint256, uint64, + uint8, ) from eth2spec.utils.ssz.ssz_impl import serialize @@ -20,6 +21,9 @@ MAX_ACCESS_LIST_STORAGE_KEYS = 2**24 MAX_ACCESS_LIST_SIZE = 2**24 +BLOB_TX_TYPE = uint8(0x03) + + class AccessTuple(Container): address: Bytes20 # Address = Bytes20 storage_keys: List[Bytes32, MAX_ACCESS_LIST_STORAGE_KEYS] @@ -120,5 +124,5 @@ def get_sample_opaque_tx(spec, blob_count=1, rng=random.Random(5566), is_valid_b ) ) serialized_tx = serialize(signed_blob_tx) - opaque_tx = spec.uint_to_bytes(spec.BLOB_TX_TYPE) + serialized_tx + opaque_tx = spec.uint_to_bytes(BLOB_TX_TYPE) + serialized_tx return opaque_tx, blobs, blob_kzg_commitments, blob_kzg_proofs