Skip to content

apollo_integration_tests: verify Patricia storage proofs of persisted witnesses in flow tests - #14905

Draft
itamar-starkware wants to merge 1 commit into
dummy-recorder-validates-blobfrom
witness-storage-proofs
Draft

apollo_integration_tests: verify Patricia storage proofs of persisted witnesses in flow tests#14905
itamar-starkware wants to merge 1 commit into
dummy-recorder-validates-blobfrom
witness-storage-proofs

Conversation

@itamar-starkware

Copy link
Copy Markdown
Contributor

No description provided.

@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are confined to integration-test helpers and assertions; production sequencer behavior is unchanged.

Overview
End-to-end flow tests now cryptographically check that persisted witness data matches each block’s storage writes, not only that witnesses exist and trie roots chain.

After the existing witness checks, end_to_end_flow runs verify_witness_storage_proofs_flow. For every committed height with StateCommitmentInfos, it loads the block’s ThinStateDiff via a new FlowSequencerSetup::get_thin_state_diff helper (storage reader location + fetch). For each contract with storage diffs, it builds preimages from commitment_facts, maps non-zero writes to leaf indices, and calls verify_patricia_proof against the contract’s updated storage root (zero values are skipped as absent leaves).

starknet_patricia is added as a test dependency to use the shared proof verifier and related types.

Reviewed by Cursor Bugbot for commit 3d968ab. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@itamar-starkware
itamar-starkware force-pushed the dummy-recorder-validates-blob branch from 9528a72 to 256bcca Compare August 1, 2026 21:10
@itamar-starkware
itamar-starkware force-pushed the dummy-recorder-validates-blob branch 2 times, most recently from 7926e02 to 7ed5553 Compare August 1, 2026 22:07
@itamar-starkware
itamar-starkware changed the base branch from dummy-recorder-validates-blob to graphite-base/14905 August 2, 2026 12:33
@itamar-starkware
itamar-starkware changed the base branch from graphite-base/14905 to central-systest-blobs-carry-witness-fields August 2, 2026 12:34
@itamar-starkware
itamar-starkware force-pushed the central-systest-blobs-carry-witness-fields branch from da6f991 to c065071 Compare August 2, 2026 12:55
@itamar-starkware
itamar-starkware changed the base branch from central-systest-blobs-carry-witness-fields to graphite-base/14905 August 2, 2026 17:25
@itamar-starkware
itamar-starkware changed the base branch from graphite-base/14905 to dummy-recorder-validates-blob August 2, 2026 17:25
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.

2 participants