Skip to content

Commit 1ad381d

Browse files
committed
adding get_extended_sample_count docsstring
Signed-off-by: Csaba Kiraly <[email protected]>
1 parent 78b583d commit 1ad381d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

specs/_features/eip7594/das-core.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ def get_data_column_sidecars(signed_block: SignedBeaconBlock,
229229
```python
230230
def get_extended_sample_count(allowed_failures: uint64) -> uint64:
231231
assert 0 <= allowed_failures <= NUMBER_OF_COLUMNS // 2
232+
"""
233+
Return the sample count if allowing failures.
234+
235+
This helper demonstrates how to calculate the number of columns to query per slot when
236+
allowing given number of failures, assuming uniform random selection without replacement.
237+
Nested functions are direct replacements of Python library functions math.comb and
238+
scipy.stats.hypergeom.cdf, with the same signatures.
239+
"""
232240

233241
def math_comb(n: int, k: int) -> int:
234242
if not 0 <= k <= n:

0 commit comments

Comments
 (0)