Skip to content

Commit b4f57e1

Browse files
authored
feat: eip7594 constants (#2245)
1 parent 7988db4 commit b4f57e1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

crates/eips/src/eip7594.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//! Constants for PeerDAS.
2+
//!
3+
//! See also [EIP-7594](https://eips.ethereum.org/EIPS/eip-7594): PeerDAS - Peer Data Availability Sampling
4+
5+
use crate::eip4844::FIELD_ELEMENTS_PER_BLOB;
6+
7+
/// Number of field elements in a Reed-Solomon extended blob.
8+
pub const FIELD_ELEMENTS_PER_EXT_BLOB: u64 = FIELD_ELEMENTS_PER_BLOB * 2;
9+
10+
/// Number of field elements in a cell.
11+
pub const FIELD_ELEMENTS_PER_CELL: u64 = 64;
12+
13+
/// The number of cells in an extended blob.
14+
pub const CELLS_PER_EXT_BLOB: u64 = FIELD_ELEMENTS_PER_EXT_BLOB / FIELD_ELEMENTS_PER_CELL;

crates/eips/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub mod eip7002;
4242

4343
pub mod eip7251;
4444

45+
pub mod eip7594;
46+
4547
pub mod eip7685;
4648

4749
pub mod eip7691;

0 commit comments

Comments
 (0)