From c4b8d34522fc3243a1a68b2cf0808eb71528f095 Mon Sep 17 00:00:00 2001 From: Shoham Shamir Date: Sun, 26 Jan 2025 13:39:47 +0200 Subject: [PATCH] improves the optimistic_hashing cli option description --- docs/prover/approx/hashing.md | 1 + docs/prover/cli/options.md | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/prover/approx/hashing.md b/docs/prover/approx/hashing.md index 534fe2e8..49de495e 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 0277df3c..23ed70b3 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?**