-
Notifications
You must be signed in to change notification settings - Fork 52
feat(starknet_batcher): metric for blocks closed on capacity #5223
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
Graphite Automations"Yair - Auto-assign" took an action on this PR • (03/24/25)1 assignee was added to this PR based on Yair's automation. |
3d2f9f7
to
4b27ecd
Compare
e59bb13
to
5a38200
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 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @yair-starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 448 at r1 (raw file):
crate::metrics::FULL_BLOCKS.parse_numeric_metric::<u64>(metrics), Some(expected_full_blocks_metric) );
Suggestion:
crate::metrics::FULL_BLOCKS.asssert_eq<u64>(metrics, expected_full_blocks_metric);
crates/starknet_batcher/src/block_builder_test.rs
line 492 at r1 (raw file):
crate::metrics::FULL_BLOCKS.register(); let metrics = recorder.handle().render(); assert_eq!(crate::metrics::FULL_BLOCKS.parse_numeric_metric::<u64>(&metrics), Some(0));
Suggestion:
crate::metrics::FULL_BLOCKS.assert_eq<u64>(&metrics, 0);
crates/starknet_batcher/src/block_builder_test.rs
line 515 at r1 (raw file):
test_expectations.expected_full_blocks_metric, &recorder.handle().render(), )
better to pass a reference to the entire test_expectations than 3 of it's sub-fields.
Code quote:
verify_build_block_output(
test_expectations.expected_txs_output,
test_expectations.expected_block_artifacts,
result_block_artifacts,
output_tx_receiver,
test_expectations.expected_full_blocks_metric,
&recorder.handle().render(),
)
5a38200
to
1543682
Compare
4b27ecd
to
56359b8
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: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @Yael-Starkware and @yair-starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 515 at r1 (raw file):
Previously, Yael-Starkware (YaelD) wrote…
better to pass a reference to the entire test_expectations than 3 of it's sub-fields.
Added todo
crates/starknet_batcher/src/block_builder_test.rs
line 448 at r1 (raw file):
crate::metrics::FULL_BLOCKS.parse_numeric_metric::<u64>(metrics), Some(expected_full_blocks_metric) );
Done.
crates/starknet_batcher/src/block_builder_test.rs
line 492 at r1 (raw file):
crate::metrics::FULL_BLOCKS.register(); let metrics = recorder.handle().render(); assert_eq!(crate::metrics::FULL_BLOCKS.parse_numeric_metric::<u64>(&metrics), Some(0));
Done.
1543682
to
8708926
Compare
8708926
to
e891dde
Compare
56359b8
to
309c563
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 1 of 2 files at r3, all commit messages.
Reviewable status: 2 of 4 files reviewed, 4 unresolved discussions (waiting on @Yael-Starkware)
crates/starknet_batcher/src/block_builder.rs
line 287 at r3 (raw file):
return Err(BlockBuilderError::FailOnError(FailOnErrorCause::BlockFull)); } else { FULL_BLOCKS.increment(1);
How do we know this block was accepted? If it counts full proposed blocks that weren't accepted this metric won't mean much
e891dde
to
250bc63
Compare
Previously, alonh5 (Alon Haramati) wrote…
I guess we don't. |
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 2 files at r2, 1 of 2 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @Yael-Starkware)
crates/starknet_batcher/src/block_builder.rs
line 287 at r3 (raw file):
Previously, yair-starkware (Yair) wrote…
I guess we don't.
Why won't it mean much?
Well I guess it's better than nothing, and for now it's not worth the effort checking if the block was accepted.
crates/starknet_batcher/src/metrics.rs
line 40 at r4 (raw file):
BATCHED_TRANSACTIONS.register(); REJECTED_TRANSACTIONS.register(); <<<<<<< HEAD
resolve.
crates/starknet_batcher/src/block_builder_test.rs
line 446 at r4 (raw file):
assert_eq!(result_block_artifacts, expected_block_artifacts); crate::metrics::FULL_BLOCKS.assert_eq::<u64>(metrics, expected_full_blocks_metric)
import
Code quote:
crate::metrics::FULL_BLOCKS
crates/starknet_batcher/src/block_builder_test.rs
line 485 at r4 (raw file):
#[tokio::test] async fn test_build_block(#[case] test_expectations: TestExpectations) { let recorder: metrics_exporter_prometheus::PrometheusRecorder =
is this needed?
Code quote:
: metrics_exporter_prometheus::PrometheusRecorder
250bc63
to
976b6c6
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, 6 unresolved discussions (waiting on @alonh5 and @Yael-Starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 446 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
import
Done.
crates/starknet_batcher/src/block_builder_test.rs
line 485 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
is this needed?
Done.
crates/starknet_batcher/src/metrics.rs
line 40 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
resolve.
Done.
976b6c6
to
14c10ac
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 1 of 1 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Yael-Starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 488 at r6 (raw file):
let recorder = PrometheusBuilder::new().build_recorder(); let _recorder_guard = metrics::set_default_local_recorder(&recorder); crate::metrics::FULL_BLOCKS.register();
remove all over file
Code quote:
crate::metrics::
14c10ac
to
9f37c2b
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 and @Yael-Starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 488 at r6 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
remove all over file
Missed that, 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 r7, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Yael-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 2 of 2 files at r3, 1 of 1 files at r5, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yair-starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 515 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
Added todo
I don't see it.
Previously, Yael-Starkware (YaelD) wrote…
line 430:
|
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, 1 unresolved discussion (waiting on @yair-starkware)
crates/starknet_batcher/src/block_builder_test.rs
line 515 at r1 (raw file):
Previously, yair-starkware (Yair) wrote…
line 430:
// TODO(yair): refactor to be a method of TestExpectations. async fn verify_build_block_output(
oh sorry. ack
No description provided.