Skip to content

Commit

Permalink
test(blockifier): l1 bounds -> all bounds in worker logic test
Browse files Browse the repository at this point in the history
  • Loading branch information
dorimedini-starkware committed Oct 14, 2024
1 parent 343b9d0 commit 98473e0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions crates/blockifier/src/concurrency/worker_logic_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use crate::transaction::objects::HasRelatedFeeType;
use crate::transaction::test_utils::{
account_invoke_tx,
calculate_class_info_for_testing,
default_l1_resource_bounds,
default_all_resource_bounds,
emit_n_events_tx,
max_fee,
};
Expand All @@ -64,7 +64,7 @@ fn trivial_calldata_invoke_tx(
account_invoke_tx(invoke_tx_args! {
sender_address: account_address,
calldata: create_trivial_calldata(test_contract_address),
resource_bounds: default_l1_resource_bounds(),
resource_bounds: default_all_resource_bounds(),
nonce,
})
}
Expand Down Expand Up @@ -263,7 +263,7 @@ fn test_commit_tx_when_sender_is_sequencer() {
}

#[rstest]
fn test_worker_execute(default_l1_resource_bounds: ValidResourceBounds) {
fn test_worker_execute(default_all_resource_bounds: ValidResourceBounds) {
// Settings.
let block_context = BlockContext::create_for_account_testing();
let account_contract = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1);
Expand All @@ -288,7 +288,7 @@ fn test_worker_execute(default_l1_resource_bounds: ValidResourceBounds) {
"test_storage_read_write",
&[*storage_key.0.key(),storage_value ], // Calldata: address, value.
),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce_manager.next(account_address)
});

Expand All @@ -301,7 +301,7 @@ fn test_worker_execute(default_l1_resource_bounds: ValidResourceBounds) {
"test_storage_read_write",
&[*storage_key.0.key(),storage_value ], // Calldata: address, value.
),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce_manager.next(account_address)

});
Expand All @@ -313,7 +313,7 @@ fn test_worker_execute(default_l1_resource_bounds: ValidResourceBounds) {
"write_and_revert",
&[felt!(1991_u16),storage_value ], // Calldata: address, value.
),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce_manager.next(account_address)

});
Expand Down Expand Up @@ -437,7 +437,7 @@ fn test_worker_execute(default_l1_resource_bounds: ValidResourceBounds) {
}

#[rstest]
fn test_worker_validate(default_l1_resource_bounds: ValidResourceBounds) {
fn test_worker_validate(default_all_resource_bounds: ValidResourceBounds) {
// Settings.
let block_context = BlockContext::create_for_account_testing();
let account_contract = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1);
Expand All @@ -464,7 +464,7 @@ fn test_worker_validate(default_l1_resource_bounds: ValidResourceBounds) {
"test_storage_read_write",
&[*storage_key.0.key(),storage_value0 ], // Calldata: address, value.
),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce_manager.next(account_address)
});

Expand All @@ -475,7 +475,7 @@ fn test_worker_validate(default_l1_resource_bounds: ValidResourceBounds) {
"test_storage_read_write",
&[*storage_key.0.key(),storage_value1 ], // Calldata: address, value.
),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce_manager.next(account_address)

});
Expand Down Expand Up @@ -544,7 +544,7 @@ fn test_worker_validate(default_l1_resource_bounds: ValidResourceBounds) {
#[case::declare_cairo1(CairoVersion::Cairo1, TransactionVersion::THREE)]
fn test_deploy_before_declare(
max_fee: Fee,
default_l1_resource_bounds: ValidResourceBounds,
default_all_resource_bounds: ValidResourceBounds,
#[case] cairo_version: CairoVersion,
#[case] version: TransactionVersion,
) {
Expand All @@ -565,7 +565,7 @@ fn test_deploy_before_declare(
let declare_tx = declare_tx(
declare_tx_args! {
sender_address: account_address_0,
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
class_hash: test_class_hash,
compiled_class_hash: test_compiled_class_hash,
version,
Expand All @@ -589,7 +589,7 @@ fn test_deploy_before_declare(
felt!(1_u8), // Constructor calldata arg2.
]
),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce!(0_u8)
});

Expand Down Expand Up @@ -634,7 +634,7 @@ fn test_deploy_before_declare(
}

#[rstest]
fn test_worker_commit_phase(default_l1_resource_bounds: ValidResourceBounds) {
fn test_worker_commit_phase(default_all_resource_bounds: ValidResourceBounds) {
// Settings.
let block_context = BlockContext::create_for_account_testing();
let account_contract = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1);
Expand Down Expand Up @@ -662,7 +662,7 @@ fn test_worker_commit_phase(default_l1_resource_bounds: ValidResourceBounds) {
Transaction::Account(account_invoke_tx(invoke_tx_args! {
sender_address,
calldata: calldata.clone(),
resource_bounds: default_l1_resource_bounds,
resource_bounds: default_all_resource_bounds,
nonce: nonce_manager.next(sender_address)
}))
})
Expand Down

0 comments on commit 98473e0

Please sign in to comment.