Examples.ECommitmentTree (Anoma v0.29.0)
Summary
Functions
This fetches the current mnesia tree storage
A commitment tree with commits from ETransaction.swap_from_actions/1
Functions
Link to this function
a_merkle_proof()
@spec a_merkle_proof() :: {CommitmentTree.t(), CommitmentTree.Proof.t(), any()}
Link to this function
babylon_mnesia_ct(spec \\ sha256_32_spec())
@spec babylon_mnesia_ct(CommitmentTree.Spec.t()) :: CommitmentTree.t()
Link to this function
cairo_poseidon_spec()
@spec cairo_poseidon_spec() :: CommitmentTree.Spec.t()
Link to this function
current_tree_mnesia_ct(spec \\ sha256_32_spec())
@spec current_tree_mnesia_ct(CommitmentTree.Spec.t()) :: CommitmentTree.t()
This fetches the current mnesia tree storage
This value is expected to differ, and will be a fixture for other tests to assert about.
Link to this function
empty_mnesia_backed_ct(spec \\ sha256_32_spec())
@spec empty_mnesia_backed_ct(CommitmentTree.Spec.t()) :: CommitmentTree.t()
Link to this function
lots_of_inserts_ct(spec \\ sha256_32_spec())
@spec lots_of_inserts_ct(CommitmentTree.Spec.t()) :: CommitmentTree.t()
Link to this function
memory_backed_ct(spec \\ sha256_32_spec())
@spec memory_backed_ct(CommitmentTree.Spec.t()) :: CommitmentTree.t()
Link to this function
memory_backed_ct_with_trivial_swap(spec \\ sha256_32_spec())
@spec memory_backed_ct_with_trivial_swap(term()) :: {CommitmentTree.t(), binary()}
A commitment tree with commits from ETransaction.swap_from_actions/1
Link to this function
sha256_32_spec()
@spec sha256_32_spec() :: CommitmentTree.Spec.t()
Link to this function
tree_storage()
@spec tree_storage() :: atom()