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

improves the optimistic_hashing cli option description #342

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/prover/approx/hashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ makes up any arbitrary function that fulfills the previously described axioms an
also maps that single input to an output accordingly.
```

(hashing_unbounded)=
## Hashing of unbounded data

In the discussion so far we only considered hashes of data whose length is
Expand Down
11 changes: 9 additions & 2 deletions docs/prover/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,16 @@ Options regarding hashing of unbounded data

**What does it do?**

When hashing data of potentially unbounded length (including unbounded arrays, like `bytes`, `uint[]`, etc.), assume that its length is bounded by the value set through the `--hashing_length_bound` option. If this is not set, and the length can be exceeded by the input program, the Prover reports an assertion violation. I.e., when this option is set, the boundedness of the hashed data assumed checked by the Prover, when this option is set that boundedness is assumed instead.
When hashing data of potentially unbounded length (including unbounded arrays,
like `bytes`, `uint[]`, etc.):

See {doc}`../approx/hashing` for more details.
1. If `optimistic_hashing` is set the Proves _assumes_
Copy link
Contributor

Choose a reason for hiding this comment

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

Proves -> Prover
(sorry I'm late on this. I like the reformulation; much better ..)

the data's length is bounded by the `--hashing_length_bound` option.
2. If `optimistic_hashing` is not set, the Prover will check whether
the data's length can exceed the `hashing_length_bound`, and report an
assertion violation if it can.

See {ref}`hashing_unbounded` for more details.


**When to use it?**
Expand Down
Loading