mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 13:06:34 +00:00
Merge branch 'dev' into blob-p2p-proof
This commit is contained in:
commit
7f63f003c0
@ -77,7 +77,6 @@ Deneb is a consensus-layer upgrade containing a number of features. Including:
|
|||||||
|
|
||||||
| Name | Value |
|
| Name | Value |
|
||||||
| - | - |
|
| - | - |
|
||||||
| `BLOB_TX_TYPE` | `uint8(0x03)` |
|
|
||||||
| `VERSIONED_HASH_VERSION_KZG` | `Bytes1('0x01')` |
|
| `VERSIONED_HASH_VERSION_KZG` | `Bytes1('0x01')` |
|
||||||
|
|
||||||
## Preset
|
## Preset
|
||||||
|
@ -165,6 +165,7 @@ The following validations MUST pass before forwarding the `blob_sidecar` on the
|
|||||||
- _[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).
|
- _[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).
|
||||||
- _[REJECT]_ The sidecar's block's parent (defined by `block_header.parent_root`) passes validation.
|
- _[REJECT]_ The sidecar's block's parent (defined by `block_header.parent_root`) passes validation.
|
||||||
- _[REJECT]_ The sidecar is from a higher slot than the sidecar's block's parent (defined by `block_header.parent_root`).
|
- _[REJECT]_ The sidecar is from a higher slot than the sidecar's block's parent (defined by `block_header.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 of `blob_sidecar.signed_block_header`, is valid with respect to the `block_header.proposer_index` pubkey.
|
- _[REJECT]_ The proposer signature of `blob_sidecar.signed_block_header`, is valid with respect to the `block_header.proposer_index` pubkey.
|
||||||
- _[REJECT]_ The sidecar's inclusion proof is valid as verified by `verify_blob_sidecar_inclusion_proof`.
|
- _[REJECT]_ The sidecar's inclusion proof is valid as verified by `verify_blob_sidecar_inclusion_proof`.
|
||||||
- _[REJECT]_ The sidecar's blob is valid as verified by `verify_blob_kzg_proof(blob_sidecar.blob, blob_sidecar.kzg_commitment, blob_sidecar.kzg_proof)`.
|
- _[REJECT]_ The sidecar's blob is valid as verified by `verify_blob_kzg_proof(blob_sidecar.blob, blob_sidecar.kzg_commitment, blob_sidecar.kzg_proof)`.
|
||||||
|
@ -128,10 +128,8 @@ def prepare_execution_payload(state: BeaconState,
|
|||||||
|
|
||||||
*[New in Deneb:EIP4844]*
|
*[New in Deneb:EIP4844]*
|
||||||
|
|
||||||
1. After retrieving the execution payload from the execution engine as specified above,
|
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`.
|
||||||
use the `payload_id` to retrieve `blobs`, `blob_kzg_commitments`, and `blob_kzg_proofs`
|
2. Set `block.body.blob_kzg_commitments = commitments`.
|
||||||
via `get_payload(payload_id).blobs_bundle`.
|
|
||||||
2. Set `block.body.blob_kzg_commitments = blob_kzg_commitments`.
|
|
||||||
|
|
||||||
#### Constructing the `BlobSidecar`s
|
#### Constructing the `BlobSidecar`s
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ from eth2spec.utils.ssz.ssz_typing import (
|
|||||||
Union,
|
Union,
|
||||||
boolean,
|
boolean,
|
||||||
uint256, uint64,
|
uint256, uint64,
|
||||||
|
uint8,
|
||||||
)
|
)
|
||||||
from eth2spec.utils.ssz.ssz_impl import serialize
|
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
|
MAX_ACCESS_LIST_SIZE = 2**24
|
||||||
|
|
||||||
|
|
||||||
|
BLOB_TX_TYPE = uint8(0x03)
|
||||||
|
|
||||||
|
|
||||||
class AccessTuple(Container):
|
class AccessTuple(Container):
|
||||||
address: Bytes20 # Address = Bytes20
|
address: Bytes20 # Address = Bytes20
|
||||||
storage_keys: List[Bytes32, MAX_ACCESS_LIST_STORAGE_KEYS]
|
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)
|
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
|
return opaque_tx, blobs, blob_kzg_commitments, blob_kzg_proofs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user