Skip to content
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

docs(website): Add dev-mode instructions #1033

Merged
merged 24 commits into from Nov 1, 2023

Conversation

Cardosaum
Copy link
Contributor

Closes #434

@vercel
Copy link

vercel bot commented Oct 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2023 9:50pm

@Cardosaum Cardosaum self-assigned this Oct 25, 2023
@Cardosaum Cardosaum added the documentation Improvements or additions to documentation label Oct 25, 2023
@SchmErik SchmErik self-requested a review October 25, 2023 16:24

A risc0 project in dev mode supports ([fake](https://docs.rs/risc0-zkvm/0.18.0/risc0_zkvm/enum.InnerReceipt.html#variant.Fake)) receipt creation and pass-through (fake) 'verification' workflows, so that dev mode may be switched on and off without impacting project workflows. In particular, receipts generated in dev mode still include public outputs written to the [journal](https://dev.risczero.com/terminology#journal).

However, because the proving process is bypassed, receipts generated in dev mode will fail a standard receipt verification check. Only when the verifier is also built in dev mode will it perform pass-through 'verification' of the fake receipt.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag is an environment variable checked at runtime rather than at build-time

website/docs/faq.md Outdated Show resolved Hide resolved
Comment on lines 269 to 272
| Dev mode env var | Feature flag off | Feature flag on |
| ----------------------------- | ------------------------ | ------------------------ |
| RISC0_DEV_MODE=true | Developer mode activated | Prover panic |
| RISCO_DEV_MODE={false, unset} | Default project behavior | Default project behavior |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the verifier panic when the disable-dev-mode flag is on? Also it's not clear just looking at this table which feature flag you are referring to. Directly referencing diable-dev-mode would be helpful to make this table self-contained.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will panic, we test for this property here.

I changed the table to reference disable-dev-mode directly, thanks for pointing out!

@flaub
Copy link
Member

flaub commented Oct 25, 2023

A reminder to rename the PR before landing. :)

Copy link
Contributor

@SchmErik SchmErik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this a while ago but I think we should consider referring to "developer mode" as "dev-mode" throughout the document so that we have consistency in terminology

@flaub flaub added this to the 0.19 milestone Oct 26, 2023
@Cardosaum Cardosaum changed the title Cardosaum/docs/add-risc0-dev-mode-to-website docs(website): Add dev-mode instructions Oct 26, 2023
Co-authored-by: Erik Kaneda <erik@risczero.com>
Copy link
Contributor

@SchmErik SchmErik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but before you merge, could you update the links to reflect the latest version? I see some 0.18

@flaub
Copy link
Member

flaub commented Oct 26, 2023

For prerelease, you can use *, see: https://docs.rs/about/redirections

@github-actions github-actions bot temporarily deployed to preview October 31, 2023 21:27 Destroyed
Copy link

Pages Preview
🚀 Deployed preview to https://risc0.github.io/website-preview/risc0/risc0/pr/1033
on branch gh-pages at 2023-10-31 21:27:11 +0000

@SchmErik SchmErik enabled auto-merge (squash) October 31, 2023 21:49
@SchmErik SchmErik merged commit 6cb217a into main Nov 1, 2023
24 checks passed
@SchmErik SchmErik deleted the cardosaum/docs/add-risc0-dev-mode-to-website branch November 1, 2023 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DevEx] Document how to use Dev Mode feature
4 participants