feat(avm): defensively assert cd hashes#19346
Merged
IlyasRidhuan merged 2 commits intoJan 7, 2026
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jan 6, 2026
e1ca69a to
8325579
Compare
97782de to
36ee031
Compare
IlyasRidhuan
commented
Jan 7, 2026
36ee031 to
86093ec
Compare
8325579 to
5ab4f28
Compare
fcarreiro
reviewed
Jan 7, 2026
fcarreiro
left a comment
Contributor
There was a problem hiding this comment.
Just a note that this does make C++ simulation check the cd hashes and fail catastrophically if sth goes wrong. Assuming that the hash is already validated in TX validation, this should be ok (a noop change).
Btw, the sequencer does not generate hints and give them to the prover. The prover itself generates the hints from the TXs and gives them to the agents (all of it under its control).
Once CI passes, lmk and I'll approve.
86093ec to
619ee29
Compare
5ab4f28 to
998b6c7
Compare
619ee29 to
0ffaa16
Compare
Base automatically changed from
ir/01-04-feat_avm_mutate_enqueued_calls
to
merge-train/avm
January 7, 2026 16:29
fcarreiro
approved these changes
Jan 7, 2026
Merged
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jan 8, 2026
BEGIN_COMMIT_OVERRIDE feat(avm)!: optionally use TS logger in C++ simulation (#19305) chore(avm): bytecode caching comments chore(avm): disable VK hash checking in tests fix(avm)!: instr_fetching soundness bug (#19381) fix(avm): dont catch wide exceptions (#19388) refactor(avm): Refactor get contract instance fuzzer backfill (#19387) feat(avm): mutate enqueued calls (#19315) chore(avm): migrate to BB asserts (#19395) fix!: more missing boolean constraints in calldata, calldata hashing, sha256 mem PILs (#19367) feat(avm): defensively assert cd hashes (#19346) chore: annotate booleans in PIL, and add some missing boolean constraints (#19371) fix!: missing boolean constraints on zero checks targets (#19401) fix!: context did not constrain returndata size to 0 at start, and had a misnamed relation (#19404) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR moves us from
compute_calldata_hash->assert_calldata_hashwhich essentially adds a degree of validation to the calldata hash in the AVM cpp code.Why tho?
assert_address_derivation.H(calldata) != calldata_hash)Sharp Edges
In TS, cd hash validation is done at the tx validation level. I don't think it is worthwhile to implement the cd hash validation in the TS simulator - so instead I've implemented a validation in the TS fuzzer entrypoint