diff --git a/stackslib/src/chainstate/tests/consensus.rs b/stackslib/src/chainstate/tests/consensus.rs index 55cc74d53c..f528f52e1c 100644 --- a/stackslib/src/chainstate/tests/consensus.rs +++ b/stackslib/src/chainstate/tests/consensus.rs @@ -29,7 +29,7 @@ use clarity::util::hash::{MerkleTree, Sha512Trunc256Sum}; use clarity::util::secp256k1::MessageSignature; use clarity::vm::ast::stack_depth_checker::AST_CALL_STACK_DEPTH_BUFFER; use clarity::vm::costs::ExecutionCost; -use clarity::vm::types::PrincipalData; +use clarity::vm::types::{OptionalData, PrincipalData, ResponseData}; use clarity::vm::{ClarityVersion, Value as ClarityValue, MAX_CALL_STACK_DEPTH}; use serde::{Deserialize, Serialize, Serializer}; use stacks_common::bitvec::BitVec; @@ -1163,9 +1163,256 @@ contract_deploy_consensus_test!( chainstate_error_expression_stack_depth_too_deep, contract_name: "test-exceeds", contract_code: &{ - let exceeds_repeat_factor = AST_CALL_STACK_DEPTH_BUFFER + (MAX_CALL_STACK_DEPTH as u64); - let tx_exceeds_body_start = "{ a : ".repeat(exceeds_repeat_factor as usize); - let tx_exceeds_body_end = "} ".repeat(exceeds_repeat_factor as usize); + let exceeds_repeat_factor = AST_CALL_STACK_DEPTH_BUFFER + (MAX_CALL_STACK_DEPTH as u64); + let tx_exceeds_body_start = "{ a : ".repeat(exceeds_repeat_factor as usize); + let tx_exceeds_body_end = "} ".repeat(exceeds_repeat_factor as usize); format!("{tx_exceeds_body_start}u1 {tx_exceeds_body_end}") }, ); + +// Tests that MemoryBalanceExceeded error during contract analysis invalidates the block. +// The entire block will be rejected. +// +// This test creates a contract that fails during analysis phase. +// The contract defines large nested tuple constants that exhaust +// the 100MB memory limit during analysis. +contract_deploy_consensus_test!( + chainstate_error_memory_balance_exceeded_during_contract_analysis, + contract_name: "analysis-memory-test", + contract_code: &{ + let mut contract = String::new(); + // size: t0: 36 bytes + contract.push_str("(define-constant t0 (tuple (f0 0x00) (f1 0x00) (f2 0x00) (f3 0x00)))"); + // size: t1: 160 bytes + contract.push_str("(define-constant t1 (tuple (f0 t0) (f1 t0) (f2 t0) (f3 t0)))"); + // size: t2: 656 bytes + contract.push_str("(define-constant t2 (tuple (f0 t1) (f1 t1) (f2 t1) (f3 t1)))"); + // size: t3: 2640 bytes + contract.push_str("(define-constant t3 (tuple (f0 t2) (f1 t2) (f2 t2) (f3 t2)))"); + // size: t4: 10576 bytes + contract.push_str("(define-constant t4 (tuple (f0 t3) (f1 t3) (f2 t3) (f3 t3)))"); + // size: t5: 42320 bytes + contract.push_str("(define-constant t5 (tuple (f0 t4) (f1 t4) (f2 t4) (f3 t4)))"); + // size: t6: 126972 bytes + contract.push_str("(define-constant t6 (tuple (f0 t5) (f1 t5) (f2 t5)))"); + // 126972 bytes * 800 ~= 101577600. Triggers MemoryBalanceExceeded during analysis. + for i in 0..800 { + contract.push_str(&format!("(define-constant l{} t6)", i + 1)); + } + contract + }, +); + +// Tests that `MemoryBalanceExceeded` error occurs during contract initialization. +// The transaction will fail but will still be committed to the block. +// +// This test creates a contract that successfully passes analysis but fails during initialization +// The contract defines large buffer constants (buff-20 = 1MB) and then creates many references +// to it in a top-level `is-eq` expression, which exhausts the 100MB memory limit during initialization. +contract_deploy_consensus_test!( + chainstate_error_memory_balance_exceeded_during_contract_initialization, + contract_name: "test-exceeds", + contract_code: &{ + let define_data_var = "(define-constant buff-0 0x00)"; + + let mut contract = define_data_var.to_string(); + for i in 0..20 { + contract.push('\n'); + contract.push_str(&format!( + "(define-constant buff-{} (concat buff-{i} buff-{i}))", + i + 1, + )); + } + + contract.push('\n'); + contract.push_str("(is-eq "); + + for _i in 0..100 { + let exploder = "buff-20 "; + contract.push_str(exploder); + } + + contract.push(')'); + contract + }, +); + +// Tests that `MemoryBalanceExceeded` error occurs during a contract call. +// The transaction will fail but will still be committed to the block. + +// This test creates a contract that successfully passes analysis and initialization +// but fails during the call phase when the `create-many-references` function is called. +// It creates many references to a large buffer (buff-20 = 1MB) in an `is-eq` +// expression, which exhausts the 100MB memory limit during function execution. +contract_call_consensus_test!( + chainstate_error_memory_balance_exceeded_during_contract_call, + contract_name: "memory-test-contract", + contract_code: &{ + // Procedurally generate a contract with large buffer constants and a function + // that creates many references to them, similar to argument_memory_test + let mut contract = String::new(); + + // Create buff-0 through buff-20 via repeated doubling: buff-20 = 1MB + contract.push_str("(define-constant buff-0 0x00)\n"); + for i in 0..20 { + contract.push_str(&format!( + "(define-constant buff-{} (concat buff-{i} buff-{i}))\n", + i + 1 + )); + } + + // Create a public function that makes many references to buff-20 + contract.push_str("\n(define-public (create-many-references)\n"); + contract.push_str(" (ok (is-eq "); + + // Create 100 references to buff-20 (1MB each = ~100MB total) + for _ in 0..100 { + contract.push_str("buff-20 "); + } + + contract.push_str(")))\n"); + contract + }, + function_name: "create-many-references", + function_args: &[], +); + +/// Tests that when `MemoryBalanceExceeded` error occurs in a block, the transactions fail, but are +/// still committed to the block, and the "valid" transactions are still executed without errors. +/// +/// 1. Deploy the memory-test-contract once in epoch 3.2 +/// 2. Create a second block with 21 transactions: +/// - 20 transactions that call the contract (should fail with MemoryBalanceExceeded) +/// - 1 transaction that is expected to succeed +#[test] +fn test_memory_balance_exceeded_multiple_calls() { + // Generate the same contract code as chainstate_error_memory_balance_exceeded_during_contract_call + let contract_code = { + // Procedurally generate a contract with large buffer constants and a function + // that creates many references to them, similar to argument_memory_test + let mut contract = String::new(); + + // Create buff-0 through buff-20 via repeated doubling: buff-20 = 1MB + contract.push_str("(define-constant buff-0 0x00)\n"); + for i in 0..20 { + contract.push_str(&format!( + "(define-constant buff-{} (concat buff-{i} buff-{i}))\n", + i + 1 + )); + } + + // Create a public function that makes many references to buff-20 + contract.push_str("\n(define-public (create-many-references)\n"); + contract.push_str(" (ok (is-eq "); + + // Create 100 references to buff-20 (1MB each = ~100MB total) + for _ in 0..100 { + contract.push_str("buff-20 "); + } + + contract.push_str(")))\n"); + contract.push_str("(define-public (foo) (ok 1))"); + contract + }; + + let mut nonce = 0; + + // Add balance for the contract deployer (using FAUCET) + let deploy_fee = (contract_code.len() * 100) as u64; + + // Block 1: Deploy the contract in epoch 3.2 + let deploy_tx = make_contract_publish_versioned( + &FAUCET_PRIV_KEY, + nonce, + deploy_fee, + CHAIN_ID_TESTNET, + "memory-test-contract", + &contract_code, + Some(ClarityVersion::Clarity4), + ); + + let block1 = TestBlock { + transactions: vec![ + StacksTransaction::consensus_deserialize(&mut deploy_tx.as_slice()).unwrap(), + ], + }; + + // Block 2: 50 transactions calling the contract + let contract_addr = + StacksAddress::p2pkh(false, &StacksPublicKey::from_private(&FAUCET_PRIV_KEY)); + let mut call_transactions = Vec::new(); + + for _ in 0..20 { + nonce += 1; + let call_tx = make_contract_call( + &FAUCET_PRIV_KEY, + nonce, + 200, + CHAIN_ID_TESTNET, + &contract_addr, + "memory-test-contract", + "create-many-references", + &[], + ); + call_transactions + .push(StacksTransaction::consensus_deserialize(&mut call_tx.as_slice()).unwrap()); + } + nonce += 1; + let foo_tx = make_contract_call( + &FAUCET_PRIV_KEY, + nonce, + 200, + CHAIN_ID_TESTNET, + &contract_addr, + "memory-test-contract", + "foo", + &[], + ); + call_transactions + .push(StacksTransaction::consensus_deserialize(&mut foo_tx.as_slice()).unwrap()); + + let block2 = TestBlock { + transactions: call_transactions, + }; + + // Create epoch blocks map - both blocks in Epoch 3.3 + let mut epoch_blocks = HashMap::new(); + epoch_blocks.insert(StacksEpochId::Epoch33, vec![block1, block2]); + + // Run the test + let result = ConsensusTest::new(function_name!(), vec![]).run(epoch_blocks); + if let ExpectedResult::Success(expected_block_output) = &result[0] { + assert_eq!(expected_block_output.transactions.len(), 1); + assert_eq!( + expected_block_output.transactions[0].return_type, + ClarityValue::Response(ResponseData { + committed: true, + data: Box::new(ClarityValue::Bool(true)), + }) + ); + } else { + panic!("First block should be successful"); + } + if let ExpectedResult::Success(expected_block_output) = &result[1] { + assert_eq!(expected_block_output.transactions.len(), 21); + let expected_vm_error = Some("MemoryBalanceExceeded(100665664, 100000000)".to_string()); + let expected_failure_return_type = ClarityValue::Response(ResponseData { + committed: false, + data: Box::new(ClarityValue::Optional(OptionalData { data: None })), + }); + + for transaction in &expected_block_output.transactions[..20] { + assert_eq!(transaction.return_type, expected_failure_return_type); + assert_eq!(transaction.vm_error, expected_vm_error); + } + assert_eq!( + expected_block_output.transactions[20].return_type, + ClarityValue::Response(ResponseData { + committed: true, + data: Box::new(ClarityValue::Int(1)), + }) + ); + } else { + panic!("Second block should be successful"); + } +} diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_analysis.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_analysis.snap new file mode 100644 index 0000000000..145ba61c43 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_analysis.snap @@ -0,0 +1,13 @@ +--- +source: stackslib/src/chainstate/tests/consensus.rs +expression: result +--- +[ + Failure("Invalid Stacks block 5df30d42bad6b4b7388b82139b99ed39b3cd8418b51682195eb3a525df421f79: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), + Failure("Invalid Stacks block be8cfcb7d8ccdfd04f092556c8fb4542b49e1a68c4a0ff7d495b5e7208a2be78: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), + Failure("Invalid Stacks block 4b97bc26a6681b251bb2caecf2c89a0e90f87c589875c87046b395230621353f: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), + Failure("Invalid Stacks block be2ff63675753dd6db20528d54de997b7e47842b3614965b2d44607df130b96f: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), + Failure("Invalid Stacks block 368cee17382fa25fcdd4bab5c969e7568b60c8959da4648860121fc73a2ab450: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), + Failure("Invalid Stacks block fadfe1c5a66fcf65b08201fa6673869b5590dba7d53ff854ae25e13f11f36315: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), + Failure("Invalid Stacks block a20452a05233fb819119128353e32cd87255ce15b507166aa1645fea9c87e77c: CostOverflowError(ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 0 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 }, ExecutionCost { write_length: 18446744073709551615, write_count: 18446744073709551615, read_length: 18446744073709551615, read_count: 18446744073709551615, runtime: 18446744073709551615 })"), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_call.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_call.snap new file mode 100644 index 0000000000..94f6646504 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_call.snap @@ -0,0 +1,1030 @@ +--- +source: stackslib/src/chainstate/tests/consensus.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "9fa0399657f5a65281fa1cf7e0a1e3021c47f64e18128fb32718b3839b1499ec", + evaluated_epoch: Epoch30, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_0-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "c23805c28507504b60959e9e92be12a12f2972986ec1bfab487be65e5d4363ac", + evaluated_epoch: Epoch30, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_0-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "268ddcd7b9eee79e03e11478c3eed55fe39e8f253194d1641f7494d2766251ed", + evaluated_epoch: Epoch30, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_0-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "b5e28cfb42fb3fa74b16f5cde9d0f6a208c97f518a28fc92431adcceb613b2d2", + evaluated_epoch: Epoch31, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_1-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "43537a9d4035be93f9949ccb898c69a3524fca7fae7b8bd341d9d55cc33cce1b", + evaluated_epoch: Epoch31, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_1-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "60e185084545d900e81d1964bda82200c638714a7d4f9c1a5bbfbe25fef5a2ff", + evaluated_epoch: Epoch31, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_1-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "95e7c2cc550c5da3525d15750f59a9246f70c932a7df8b919ab244121b285baf", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_2-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "af5f66a02b9ac95ec01d7bc0d723964551b3b545db3fee412ab2f0212991c101", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_2-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "2a5deeeae5f67d989c8176dfa6eec63af524487601169d1947570f20b32018e5", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_2-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "1be54712c90205008d853c5783f4ebbe15f01144717e8aea89462d0c72935215", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_0-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "378c2829d75a6629137c4626974170eea94e161eff3de2d8faa3db802a2d68ad", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_0-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "361d9116da858152eacd81fb5e755d7b41f9eb7e8c66574218454a057803e1ea", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_0-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "0c970e3baf820f6826d6b5ac7395538bde8547ff2402938336b6ce515ff0dd64", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_1-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "5a25c4122a72481cbabd38cae36bf7e2a07ebccc402d25e6638a479a4d5c4d30", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_1-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "b35029d52da0b9b52a7533d335ac9352a1ab58eda3c72535640f0c78eafbbb83", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_1-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "39b1bf1632d326fc3e0603052da6daf2949a3fba51b57dc086afeb978bf491f2", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_2-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "ae237705e43d2a2b9aa8dd04624aa37dc2b3dce6e184ad7b97fa9c85a642a0b8", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_2-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "079ae22657154d056a338ba1516c41fa44feb413e2cd376b26d6a548a91a59fb", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_2-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "592a39cf94036ee34d3766d9caa9e950ddd359ee6cfb769ead17d78e393d7bc6", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "aa573c1c7f5e206907bca8dbf455560087fe5cdf6b6eddc7978b7fb744b264ca", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "7fc130b0e06ec2565aa9c33ce12a0e518fa53feff71a08c26f315e9f469cf57b", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "2b04032cda83d05c5aab6c272c7b03c10ee3856442decc5ac5650ced9a36962e", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: memory-test-contract-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "None [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: true, + data: Bool(true), + )), + cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2135, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 81972006, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "c9832b40b1fc17209c32cb8a5ddebf67c45a9bd78a0e634556e756978c4bed97", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_0-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "2538602dae68b29f5ef526a9c41b16eea381971b9beba0b43d7963d33fc60f91", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_0-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "9276a0b09b3b149deeb65097d5d5988ee8a3972cc892a7ce6466ba543e4bb7f0", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_0-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "5cb0dc0bae3c746544416d80dbe5ccbeabfb8868cc859d6a392777676c52bb41", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_1-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "7aecbaebbffa5555dd0b31a044b1d215afbebf6142e1ca020585f3986378dbee", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_1-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "bd504ae7e9fb72e7e2dfded58cbb405b619636789ad90096b8e810d26836cdeb", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_1-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "6d0580ba4030f1bedbc73a49d3c1a8523ca45ecc59aa901f8edccaf481a50717", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_2-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "55f2e62bf52d1aa85b6eb7959202785d265e24f71967b8721534c049814610b7", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_2-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "be3754e479f02e4ab634e13f97bea773e61a0df579d8d72e4ef5b32387a36dcf", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_2-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "ffdcc7cfa73c7cd9836a3796e56ca474116ce23abf97a64153517f0531d6512e", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_3-Clarity1, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "16d8c3d0f04b49d8dada5c2b6fc3430e5413d8d3377931a73e4517a2398cb8df", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_3-Clarity2, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "2a06055e70dc11468b9341ce7a15d8167f4b3e1bc6114da6d62bbcb8c83c134f", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_3-Clarity3, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "33785567f2572a311ac44a8e7939485fd1763c924401ff3b32bd9396e09a90a2", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "ContractCall(address: ST1AW6EKPGT61SQ9FNVDS17RKNWT8ZP582VF9HSCP, contract_name: memory-test-contract-Epoch3_3-Clarity4, function_name: create-many-references, function_args: [[]])", + vm_error: "Some(MemoryBalanceExceeded(100665636, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 2099117, + read_count: 3, + runtime: 199232461, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_initialization.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_initialization.snap new file mode 100644 index 0000000000..7ad4e84f83 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__consensus__chainstate_error_memory_balance_exceeded_during_contract_initialization.snap @@ -0,0 +1,216 @@ +--- +source: stackslib/src/chainstate/tests/consensus.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "9e6488ca24675d73c36e453b667fbd2339abc6b33ba3aa1cdd922b89fd0e5c78", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_2-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "9f279609060168e2618bfda974276e995bc3c9ed29414458ca29b6ff83f3dad4", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_2-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "41c7a246b208cba21592644be935281160a9227af527bf1398ec6a3bc440c39f", + evaluated_epoch: Epoch32, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_2-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "bbdc24ae1674d6e93c2408588a4195f4b2d146206c413c8ab17be283dc5f45e7", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "e255bfeb7d3d773e90499323a7f4160a4d4b117deea84b5bd6d40d072d5068dd", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "5a6fcfaa08bc021dc9f68a92627a691fc9be83cca79a01a20c6c6ea3bbe6b448", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "f7066329309ae8bdedd5e164fdaabb00ad927990c7e94456b22602672ce42892", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: test-exceeds-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(MemoryBalanceExceeded(100665826, 100000000)) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 2077, + write_count: 2, + read_length: 1, + read_count: 1, + runtime: 279102966, + ), + )), +]