fix: deferral output_commit should be a true hash#2574
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
shuklaayush
left a comment
There was a problem hiding this comment.
some small nits. lgtm, i didn't find any glaring issues
There was a problem hiding this comment.
unfortunate that we need to duplicate all this
|
Claude finished @stephenh-axiom-xyz's task in 2m 47s —— View job Code Review: PR #2574 — Deferral Output Hash Fixes
This PR correctly converts the deferral output commit from a naive compression to a proper sponge hash of Security Fixes Verified
Sponge Consistency CheckI verified that trace generation in
The same pattern is correctly replicated in
|
732eb66
into
develop-v2.0.0-beta
Resolves INT-6725, INT-6727, INT-6709, INT-6784, INT-6723, INT-6724
INT-6725: Output commit must be a true sponge hash
INT-6709:
output_lenis not bound inDEFER_CALLINT-6784: Zero-length outputs bypass the output AIR
Output commit is now the
hash_sliceof[def_idx, output_len, 0, ...]andoutput_raw. The first row inDeferralOutputAiris for the[def_idx, output_len, 0, ...](i.e. skips a write), andDeferralOutputCommitAirdoes the same.INT-6727:
DeferralOutputCommitAirdoesn't handle initialdef_idxstateUpdated
DeferralOutputCommitAirto constrain thedef_idxandoutput_lenpresent on the first row. The former is compared against a constant, whileoutput_lenis constrained to be consistent with the number of valid rows.INT-6723:
DeferralOutputAircleanup and degree reductionReplaced the redundant constraints with
is_transition, which is used throughout the AIR now.INT-6724:
DeferralOutputCommitAircleanupRemoved
next_fand the final invalid row by calling permute on thenextrow.