-
Notifications
You must be signed in to change notification settings - Fork 874
chore: add rust PeerdasKZG crypto library for peerdas functionality and rollback c-kzg dependency to 4844 version #5941
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
Changes from 10 commits
8331583
f84bbde
2f0eefa
2bec02c
6f3c1b6
d09a495
d15a8ae
ed418a6
37552cb
5f142aa
405e80e
629ba9f
fc34d59
fda359e
1a57456
42316da
ddcd60d
f34a84d
25e7b72
dda5133
126ac96
05426ee
6440d78
8570748
2b2938a
7d284bb
d388f54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||
use kzg::{Blob as KzgBlob, Bytes48, Cell as KzgCell, Error as KzgError, Kzg}; | ||||||
use kzg::{Blob as KzgBlob, Bytes48, CellRef as KzgCellRef, Error as KzgError, Kzg}; | ||||||
use std::sync::Arc; | ||||||
use types::data_column_sidecar::Cell; | ||||||
use types::{Blob, DataColumnSidecar, EthSpec, Hash256, KzgCommitment, KzgProof}; | ||||||
|
@@ -11,8 +11,11 @@ fn ssz_blob_to_crypto_blob<E: EthSpec>(blob: &Blob<E>) -> Result<KzgBlob, KzgErr | |||||
|
||||||
/// Converts a cell ssz List object to an array to be used with the kzg | ||||||
/// crypto library. | ||||||
fn ssz_cell_to_crypto_cell<E: EthSpec>(cell: &Cell<E>) -> Result<KzgCell, KzgError> { | ||||||
KzgCell::from_bytes(cell.as_ref()).map_err(Into::into) | ||||||
fn ssz_cell_to_crypto_cell<E: EthSpec>(cell: &Cell<E>) -> Result<KzgCellRef, KzgError> { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that this method is duplicated in data_column_sidecar.rs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, we can probably remove this one |
||||||
let cell_bytes: &[u8] = cell.as_ref(); | ||||||
Ok(cell_bytes | ||||||
.try_into() | ||||||
.expect("expected cell to have size {BYTES_PER_CELL}. This should be guaranteed by the `FixedVector type")) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
|
||||||
/// Validate a single blob-commitment-proof triplet from a `BlobSidecar`. | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.