diff --git a/docs/prover/approx/hashing.md b/docs/prover/approx/hashing.md index 534fe2e80..49de495e0 100644 --- a/docs/prover/approx/hashing.md +++ b/docs/prover/approx/hashing.md @@ -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 diff --git a/docs/prover/cli/options.md b/docs/prover/cli/options.md index 0277df3c8..23ed70b31 100644 --- a/docs/prover/cli/options.md +++ b/docs/prover/cli/options.md @@ -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_ + 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?**