Skip to content

chore: backport PR #21788 (feat(p2p): add tx validation for contract class id verification) to v4-next#21852

Merged
spalladino merged 3 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-21788-tx-validation-v4-next
Mar 20, 2026
Merged

chore: backport PR #21788 (feat(p2p): add tx validation for contract class id verification) to v4-next#21852
spalladino merged 3 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-21788-tx-validation-v4-next

Conversation

@AztecBot
Copy link
Collaborator

Summary

Backport of #21788 to v4-next.

Adds contract class ID validation to the DataTxValidator and archiver's updatePublishedContractClasses, preventing malicious txs from registering classes with mismatched IDs. Also simplifies toContractClassPublic() to be synchronous with explicit validation at call sites.

Conflicts Resolved

Cherry-pick had 7 conflict regions across 5 files. Key differences on v4-next:

  • ContractClassPublic type includes privateFunctions/utilityFunctions arrays (not present on next)
  • Different import paths for DataStoreConfig and L1RollupConstants
  • Different test expectations for duplicate contract class registration

Full conflict resolution analysis: https://gist.github.com/AztecBot/7bae9da9cdc612e1df373324a58e6b24

Test plan

  • TypeScript compilation passes for all modified packages
  • Existing tests should pass (test structure adapted for v4-next)
  • CI will validate end-to-end"

ClaudeBox log: https://claudebox.work/s/4066b8ad44d62582?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 20, 2026
@spalladino spalladino marked this pull request as ready for review March 20, 2026 15:39
@AztecBot AztecBot force-pushed the claudebox/backport-21788-tx-validation-v4-next branch from 056d18b to 519a92f Compare March 20, 2026 15:44
@AztecBot
Copy link
Collaborator Author

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/c499edcf828601d5�c499edcf828601d58;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_proof_fails.parallel.test.ts "does not allow submitting proof after epoch end" (202s) (code: 0) group:e2e-p2p-epoch-flakes

@spalladino spalladino merged commit 5402b0a into backport-to-v4-next-staging Mar 20, 2026
9 checks passed
@spalladino spalladino deleted the claudebox/backport-21788-tx-validation-v4-next branch March 20, 2026 17:11
AztecBot added a commit that referenced this pull request Mar 21, 2026
BEGIN_COMMIT_OVERRIDE
chore: backport #21754 (feat!: make isContractInitialized a tri-state
enum) to v4-next (#21792)
fix(stdlib): zero-pad bufferFromFields when declared length exceeds
payload (#21802)
test(protocol-contracts): verify max-size bytecode fits in contract
class log (#21818)
chore: port P2P mesh topic deflake fix to v4-next (#21825)
fix(archiver): throw on duplicate contract class or instance additions
(#21799)
feat: sync poseidon in the browser (#21833)
chore: backport #21824 (fix(aztec-up): add sensible defaults to
installer y/n prompts) to v4-next (#21844)
fix(sequencer): backport wall-clock time for slot estimation to v4-next
(#21769) (#21847)
chore: backport PR #21788 (feat(p2p): add tx validation for contract
class id verification) to v4-next (#21852)
feat: sync poseidon browser (#21851)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants