Skip to content

starknet_os_flow_tests: add multicall prove test; drop balance_of test#14082

Merged
Yoni-Starkware merged 1 commit into
mainfrom
05-19-multicall_keccak_ec_op_prove_test_remove_balance_of
May 19, 2026
Merged

starknet_os_flow_tests: add multicall prove test; drop balance_of test#14082
Yoni-Starkware merged 1 commit into
mainfrom
05-19-multicall_keccak_ec_op_prove_test_remove_balance_of

Conversation

@Yoni-Starkware

@Yoni-Starkware Yoni-Starkware commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Stack:

Summary

  • Add multi_call(Array<Call>) to account_with_dummy_validate.cairo, with a TODO above the existing __execute__ to eventually replace it with this multicall shape so INVOKE calldata can be Array<Call> natively.
  • Add prove_and_verify_multicall_tx in crates/starknet_os_flow_tests/src/virtual_os_test.rs: one virtual-OS tx forwards through __execute__ to the account's multi_call, currently dispatching only test_ec_op (with a TODO to restore the test_keccak inner call — added by stacked PR apollo_starknet_os_program: restore keccak syscall in virtual OS #14071, which re-enables the keccak syscall in the virtual OS).
  • Local serialize_call(name, args) helper mutates multi_call_args and bumps the leading num_calls counter so each call site is one line. Marked #[ignore].
  • Remove test_prove_balance_of_transaction from crates/starknet_transaction_prover/src/proving/virtual_snos_prover_test.rs — the remaining test_prove_transfer_transaction already covers the same VirtualSnosProver::prove_transaction Sepolia path.
  • Wire the new test into the prover CI workflow alongside virtual_snos_prover_test. Widen the workflow's path triggers to include apollo_starknet_os_program/**, blockifier_test_utils/**, and starknet_os_flow_tests/** (path triggers aren't transitive).
  • Regenerate downstream snapshots whose values depend on the new account class hash: bouncer::test::class_hash_migration_data_from_state, stack_trace_regression/test_contract_ctor_frame_stack_trace_cairo1_casm.txt, the FUZZ_ADDRESS_* constants in starknet_os_flow_tests::fuzz_tests, and test_experimental_libfuncs_contract blakes count.

Test plan

  • cargo test -p blockifier --lib bouncer:: execution::stack_trace::test::test_contract_ctor_frame_stack_trace
  • cargo test -p starknet_os_flow_tests --lib fuzz_tests test_experimental_libfuncs_contract
  • cargo clippy -p starknet_os_flow_tests --all-targets --all-features
  • cargo +nightly-2025-07-14 test -p starknet_os_flow_tests --features starknet_transaction_prover/stwo_proving --release prove_and_verify_multicall_tx -- --ignored --nocapture (runs as the --ignored step in starknet_transaction_prover_ci)

@cursor

cursor Bot commented May 19, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Updates a shared Cairo1 dummy account contract (changing its compiled output/class hash) and adds a new ignored proof/verify test that is now executed in CI with --ignored, which could cause snapshot churn or CI instability if proofs become flaky.

Overview
Adds a Cairo1 multi_call(Array<Call>) entrypoint to the account_with_dummy_validate test account contract (while keeping the legacy single-call __execute__), enabling tests to drive multicall-style invokes.

Introduces an ignored prove_and_verify_multicall_tx virtual-OS proving+verification integration test in starknet_os_flow_tests (using starknet_proof_verifier) and wires it into the Starknet-Transaction-Prover-CI workflow to run under --ignored with proving features.

Removes the redundant Sepolia balanceOf proving integration test from virtual_snos_prover_test, and updates various expectation snapshots/fixtures impacted by the contract/output changes (gas numbers, stack trace PC, fuzz deployment addresses, and a blake opcode count).

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-starknet_os_flow_tests_repro_keccak_builtin_privacy_prove_failure branch from e4ca422 to a967e07 Compare May 19, 2026 10:38
@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-multicall_keccak_ec_op_prove_test_remove_balance_of branch from 47097e7 to 3e32b25 Compare May 19, 2026 10:49

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3e32b25. Configure here.

Comment thread crates/starknet_os_flow_tests/src/virtual_os_test.rs
Comment thread .github/workflows/starknet_transaction_prover_ci.yml

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Yoni-Starkware resolved 1 discussion.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion.

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Yoni-Starkware resolved 1 discussion.
Reviewable status: 0 of 4 files reviewed, all discussions resolved.

@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-multicall_keccak_ec_op_prove_test_remove_balance_of branch from 3e32b25 to 7b4a4d0 Compare May 19, 2026 11:02
@Yoni-Starkware Yoni-Starkware changed the title starknet_os_flow_tests,blockifier_test_utils,starknet_transaction_prover: multicall prove test, drop balance_of starknet_os_flow_tests: add multicall prove test; drop balance_of test May 19, 2026
@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-multicall_keccak_ec_op_prove_test_remove_balance_of branch 4 times, most recently from 0573653 to 1d664e9 Compare May 19, 2026 11:31
@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown

@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-starknet_os_flow_tests_repro_keccak_builtin_privacy_prove_failure branch from a967e07 to 7dd9291 Compare May 19, 2026 11:41
@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-multicall_keccak_ec_op_prove_test_remove_balance_of branch from 1d664e9 to c5bf570 Compare May 19, 2026 11:42
@Yoni-Starkware Yoni-Starkware changed the base branch from 05-19-starknet_os_flow_tests_repro_keccak_builtin_privacy_prove_failure to main May 19, 2026 12:16
@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-multicall_keccak_ec_op_prove_test_remove_balance_of branch 2 times, most recently from 2656290 to 6c65407 Compare May 19, 2026 12:51
- Add `multi_call(Array<Call>)` to `account_with_dummy_validate.cairo`
  with a TODO above `__execute__` to eventually replace its single-call
  shape with the multicall-style entry point.
- Add `prove_and_verify_multicall_tx` in `crates/starknet_os_flow_tests/
  src/virtual_os_test.rs`: a single virtual-OS tx forwards through
  `__execute__` to the new `multi_call`, currently dispatching
  `test_keccak` and `test_ec_op`. Inner calls are appended via a local
  `serialize_call(name, args)` helper that bumps the leading `num_calls`
  counter in `multi_call_args`, so each call site is one line. Marked
  `#[ignore]`; doc carries a TODO to extend coverage.
- Remove `test_prove_balance_of_transaction` from `crates/
  starknet_transaction_prover/src/proving/virtual_snos_prover_test.rs`
  — the remaining `test_prove_transfer_transaction` already covers the
  same `VirtualSnosProver::prove_transaction` Sepolia path.
- Run the new test in the prover CI workflow alongside
  `virtual_snos_prover_test`. Also widen the workflow's path triggers
  to include `apollo_starknet_os_program/**` (compiles the OS program
  the prover runs), `blockifier_test_utils/**` (account/contract test
  sources), and `starknet_os_flow_tests/**`. Path triggers are not
  transitive, so these had to be listed explicitly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Yoni-Starkware Yoni-Starkware force-pushed the 05-19-multicall_keccak_ec_op_prove_test_remove_balance_of branch from 6c65407 to 6a5b663 Compare May 19, 2026 12:57

@AvivYossef-starkware AvivYossef-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@AvivYossef-starkware reviewed 10 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Yoni-Starkware).


crates/starknet_os_flow_tests/src/virtual_os_test.rs line 299 at r6 (raw file):

        multi_call_args.push(Felt::from(args.len()));
        multi_call_args.extend_from_slice(args);
    };

PLTAL

Code quote:

    let mut multi_call_args: Vec<Felt> = vec![Felt::ZERO];
    let mut serialize_call = |func_name: &str, args: &[Felt]| {
        multi_call_args[0] += Felt::ONE;
        multi_call_args.push(*contract_address.0.key());
        multi_call_args.push(selector_from_name(func_name).0);
        multi_call_args.push(Felt::from(args.len()));
        multi_call_args.extend_from_slice(args);
    };

@Yoni-Starkware Yoni-Starkware left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Yoni-Starkware resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Yoni-Starkware).

@Yoni-Starkware Yoni-Starkware added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 8b0bbdb May 19, 2026
76 of 79 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
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.

3 participants