From 35e22702f34a612e1c0a7f1c39bc10c1aff81e01 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sat, 28 Oct 2023 11:11:27 -0600 Subject: [PATCH] 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