Skip to content

Commit

Permalink
[PeerDAS] Parallelize data column sampling (#14105)
Browse files Browse the repository at this point in the history
* PeerDAS: parallelizing sample queries

* PeerDAS: select sample from non custodied columns

* Finish rebase

* Add more test cases
  • Loading branch information
0x00101010 authored and nalepae committed Oct 23, 2024
1 parent f8473ba commit 906a068
Show file tree
Hide file tree
Showing 4 changed files with 695 additions and 362 deletions.
8 changes: 8 additions & 0 deletions beacon-chain/core/peerdas/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,11 @@ func CustodyCountFromRecord(record *enr.Record) (uint64, error) {

return uint64(csc), nil
}

func CanSelfReconstruct(numCol uint64) bool {
total := params.BeaconConfig().NumberOfColumns
// if total is odd, then we need total / 2 + 1 columns to reconstruct
// if total is even, then we need total / 2 columns to reconstruct
columnsNeeded := total/2 + total%2
return numCol >= columnsNeeded
}
Loading

0 comments on commit 906a068

Please sign in to comment.