Skip to content

Increase testability of constraint failures - #351

Open
jan-ferdinand wants to merge 15 commits into
masterfrom
constraint_tests
Open

jan-ferdinand wants to merge 15 commits into
masterfrom
constraint_tests

Conversation

@jan-ferdinand

Copy link
Copy Markdown
Member

On unfulfilled constraints, don't just print strings to stderr, but return a dedicated type.

Also, restructure test helper functions. In particular, return fewer tuples, use dedicated types instead.

@jan-ferdinand
jan-ferdinand force-pushed the master branch 3 times, most recently from 30f17a2 to 9407c96 Compare May 12, 2025 05:38
@jan-ferdinand
jan-ferdinand force-pushed the constraint_tests branch 2 times, most recently from 9250c93 to 0f4d144 Compare June 5, 2025 14:08
Both the “Fast Reed-Solomon IOPP” (“FRI”) and “Shift to Improve
Rate” (“STIR”) are proof systems that establish the low-degreeness of a
polynomial. They each have their own advantages and disadvantages.

In particular, for our STARK and when the execution trace is short, the
size of the proof is significantly larger when using STIR instead of
FRI. For longer execution traces, this is reversed.

In addition, STIR proofs allow for some exciting future enhancements to
the overall proof system.

This commit also moves away from the disproven conjectured bound that
was in use previously: Some recent results have proven that
Reed-Solomon codes do not exhibit a proximity gap at the
capacity-bound.

The list size of Reed-Solomon codes with proximity parameter beyond the
Johnson bound is a famous open problem; the security of any bound
beyond the Johnson bound is conjectured at best for the time being.

BREAKING CHANGE: In order to add STIR as an LDT, the version of the
proof system is bumped from 2 to 3. This means that old proofs are
considered invalid by this version of Triton VM.
While there is a clippy lint for this combination, I find `map` +
`unwrap_or` more readable than `map_or`.

changelog: ignore
(Where needed.)

changelog: ignore
If Triton VM is configured to cache as much as possible but cannot
allocate the required amount of memory, return an error instead of
panicking.

Note that there is no guarantee that this behavior will trigger: some
operating systems do “memory overcommitment”, seemingly providing
access to memory that is not, in fact, available. In such cases, the
out-of-memory error will not be triggered and the operating system
instead terminates the process consuming the most RAM as soon as the
machine's RAM is exhausted.
changelog: ignore
A future update to `rustc` will turn this into a hard error.

changelog: ignore
Also, reduce overall test times by limiting the number of cases of some
long-running proptests.

changelog: ignore
Part of this change is to run the link checker weekly, not daily.

Due to some recent changes somewhere on the internet (I really don't
know where), the link checking workflow has become quite a bit more
noisy than it used to be, creating issues that resolve themselves
within a day or two.

With the new behavior, if there are no links known to be broken, then
the link checker runs only once a week. Otherwise, if there are broken
links in the repository somewhere, the link checker runs once a day.

The intention of this change is a reduction of the overall noise. The
weekly link checker run might create a noisy issue, but at most one per
week. The daily runs keep that issue up to date, accurately informing
in case of a real problem.

Also, exclude eprint.iacr.org and iacr.org/crypoDB from link checking:
Due to heavily restricted automated access to the eprint archive, forgo
checking whether the pointed-to pages are still available.

While it is sad to diminish the effectiveness of the automated link
checker, I do understand their reasons for limiting automated access.

changelog: ignore
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.

1 participant