diff --git a/CHANGELOG.md b/CHANGELOG.md index 01e30709a3..24aa50754b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [#683](https://github.com/FuelLabs/fuel-vm/pull/683): Simplify `InterpreterStorage` by removing dependency on `MerkleRootStorage` and removing `merkle_` prefix from method names. - [#672](https://github.com/FuelLabs/fuel-vm/pull/672): Remove `GasPrice` policy - [#672](https://github.com/FuelLabs/fuel-vm/pull/672): Add `gas_price` field to transaction execution +- [#684](https://github.com/FuelLabs/fuel-vm/pull/684): Remove `maturity` field from `Input` coin types. Also remove related `GTF` getter. ## [Version 0.46.0] diff --git a/fuel-asm/src/args.rs b/fuel-asm/src/args.rs index 3fe157a480..f8300f1076 100644 --- a/fuel-asm/src/args.rs +++ b/fuel-asm/src/args.rs @@ -143,9 +143,6 @@ crate::enum_try_from! { /// Set `$rA` to `tx.inputs[$rB].witnessIndex` InputCoinWitnessIndex = 0x207, - /// Set `$rA` to `tx.inputs[$rB].maturity` - InputCoinMaturity = 0x208, - /// Set `$rA` to `tx.inputs[$rB].predicateLength` InputCoinPredicateLength = 0x209, @@ -326,7 +323,6 @@ fn encode_gtf_args() { GTFArgs::InputCoinAssetId, GTFArgs::InputCoinTxPointer, GTFArgs::InputCoinWitnessIndex, - GTFArgs::InputCoinMaturity, GTFArgs::InputCoinPredicateLength, GTFArgs::InputCoinPredicateDataLength, GTFArgs::InputCoinPredicate, diff --git a/fuel-tx/src/builder.rs b/fuel-tx/src/builder.rs index 60ef079980..aa09a4ac0f 100644 --- a/fuel-tx/src/builder.rs +++ b/fuel-tx/src/builder.rs @@ -337,7 +337,6 @@ impl TransactionBuilder { amount: Word, asset_id: fuel_types::AssetId, tx_pointer: TxPointer, - maturity: BlockHeight, ) -> &mut Self { let pk = secret.public_key(); @@ -349,7 +348,6 @@ impl TransactionBuilder { amount, asset_id, tx_pointer, - maturity, witness_index, ); @@ -369,7 +367,6 @@ impl TransactionBuilder { rng.gen(), rng.gen(), Default::default(), - Default::default(), ) } diff --git a/fuel-tx/src/tests/bytes.rs b/fuel-tx/src/tests/bytes.rs index 11c9518cca..1d8ec334d1 100644 --- a/fuel-tx/src/tests/bytes.rs +++ b/fuel-tx/src/tests/bytes.rs @@ -98,7 +98,6 @@ fn input() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), ), Input::coin_predicate( rng.gen(), @@ -107,7 +106,6 @@ fn input() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), generate_nonempty_padded_bytes(rng), generate_bytes(rng), ), @@ -443,7 +441,6 @@ fn create_input_data_offset() { rng.next_u64(), rng.gen(), rng.gen(), - rng.gen(), predicate_gas_used, predicate.clone(), predicate_data.clone(), @@ -575,7 +572,6 @@ fn script_input_coin_data_offset() { rng.next_u64(), rng.gen(), rng.gen(), - rng.gen(), predicate_gas_used, predicate.clone(), predicate_data, diff --git a/fuel-tx/src/tests/valid_cases/input.rs b/fuel-tx/src/tests/valid_cases/input.rs index b1c35045ea..7e0e78025f 100644 --- a/fuel-tx/src/tests/valid_cases/input.rs +++ b/fuel-tx/src/tests/valid_cases/input.rs @@ -89,7 +89,6 @@ fn input_coin_message_signature() { let amount = rng.gen(); let asset_id = rng.gen(); let tx_pointer = rng.gen(); - let maturity = rng.gen(); sign_and_validate(rng, txs.by_ref(), |tx, public| { let witness_index = @@ -102,7 +101,6 @@ fn input_coin_message_signature() { amount, asset_id, tx_pointer, - maturity, witness_index as u8, ) }) @@ -145,15 +143,8 @@ fn coin_signed() { let mut tx = Script::default(); - let input = Input::coin_signed( - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - 0, - rng.gen(), - ); + let input = + Input::coin_signed(rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen(), 0); tx.add_input(input); let block_height = rng.gen(); @@ -176,9 +167,9 @@ fn duplicate_secrets_reuse_witness() { // verify witness reuse for script txs let script = TransactionBuilder::script(vec![], vec![]) // coin 1 - .add_unsigned_coin_input(key, rng.gen(), 100, Default::default(), Default::default(), 0.into()) + .add_unsigned_coin_input(key, rng.gen(), 100, Default::default(), Default::default()) // coin 2 - .add_unsigned_coin_input(key, rng.gen(), 200, rng.gen(), Default::default(), 0.into()) + .add_unsigned_coin_input(key, rng.gen(), 200, rng.gen(), Default::default()) // message 1 .add_unsigned_message_input(key, rng.gen(), rng.gen(), 100, vec![]) .add_unsigned_message_input(key, rng.gen(), rng.gen(), 100, vec![rng.gen()]) @@ -193,9 +184,9 @@ fn duplicate_secrets_reuse_witness() { // verify witness reuse for creation txs let create = TransactionBuilder::create(Witness::default(), rng.gen(), vec![]) // coin 1 - .add_unsigned_coin_input(key, rng.gen(), 100, Default::default(), Default::default(), 0.into()) + .add_unsigned_coin_input(key, rng.gen(), 100, Default::default(), Default::default()) // coin 2 - .add_unsigned_coin_input(key, rng.gen(), 200, rng.gen(), Default::default(), 0.into()) + .add_unsigned_coin_input(key, rng.gen(), 200, rng.gen(), Default::default()) // message 1 .add_unsigned_message_input(key, rng.gen(), rng.gen(), 100, vec![]) .add_unsigned_message_input(key, rng.gen(), rng.gen(), 100, vec![rng.gen()]) @@ -224,7 +215,6 @@ fn coin_predicate() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), predicate, generate_bytes(rng), ) @@ -241,7 +231,6 @@ fn coin_predicate() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), predicate, generate_bytes(rng), ) @@ -262,7 +251,6 @@ fn coin_predicate() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), predicate, generate_bytes(rng), ) @@ -574,24 +562,8 @@ fn transaction_with_duplicate_coin_inputs_is_invalid() { let utxo_id = rng.gen(); let arb_gas_price = 1; - let a = Input::coin_signed( - utxo_id, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - 0, - rng.gen(), - ); - let b = Input::coin_signed( - utxo_id, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - 0, - rng.gen(), - ); + let a = Input::coin_signed(utxo_id, rng.gen(), rng.gen(), rng.gen(), rng.gen(), 0); + let b = Input::coin_signed(utxo_id, rng.gen(), rng.gen(), rng.gen(), rng.gen(), 0); let err = TransactionBuilder::script(vec![], vec![]) .add_input(a) @@ -628,7 +600,6 @@ fn transaction_with_duplicate_message_inputs_is_invalid() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), ); let err = TransactionBuilder::script(vec![], vec![]) @@ -660,7 +631,6 @@ fn transaction_with_duplicate_contract_inputs_is_invalid() { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), ); let a = Input::contract(rng.gen(), rng.gen(), rng.gen(), rng.gen(), contract_id); @@ -694,15 +664,8 @@ fn transaction_with_duplicate_contract_utxo_id_is_valid() { let a = Input::contract(input_utxo_id, rng.gen(), rng.gen(), rng.gen(), rng.gen()); let b = Input::contract(input_utxo_id, rng.gen(), rng.gen(), rng.gen(), rng.gen()); - let fee = Input::coin_signed( - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - 0, - rng.gen(), - ); + let fee = + Input::coin_signed(rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen(), 0); let o = Output::contract(0, rng.gen(), rng.gen()); let p = Output::contract(1, rng.gen(), rng.gen()); diff --git a/fuel-tx/src/tests/valid_cases/output.rs b/fuel-tx/src/tests/valid_cases/output.rs index 9527ecbe80..e8871722ed 100644 --- a/fuel-tx/src/tests/valid_cases/output.rs +++ b/fuel-tx/src/tests/valid_cases/output.rs @@ -32,7 +32,6 @@ fn contract() { rng.gen(), rng.gen(), rng.next_u32().to_be_bytes()[0], - rng.gen(), ), Input::contract(rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()), ], @@ -50,7 +49,6 @@ fn contract() { rng.gen(), rng.gen(), rng.next_u32().to_be_bytes()[0], - rng.gen(), ), Input::contract(rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()), ], @@ -71,7 +69,6 @@ fn contract() { rng.gen(), rng.gen(), rng.next_u32().to_be_bytes()[0], - rng.gen(), ), Input::contract(rng.gen(), rng.gen(), rng.gen(), rng.gen(), rng.gen()), ], diff --git a/fuel-tx/src/tests/valid_cases/transaction.rs b/fuel-tx/src/tests/valid_cases/transaction.rs index e534c7776f..3324c0714d 100644 --- a/fuel-tx/src/tests/valid_cases/transaction.rs +++ b/fuel-tx/src/tests/valid_cases/transaction.rs @@ -336,7 +336,6 @@ fn max_iow() { rng.gen(), asset_id, rng.gen(), - maturity, ); while builder.outputs().len() < TX_PARAMS.max_outputs as usize { @@ -366,14 +365,7 @@ fn max_iow() { let asset_id: AssetId = rng.gen(); secrets.iter().for_each(|k| { - builder.add_unsigned_coin_input( - *k, - rng.gen(), - rng.gen(), - asset_id, - rng.gen(), - maturity, - ); + builder.add_unsigned_coin_input(*k, rng.gen(), rng.gen(), asset_id, rng.gen()); }); while builder.outputs().len() < TX_PARAMS.max_outputs as usize { @@ -401,14 +393,7 @@ fn max_iow() { .collect(); secrets.iter().for_each(|k| { - builder.add_unsigned_coin_input( - *k, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ); + builder.add_unsigned_coin_input(*k, rng.gen(), rng.gen(), rng.gen(), rng.gen()); }); while builder.outputs().len() < TX_PARAMS.max_outputs as usize { @@ -438,14 +423,7 @@ fn max_iow() { .collect(); secrets.iter().for_each(|k| { - builder.add_unsigned_coin_input( - *k, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ); + builder.add_unsigned_coin_input(*k, rng.gen(), rng.gen(), rng.gen(), rng.gen()); }); while builder.outputs().len() < 1 + TX_PARAMS.max_outputs as usize { @@ -475,14 +453,7 @@ fn max_iow() { .collect(); secrets.iter().for_each(|k| { - builder.add_unsigned_coin_input( - *k, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ); + builder.add_unsigned_coin_input(*k, rng.gen(), rng.gen(), rng.gen(), rng.gen()); }); while builder.outputs().len() < TX_PARAMS.max_outputs as usize { @@ -518,8 +489,8 @@ fn output_change_asset_id() { TransactionBuilder::script(generate_bytes(rng), generate_bytes(rng)) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen(), rng.gen()) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen()) .add_output(Output::change(rng.gen(), rng.next_u64(), a)) .add_output(Output::change(rng.gen(), rng.next_u64(), b)) .finalize() @@ -528,8 +499,8 @@ fn output_change_asset_id() { let err = TransactionBuilder::script(generate_bytes(rng), generate_bytes(rng)) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen(), rng.gen()) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen()) .add_output(Output::change(rng.gen(), rng.next_u64(), a)) .add_output(Output::change(rng.gen(), rng.next_u64(), a)) .finalize() @@ -543,8 +514,8 @@ fn output_change_asset_id() { let err = TransactionBuilder::script(generate_bytes(rng), generate_bytes(rng)) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen(), rng.gen()) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen()) .add_output(Output::change(rng.gen(), rng.next_u64(), a)) .add_output(Output::change(rng.gen(), rng.next_u64(), c)) .finalize() @@ -558,8 +529,8 @@ fn output_change_asset_id() { let err = TransactionBuilder::script(generate_bytes(rng), generate_bytes(rng)) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen(), rng.gen()) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), a, rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), b, rng.gen()) .add_output(Output::coin(rng.gen(), rng.next_u64(), a)) .add_output(Output::coin(rng.gen(), rng.next_u64(), c)) .finalize() @@ -589,7 +560,7 @@ fn script() { vec![0xfb; SCRIPT_PARAMS.max_script_data_length as usize], ) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), asset_id)) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -600,7 +571,7 @@ fn script() { vec![0xfb; SCRIPT_PARAMS.max_script_data_length as usize], ) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen()) .add_output(Output::contract_created(rng.gen(), rng.gen())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -616,7 +587,7 @@ fn script() { vec![0xfb; SCRIPT_PARAMS.max_script_data_length as usize], ) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen()) .add_output(Output::contract_created(rng.gen(), rng.gen())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -629,7 +600,7 @@ fn script() { vec![0xfb; 1 + SCRIPT_PARAMS.max_script_data_length as usize], ) .maturity(maturity) - .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen(), rng.gen()) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), asset_id, rng.gen()) .add_output(Output::contract_created(rng.gen(), rng.gen())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -652,14 +623,7 @@ fn create() { TransactionBuilder::create(generate_bytes(rng).into(), rng.gen(), vec![]) .maturity(maturity) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .finalize() .check(block_height, &test_params(), arb_gas_price) .expect("Failed to validate tx"); @@ -673,14 +637,7 @@ fn create() { rng.gen(), rng.gen(), )) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .add_output(Output::contract(0, rng.gen(), rng.gen())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -701,14 +658,7 @@ fn create() { rng.gen(), not_empty_data, ) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .finalize() .check(block_height, &test_params(), arb_gas_price) .expect_err("Expected erroneous transaction"); @@ -720,14 +670,7 @@ fn create() { let err = TransactionBuilder::create(generate_bytes(rng).into(), rng.gen(), vec![]) .maturity(maturity) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .add_output(Output::variable(rng.gen(), rng.gen(), rng.gen())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -746,16 +689,8 @@ fn create() { rng.gen(), AssetId::default(), rng.gen(), - maturity, - ) - .add_unsigned_coin_input( - secret_b, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, ) + .add_unsigned_coin_input(secret_b, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::BASE)) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::BASE)) .finalize() @@ -777,16 +712,8 @@ fn create() { rng.gen(), AssetId::default(), rng.gen(), - maturity, - ) - .add_unsigned_coin_input( - secret_b, - rng.gen(), - rng.gen(), - asset_id, - rng.gen(), - maturity, ) + .add_unsigned_coin_input(secret_b, rng.gen(), rng.gen(), asset_id, rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::default())) .add_output(Output::change(rng.gen(), rng.gen(), asset_id)) .finalize() @@ -813,16 +740,8 @@ fn create() { rng.gen(), AssetId::default(), rng.gen(), - maturity, - ) - .add_unsigned_coin_input( - secret_b, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, ) + .add_unsigned_coin_input(secret_b, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .add_output(Output::contract_created(contract_id, state_root)) .add_output(Output::contract_created(contract_id, state_root)) .finalize() @@ -840,14 +759,7 @@ fn create() { vec![], ) .maturity(maturity) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - AssetId::default(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), AssetId::default(), rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::default())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -859,14 +771,7 @@ fn create() { vec![], ) .maturity(maturity) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - AssetId::default(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), AssetId::default(), rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::default())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -886,7 +791,6 @@ fn create() { rng.gen(), rng.gen(), 0, - rng.gen(), )], vec![], vec![Default::default()], @@ -904,7 +808,6 @@ fn create() { rng.gen(), AssetId::default(), rng.gen(), - maturity, ) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::default())) .finalize() @@ -926,14 +829,7 @@ fn create() { storage_slots.clone(), ) .maturity(maturity) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - AssetId::default(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), AssetId::default(), rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::default())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -951,14 +847,7 @@ fn create() { storage_slots_max, ) .maturity(maturity) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - AssetId::default(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), AssetId::default(), rng.gen()) .add_output(Output::change(rng.gen(), rng.gen(), AssetId::default())) .finalize() .check(block_height, &test_params(), arb_gas_price) @@ -972,7 +861,6 @@ fn script_transaction_at_maximum_size_is_valid() { let rng = &mut StdRng::seed_from_u64(8586); let secret = SecretKey::random(rng); - let maturity = 100.into(); let block_height = 100.into(); let mut params = test_params(); let max_size = 1024usize; @@ -981,14 +869,7 @@ fn script_transaction_at_maximum_size_is_valid() { let base_size = { let tx = TransactionBuilder::script(vec![], vec![]) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .finalize(); tx.size() }; @@ -1001,14 +882,7 @@ fn script_transaction_at_maximum_size_is_valid() { data }; let tx = TransactionBuilder::script(script, vec![]) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .finalize(); tx.check(block_height, ¶ms, arb_gas_price) @@ -1020,7 +894,6 @@ fn script_transaction_exceeding_maximum_size_is_invalid() { let rng = &mut StdRng::seed_from_u64(8586); let secret = SecretKey::random(rng); - let maturity = 100.into(); let block_height = 100.into(); let mut params = test_params(); let max_size = 1024usize; @@ -1029,14 +902,7 @@ fn script_transaction_exceeding_maximum_size_is_invalid() { let base_size = { let tx = TransactionBuilder::script(vec![], vec![]) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .finalize(); tx.size() }; @@ -1051,14 +917,7 @@ fn script_transaction_exceeding_maximum_size_is_invalid() { data }; let tx = TransactionBuilder::script(script, vec![]) - .add_unsigned_coin_input( - secret, - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - maturity, - ) + .add_unsigned_coin_input(secret, rng.gen(), rng.gen(), rng.gen(), rng.gen()) .finalize(); let err = tx @@ -1211,7 +1070,6 @@ mod inputs { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), predicate, vec![], )) @@ -1237,7 +1095,6 @@ mod inputs { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), predicate, vec![], )) diff --git a/fuel-tx/src/transaction.rs b/fuel-tx/src/transaction.rs index 82295dba93..01c463385e 100644 --- a/fuel-tx/src/transaction.rs +++ b/fuel-tx/src/transaction.rs @@ -22,7 +22,6 @@ use fuel_types::{ }, Address, AssetId, - BlockHeight, Bytes32, Nonce, Salt, @@ -366,7 +365,6 @@ pub trait Executable: field::Inputs + field::Outputs + field::Witnesses { amount: Word, asset_id: AssetId, tx_pointer: TxPointer, - maturity: BlockHeight, witness_index: u8, ) { let owner = Input::owner(owner); @@ -378,7 +376,6 @@ pub trait Executable: field::Inputs + field::Outputs + field::Witnesses { asset_id, tx_pointer, witness_index, - maturity, ); self.inputs_mut().push(input); } diff --git a/fuel-tx/src/transaction/id.rs b/fuel-tx/src/transaction/id.rs index 3a55286c48..a94ddf42d3 100644 --- a/fuel-tx/src/transaction/id.rs +++ b/fuel-tx/src/transaction/id.rs @@ -196,15 +196,6 @@ mod tests { mem::swap(t, &mut t_p); } - fn not_u32(t: &mut T) - where - T: Copy + Into + From, - { - let u_32: u32 = (*t).into(); - let mut t_p = u_32.not().into(); - mem::swap(t, &mut t_p); - } - fn assert_id_eq(tx: &Tx, mut f: F) where F: FnMut(&mut Tx), @@ -304,13 +295,6 @@ mod tests { witness_index, not ); - assert_io_ne!( - tx, - inputs_mut, - Input::CoinSigned[CoinSigned], - maturity, - not_u32 - ); assert_io_ne!( tx, @@ -340,13 +324,6 @@ mod tests { asset_id, invert ); - assert_io_ne!( - tx, - inputs_mut, - Input::CoinPredicate[CoinPredicate], - maturity, - not_u32 - ); assert_io_ne!( tx, inputs_mut, @@ -636,7 +613,6 @@ mod tests { rng.gen(), rng.gen(), rng.next_u32().to_be_bytes()[0], - rng.gen(), ), Input::coin_predicate( rng.gen(), @@ -645,7 +621,6 @@ mod tests { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), generate_nonempty_padded_bytes(rng), generate_bytes(rng), ), diff --git a/fuel-tx/src/transaction/types/input.rs b/fuel-tx/src/transaction/types/input.rs index eee7944c0c..f1113251c0 100644 --- a/fuel-tx/src/transaction/types/input.rs +++ b/fuel-tx/src/transaction/types/input.rs @@ -29,7 +29,6 @@ use fuel_types::{ fmt_truncated_hex, Address, AssetId, - BlockHeight, Bytes32, ContractId, MessageId, @@ -220,7 +219,6 @@ impl Input { amount: Word, asset_id: AssetId, tx_pointer: TxPointer, - maturity: BlockHeight, predicate_gas_used: Word, predicate: Vec, predicate_data: Vec, @@ -232,7 +230,6 @@ impl Input { asset_id, tx_pointer, witness_index: Empty::new(), - maturity, predicate_gas_used, predicate, predicate_data, @@ -246,7 +243,6 @@ impl Input { asset_id: AssetId, tx_pointer: TxPointer, witness_index: u8, - maturity: BlockHeight, ) -> Self { Self::CoinSigned(CoinSigned { utxo_id, @@ -255,7 +251,6 @@ impl Input { asset_id, tx_pointer, witness_index, - maturity, predicate_gas_used: Empty::new(), predicate: Empty::new(), predicate_data: Empty::new(), @@ -438,18 +433,6 @@ impl Input { } } - pub const fn maturity(&self) -> Option { - match self { - Input::CoinSigned(CoinSigned { maturity, .. }) - | Input::CoinPredicate(CoinPredicate { maturity, .. }) => Some(*maturity), - Input::Contract(_) - | Input::MessageCoinSigned(_) - | Input::MessageCoinPredicate(_) - | Input::MessageDataSigned(_) - | Input::MessageDataPredicate(_) => None, - } - } - pub fn predicate_offset(&self) -> Option { match self { Input::CoinPredicate(_) => InputRepr::Coin.coin_predicate_offset(), @@ -909,7 +892,6 @@ pub mod typescript { use fuel_types::{ Address, AssetId, - BlockHeight, Bytes32, Word, }; @@ -960,7 +942,6 @@ pub mod typescript { amount: Word, asset_id: AssetId, tx_pointer: TxPointer, - maturity: BlockHeight, predicate_gas_used: Word, predicate: Vec, predicate_data: Vec, @@ -972,7 +953,6 @@ pub mod typescript { asset_id, tx_pointer, witness_index: Empty::new(), - maturity, predicate_gas_used, predicate, predicate_data, @@ -987,7 +967,6 @@ pub mod typescript { asset_id: AssetId, tx_pointer: TxPointer, witness_index: u8, - maturity: BlockHeight, ) -> Input { Input(Box::new(crate::Input::CoinSigned(CoinSigned { utxo_id, @@ -996,7 +975,6 @@ pub mod typescript { asset_id, tx_pointer, witness_index, - maturity, predicate_gas_used: Empty::new(), predicate: Empty::new(), predicate_data: Empty::new(), diff --git a/fuel-tx/src/transaction/types/input/coin.rs b/fuel-tx/src/transaction/types/input/coin.rs index f8896b4bb8..8cb3969a7b 100644 --- a/fuel-tx/src/transaction/types/input/coin.rs +++ b/fuel-tx/src/transaction/types/input/coin.rs @@ -14,7 +14,6 @@ use derivative::Derivative; use fuel_types::{ Address, AssetId, - BlockHeight, Word, }; @@ -108,7 +107,6 @@ where pub tx_pointer: TxPointer, #[derivative(Debug(format_with = "fmt_as_field"))] pub witness_index: Specification::Witness, - pub maturity: BlockHeight, #[derivative(Debug(format_with = "fmt_as_field"))] pub predicate_gas_used: Specification::PredicateGasUsed, #[derivative(Debug(format_with = "fmt_as_field"))] @@ -140,7 +138,6 @@ impl Coin { asset_id, tx_pointer, witness_index, - maturity, .. } = self; @@ -151,7 +148,6 @@ impl Coin { asset_id, tx_pointer, witness_index, - maturity, ..Default::default() } } @@ -163,7 +159,6 @@ impl Coin { amount, asset_id, tx_pointer, - maturity, predicate, predicate_data, predicate_gas_used, @@ -176,7 +171,6 @@ impl Coin { amount, asset_id, tx_pointer, - maturity, predicate, predicate_data, predicate_gas_used, @@ -194,7 +188,6 @@ impl Coin { asset_id, tx_pointer, witness_index, - maturity, .. } = self; @@ -205,7 +198,6 @@ impl Coin { asset_id, tx_pointer, witness_index, - maturity, ..Default::default() } } @@ -219,7 +211,6 @@ impl Coin { amount, asset_id, tx_pointer, - maturity, predicate, predicate_data, predicate_gas_used, @@ -232,7 +223,6 @@ impl Coin { amount, asset_id, tx_pointer, - maturity, predicate, predicate_data, predicate_gas_used, diff --git a/fuel-tx/src/transaction/types/input/consts.rs b/fuel-tx/src/transaction/types/input/consts.rs index c6eed86dbe..a8dd9deba3 100644 --- a/fuel-tx/src/transaction/types/input/consts.rs +++ b/fuel-tx/src/transaction/types/input/consts.rs @@ -21,7 +21,6 @@ pub(super) const INPUT_COIN_TX_POINTER_OFFSET: usize = pub(super) const INPUT_COIN_FIXED_SIZE: usize = INPUT_COIN_TX_POINTER_OFFSET + TxPointer::LEN // TxPointer + WORD_SIZE // Witness index - + WORD_SIZE // Maturity + WORD_SIZE // Predicate size + WORD_SIZE // Predicate data size + WORD_SIZE; // Predicate gas used diff --git a/fuel-tx/src/transaction/types/input/snapshot_tests.rs b/fuel-tx/src/transaction/types/input/snapshot_tests.rs index 25a94484ca..e5dc4f8247 100644 --- a/fuel-tx/src/transaction/types/input/snapshot_tests.rs +++ b/fuel-tx/src/transaction/types/input/snapshot_tests.rs @@ -14,7 +14,6 @@ fn tx_with_signed_coin_snapshot() { asset_id: [5u8; 32].into(), tx_pointer: TxPointer::new(46.into(), 5), witness_index: 4, - maturity: 2.into(), predicate_gas_used: Empty::new(), predicate: Empty::new(), predicate_data: Empty::new(), @@ -40,7 +39,6 @@ fn tx_with_predicate_coin_snapshot() { asset_id: [5u8; 32].into(), tx_pointer: TxPointer::new(46.into(), 5), witness_index: Empty::new(), - maturity: 2.into(), predicate_gas_used: 100_000, predicate: vec![3u8; 10], predicate_data: vec![4u8; 12], diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap index 59b841ce2d..7a13cfc2cb 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_predicate_coin_snapshot.snap @@ -3,4 +3,4 @@ source: fuel-tx/src/transaction/types/input/snapshot_tests.rs assertion_line: 55 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000d00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e00000000000000050000000000000000000000000000000200000000000186a0000000000000000a000000000000000c0303030303030303030300000000000004040404040404040404040400000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000d00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e0000000000000005000000000000000000000000000186a0000000000000000a000000000000000c0303030303030303030300000000000004040404040404040404040400000000 diff --git a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap index 9b09157a53..bf230daea7 100644 --- a/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap +++ b/fuel-tx/src/transaction/types/input/snapshots/fuel_tx__transaction__types__input__snapshot_tests__tx_with_signed_coin_snapshot.snap @@ -3,4 +3,4 @@ source: fuel-tx/src/transaction/types/input/snapshot_tests.rs assertion_line: 30 expression: hex --- -0000000000000000000000000000000000000000000000000000000000000000000000000000000f0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000003e8000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e000000000000000500000000000000040000000000000002000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000000000f0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000003e8000000000000007b00000000000f42400000000000000000010101010101010101010101010101010101010101010101010101010101010100000000000000020202020202020202020202020202020202020202020202020202020202020202000000000000000b0505050505050505050505050505050505050505050505050505050505050505000000000000002e00000000000000050000000000000004000000000000000000000000000000000000000000000000 diff --git a/fuel-tx/test-helpers/src/lib.rs b/fuel-tx/test-helpers/src/lib.rs index 4f1756e499..7cdd6748d6 100644 --- a/fuel-tx/test-helpers/src/lib.rs +++ b/fuel-tx/test-helpers/src/lib.rs @@ -209,7 +209,6 @@ mod use_std { self.rng.gen(), self.rng.gen(), self.rng.gen(), - self.rng.gen(), predicate, generate_bytes(&mut self.rng), ); @@ -287,7 +286,6 @@ mod use_std { self.rng.gen(), self.rng.gen(), self.rng.gen(), - self.rng.gen(), ); }); diff --git a/fuel-vm/src/checked_transaction.rs b/fuel-vm/src/checked_transaction.rs index 783959eadd..f4cf24c582 100644 --- a/fuel-vm/src/checked_transaction.rs +++ b/fuel-vm/src/checked_transaction.rs @@ -770,7 +770,7 @@ mod tests { let tx = TransactionBuilder::script(vec![], vec![]) .add_unsigned_message_input(SecretKey::random(rng), rng.gen(), rng.gen(), input_amount, vec![0xff; 10]) // Add empty base coin - .add_unsigned_coin_input(SecretKey::random(rng), rng.gen(), 0, AssetId::BASE, rng.gen(), rng.gen()) + .add_unsigned_coin_input(SecretKey::random(rng), rng.gen(), 0, AssetId::BASE, rng.gen()) .finalize(); let err = tx @@ -811,7 +811,7 @@ mod tests { vec![0xbb; 10], )) // Add empty base coin - .add_unsigned_coin_input(SecretKey::random(rng), rng.gen(), 0, AssetId::BASE, rng.gen(), rng.gen()) + .add_unsigned_coin_input(SecretKey::random(rng), rng.gen(), 0, AssetId::BASE, rng.gen()) .finalize(); let err = tx @@ -1362,7 +1362,6 @@ mod tests { asset, rng.gen(), Default::default(), - Default::default(), )) .add_input(Input::contract( rng.gen(), @@ -1501,7 +1500,6 @@ mod tests { input_amount, AssetId::default(), rng.gen(), - Default::default(), ) .add_output(Output::change(rng.gen(), 0, AssetId::default())) // arbitrary spending asset @@ -1511,7 +1509,6 @@ mod tests { input_amount, any_asset, rng.gen(), - Default::default(), ) .add_output(Output::coin(rng.gen(), input_amount + 1, any_asset)) .add_output(Output::change(rng.gen(), 0, any_asset)) @@ -1722,7 +1719,6 @@ mod tests { input_amount, asset, rng.gen(), - Default::default(), ) .add_input(Input::contract( rng.gen(), @@ -1757,7 +1753,6 @@ mod tests { fee_input_amount, asset, rng.gen(), - Default::default(), predicate_gas_used, predicate, vec![], @@ -1812,7 +1807,6 @@ mod tests { input_amount, AssetId::default(), rng.gen(), - Default::default(), ) .add_output(Output::change(rng.gen(), 0, AssetId::default())) .finalize() diff --git a/fuel-vm/src/interpreter/executors/main/tests.rs b/fuel-vm/src/interpreter/executors/main/tests.rs index f4bc7ca1be..6b6b641c04 100644 --- a/fuel-vm/src/interpreter/executors/main/tests.rs +++ b/fuel-vm/src/interpreter/executors/main/tests.rs @@ -51,7 +51,6 @@ fn estimate_gas_gives_proper_gas_used() { coin_amount, AssetId::default(), rng.gen(), - Default::default(), ); let transaction_without_predicate = builder @@ -81,7 +80,6 @@ fn estimate_gas_gives_proper_gas_used() { coin_amount, AssetId::default(), rng.gen(), - Default::default(), rng.gen(), predicate, vec![], diff --git a/fuel-vm/src/interpreter/internal/tests.rs b/fuel-vm/src/interpreter/internal/tests.rs index e6bafdf140..336115d9e1 100644 --- a/fuel-vm/src/interpreter/internal/tests.rs +++ b/fuel-vm/src/interpreter/internal/tests.rs @@ -49,7 +49,6 @@ fn external_balance() { amount, asset, rng.gen(), - maturity, ); }); diff --git a/fuel-vm/src/interpreter/metadata.rs b/fuel-vm/src/interpreter/metadata.rs index 2b5081c9c6..56981bc26a 100644 --- a/fuel-vm/src/interpreter/metadata.rs +++ b/fuel-vm/src/interpreter/metadata.rs @@ -268,13 +268,6 @@ impl GTFInput<'_, Tx> { .and_then(Input::witness_index) .ok_or(PanicReason::InputNotFound)? as Word } - GTFArgs::InputCoinMaturity => { - *tx.inputs() - .get(b) - .filter(|i| i.is_coin()) - .and_then(Input::maturity) - .ok_or(PanicReason::InputNotFound)? as Word - } GTFArgs::InputCoinPredicateLength => { tx.inputs() .get(b) diff --git a/fuel-vm/src/predicate.rs b/fuel-vm/src/predicate.rs index d22d8366d3..99e95bcffb 100644 --- a/fuel-vm/src/predicate.rs +++ b/fuel-vm/src/predicate.rs @@ -91,7 +91,6 @@ mod tests { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), 0, predicate.clone(), predicate_data.clone(), @@ -197,7 +196,6 @@ mod tests { rng.gen(), rng.gen(), rng.gen(), - rng.gen(), 15, predicate.clone(), predicate_data.clone(), diff --git a/fuel-vm/src/tests/code_coverage.rs b/fuel-vm/src/tests/code_coverage.rs index 6d97cf30aa..98598eda98 100644 --- a/fuel-vm/src/tests/code_coverage.rs +++ b/fuel-vm/src/tests/code_coverage.rs @@ -53,7 +53,6 @@ fn code_coverage() { 2, Default::default(), rng.gen(), - Default::default(), ) .script_gas_limit(gas_limit) .maturity(maturity) diff --git a/fuel-vm/src/tests/contract.rs b/fuel-vm/src/tests/contract.rs index 4a7fd46536..27ec3c4dd6 100644 --- a/fuel-vm/src/tests/contract.rs +++ b/fuel-vm/src/tests/contract.rs @@ -68,7 +68,6 @@ fn prevent_contract_id_redeployment() { asset_id, rng.gen(), Default::default(), - 1, ); let consensus_params = ConsensusParameters::standard(); diff --git a/fuel-vm/src/tests/crypto.rs b/fuel-vm/src/tests/crypto.rs index 01b7061051..4957117984 100644 --- a/fuel-vm/src/tests/crypto.rs +++ b/fuel-vm/src/tests/crypto.rs @@ -206,7 +206,6 @@ async fn recover_tx_id_predicate() { 1000, rng.gen(), Default::default(), - rng.gen(), 0, predicate, vec![], @@ -222,7 +221,6 @@ async fn recover_tx_id_predicate() { rng.gen(), rng.gen(), Default::default(), - Default::default(), ) .finalize(); diff --git a/fuel-vm/src/tests/encoding.rs b/fuel-vm/src/tests/encoding.rs index b9f0eecc47..d7a160ce02 100644 --- a/fuel-vm/src/tests/encoding.rs +++ b/fuel-vm/src/tests/encoding.rs @@ -101,7 +101,6 @@ fn input() { [0xcc; 32].into(), TxPointer::new(0x3802.into(), 0x28), 0xff, - (u32::MAX >> 1).into(), ), Input::coin_predicate( UtxoId::new([0xaa; 32].into(), 0), @@ -109,7 +108,6 @@ fn input() { Word::MAX, [0xcc; 32].into(), TxPointer::new(0x3802.into(), 0x28), - (u32::MAX >> 1).into(), Word::MAX, vec![0xdd; 50], vec![0xee; 23], @@ -120,7 +118,6 @@ fn input() { Word::MAX, [0xcc; 32].into(), TxPointer::new(0x3802.into(), 0x28), - (u32::MAX >> 1).into(), Word::MAX, vec![0xdd; 50], vec![], diff --git a/fuel-vm/src/tests/metadata.rs b/fuel-vm/src/tests/metadata.rs index 5a570e25e2..2544db05c5 100644 --- a/fuel-vm/src/tests/metadata.rs +++ b/fuel-vm/src/tests/metadata.rs @@ -313,7 +313,6 @@ fn get_transaction_fields() { 1_500, rng.gen(), rng.gen(), - 100.into(), gas_costs.ret, predicate.clone(), predicate_data.clone(), @@ -358,7 +357,6 @@ fn get_transaction_fields() { input, AssetId::zeroed(), rng.gen(), - maturity, ) .add_input(input_coin_predicate) .add_input(Input::contract( @@ -389,7 +387,6 @@ fn get_transaction_fields() { asset_amt, asset, rng.gen(), - maturity, ) .add_output(Output::coin(rng.gen(), asset_amt, asset)) .finalize_checked(height, zero_gas_price); @@ -627,12 +624,6 @@ fn get_transaction_fields() { op::eq(0x10, 0x10, 0x11), op::and(0x20, 0x20, 0x10), - op::movi(0x11, *inputs[0].maturity().unwrap() as Immediate18), - op::movi(0x19, 0x00), - op::gtf_args(0x10, 0x19, GTFArgs::InputCoinMaturity), - op::eq(0x10, 0x10, 0x11), - op::and(0x20, 0x20, 0x10), - op::movi(0x11, predicate.len() as Immediate18), op::movi(0x19, 0x01), op::gtf_args(0x10, 0x19, GTFArgs::InputCoinPredicateLength), diff --git a/fuel-vm/src/tests/outputs.rs b/fuel-vm/src/tests/outputs.rs index ed8913a8d1..d55fc15deb 100644 --- a/fuel-vm/src/tests/outputs.rs +++ b/fuel-vm/src/tests/outputs.rs @@ -156,7 +156,6 @@ fn correct_change_is_provided_for_coin_outputs_create() { base_asset_id, rng.gen(), Default::default(), - 1, ); let consensus_params = ConsensusParameters::new( diff --git a/fuel-vm/src/tests/predicate.rs b/fuel-vm/src/tests/predicate.rs index 62cc81b5cd..9ed025b410 100644 --- a/fuel-vm/src/tests/predicate.rs +++ b/fuel-vm/src/tests/predicate.rs @@ -82,7 +82,6 @@ where amount, asset_id, tx_pointer, - maturity, predicate_gas_used, predicate, predicate_data, @@ -104,7 +103,6 @@ where rng.gen(), rng.gen(), rng.gen(), - maturity, ); }); @@ -220,7 +218,6 @@ async fn execute_gas_metered_predicates( coin_amount, AssetId::default(), rng.gen(), - Default::default(), ); } @@ -238,7 +235,6 @@ async fn execute_gas_metered_predicates( coin_amount, AssetId::default(), rng.gen(), - Default::default(), 0, predicate, vec![], @@ -370,7 +366,6 @@ async fn gas_used_by_predicates_not_causes_out_of_gas_during_script() { coin_amount, AssetId::default(), rng.gen(), - Default::default(), ); // parallel version @@ -410,7 +405,6 @@ async fn gas_used_by_predicates_not_causes_out_of_gas_during_script() { coin_amount, AssetId::default(), rng.gen(), - Default::default(), rng.gen(), predicate, vec![], @@ -498,7 +492,6 @@ async fn gas_used_by_predicates_more_than_limit() { coin_amount, AssetId::default(), rng.gen(), - Default::default(), ); // parallel version @@ -544,7 +537,6 @@ async fn gas_used_by_predicates_more_than_limit() { coin_amount, AssetId::default(), rng.gen(), - Default::default(), gas_limit + 1, predicate, vec![], diff --git a/fuel-vm/src/tests/profile_gas.rs b/fuel-vm/src/tests/profile_gas.rs index 3a948bde18..5cf4546336 100644 --- a/fuel-vm/src/tests/profile_gas.rs +++ b/fuel-vm/src/tests/profile_gas.rs @@ -42,7 +42,6 @@ fn profile_gas() { 2, Default::default(), rng.gen(), - Default::default(), ) .script_gas_limit(gas_limit) .maturity(maturity) diff --git a/fuel-vm/src/tests/validation.rs b/fuel-vm/src/tests/validation.rs index 3152f458af..ac41e151af 100644 --- a/fuel-vm/src/tests/validation.rs +++ b/fuel-vm/src/tests/validation.rs @@ -26,7 +26,6 @@ fn transaction_can_be_executed_after_maturity() { 1, Default::default(), rng.gen(), - Default::default(), ) .script_gas_limit(100) .maturity(MATURITY) diff --git a/fuel-vm/src/util.rs b/fuel-vm/src/util.rs index 9bb0898bff..78191ee8c9 100644 --- a/fuel-vm/src/util.rs +++ b/fuel-vm/src/util.rs @@ -267,7 +267,6 @@ pub mod test_helpers { self.rng.gen(), amount, asset_id, - self.rng.gen(), Default::default(), ); self