Skip to content

Commit

Permalink
quick fix on accidental commit (#137)
Browse files Browse the repository at this point in the history
* comment for generating stage2

* Adding ability to grab ParaMerkleProof.. wasm trap error..

* fixing bug with paraId

* fixing proof generation

* small refactorings

* got stage4 and stage 3 proof generation setup

* adding small func and test for digest

* generating correct full proof

* final cleanup

* verifying full XCMP proof successfully

* removing merge stuff
  • Loading branch information
coax1d authored Mar 22, 2024
1 parent 6146b52 commit bef55bb
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pallets/xcmp_message_stuffer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ impl Default for ChannelMerkleProof {
type XcmpMessages<T, I> = <<T as crate::Config<I>>::XcmpDataProvider as XcmpMessageProvider<<T as frame_system::Config>::Hash>>::XcmpMessages;
type MmrProof = Proof<H256>;
type ChannelId = u64;
<<<<<<< HEAD
=======
type BinaryMerkleProof = ();
>>>>>>> main

#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
pub struct XcmpProof {
Expand Down Expand Up @@ -246,18 +242,10 @@ pub mod pallet {
"Verified Stage 1 XCMP Proof Successfully!!!",
);

<<<<<<< HEAD
if stage_1_leaves.len() > 1 {
log::error!("stage_1_leaves length too long {}", stage_1_leaves.len());
return Err(Error::<T, I>::XcmpStage1LeavesTooLarge.into())
}
=======
// Verify stage 2..
// grab ParaHeader root from stage_1_proof
// let para_header_root = Decode::decode(stage_1_leaves)
// Take Last leaf element as the para_header_root selected
// let (stage_2_proof, stage_2_leaves) = xcmp_proof.stage_2;
>>>>>>> main

let stage_1_leaf = &stage_1_leaves[0];
let stage_1_leaf = stage_1_leaf.clone().into_opaque_leaf();
Expand Down

0 comments on commit bef55bb

Please sign in to comment.