starknet_os_runner: simulate tx and get rpc initial reads#12869
starknet_os_runner: simulate tx and get rpc initial reads#12869AvivYossef-starkware merged 1 commit intomain-v0.14.2from
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
cd4de5f to
569d88e
Compare
b968e74 to
4b64959
Compare
meship-starkware
left a comment
There was a problem hiding this comment.
@meship-starkware reviewed 5 files and all commit messages, and made 2 comments.
Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on AvivYossef-starkware, einat-starkware, and noaov1).
crates/starknet_os_runner/src/running/serde_utils_test.rs line 31 at r1 (raw file):
#[case] expected_nonces: usize, #[case] expected_class_hashes: usize, #[case] expected_declared_contracts: usize,
Does it represent the length of the list? than maybe, because right now it looks like a flag. I also think it could be interesting if one of the fields contains more than one element in the first test case
Suggestion:
#[case] expected_storage_len: usize,
#[case] expected_nonces: usize,
#[case] expected_class_hashes: usize,
#[case] expected_declared_contracts: usize,crates/starknet_os_runner/src/running/serde_utils_test.rs line 33 at r1 (raw file):
#[case] expected_declared_contracts: usize, ) { let state_maps = deserialize_rpc_initial_reads(input).unwrap();
I think we should have the expected map and not just its length. I am not sure the length is enough
Code quote:
let state_maps = deserialize_rpc_initial_reads(input).unwrap();
meship-starkware
left a comment
There was a problem hiding this comment.
@meship-starkware reviewed 1 file and made 1 comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on AvivYossef-starkware, einat-starkware, and noaov1).
crates/starknet_os_runner/src/running/virtual_block_executor_test.rs line 172 at r1 (raw file):
/// ``` #[tokio::test(flavor = "multi_thread")] async fn test_simulate_and_get_initial_reads() {
Is the test not ignored on purpose?
Code quote:
#[tokio::test(flavor = "multi_thread")]
async fn test_simulate_and_get_initial_reads() {4b64959 to
a4f0e58
Compare
AvivYossef-starkware
left a comment
There was a problem hiding this comment.
@AvivYossef-starkware made 3 comments.
Reviewable status: 5 of 6 files reviewed, 3 unresolved discussions (waiting on einat-starkware, meship-starkware, and noaov1).
crates/starknet_os_runner/src/running/serde_utils_test.rs line 31 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Does it represent the length of the list? than maybe, because right now it looks like a flag. I also think it could be interesting if one of the fields contains more than one element in the first test case
thanks
crates/starknet_os_runner/src/running/serde_utils_test.rs line 33 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
I think we should have the expected map and not just its length. I am not sure the length is enough
Done.
crates/starknet_os_runner/src/running/virtual_block_executor_test.rs line 172 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Is the test not ignored on purpose?
Yes , we use the records in the resources dir
meship-starkware
left a comment
There was a problem hiding this comment.
@meship-starkware reviewed 1 file and all commit messages, made 1 comment, and resolved 3 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on AvivYossef-starkware, einat-starkware, and noaov1).
crates/starknet_os_runner/src/running/virtual_block_executor_test.rs line 169 at r1 (raw file):
/// /// # Offline (after recording): /// cargo test -p starknet_os_runner test_simulate_and_get_initial_reads -- --ignored
Please fix or -- --include_ignore otherwise the test wont run
Suggestion:
/// RECORD_RPC_RECORDS=1 NODE_URL=http://<privacy-env-node>/rpc/v0_10 \
/// cargo test -p starknet_os_runner test_simulate_and_get_initial_reads
///
/// # Offline (after recording):
/// cargo test -p starknet_os_runner test_simulate_and_get_initial_reads a4f0e58 to
a10b57d
Compare
569d88e to
8322e37
Compare
meship-starkware
left a comment
There was a problem hiding this comment.
@meship-starkware reviewed 1 file and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on AvivYossef-starkware, einat-starkware, and noaov1).
8322e37 to
e5fba67
Compare
a10b57d to
9fd0721
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
9fd0721 to
afe7925
Compare
Merge activity
|
afe7925 to
4b8e28b
Compare
AvivYossef-starkware
left a comment
There was a problem hiding this comment.
@AvivYossef-starkware reviewed 3 files and all commit messages, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on einat-starkware and noaov1).

Note
Low Risk
Mostly additive changes: a new RPC helper + JSON deserialization plus tests and a recorded fixture. Risk is low, mainly around compatibility with v0.10 nodes and correctness of the
initial_readsparsing.Overview
Adds an RPC path to prefetch initial state reads by calling
starknet_simulateTransactionswith theRETURN_INITIAL_READSflag and converting the response into blockifierStateMaps.Introduces a small
serde_utilsmodule to deserialize pathfinder v0.10initial_readsJSON, plus unit/integration coverage and a newrpc_recordsfixture to allow offline replay of the simulate response.Written by Cursor Bugbot for commit 4b8e28b. This will update automatically on new commits. Configure here.