TritonVM / tasm-lib

A collection of functions written in Triton VM assembly (tasm)
Apache License 2.0
11 stars 2 forks source link

Rederive or remove `TasmObject` implementation for `MmrMembershipProof` #110

Open Sword-Smith opened 1 month ago

Sword-Smith commented 1 month ago

Since leaf_index is removed from MmrMembershipProof upstream in twenty-first, we need to update the auto-generated TasmObject implementation of this structure, located in (tasm-lib/src/structure/auto_generated_tasm_object_implementations.rs). Alternatively, we could delete the implementation all together, since the structure now only contains one field, the authentication path.

#[derive(Debug, Clone, Serialize, Deserialize, GetSize, BFieldCodec, Arbitrary)]
pub struct MmrMembershipProof<H>
where
    H: AlgebraicHasher + Sized,
{
    pub authentication_path: Vec<Digest>,
    #[bfield_codec(ignore)]
    pub _hasher: PhantomData<H>,
}

Note that this should not be done before the upstream triton-vm is updated, since the current triton-vm version still uses the MmrMembershipProof structure that contains the leaf index.