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

Remove array_windows feature to be closer to stable rust #606

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion adapters/celestia/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(array_windows)]
pub mod celestia;
pub mod shares;
pub use celestia::*;
Expand Down
6 changes: 4 additions & 2 deletions adapters/celestia/src/verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ impl da::DaVerifier for CelestiaVerifier {

// Verify each sub-proof and flatten the shares back into a sequential array
// First, enforce that the sub-proofs cover a contiguous range of shares
for [l, r] in tx_proof.proof.array_windows::<2>() {
assert_eq!(l.start_share_idx + l.shares.len(), r.start_share_idx)
for i in 1..tx_proof.proof.len() {
let l = &tx_proof.proof[i - 1];
let r = &tx_proof.proof[i];
assert_eq!(l.start_share_idx + l.shares.len(), r.start_share_idx);
}
let mut tx_shares = Vec::new();
// Then, verify the sub proofs
Expand Down