-
Notifications
You must be signed in to change notification settings - Fork 65
apollo_rpc: add proof to invoke v3 #10710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apollo_rpc: add proof to invoke v3 #10710
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2d354f4 to
ddc8fe7
Compare
|
alternative approach - adding its own 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()]))
}
} |
meship-starkware
left a comment
There was a problem hiding this 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"]
noaov1
left a comment
There was a problem hiding this 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>>);ddc8fe7 to
b085011
Compare
avivg-starkware
left a comment
There was a problem hiding this 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
proofto appear in the blockifier's txstarknet_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)
b085011 to
e32acfd
Compare
noaov1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaov1 reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @meship-starkware)
noaov1
left a comment
There was a problem hiding this 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
Proofwas added.
Calldataworked 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 separateGetTestInstance for Proofsuggested 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?
|
Previously, noaov1 (Noa Oved) wrote…
Exactly, Rust has a macro expansion recursion limit, defaulting to 128. |
noaov1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
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

No description provided.