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 Jul 16, 2024
1 parent 9572c16 commit 4b3a0b5
Show file tree
Hide file tree
Showing 4 changed files with 697 additions and 363 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 4b3a0b5

Please sign in to comment.