-
Notifications
You must be signed in to change notification settings - Fork 58
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
Conversation
6eb0786
to
cc7d12c
Compare
64f3151
to
a0d05d0
Compare
cc7d12c
to
a679b2b
Compare
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.
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> {
5849f04
to
3fcc9d5
Compare
a679b2b
to
3a10d7b
Compare
3a10d7b
to
7da3e7f
Compare
3fcc9d5
to
58957cf
Compare
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, 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.
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.
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 thatexecute_transactions
will be called by theTestManager
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
?
7da3e7f
to
e5af354
Compare
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 @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 ofTestManager
, and have access toself
?
no, I don't think it needs access to context.
the context will be mutated when inserting the txs.
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)
e5af354
to
d9c5940
Compare
Merge activity
|
No description provided.