Skip to content

starknet_os_flow_tests: execute txs #8342

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

Merged
merged 1 commit into from
Jul 31, 2025

Conversation

nimrod-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @nimrod-starkware)


crates/starknet_os_flow_tests/src/utils.rs line 17 at r1 (raw file):

pub(crate) type ExecutionOutput<S> =
    (Vec<TransactionExecutionOutput>, BlockExecutionSummary, CachedState<S>);

why not make this a struct? prefer named fields to tuple-types

Code quote:

pub(crate) type ExecutionOutput<S> =
    (Vec<TransactionExecutionOutput>, BlockExecutionSummary, CachedState<S>);

crates/starknet_os_flow_tests/src/utils.rs line 22 at r1 (raw file):

/// configuration.
pub(crate) fn execute_transactions<S: FlowTestState>(
    initial_state_reader: S,

this state is not just a reader (right?)

Suggestion:

initial_state: S,

crates/starknet_os_flow_tests/src/utils.rs line 25 at r1 (raw file):

    txs: &[Transaction],
    block_context: BlockContext,
) -> ExecutionOutput<S> {

when executing transactions you need full context, not just the "initial state", i.e. you will need a class manager for declares?
is this the final API?

Code quote:

pub(crate) fn execute_transactions<S: FlowTestState>(
    initial_state_reader: S,
    txs: &[Transaction],
    block_context: BlockContext,
) -> ExecutionOutput<S> {

@nimrod-starkware nimrod-starkware force-pushed the nimrod/os_flow_tests_crate branch from 5849f04 to 3fcc9d5 Compare July 31, 2025 13:41
@nimrod-starkware nimrod-starkware force-pushed the nimrod/os_flow_tests_execution branch from a679b2b to 3a10d7b Compare July 31, 2025 13:41
@nimrod-starkware nimrod-starkware force-pushed the nimrod/os_flow_tests_execution branch from 3a10d7b to 7da3e7f Compare July 31, 2025 14:02
@nimrod-starkware nimrod-starkware force-pushed the nimrod/os_flow_tests_crate branch from 3fcc9d5 to 58957cf Compare July 31, 2025 14:02
Copy link
Contributor Author

@nimrod-starkware nimrod-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: all files reviewed, 3 unresolved discussions (waiting on @dorimedini-starkware)


crates/starknet_os_flow_tests/src/utils.rs line 17 at r1 (raw file):

Previously, dorimedini-starkware wrote…

why not make this a struct? prefer named fields to tuple-types

Done.


crates/starknet_os_flow_tests/src/utils.rs line 22 at r1 (raw file):

Previously, dorimedini-starkware wrote…

this state is not just a reader (right?)

Done.


crates/starknet_os_flow_tests/src/utils.rs line 25 at r1 (raw file):

Previously, dorimedini-starkware wrote…

when executing transactions you need full context, not just the "initial state", i.e. you will need a class manager for declares?
is this the final API?

Can you please explain wdym?
The plan is that execute_transactions will be called by the TestManager when the user wants to execute the test.
The context is updated when the user adds transactions to the test.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware)


crates/starknet_os_flow_tests/src/utils.rs line 22 at r1 (raw file):

Previously, nimrod-starkware wrote…

Done.

nope :)


crates/starknet_os_flow_tests/src/utils.rs line 25 at r1 (raw file):

Previously, nimrod-starkware wrote…

Can you please explain wdym?
The plan is that execute_transactions will be called by the TestManager when the user wants to execute the test.
The context is updated when the user adds transactions to the test.

execute_transactions will be a method of TestManager, and have access to self?

@nimrod-starkware nimrod-starkware force-pushed the nimrod/os_flow_tests_execution branch from 7da3e7f to e5af354 Compare July 31, 2025 14:29
Copy link
Contributor Author

@nimrod-starkware nimrod-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: all files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware)


crates/starknet_os_flow_tests/src/utils.rs line 22 at r1 (raw file):

Previously, dorimedini-starkware wrote…

nope :)

now done, sorry


crates/starknet_os_flow_tests/src/utils.rs line 25 at r1 (raw file):

Previously, dorimedini-starkware wrote…

execute_transactions will be a method of TestManager, and have access to self?

no, I don't think it needs access to context.
the context will be mutated when inserting the txs.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)

@nimrod-starkware nimrod-starkware changed the base branch from nimrod/os_flow_tests_crate to main July 31, 2025 19:17
@nimrod-starkware nimrod-starkware force-pushed the nimrod/os_flow_tests_execution branch from e5af354 to d9c5940 Compare July 31, 2025 19:17
Copy link

graphite-app bot commented Jul 31, 2025

Merge activity

  • Jul 31, 7:18 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@nimrod-starkware nimrod-starkware added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit 50380c8 Jul 31, 2025
14 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 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.

3 participants