Skip to content

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 crate-crypto/go-eth-kzg#102 - gnark-crypto v0.14.0:

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 crate-crypto/go-eth-kzg#104 - gnark-crypto v0.14.0:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms 1 978 ms 277 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 150 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms 2 142 ms 330 ms

Benchmark with crate-crypto/go-eth-kzg#105 - gnark-crypto v0.14.0:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms 2 001 ms 290 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 196 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms 2 244 ms 335 ms

Benchmark with crate-crypto/go-eth-kzg#106 - gnark-crypto v0.14.0:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms 2 073 ms 283 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 201 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms 2 256 ms 337 ms

Benchmark with crate-crypto/go-eth-kzg#107 - gnark-crypto v0.14.0:

Benchmark C - sequential C - parallel go - sequential go - parallel
DataColumnSidecars 2 117 ms 260 ms 2 071 ms 291 ms
VerifyDataColumnsSidecarKZGProofs 116 ms N/A* 193 ms N/A*
RecoverCellsAndProofs 2 180 ms 254 ms 2 276 ms 347 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 james-prysm, prestonvanloon and saolyn 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