-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(starknet_integration_tests): use monitoring instead of reading storage #3755
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Graphite Automations"Yair - Auto-assign" took an action on this PR • (01/28/25)1 assignee was added to this PR based on Yair's automation. |
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: 0 of 4 files reviewed, 4 unresolved discussions (waiting on @alonh5, @nadin-Starkware, and @yair-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 338 at r1 (raw file):
/// Gets the latest block number from the batcher's metrics. async fn get_latest_block_number(batcher_monitoring_client: &MonitoringClient) -> BlockNumber {
This is not the batcher's monitoring client, but the node's. Please rephrase accordingly (throughout).
Code quote:
batcher_monitoring_client: &MonitoringClient
crates/starknet_integration_tests/src/sequencer_manager.rs
line 352 at r1 (raw file):
async fn get_account_nonce( batcher_monitoring_client: &MonitoringClient, storage_reader: &StorageReader,
Do you plan on addressing this as well? If so, please add a todo.
Code quote:
storage_reader: &StorageReader,
crates/starknet_integration_tests/src/sequencer_manager.rs
line 355 at r1 (raw file):
contract_address: ContractAddress, ) -> Nonce { let block_number = get_latest_block_number(batcher_monitoring_client).await;
WDYT about renaming this fn? The current context was with the batcher storage reader, hence this implied we are referring to the batcher block height. However, and following the previous comment, the fn name no longer indicates the block we are referring to.
Code quote:
get_latest_block_number
crates/starknet_integration_tests/src/sequencer_manager.rs
line 363 at r1 (raw file):
} /// Sample a storage until sufficiently many blocks have been stored. Returns an error if after
Please update.
Code quote:
Sample a storage until sufficiently many blocks have been stored.
7b9ce07
to
3138901
Compare
bcebf7a
to
c6572dc
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: 0 of 4 files reviewed, 4 unresolved discussions (waiting on @alonh5, @Itay-Tsabary-Starkware, and @nadin-Starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 338 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
This is not the batcher's monitoring client, but the node's. Please rephrase accordingly (throughout).
It's the executable that contains the batcher, do we call each executable a node?
crates/starknet_integration_tests/src/sequencer_manager.rs
line 352 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Do you plan on addressing this as well? If so, please add a todo.
I'm not sure, this is not something that we can get from monitoring, we need RPC for this - @alonh5
crates/starknet_integration_tests/src/sequencer_manager.rs
line 355 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
WDYT about renaming this fn? The current context was with the batcher storage reader, hence this implied we are referring to the batcher block height. However, and following the previous comment, the fn name no longer indicates the block we are referring to.
The function is still returning the same block number it returned before thanks to the call to prev
.
IIUC, your suggestion is to change that and fix all the callers?
If so, I will do it in a separate PR.
crates/starknet_integration_tests/src/sequencer_manager.rs
line 363 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Please update.
Done.
0b1ddb0
to
6e6bc62
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: 0 of 4 files reviewed, 3 unresolved discussions (waiting on @alonh5, @nadin-Starkware, and @yair-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 338 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
It's the executable that contains the batcher, do we call each executable a node?
Node: the set of all components (gateway, batcher, etc.)
Executable: an instance running the binary with a config, setting up one or more components
A node is run using one or more executables.
I do see your point though, it's the (executable that runs the batcher)'s monitoring client.
Can this be better emphasized though?
crates/starknet_integration_tests/src/sequencer_manager.rs
line 355 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
The function is still returning the same block number it returned before thanks to the call to
prev
.
IIUC, your suggestion is to change that and fix all the callers?
If so, I will do it in a separate PR.
Not at all, I suggested about renaming the fn from get_latest_block_number
to get_batcher_latest_block_number
, or something of that sort.
Motivation: to indicate it is about the batcher and not the consensus for example.
3138901
to
2f89609
Compare
6e6bc62
to
90788e9
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 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Itay-Tsabary-Starkware, @nadin-Starkware, and @yair-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 352 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
I'm not sure, this is not something that we can get from monitoring, we need RPC for this - @alonh5
We don't actually need the nonce in this case, we just wanted to check all txs in general went in blocks. Can you use the n_txs metrics here?
90788e9
to
8f15f32
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: 3 of 4 files reviewed, 3 unresolved discussions (waiting on @alonh5, @Itay-Tsabary-Starkware, and @nadin-Starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 338 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Node: the set of all components (gateway, batcher, etc.)
Executable: an instance running the binary with a config, setting up one or more componentsA node is run using one or more executables.
I do see your point though, it's the (executable that runs the batcher)'s monitoring client.
Can this be better emphasized though?
discussed f2f, leaving the current name
crates/starknet_integration_tests/src/sequencer_manager.rs
line 355 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Not at all, I suggested about renaming the fn from
get_latest_block_number
toget_batcher_latest_block_number
, or something of that sort.
Motivation: to indicate it is about the batcher and not the consensus for example.
Done.
Previously, alonh5 (Alon Haramati) wrote…
Will do in a following PR |
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: 3 of 4 files reviewed, 4 unresolved discussions (waiting on @Itay-Tsabary-Starkware, @nadin-Starkware, and @yair-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 285 at r2 (raw file):
}) .expect("Node 0 should be either idle or running.") }
Let's take one of the running nodes, it doesn't have to be the first node.
Suggestion:
fn running_batcher_monitoring_client(&self) -> &MonitoringClient {
self.idle_nodes
.get(&0)
.map(|node| node.batcher_monitoring_client())
.or_else(|| {
self.running_nodes
.get(&0)
.map(|running_node| running_node.node_setup.batcher_monitoring_client())
})
.expect("Node 0 should be either idle or running.")
}
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: all files reviewed, 4 unresolved discussions (waiting on @Itay-Tsabary-Starkware, @nadin-Starkware, and @yair-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 352 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
Will do in a following PR
np
Previously, alonh5 (Alon Haramati) wrote…
|
8f15f32
to
fe1e355
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: 3 of 4 files reviewed, 4 unresolved discussions (waiting on @alonh5, @Itay-Tsabary-Starkware, and @nadin-Starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 285 at r2 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Let's take one of the running nodes, it doesn't have to be the first node.
Done.
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 r4, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @Itay-Tsabary-Starkware, @nadin-Starkware, and @yair-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 285 at r2 (raw file):
Previously, yair-starkware (Yair) wrote…
Done.
Rename as suggested?
crates/starknet_integration_tests/src/sequencer_manager.rs
line 346 at r4 (raw file):
) .prev() // The metric is the height marker so we need to subtract 1 to get the latest. .unwrap()
expect in both
Code quote:
.unwrap(),
)
.prev() // The metric is the height marker so we need to subtract 1 to get the latest.
.unwrap()
2f89609
to
70caf22
Compare
fe1e355
to
ebfb4dc
Compare
70caf22
to
5a5e05b
Compare
ebfb4dc
to
3c87d00
Compare
3c87d00
to
48f14f9
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, 5 unresolved discussions (waiting on @alonh5, @Itay-Tsabary-Starkware, and @nadin-Starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 285 at r2 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Rename as suggested?
Done.
crates/starknet_integration_tests/src/sequencer_manager.rs
line 346 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
expect in both
Done.
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 3 of 4 files at r1, 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @alonh5 and @nadin-Starkware)
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 r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @nadin-Starkware)
48f14f9
to
e719b7b
Compare
Merge activity
|
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 4 files at r1, 3 of 3 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @nadin-Starkware)
No description provided.