Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add a new config MAX_EXTENDED_MATRIX_SIZE #3708

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ WHISK_PROPOSER_SELECTION_GAP: 2

# EIP7594
NUMBER_OF_COLUMNS: 128
MAX_EXTENDED_MATRIX_SIZE: 768
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 32
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384

Expand Down
1 change: 1 addition & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ WHISK_PROPOSER_SELECTION_GAP: 1

# EIP7594
NUMBER_OF_COLUMNS: 128
MAX_EXTENDED_MATRIX_SIZE: 768
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 32
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384

Expand Down
1 change: 1 addition & 0 deletions pysetup/spec_builders/eip7594.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def hardcoded_custom_type_dep_constants(cls, spec_object) -> str:
'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,
'NUMBER_OF_COLUMNS': spec_object.config_vars['NUMBER_OF_COLUMNS'].value,
'MAX_EXTENDED_MATRIX_SIZE': spec_object.config_vars['MAX_EXTENDED_MATRIX_SIZE'].value,
}

@classmethod
Expand Down
3 changes: 2 additions & 1 deletion specs/_features/eip7594/das-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ We define the following Python custom types for type hinting and readability:
| Name | SSZ equivalent | Description |
| - | - | - |
| `DataColumn` | `List[Cell, MAX_BLOB_COMMITMENTS_PER_BLOCK]` | The data of each column in EIP-7594 |
| `ExtendedMatrix` | `List[Cell, MAX_BLOBS_PER_BLOCK * NUMBER_OF_COLUMNS]` | The full data of one-dimensional erasure coding extended blobs (in row major format) |
| `ExtendedMatrix` | `List[Cell, MAX_EXTENDED_MATRIX_SIZE]` | The full data of one-dimensional erasure coding extended blobs (in row major format). |

## Configuration

Expand All @@ -55,6 +55,7 @@ We define the following Python custom types for type hinting and readability:
| Name | Value | Description |
| - | - | - |
| `NUMBER_OF_COLUMNS` | `uint64(FIELD_ELEMENTS_PER_EXT_BLOB // FIELD_ELEMENTS_PER_CELL)` (= 128) | Number of columns in the extended data matrix. |
| `MAX_EXTENDED_MATRIX_SIZE` | `uint64(MAX_BLOBS_PER_BLOCK * NUMBER_OF_COLUMNS)` (= 768) | The data size of `ExtendedMatrix`. |
kevaundray marked this conversation as resolved.
Show resolved Hide resolved

### Networking

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def test_invariants(spec):
assert spec.config.MAX_REQUEST_DATA_COLUMN_SIDECARS == (
spec.config.MAX_REQUEST_BLOCKS_DENEB * spec.config.NUMBER_OF_COLUMNS
)
assert spec.config.MAX_EXTENDED_MATRIX_SIZE == spec.MAX_BLOBS_PER_BLOCK * spec.config.NUMBER_OF_COLUMNS


@with_eip7594_and_later
Expand Down
Loading