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

Fix: Remove security footgun example in onchain values docs #793

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

mitschabaude
Copy link
Contributor

@mitschabaude mitschabaude commented Jan 15, 2024

The code example deleted here (written by me originally) makes no sense and suggests usage of on-chain values in an insecure way: Using a completely unconstrained value (now) to define a range that treats that unconstrained value as the actual value.

A better example for requireBetween() with the .get() value as input would be to treat it like "requireEquals() but allowing for an error"

@mitschabaude mitschabaude requested a review from a team as a code owner January 15, 2024 07:41
Copy link

vercel bot commented Jan 15, 2024

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

Name Status Preview Comments Updated (UTC)
docs2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2024 7:43am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
07-oracles ⬜️ Ignored (Inspect) Visit Preview Jan 15, 2024 7:43am

@barriebyron
Copy link
Contributor

thanks for the fix!
@mitschabaude would you consider the rest of this doc https://docs.minaprotocol.com/zkapps/o1js/on-chain-values to be technically accurate so we can close the HF Audit task? See https://app.zenhub.com/workspaces/o1js-docs-6565f4667e7d97084bc9895d/issues/gh/o1-labs/docs2/478

@mitschabaude
Copy link
Contributor Author

@mitschabaude would you consider the rest of this doc https://docs.minaprotocol.com/zkapps/o1js/on-chain-values to be technically accurate so we can close the HF Audit task?

@barriebyron not sure, haven't gone through it all in detail again

@barriebyron barriebyron merged commit 5f3785e into main Jan 24, 2024
4 checks passed
@barriebyron barriebyron deleted the fix/security-footgun-onchain-values branch January 24, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants