Skip to content

fix: reject BatchProofQueue ingress collisions and fix commit accounting - #406

Open
0xIcarus wants to merge 1 commit into
m1from
0xicarus/fix-batch-proof-queue-collision
Open

fix: reject BatchProofQueue ingress collisions and fix commit accounting#406
0xIcarus wants to merge 1 commit into
m1from
0xicarus/fix-batch-proof-queue-collision

Conversation

@0xIcarus

@0xIcarus 0xIcarus commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Description

BatchProofQueue keys slots on (author, batch_id) without the content digest. Two batches sharing the same key but different metadata can corrupt a slot thus grafting a proof onto a mismatched summary or vice versa and cause a u64 underflow in mark_committed when num_txns diverges.

How Has This Been Tested?

4 regression tests in batch_proof_queue_test.rs covering: summary-first collision, proof-first collision, colliding summary on an existing proof, and the mark_committed underflow case. All 11 tests in the module pass.

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@0xIcarus
0xIcarus requested review from fEst1ck and seanyoung July 30, 2026 14:46
@0xIcarus
0xIcarus requested a review from areshand as a code owner July 30, 2026 14:46
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