From 4b6b07b73e331c58f55fdc799e22cfec2a8f4066 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Tue, 12 Mar 2024 15:07:42 +0200 Subject: [PATCH] PeerDAS: Use FIELD_ELEMENTS_PER_EXT_BLOB in def of PolynomialCoeff --- presets/mainnet/eip7594.yaml | 2 ++ presets/minimal/eip7594.yaml | 2 ++ pysetup/spec_builders/eip7594.py | 1 + specs/_features/eip7594/polynomial-commitments-sampling.md | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/presets/mainnet/eip7594.yaml b/presets/mainnet/eip7594.yaml index c5bc54e52..6bddce11c 100644 --- a/presets/mainnet/eip7594.yaml +++ b/presets/mainnet/eip7594.yaml @@ -4,3 +4,5 @@ # --------------------------------------------------------------- # `uint64(2**6)` (= 64) FIELD_ELEMENTS_PER_CELL: 64 +# `uint64(2 * 4096)` (= 8192) +FIELD_ELEMENTS_PER_EXT_BLOB: 8192 diff --git a/presets/minimal/eip7594.yaml b/presets/minimal/eip7594.yaml index 043533285..0abcad3b2 100644 --- a/presets/minimal/eip7594.yaml +++ b/presets/minimal/eip7594.yaml @@ -4,3 +4,5 @@ # --------------------------------------------------------------- # `uint64(2**6)` (= 64) FIELD_ELEMENTS_PER_CELL: 64 +# `uint64(2 * 4096)` (= 8192) +FIELD_ELEMENTS_PER_EXT_BLOB: 8192 diff --git a/pysetup/spec_builders/eip7594.py b/pysetup/spec_builders/eip7594.py index 606ce895e..6f145affb 100644 --- a/pysetup/spec_builders/eip7594.py +++ b/pysetup/spec_builders/eip7594.py @@ -17,4 +17,5 @@ from eth2spec.deneb import {preset_name} as deneb def hardcoded_custom_type_dep_constants(cls, spec_object) -> Dict[str, str]: return { 'FIELD_ELEMENTS_PER_CELL': spec_object.preset_vars['FIELD_ELEMENTS_PER_CELL'].value, + 'FIELD_ELEMENTS_PER_EXT_BLOB': spec_object.preset_vars['FIELD_ELEMENTS_PER_EXT_BLOB'].value, } diff --git a/specs/_features/eip7594/polynomial-commitments-sampling.md b/specs/_features/eip7594/polynomial-commitments-sampling.md index 0a90443e9..7fe59c3b6 100644 --- a/specs/_features/eip7594/polynomial-commitments-sampling.md +++ b/specs/_features/eip7594/polynomial-commitments-sampling.md @@ -62,7 +62,7 @@ Public functions MUST accept raw bytes as input and perform the required cryptog | Name | SSZ equivalent | Description | | - | - | - | -| `PolynomialCoeff` | `List[BLSFieldElement, 2 * FIELD_ELEMENTS_PER_BLOB]` | A polynomial in coefficient form | +| `PolynomialCoeff` | `List[BLSFieldElement, FIELD_ELEMENTS_PER_EXT_BLOB]` | A polynomial in coefficient form | | `Cell` | `Vector[BLSFieldElement, FIELD_ELEMENTS_PER_CELL]` | The unit of blob data that can come with their own KZG proofs | | `CellID` | `uint64` | Cell identifier |