Skip to content

Conversation

@avivg-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@avivg-starkware avivg-starkware marked this pull request as ready for review December 10, 2025 16:02
Copy link
Contributor Author

avivg-starkware commented Dec 10, 2025

@avivg-starkware avivg-starkware force-pushed the avivg/apollo_rpc/add_proof_to_tx_invoke_v3 branch from 2d354f4 to ddc8fe7 Compare December 10, 2025 16:22
@avivg-starkware
Copy link
Contributor Author

crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

#![allow(clippy::unwrap_used)]
#![recursion_limit = "256"]

alternative approach - adding its own get_test_instance

Code snippet:

impl GetTestInstance for Proof {
    fn get_test_instance(rng: &mut ChaCha8Rng) -> Self {
        Self(Arc::new(vec![rng.next_u32(), rng.next_u32(), rng.next_u32()]))
    }
}

@avivg-starkware avivg-starkware changed the title apollo rpc: add proof to invoke v3 apollo_rpc: add proof to invoke v3 Dec 10, 2025
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 reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @noaov1)


crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

#![allow(clippy::unwrap_used)]
#![recursion_limit = "256"]

Why do we need the resource limit now?

Code quote:

#![recursion_limit = "256"]

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

@noaov1 reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @avivg-starkware and @meship-starkware)


crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

Previously, meship-starkware (Meshi Peled) wrote…

Why do we need the resource limit now?

+1
How is it different from the calldata field?


crates/apollo_rpc/src/v0_8/transaction.rs line 558 at r2 (raw file):

                account_deployment_data,
                proof_facts,
                proof: Proof::default(),

What do you expect to put here?

Code quote:

                proof: Proof::default(),

crates/apollo_test_utils/src/lib.rs line 433 at r2 (raw file):

    pub struct AccountDeploymentData(pub Vec<Felt>);
    pub struct ProofFacts(pub Vec<Felt>);
    pub struct Proof(pub Arc<Vec<u32>>);

Please keep alphebetize :)

Code quote:

    pub struct ProofFacts(pub Vec<Felt>);
    pub struct Proof(pub Arc<Vec<u32>>);

@avivg-starkware avivg-starkware force-pushed the avivg/apollo_rpc/add_proof_to_tx_invoke_v3 branch from ddc8fe7 to b085011 Compare December 11, 2025 09:44
Copy link
Contributor Author

@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.

Reviewable status: 2 of 4 files reviewed, 3 unresolved discussions (waiting on @meship-starkware and @noaov1)


crates/apollo_rpc/src/v0_8/transaction.rs line 558 at r2 (raw file):

Previously, noaov1 (Noa Oved) wrote…

What do you expect to put here?

My thinking is that this mainly affects tests, or, if it’s not test-related, that the info still isn’t needed here

  • We don’t expect proof to appear in the blockifier's tx starknet_api::transaction::InvokeTransaction.

That said, I’m not fully convinced, so I added a TODO to investigate further.


crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

Previously, noaov1 (Noa Oved) wrote…

+1
How is it different from the calldata field?

The macro hit Rust’s recursion limit once Proof was added.
Calldata worked before because the total number of types was still under the 128-step recursion limit. I can change it to "129", which also works, or any other number.
Or to implement the separate GetTestInstance for Proof suggested above (but im tending to just make the recursion limit higher)

@avivg-starkware avivg-starkware force-pushed the avivg/apollo_rpc/add_proof_to_tx_invoke_v3 branch from b085011 to e32acfd Compare December 11, 2025 09:53
Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

:lgtm:

@noaov1 reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @meship-starkware)

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware and @meship-starkware)


crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

Previously, avivg-starkware wrote…

The macro hit Rust’s recursion limit once Proof was added.
Calldata worked before because the total number of types was still under the 128-step recursion limit. I can change it to "129", which also works, or any other number.
Or to implement the separate GetTestInstance for Proof suggested above (but im tending to just make the recursion limit higher)

Why does the 128 step limit was not needed to be specified explicitly?
Is the new limitation just because you added one more field?

@avivg-starkware
Copy link
Contributor Author

crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

Previously, noaov1 (Noa Oved) wrote…

Why does the 128 step limit was not needed to be specified explicitly?
Is the new limitation just because you added one more field?

Exactly, Rust has a macro expansion recursion limit, defaulting to 128.
I can add a comment above the limit expansion - do you think it'll be helpful?

@avivg-starkware avivg-starkware added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit 8fbb2a6 Dec 11, 2025
26 of 27 checks passed
Copy link
Collaborator

@noaov1 noaov1 left a comment

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


crates/apollo_test_utils/src/lib.rs line 2 at r2 (raw file):

Previously, avivg-starkware wrote…

Exactly, Rust has a macro expansion recursion limit, defaulting to 128.
I can add a comment above the limit expansion - do you think it'll be helpful?

Yes. Thank you

@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants