Skip to content

apollo_gateway: skip archiving proof if transaction is P2P#14022

Open
einat-starkware wants to merge 1 commit into
mainfrom
einat/05-12-apollo_gateway_skip_archiving_proof_if_transaction_is_p2p
Open

apollo_gateway: skip archiving proof if transaction is P2P#14022
einat-starkware wants to merge 1 commit into
mainfrom
einat/05-12-apollo_gateway_skip_archiving_proof_if_transaction_is_p2p

Conversation

@einat-starkware
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

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

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@einat-starkware einat-starkware marked this pull request as ready for review May 12, 2026 19:03
@cursor
Copy link
Copy Markdown

cursor Bot commented May 12, 2026

PR Summary

Medium Risk
Changes the proof archiving/forwarding flow so P2P-originated transactions no longer perform (or can fail due to) GCS proof writes, which could affect proof persistence/observability if the P2P flag is misclassified. Logic is localized but touches the transaction acceptance path and its error handling.

Overview
Gateway add_tx now detects whether a transaction arrived via P2P (p2p_message_metadata.is_some()) and passes this into store_proof_and_spawn_archiving.

For P2P transactions, the gateway skips spawning the async GCS proof archive write, while still storing the proof in the proof manager; archive-task abort handling is updated to account for the handle being optional.

Tests are updated to thread p2p_message_metadata through helpers, assert set_proof is only called for non-P2P, and expand the positive path to cover both P2P and non-P2P submissions (with mempool forwarding no longer gated by archive outcome on the P2P path).

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

@einat-starkware einat-starkware force-pushed the einat/05-12-apollo_gateway_skip_archiving_proof_if_transaction_is_p2p branch 3 times, most recently from ff06d28 to 5965b54 Compare May 12, 2026 21:28
Copy link
Copy Markdown
Contributor

@AvivYossef-starkware AvivYossef-starkware left a comment

Choose a reason for hiding this comment

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

@AvivYossef-starkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Yoni-Starkware).


crates/apollo_gateway/src/gateway_test.rs line 567 at r1 (raw file):

    let expected_proof_archive_result: Result<(), ProofArchiveError> =
        Err(ProofArchiveError::WriteError("failed upload".to_string()));
    setup_mock_state(&mut mock_dependencies, &tx_args, Ok(()), expected_proof_archive_result, None)

name this arg before passing it

Code quote:

None)

@einat-starkware einat-starkware force-pushed the einat/05-12-apollo_gateway_skip_archiving_proof_if_transaction_is_p2p branch from 5965b54 to aedeea7 Compare May 14, 2026 17:24
@einat-starkware
Copy link
Copy Markdown
Contributor Author

crates/apollo_gateway/src/gateway_test.rs line 567 at r1 (raw file):

Previously, AvivYossef-starkware wrote…

name this arg before passing it

Done

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.

3 participants