Skip to content

apollo_committer: add request_paths_and_commit_block tests#14208

Merged
ArielElp merged 1 commit into
mainfrom
ariel/test_revert_flow_with_witnesses
Jun 8, 2026
Merged

apollo_committer: add request_paths_and_commit_block tests#14208
ArielElp merged 1 commit into
mainfrom
ariel/test_revert_flow_with_witnesses

Conversation

@ArielElp

Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

ArielElp commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from e720964 to 9c253a8 Compare May 27, 2026 09:45
@ArielElp ArielElp marked this pull request as ready for review May 27, 2026 11:05
@cursor

cursor Bot commented May 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only changes plus a gated test helper on MapStorage; no production committer or storage behavior is altered.

Overview
Adds integration tests for read_paths_and_commit_block behind the os_input feature, wired from committer_test.rs into a new request_paths_and_commit_block_tests module.

The happy-path test commits a block with AccessedKeys, checks returned Patricia proofs (classes, contracts, and per-contract storage) against trie roots, then uses a new IndexDb::clear_patricia_trie_nodes_for_test helper to strip trie nodes while keeping witness metadata and asserts a replay returns the same proofs from storage. A second test checks that revert drops the accessed-keys digest and persisted witness payload for the reverted height.

apollo_committer dev-dependencies now pull starknet_committer with the testing feature so the map-storage test hook is available.

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

@ArielElp ArielElp requested a review from yoavGrs May 27, 2026 11:17
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from 9c253a8 to 8a3d6fb Compare May 27, 2026 11:52
@ArielElp ArielElp force-pushed the ariel/revert_logic branch from 0a150fa to dcafcad Compare May 27, 2026 11:52
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from 8a3d6fb to b0c6beb Compare May 27, 2026 12:00
@ArielElp ArielElp force-pushed the ariel/revert_logic branch from dcafcad to 10d77f4 Compare May 27, 2026 12:00
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from b0c6beb to b87f87a Compare May 27, 2026 12:20
@ArielElp ArielElp force-pushed the ariel/revert_logic branch from 10d77f4 to bcf65f0 Compare May 27, 2026 12:20
@ArielElp ArielElp force-pushed the ariel/add_proof_verification_for_tests branch from dc8b161 to 83d5cd7 Compare June 3, 2026 11:07
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from 00aaf1a to 74fccf6 Compare June 3, 2026 11:07

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 5 files and all commit messages, made 1 comment, and resolved 6 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp).


crates/starknet_committer/src/db/index_db/db.rs line 504 at r8 (raw file):

Previously, ArielElp wrote…

I don't follow, let me add some context:

This test util is only used to verify that when we're re-sending the same request to the committer, it does not recompute. Ideally, this would have been done with nice mock libs, but I need too much of the real implementation to make it work. To overcome this, I'm simply removing all the trie data from the storage (keeping only metadata). If the request succeeds, then it clearly did not recompute.

can't this be a util in the test module though?

@ArielElp ArielElp force-pushed the ariel/add_proof_verification_for_tests branch from 83d5cd7 to e1435cb Compare June 3, 2026 13:14
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch 2 times, most recently from 41082ca to 651ab0e Compare June 3, 2026 15:17
@ArielElp ArielElp force-pushed the ariel/add_proof_verification_for_tests branch from e1435cb to 6340321 Compare June 3, 2026 15:17

@ArielElp ArielElp left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ArielElp made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on dorimedini-starkware).


crates/starknet_committer/src/db/index_db/db.rs line 504 at r8 (raw file):

Previously, dorimedini-starkware wrote…

can't this be a util in the test module though?

Nope, I need access to the underlying storage which the committer does not see

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).

@ArielElp ArielElp changed the base branch from ariel/add_proof_verification_for_tests to graphite-base/14208 June 7, 2026 10:20
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from 651ab0e to efb1efd Compare June 7, 2026 12:22
@ArielElp ArielElp force-pushed the graphite-base/14208 branch from 6340321 to c96290d Compare June 7, 2026 12:22
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from efb1efd to 1a70b65 Compare June 7, 2026 14:39
@ArielElp ArielElp changed the base branch from graphite-base/14208 to ariel/add_proof_verification_for_tests June 7, 2026 14:39

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).

@ArielElp ArielElp changed the base branch from ariel/add_proof_verification_for_tests to graphite-base/14208 June 7, 2026 14:54

@ArielElp ArielElp left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ArielElp reviewed 4 files and all commit messages, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ArielElp).

@graphite-app

graphite-app Bot commented Jun 8, 2026

Copy link
Copy Markdown

Merge activity

  • Jun 8, 2:02 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Jun 8, 2:03 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ArielElp).

@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from 1a70b65 to ccf5b85 Compare June 8, 2026 14:10
@ArielElp ArielElp force-pushed the graphite-base/14208 branch from c96290d to 39fe75d Compare June 8, 2026 14:10
@ArielElp ArielElp changed the base branch from graphite-base/14208 to main June 8, 2026 14:10
@ArielElp ArielElp force-pushed the ariel/test_revert_flow_with_witnesses branch from ccf5b85 to 91077f1 Compare June 8, 2026 14:40

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ArielElp).

@ArielElp ArielElp added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 7b48e6c Jun 8, 2026
31 of 34 checks passed
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.

4 participants