-
Notifications
You must be signed in to change notification settings - Fork 809
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
chore: add rust PeerdasKZG crypto library for peerdas functionality and rollback c-kzg dependency to 4844 version #5941
Merged
Merged
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8331583
chore: add recover_cells_and_compute_proofs method
kevaundray f84bbde
chore: add rust peerdas crypto library
kevaundray 2f0eefa
chore: integrate peerdaskzg rust library into kzg crate
kevaundray 2bec02c
chore(multi):
kevaundray 6f3c1b6
chore(multi):
kevaundray d09a495
chore: cleanup of superfluous conversions
kevaundray d15a8ae
chore: revert c-kzg dependency back to v1
kevaundray ed418a6
chore: move dependency into correct order
kevaundray 37552cb
chore: update rust dependency
kevaundray 5f142aa
chore: remove Default initialization of PeerDasContext and explicitly…
kevaundray 405e80e
chore: cleanup exports
kevaundray 629ba9f
Merge branch 'das' into kw/add-peerdas-kzg-lib
kevaundray fc34d59
chore: commit updated cargo.lock
kevaundray fda359e
Update Cargo.toml
kevaundray 1a57456
chore: rename dependency
kevaundray 42316da
chore: update peerdas lib
kevaundray ddcd60d
chore: fix clippy lifetime
kevaundray f34a84d
Merge branch 'das' into kw/add-peerdas-kzg-lib
kevaundray 25e7b72
chore: cargo clippy fix
kevaundray dda5133
chore: cargo fmt
kevaundray 126ac96
chore: update lib to add redundant checks (these will be removed in c…
kevaundray 05426ee
chore: update dependency to ignore proofs
kevaundray 6440d78
chore: update peerdas lib to latest
kevaundray 8570748
update lib
kevaundray 2b2938a
chore: remove empty proof parameter
kevaundray 7d284bb
Merge branch 'das' into kw/add-peerdas-kzg-lib
kevaundray d388f54
Merge branch 'das' into kw/add-peerdas-kzg-lib
jimmygchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> { | ||||||
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`. | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, we can probably remove this one