-
Notifications
You must be signed in to change notification settings - Fork 39
Ceno book. #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Ceno book. #1054
Conversation
To read the book, first install
Then start a local server that serves the content:
|
As you saw in the previous chapter, you can run the program with `cargo ceno run`: | ||
|
||
```sh | ||
cargo ceno run --example fibonacci --hints=10 --public-io=4191 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
showcase how to pass hints & public-io
as files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hints from file is done. Public IO as file is not available yet.
Some examples in the document failed. Summary of the current status:
The hints file just contains the four bytes: 10 0 0 0 or 5 0 0 0 |
We need a tool to generate |
"alloc", | ||
"bytecheck", | ||
] } | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add rust-toolchain.toml
[toolchain]
channel = "nightly-2025-03-25"
targets = ["riscv32im-unknown-none-elf"]
# We need the sources for build-std.
components = ["rust-src"]
specify as nightly build as currently we rely on some features not in stable channel. Otherwise it will suffer build failed
Now, run the program and generate a proof. You can provide input via the `--stdin` flag. | ||
|
||
```bash | ||
cargo ceno prove --hints=5 --public-io=8 --out-proof proof.bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the root cause failed reported here #1054 (comment) is because in prove
internally we generate new pk/vk pair each time, so we need to append "--out-vk vk.bin" prove command to force new generated vk are serialized thus the verify can use same key.
For why pk/vk non-deterministic is under investigating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In "prove" we exposed few arguments which will generate and invalidate pk/vk in key gen phase, e.g. --field
allow change different field which will break the fixed commitment happened in key-gen phase due to different field.
I suggest to simplify, we can temporarily remove keygen phase and only rely on prove
, verify
for documentation
This is a draft and outline of the developer document for Ceno.