mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-06 21:34:00 -05:00
24 lines
408 B
Plaintext
24 lines
408 B
Plaintext
k = 13;
|
|
field = "pallas";
|
|
|
|
constant "InclusionProof" {
|
|
}
|
|
|
|
witness "InclusionProof" {
|
|
Base leaf,
|
|
Uint32 leaf_pos,
|
|
MerklePath path,
|
|
Base blind,
|
|
}
|
|
|
|
circuit "InclusionProof" {
|
|
# Merkle root
|
|
root = merkle_root(leaf_pos, path, leaf);
|
|
constrain_instance(root);
|
|
|
|
# Also export the actual value but encrypted with a random blind
|
|
enc_leaf = poseidon_hash(leaf, blind);
|
|
constrain_instance(enc_leaf);
|
|
}
|
|
|