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

peerDAS: Replace cKZG by goKZG #14804

Draft
wants to merge 6 commits into
base: peerDAS
Choose a base branch
from
Draft

peerDAS: Replace cKZG by goKZG #14804

wants to merge 6 commits into from

Conversation

nalepae
Copy link
Contributor

@nalepae nalepae commented Jan 16, 2025

Benchmark command:

go test -bench=. -benchtime=20x

image

Blob count: 12 (Fulu)
In bold: Currently used
Sequential: The 12 blobs are processed one by one.
Parallel: There is 1 go-routine per blob. All blobs are processed in parallel.

Benchmark with go-eth-kzg v1.1.0 - gnark-crypto v0.12.1:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms 1 417 ms 447 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 151 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms 1 620 ms 500 ms

Benchmark with go-eth-kzg v1.1.1-0.20250121235631-6bfeee5d5578 - gnark-crypto v0.14.1:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms 1 937 ms 289 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 159 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms 2 132 ms 334 ms

Benchmark with go-eth-kzg v1.1.1-0.20250123135450-8462d4150358 - gnark-crypto v0.14.1:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms ? ms 277 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 159 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms ? 330 ms

*: Data columns are directly sent by batch in the cKZG function called in VerifyDataColumnSidecarKZGProofs.

DataColumnSidecars is the Prysm implementation of get_data_column_sidecars.
Internal KZG call: ComputeCellsAndKZGProofs

VerifyDataColumnsSidecarKZGProofs takes a list of data column sidecars as an input, and verifies the provided KZG Proofs.
Internal KZG call: VerifyCellKZGProofBatch.

RecoverCellsAndProofs recovers the cells and proofs from the data column sidecars.
Internal KZG call: RecoverCellsAndComputeKZGProofs.

@nalepae nalepae requested a review from a team as a code owner January 16, 2025 14:50
@nalepae nalepae requested review from prestonvanloon, saolyn and james-prysm and removed request for a team January 16, 2025 14:50
@nalepae nalepae marked this pull request as draft January 16, 2025 14:55
@nalepae nalepae force-pushed the peerDAS-cKZG branch 4 times, most recently from a787540 to 5a16476 Compare January 17, 2025 09:30
@nalepae nalepae force-pushed the peerDAS-cKZG branch 2 times, most recently from f37f0aa to fa7a5da Compare January 22, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant