slash.zk 361 B

123456789101112131415
  1. constant "RlnSlash" {}
  2. witness "RlnSlash" {
  3. Base secret_key,
  4. MerklePath identity_path,
  5. Uint32 identity_leaf_pos,
  6. }
  7. circuit "RlnSlash" {
  8. identity_derivation_path = witness_base(11);
  9. identity_commit = poseidon_hash(identity_derivation_path, secret_key);
  10. root = merkle_root(identity_leaf_pos, identity_path, identity_commit);
  11. constrain_instance(root);
  12. }