Trait AvidMConfig

Source
pub trait AvidMConfig {
    type BaseField: FftField;
    type Digest: NodeValue;
    type MerkleTree: MerkleTreeScheme<Element = Self::Digest, Commitment = Self::Digest>;

    // Required method
    fn raw_share_digest(
        raw_shares: &[Self::BaseField],
    ) -> Result<Self::Digest, VidError>;
}

Required Associated Types§

Source

type BaseField: FftField

Source

type Digest: NodeValue

Source

type MerkleTree: MerkleTreeScheme<Element = Self::Digest, Commitment = Self::Digest>

Required Methods§

Source

fn raw_share_digest( raw_shares: &[Self::BaseField], ) -> Result<Self::Digest, VidError>

Digest the raw shares into the element type for Merkle tree.

§Errors

This function will return an error if digest function fails.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AvidMConfig for Keccak256Config

Source§

type BaseField = Fp<MontBackend<FrConfig, 4>, 4>

Source§

type Digest = HasherNode<CoreWrapper<Keccak256Core>>

Source§

type MerkleTree = MerkleTree<<Keccak256Config as AvidMConfig>::Digest, HasherDigestAlgorithm, u64, 3, HasherNode<CoreWrapper<Keccak256Core>>>

Source§

impl AvidMConfig for Poseidon2Config

Source§

type BaseField = Fp<MontBackend<FrConfig, 4>, 4>

Source§

type Digest = Fp<MontBackend<FrConfig, 4>, 4>

Source§

type MerkleTree = MerkleTree<<Poseidon2Config as AvidMConfig>::Digest, FixedLenPoseidon2Hash<<Poseidon2Config as AvidMConfig>::BaseField, Poseidon2SpongeState<Fp<MontBackend<FrConfig, 4>, 4>, 3, 1, Poseidon2ParamsBn3>, 3, 1>, u64, 3, <Poseidon2Config as AvidMConfig>::Digest>

Source§

impl AvidMConfig for Sha256Config

Source§

type BaseField = Fp<MontBackend<FrConfig, 4>, 4>

Source§

type Digest = HasherNode<CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>>

Source§

type MerkleTree = MerkleTree<<Sha256Config as AvidMConfig>::Digest, HasherDigestAlgorithm, u64, 3, HasherNode<CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>>>