Skip to content

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Jan 15, 2026

BEGIN_COMMIT_OVERRIDE
feat(avm): contract instance mutation (#19499)
fix(avm): Fix note hash exists fuzzing (#19616)
fix(avm): Build trace on coverage prover runs (#19627)
chore(avm): Use PC alias type consistently (#19625)
feat(avm): mutate global gas fees and timestamp (#19500)
docs: avm docs (#19603)
fix(avm): Increase chances of fuzzer finding limits (#19656)
fix(avm)!: de-risk memory injection attacks (#19620)
fix(avm): Fix TS ECC add infinity handling (#19657)
fix(avm): Fix jumpif in fuzzer (#19655)
feat(avm): protocol contractg mutations (#19586)
chore(avm): analyze fuzzer corpus distribution (#19614)
feat(avm): fuzzer treats enqueued call size as coverage (#19615)
refactor(avm): Refactor calldata copy and return data copy fuzzing (#19666)
feat(avm): boundary values for mutations (#19617)
END_COMMIT_OVERRIDE

Mutations for contract instances
Now we allow prefilling the tree with some note hashes and we notify
instruction generation with existing note hashes (prefill +
nonrevertible inserted)
Copy link
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue Jan 15, 2026
@AztecBot
Copy link
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2026
@jeanmon jeanmon requested a review from Maddiaa0 as a code owner January 16, 2026 11:27
sirasistant and others added 14 commits January 16, 2026 12:41
Fuzzer revealed issues in infinity handling in ts
Protocol contract mutations turned out to be much more complex. Might've
been easier to implement a hardcoded set.

We need to ensure we re-validate the enqueued calls whenever we mutate
the protocol contracts since we could have invalidated some addresses.

Note: The TS simulation required a change to match the cpp simulator
running `./run_fuzzer.sh analyze` outputs some statistics about the
current tx corpus

```
orpus directory: ../src/barretenberg/avm_fuzzer/corpus/tx

Files processed: 836
Files failed: 0
Total input programs: 6408

=== Opcode Histogram ===
SET_32             :    48847  ########################################
SET_8              :    23209  ###################
SET_16             :    11977  ##########
SET_FF             :     6527  #####
RETURN             :     6510  #####
SET_64             :     4418  ####
SET_128            :     1743  #
GETENVVAR_16       :      614  #
SUCCESSCOPY        :      538
RETURNDATACOPY     :      522
RETURNDATASIZE     :      522
XOR_8              :      498
POSEIDON2PERM      :      471
SSTORE             :      459
EMITNOTEHASH       :      453
SENDL2TOL1MSG      :      448
CALLDATACOPY       :      434
SUB_16             :      398
ADD_8              :      392
OR_8               :      389
XOR_16             :      378
TORADIXBE          :      374
EMITUNENCRYPTEDLOG :      366
DIV_8              :      363
SUB_8              :      360
AND_8              :      358
OR_16              :      352
GETCONTRACTINSTANCE:      351
MUL_8              :      333
MUL_16             :      318
FDIV_8             :      296
ADD_16             :      291
DIV_16             :      282
SLOAD              :      276
AND_16             :      274
ECADD              :      241
NOT_8              :      238
EMITNULLIFIER      :      231
JUMP_32            :      213
KECCAKF1600        :      209
CAST_8             :      189
STATICCALL         :      187
SHA256COMPRESSION  :      187
CAST_16            :      186
NOT_16             :      181
NULLIFIEREXISTS    :      171
MOV_8              :      158
MOV_16             :      151
SHR_16             :      142
EQ_16              :      138
CALL               :      134
SHL_16             :      130
JUMPI_32           :      125
FDIV_16            :      122
LT_16              :      120
LT_8               :      111
LTE_16             :      105
LTE_8              :      105
SHL_8              :      102
L1TOL2MSGEXISTS    :      100
EQ_8               :       93
SHR_8              :       92
DEBUGLOG           :       60
INTERNALRETURN     :       25
INTERNALCALL       :       25
NOTEHASHEXISTS     :       14
REVERT_16          :       13

=== Opcode Statistics ===
Total instructions: 118639
Unique opcodes used: 67/68
Missing opcodes (1): REVERT_8
Most common: SET_32 (48847)
Least common: REVERT_16 (13)

=== Enqueued Calls Statistics ===

Setup Calls:
  Mean: 0.28, Median: 0.00, Mode: 0
  Histogram: 0(638) 1(178) 2(10) 3(6) 4(3) 5(1)

App Logic Calls:
  Mean: 1.09, Median: 1.00, Mode: 1
  Histogram: 1(789) 2(32) 3(7) 4(6) 5(2)

Teardown Calls:
  Mean: 0.09, Median: 0.00, Mode: 0
  Histogram: 0(761) 1(75)

Multi-Phase Transactions:
  Txs with calls in multiple phases: 249
  Txs with setup + app_logic only: 174
  Txs with setup + teardown only: 0
  Txs with app_logic + teardown only: 51
  Txs with all three phases: 24
  ```
Incentivise the fuzzer to make more enqueued calls during each run by
rewarding it with coverage progress
Some claude-suggested boundary conditions for the fuzzer
@AztecBot
Copy link
Collaborator Author

AztecBot commented Jan 16, 2026

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/bf1e0cf6ae1b1da5�bf1e0cf6ae1b1da58;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "committee member invalidates a block if proposer does not come through" (96s) (code: 1) group:e2e-p2p-epoch-flakes (\033Ilyas Ridhuan\033: feat(avm): boundary values for mutations (#19617))

@AztecBot
Copy link
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@AztecBot AztecBot enabled auto-merge January 16, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants