Crates.io | fcomm |
lib.rs | fcomm |
version | 0.2.0 |
source | src |
created_at | 2022-04-09 00:40:47.568023 |
updated_at | 2023-04-01 02:31:00.688071 |
description | Functional commitments with Lurk |
homepage | |
repository | https://github.com/lurk-lab/lurk-rs |
max_upload_size | |
id | 564476 |
size | 9,346,460 |
The fcomm
CLI exposes an interface for creating and verifying Lurk proofs, and for manipulating functional commitments.
TODO: Explanation of functional commitment interface.
To see how proofs work, first navigate to the fcomm/examples
directory. From the lurk-rs
project root,
➜ lurk-rs git:(master) ✗ cd fcomm/examples
➜ examples git:(master) ✗
To generate a very simple proof, type the following command (this will be surprisingly slow):
> make fibonacci-proof
To see the program whose evaluation was proved, see its source.
To see what the generated proof object claim's to attest, see the claim section of the generated json. This can be viewed more legibly if you have a JSON formatter like jq
installed:
➜ examples ✗ cat fibonacci-proof.json| jq | more
Yielding something like:
{
"claim": {
"Evaluation": {
"expr": "(LETREC ((NEXT (LAMBDA (A B N TARGET) (IF (EQ N TARGET) A (NEXT B (+ A B) (+ 1 N) TARGET)))) (FIB (NEXT 0 1 0))) (FIB 1))",
"env": "NIL",
"cont": "Outermost",
"expr_out": "1",
"env_out": "NIL",
"cont_out": "Terminal",
"status": "Terminal",
"iterations": null
}
},
"proof": {
"Recursive": {
...
}
}
}
To verify the generated proof:
```bash
> make verify-fibonacci-proof
Please note the following limitations:
ReductionCount
option (see: lib.rs), this can be significant.To see the commands that were used, see the Makefile.