Files
darkfi/script/research/rln/slash.zk
parazyd 6a024ab801 zkas: Add a field definition on top of the circuit file.
Currently unused, but will probably be expanded to define proofs over
different fields.
2023-08-14 17:09:18 +02:00

19 lines
388 B
Plaintext

k = 13;
field = "pallas";
constant "RlnSlash" {}
witness "RlnSlash" {
Base secret_key,
MerklePath identity_path,
Uint32 identity_leaf_pos,
}
circuit "RlnSlash" {
identity_derivation_path = witness_base(11);
identity_commit = poseidon_hash(identity_derivation_path, secret_key);
root = merkle_root(identity_leaf_pos, identity_path, identity_commit);
constrain_instance(root);
}