-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_os_runner: add RpcRunnerFactory for creating runners #11581
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
57bd452 to
24077d8
Compare
|
Code quote: pub struct RpcVirtualBlockExecutor {
/// The state reader for the virtual block executor.
pub rpc_state_reader: RpcStateReader,
/// Whether transaction validation is enabled during execution.
pub validate_txs: bool,
} |
avi-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.
@avi-starkware reviewed 1 file and all commit messages, and made 2 comments.
Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @AvivYossef-starkware and @noaov1).
crates/starknet_os_runner/src/runner.rs line 267 at r1 (raw file):
/// /// let runner = factory.create_runner(BlockNumber(800000)); /// let output = runner.run_os(txs).await?;
run_os requires the block_number as input
Code quote:
/// let output = runner.run_os(txs).await?;crates/starknet_os_runner/src/runner.rs line 292 at r1 (raw file):
/// The runner is ready to execute transactions on top of the specified block. /// Each runner is single-use (consumed when `run_os` is called). pub fn create_runner(&self, block_number: BlockNumber) -> RpcRunner {
This could potentially create a mismatch with run_os if a different block_number is provided there than the number provided when creating the runner.
Code quote:
pub fn create_runner(&self, block_number: BlockNumber) -> RpcRunner {
avi-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.
@avi-starkware reviewed 1 file.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @AvivYossef-starkware and @noaov1).
24077d8 to
a9ac9bb
Compare
f69ea2f to
25aa900
Compare
AvivYossef-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.
@AvivYossef-starkware made 3 comments.
Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @avi-starkware and @noaov1).
crates/starknet_os_runner/src/runner.rs line 267 at r1 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
run_os requires the block_number as input
Thanks
crates/starknet_os_runner/src/runner.rs line 292 at r1 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
This could potentially create a mismatch with run_os if a different block_number is provided there than the number provided when creating the runner.
see #11651 I think that its a better solution
crates/starknet_os_runner/src/virtual_block_executor.rs line 259 at r1 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
- Why isn't pub(crate) sufficient here?
- Consider making the fields
rpc_state_readerandvalidate_txsprivate if possible
see #11652
avi-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.
@avi-starkware reviewed 1 file and all commit messages, made 1 comment, and resolved 3 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @noaov1).

No description provided.