Skip to content

Conversation

@einat-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

einat-starkware commented Jan 14, 2026

Copy link
Contributor

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

@avivg-starkware reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @einat-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 122 at r1 (raw file):

            .get_proof(proof_facts.clone())
            .await?
            .ok_or(TransactionConverterError::ProofNotFound { facts_hash: proof_facts.hash() })

Does using the proof_facts hash follow a convention used elsewhere in the code? Is it logged somewhere?

Code quote:

facts_hash: proof_facts.hash() 

crates/apollo_transaction_converter/src/transaction_converter.rs line 204 at r1 (raw file):

                    account_deployment_data: tx.account_deployment_data,
                    proof_facts: tx.proof_facts.clone(),
                    proof: self.get_proof(tx.proof_facts).await?,

Document why we expect to already have the proof saved at that stage

Extra - consider documenting for the Declare as well:)

Code quote:

proof: self.get_proof(tx.proof_facts).await?,

@einat-starkware einat-starkware force-pushed the einat/tx_converter/crate branch from bbc890a to ea6ebd0 Compare January 14, 2026 13:54
@einat-starkware einat-starkware force-pushed the einat/tx_converter/use_proof_manager branch 2 times, most recently from a3e3f3c to cf2b313 Compare January 14, 2026 14:56
@einat-starkware einat-starkware force-pushed the einat/tx_converter/crate branch from ea6ebd0 to dbf82e2 Compare January 14, 2026 14:56
Copy link
Contributor Author

@einat-starkware einat-starkware left a comment

Choose a reason for hiding this comment

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

@einat-starkware made 2 comments.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @avivg-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 122 at r1 (raw file):

Previously, avivg-starkware wrote…

Does using the proof_facts hash follow a convention used elsewhere in the code? Is it logged somewhere?

The hash gets used as the name of the file/folder where we write the proof (i.e. where we would expect to find the proof). The proof facts don't implement display so this is the best alternative I could think of


crates/apollo_transaction_converter/src/transaction_converter.rs line 204 at r1 (raw file):

Previously, avivg-starkware wrote…

Document why we expect to already have the proof saved at that stage

Extra - consider documenting for the Declare as well:)

Added an explanation :)

Copy link
Contributor

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

@avivg-starkware reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @einat-starkware and @meship-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 122 at r1 (raw file):

Previously, einat-starkware wrote…

The hash gets used as the name of the file/folder where we write the proof (i.e. where we would expect to find the proof). The proof facts don't implement display so this is the best alternative I could think of

I see. Sounds good. @meship-starkware - Is there a convention you're using for logging errors of proof facts - Just making sure this aligns


crates/apollo_transaction_converter/src/transaction_converter.rs line 204 at r1 (raw file):

Previously, einat-starkware wrote…

Added an explanation :)

Is it in the GW in all cases? (mempool and consensus)

@einat-starkware einat-starkware force-pushed the einat/tx_converter/use_proof_manager branch from cf2b313 to 42a08e9 Compare January 15, 2026 10:52
Copy link
Collaborator

@meship-starkware meship-starkware left a comment

Choose a reason for hiding this comment

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

@meship-starkware made 1 comment.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @einat-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 122 at r1 (raw file):

Previously, avivg-starkware wrote…

I see. Sounds good. @meship-starkware - Is there a convention you're using for logging errors of proof facts - Just making sure this aligns

Not really, I do use the InvalidProofFact error in the StarkNet API

Copy link
Contributor

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

@avivg-starkware resolved 1 discussion.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @einat-starkware).

Copy link
Contributor Author

@einat-starkware einat-starkware left a comment

Choose a reason for hiding this comment

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

@einat-starkware made 1 comment.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @avivg-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 204 at r1 (raw file):

Previously, avivg-starkware wrote…

Is it in the GW in all cases? (mempool and consensus)

This function only gets called by proposers so we know that if there are proof facts then there should be proofs also - there is one case where it isn't added (when the proof facts are empty which I now handle :))

@einat-starkware einat-starkware force-pushed the einat/tx_converter/use_proof_manager branch from 42a08e9 to 2b70d45 Compare January 15, 2026 12:47
@einat-starkware einat-starkware force-pushed the einat/tx_converter/crate branch from dbf82e2 to 862f47f Compare January 15, 2026 12:47
Copy link
Contributor

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

@ArniStarkware made 1 comment.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @einat-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 220 at r3 (raw file):

                    },
                })))
            }

Don't clone proof_facts.
(ignore my message if get_proof is consuming - which I assume it is not...).

Suggestion:

            InternalRpcTransactionWithoutTxHash::Invoke(tx) => {
                // We expect the proof to be available here because it has already been verified
                // and stored by the proof manager in the gateway.
                let proof = if tx.proof_facts.is_empty() {
                        Proof::default()
                    } else {
                        self.get_proof(tx.proof_facts).await?
                    };
                Ok(RpcTransaction::Invoke(RpcInvokeTransaction::V3(RpcInvokeTransactionV3 {
                    resource_bounds: tx.resource_bounds,
                    signature: tx.signature,
                    nonce: tx.nonce,
                    tip: tx.tip,
                    paymaster_data: tx.paymaster_data,
                    nonce_data_availability_mode: tx.nonce_data_availability_mode,
                    fee_data_availability_mode: tx.fee_data_availability_mode,
                    sender_address: tx.sender_address,
                    calldata: tx.calldata,
                    account_deployment_data: tx.account_deployment_data,
                    proof_facts: tx.proof_facts,
                    proof,
                })))
            }

Copy link
Contributor

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@avivg-starkware made 1 comment and resolved 1 discussion.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @einat-starkware).

@einat-starkware einat-starkware force-pushed the einat/tx_converter/crate branch from 862f47f to e996b2b Compare January 18, 2026 07:17
@einat-starkware einat-starkware force-pushed the einat/tx_converter/use_proof_manager branch from 2b70d45 to b4bf690 Compare January 18, 2026 07:17
Copy link
Contributor Author

@einat-starkware einat-starkware left a comment

Choose a reason for hiding this comment

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

@einat-starkware made 1 comment.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware and @avivg-starkware).


crates/apollo_transaction_converter/src/transaction_converter.rs line 220 at r3 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

Don't clone proof_facts.
(ignore my message if get_proof is consuming - which I assume it is not...).

Done.

@einat-starkware einat-starkware force-pushed the einat/tx_converter/use_proof_manager branch from b4bf690 to b833391 Compare January 18, 2026 10:07
@einat-starkware einat-starkware force-pushed the einat/tx_converter/crate branch from e996b2b to 690c3dc Compare January 18, 2026 10:07
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.

6 participants