More reorg
This commit is contained in:
parent
40a044429a
commit
f964e21a80
9 changed files with 28 additions and 21 deletions
|
@ -15,6 +15,7 @@
|
|||
)]
|
||||
|
||||
mod proof;
|
||||
mod verifier;
|
||||
|
||||
use std::error::Error;
|
||||
use std::fmt::Debug;
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
use crate::proof;
|
||||
use crate::proof::key::{IntoKeys, PrefixedKey};
|
||||
use crate::proof::prefix::PrefixWasm;
|
||||
use crate::proof::verifier::cw::CwVerifier;
|
||||
use crate::proof::Proof;
|
||||
use core::fmt::Debug;
|
||||
|
||||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
||||
use std::fmt::Debug;
|
||||
use tendermint::merkle::proof::ProofOps;
|
||||
use tendermint_rpc::endpoint::abci_query::AbciQuery;
|
||||
|
||||
use crate::{
|
||||
proof,
|
||||
proof::key::{IntoKeys, PrefixedKey},
|
||||
proof::prefix::PrefixWasm,
|
||||
proof::Proof,
|
||||
verifier::cw::CwVerifier,
|
||||
};
|
||||
|
||||
pub type RawCwProof = CwProof<Vec<u8>, Vec<u8>>;
|
||||
|
||||
pub struct CwProof<K, V> {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use core::marker::PhantomData;
|
||||
|
||||
use crate::proof::prefix::ConstPrefix;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub trait IntoKeys {
|
||||
fn into_keys(self) -> Vec<Vec<u8>>;
|
||||
|
|
|
@ -3,9 +3,8 @@ use ics23::CommitmentProof;
|
|||
use tendermint::merkle::proof::ProofOps;
|
||||
|
||||
pub mod cw;
|
||||
mod key;
|
||||
mod prefix;
|
||||
mod verifier;
|
||||
pub mod key;
|
||||
pub mod prefix;
|
||||
|
||||
// Copied from hermes
|
||||
pub fn convert_tm_to_ics_merkle_proof(
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
pub struct PrefixWasm;
|
||||
|
||||
pub trait ConstPrefix {
|
||||
const PREFIX: &'static str;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct PrefixWasm;
|
||||
|
||||
impl ConstPrefix for PrefixWasm {
|
||||
const PREFIX: &'static str = "wasm";
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
||||
use ics23::CommitmentProof;
|
||||
|
||||
use crate::{
|
||||
proof::verifier::ics23::Ics23MembershipVerifier, proof::verifier::multi::MultiVerifier,
|
||||
proof::verifier::Verifier,
|
||||
};
|
||||
use crate::verifier::{ics23::Ics23MembershipVerifier, multi::MultiVerifier, Verifier};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CwVerifier(MultiVerifier<Ics23MembershipVerifier<Vec<u8>, Vec<u8>>, 2>);
|
|
@ -1,8 +1,12 @@
|
|||
use crate::proof::verifier::Verifier;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
||||
use ics23::commitment_proof::Proof;
|
||||
use ics23::{calculate_existence_root, verify_membership, CommitmentProof, ProofSpec};
|
||||
use std::marker::PhantomData;
|
||||
use ics23::{
|
||||
calculate_existence_root, commitment_proof::Proof, verify_membership, CommitmentProof,
|
||||
ProofSpec,
|
||||
};
|
||||
|
||||
use crate::verifier::Verifier;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Ics23MembershipVerifier<K, V> {
|
|
@ -1,4 +1,4 @@
|
|||
use crate::proof::verifier::Verifier;
|
||||
use crate::verifier::Verifier;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct MultiVerifier<V, const N: usize> {
|
Loading…
Reference in a new issue