-
Notifications
You must be signed in to change notification settings - Fork 65
Merge main-v0.13.6 into main-v0.14.0 #7736
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
Merge main-v0.13.6 into main-v0.14.0 #7736
Conversation
noaov1
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.
Reviewed 3 of 4 files at r7, 1 of 1 files at r8, all commit messages.
Reviewable status: 4 of 8 files reviewed, all discussions resolved (waiting on @avivg-starkware)
avivg-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.
Reviewed 4 of 6 files at r6, 1 of 4 files at r7, 1 of 1 files at r8.
Reviewable status: 6 of 8 files reviewed, 5 unresolved discussions (waiting on @noaov1)
crates/blockifier/src/bouncer.rs line 385 at r8 (raw file):
add_mod: 312, mul_mod: 604, range_check96: 56,
I see the builtins values were changed again?
Code quote:
pedersen: 10125,
range_check: 70,
ecdsa: 1666666,
ec_op: 714875,
bitwise: 583,
keccak: 510707,
poseidon: 6250,
add_mod: 312,
mul_mod: 604,
range_check96: 56,crates/blockifier/src/test_utils/struct_impls.rs line 205 at r8 (raw file):
..BouncerWeights::max() }, // TODO(Meshi): Check what should be the values here.
making sure this is not needed?
Code quote:
// TODO(Meshi): Check what should be the values here.crates/blockifier/src/bouncer_test.rs line 203 at r8 (raw file):
#[case] scenario: &'static str, ) { let block_context = BlockContext::create_for_account_testing();
The use of the fixtures was lost here.
Also, consider adding a TODO to try to make use of the other fixtures
//TODO(AvivG): consider use of fixtures here.
Suggestion:
fn test_bouncer_try_update_gas_based(
#[case] sierra_gas: GasAmount,
#[case] scenario: &'static str,
block_context: BlockContext,
) {crates/blockifier/src/bouncer_test.rs line 278 at r8 (raw file):
let block_max_capacity = BouncerWeights { sierra_gas: GasAmount(20), ..Default::default() }; let bouncer_config = BouncerConfig { block_max_capacity, builtin_weights: BuiltinWeights::default() };
Consider...
//TODO(AvivG): consider use of fixtures here.
Suggestion:
fn test_transaction_too_large_sierra_gas_based(
block_context: BlockContext,
) {
let mut state = test_state(&block_context.chain_info, Fee(0), &[]);
let mut transactional_state = TransactionalState::create_transactional(&mut state);
let block_max_capacity = BouncerWeights { sierra_gas: GasAmount(20), ..Default::default() };
let bouncer_config =
BouncerConfig { block_max_capacity, builtin_weights: BuiltinWeights::default() };crates/native_blockifier/src/py_block_executor.rs line 362 at r8 (raw file):
..BouncerWeights::max() }, // TODO(Meshi): Check what should be the values here.
making sure Ok
Code quote:
// TODO(Meshi): Check what should be the values here.
noaov1
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.
Reviewed 3 of 6 files at r6, 2 of 2 files at r9, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @avivg-starkware and @meship-starkware)
crates/blockifier/src/bouncer_test.rs line 203 at r8 (raw file):
Previously, avivg-starkware wrote…
The use of the fixtures was lost here.
Also, consider adding a TODO to try to make use of the other fixtures//TODO(AvivG): consider use of fixtures here.
Nice catch!
Same applies for block_max_capacity (though you need to override the proving_gas field), bouncer_config and state.
crates/blockifier/src/bouncer_test.rs line 200 at r9 (raw file):
#[case::proving_gas_block_full(GasAmount(0), "proving_gas_block_full")] fn test_bouncer_try_update_gas_based( #[case] sierra_gas: GasAmount,
Why is this needed?
@avivg-starkware
(can you do the same "trick" you do with the proving gas?)
(separate PR)
Code quote:
#[case] sierra_gas: GasAmount,…ain-v0.13.6-into-main-v0.14.0-1751523971
b6166d7 to
3a8eaa9
Compare
meship-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.
Reviewable status: 7 of 8 files reviewed, 6 unresolved discussions (waiting on @avivg-starkware and @noaov1)
crates/blockifier/src/bouncer.rs line 385 at r8 (raw file):
Previously, avivg-starkware wrote…
I see the builtins values were changed again?
Yes, these are the numbers according to the fact that we do not open most of the contract entries
crates/blockifier/src/bouncer_test.rs line 203 at r8 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Nice catch!
Same applies forblock_max_capacity(though you need to override theproving_gasfield),bouncer_configandstate.
Done.
crates/blockifier/src/bouncer_test.rs line 278 at r8 (raw file):
Previously, avivg-starkware wrote…
Consider...
//TODO(AvivG): consider use of fixtures here.
Done.
crates/blockifier/src/test_utils/struct_impls.rs line 205 at r8 (raw file):
Previously, avivg-starkware wrote…
making sure this is not needed?
Done.
crates/native_blockifier/src/py_block_executor.rs line 362 at r8 (raw file):
Previously, avivg-starkware wrote…
making sure Ok
Done.
noaov1
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.
Reviewed 1 of 1 files at r10, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @avivg-starkware)
avivg-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.
Reviewed 2 of 4 files at r7, 2 of 2 files at r9, 1 of 1 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @meship-starkware)
crates/blockifier/src/bouncer_test.rs line 200 at r9 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Why is this needed?
@avivg-starkware
(can you do the same "trick" you do with the proving gas?)
(separate PR)
@meship-starkware - Add a TODO and I'll take a look? I think it can be added here:
@noaov1 - sounds Ok?
Code snippet (i):
let builtin_counters = match scenario {
"proving_gas_block_full" => max_capacity_builtin_counters.clone(),
// Use a minimal or empty map.
"ok" | "sierra_gas_block_full" => {
HashMap::from([(BuiltinName::range_check, range_check_count - 1)])
}
_ => panic!("Unexpected scenario: {}", scenario),
};Code snippet (ii):
---->
let (builtin_counters, sierra_gas) = match scenario { ....|
Following @noaov1 's request above (I ran it, this should work) Suggestion: #[rstest]
#[case::sierra_gas_positive_flow("ok")]
#[case::sierra_gas_block_full("sierra_gas_block_full")]
#[case::proving_gas_positive_flow("ok")]
#[case::proving_gas_block_full("proving_gas_block_full")]
fn test_bouncer_try_update_gas_based(#[case] scenario: &'static str, block_context: BlockContext) {
let state = &mut test_state(&block_context.chain_info, Fee(0), &[]);
let mut transactional_state = TransactionalState::create_transactional(state);
let builtin_weights = BuiltinWeights::default();
let range_check_count = 2;
let max_capacity_builtin_counters =
HashMap::from([(BuiltinName::range_check, range_check_count)]);
let builtin_counters = match scenario {
"proving_gas_block_full" => max_capacity_builtin_counters.clone(),
// Use a minimal or empty map.
"ok" | "sierra_gas_block_full" => {
HashMap::from([(BuiltinName::range_check, range_check_count - 1)])
}
_ => panic!("Unexpected scenario: {}", scenario),
};
// Derive sierra_gas from scenario
let sierra_gas = match scenario {
"sierra_gas_block_full" => GasAmount(11), // Exceeds capacity
"ok" | "proving_gas_block_full" => GasAmount(1), // Within capacity
_ => panic!("Unexpected scenario: {}", scenario),
}; |
|
Previously, avivg-starkware wrote…
see suggestion below |
…ain-v0.13.6-into-main-v0.14.0-1751523971
meship-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.
Reviewed 3 of 6 files at r6, 4 of 5 files at r11, 1 of 1 files at r12, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
avivg-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.
Reviewed 4 of 5 files at r11, 1 of 1 files at r12, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
No description provided.