From d89b0be032a1544f6ad0080abb66f81f35a08ac2 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 17 Jun 2024 16:29:20 +0200 Subject: [PATCH] documentation --- README.md | 6 +++--- .../{fibonacci.cairo => cairo0_fibonacci.cairo} | 0 examples/prover/cairo1_fibonacci.cairo | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) rename examples/prover/{fibonacci.cairo => cairo0_fibonacci.cairo} (100%) create mode 100644 examples/prover/cairo1_fibonacci.cairo diff --git a/README.md b/README.md index 90771975a..acafe79a2 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,8 @@ cargo run --release --bin benches -- target/dev/cairo_verifier.sierra.json ### Stone Prover Instructions -For detailed instructions and examples, refer to the Stone Prover [documentation](https://github.com/starkware-libs/stone-prover?tab=readme-ov-file#creating-and-verifying-a-proof-of-a-cairozero-program). +For detailed instructions and examples, refer to the Stone Prover [documentation](https://github.com/starkware-libs/stone-prover?tab=readme-ov-file#overview). -### Stone Prover SDK Tool +How to prove [Cairo0](https://github.com/starkware-libs/stone-prover?tab=readme-ov-file#creating-and-verifying-a-proof-of-a-cairozero-program) program with Stone Prover. -For information on how to use the Stone Prover SDK tool, please refer to the [documentation](https://github.com/Moonsong-Labs/stone-prover-sdk). \ No newline at end of file +How to prove [Cairo1](https://github.com/starkware-libs/stone-prover?tab=readme-ov-file#creating-and-verifying-a-proof-of-a-cairo-program) program with Stone Prover. \ No newline at end of file diff --git a/examples/prover/fibonacci.cairo b/examples/prover/cairo0_fibonacci.cairo similarity index 100% rename from examples/prover/fibonacci.cairo rename to examples/prover/cairo0_fibonacci.cairo diff --git a/examples/prover/cairo1_fibonacci.cairo b/examples/prover/cairo1_fibonacci.cairo new file mode 100644 index 000000000..885478362 --- /dev/null +++ b/examples/prover/cairo1_fibonacci.cairo @@ -0,0 +1,14 @@ +use core::felt252; + +fn main() -> felt252 { + let n = 10; + let result = fib(1, 1, n); + result +} + +fn fib(a: felt252, b: felt252, n: felt252) -> felt252 { + match n { + 0 => a, + _ => fib(b, a + b, n - 1), + } +} \ No newline at end of file