From 96677e458cc29b2fd0da2d21ca2b29fa05d6f264 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Fri, 14 Nov 2025 14:57:18 +0000 Subject: [PATCH 1/2] add second set of consensus tests for CheckErrorKind --- ...c_check_error_bad_map_type_definition.snap | 126 +++++++++++ ...heck_error_constructed_list_too_large.snap | 126 +++++++++++ ...ould_not_determine_serialization_type.snap | 126 +++++++++++ ..._check_error_could_not_determine_type.snap | 126 +++++++++++ ...k_error_define_variable_bad_signature.snap | 126 +++++++++++ ..._static_check_error_expected_sequence.snap | 126 +++++++++++ ..._check_error_invalid_type_description.snap | 126 +++++++++++ ..._static_check_error_name_already_used.snap | 126 +++++++++++ ...c_check_error_return_types_must_match.snap | 126 +++++++++++ ...tatic_check_error_supertype_too_large.snap | 10 + ..._tests__static_check_error_type_error.snap | 126 +++++++++++ ...c_check_error_type_signature_too_deep.snap | 126 +++++++++++ ...static_check_error_undefined_variable.snap | 126 +++++++++++ ...__static_check_error_union_type_error.snap | 126 +++++++++++ ..._static_check_error_unknown_type_name.snap | 126 +++++++++++ .../chainstate/tests/static_analysis_tests.rs | 211 +++++++++++++++++- 16 files changed, 1984 insertions(+), 1 deletion(-) create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap create mode 100644 stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap new file mode 100644 index 0000000000..a99f901730 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "f2a5b27e6a489417fe7581d0575320cb9ecddcd31b353b0a0561f4aa62913618", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: bad-map-type-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: invalid map definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "e18b5c0e4fee03924a5e4a6b57c7d3d474f8fe156f441057d0d3d4c408aa7575", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: bad-map-type-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: invalid map definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "acff901a79c66a64c1667e3e3b653f23b720d73e47383f9904f63962d46faa5a", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: bad-map-type-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: invalid map definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "ccd15f7b0f17b7b375d8ab4d46a92f4707406bd181caa4d044894aed1a3e3ebc", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: bad-map-type-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: invalid map definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1372, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap new file mode 100644 index 0000000000..26f795efe6 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "44a54dcf1599905059d64d75504ba2412ce92145b16178bef7437cf84a99f753", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: constructed-list-large-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: reached limit of elements in a sequence) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7437, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7437, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "1bc402bd4a15686f779661c47310b0fffd50861747daaa58f0adf0e7e20268d0", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: constructed-list-large-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: reached limit of elements in a sequence) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7436, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7436, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "ebac210926445c38c4df7a8fc7a1c498f79389918f2121e1b46f4dffca37a4cf", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: constructed-list-large-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: reached limit of elements in a sequence) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7436, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7436, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "4383ce1a7360c4500ddf7f7fc4a663e48776ccb3692abe0265c4991495e5f138", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: constructed-list-large-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: reached limit of elements in a sequence) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7436, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 29, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7436, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap new file mode 100644 index 0000000000..df22eadd45 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "05e7bbac6f790865e3ff6cbc0b75f692dec217290feae9497e4af24f7578e1fd", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: serialization-type-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: use of unresolved function \'to-consensus-buff?\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 7374, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 7374, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "10d4c505f8a773261a728598c73d002c966f7ba4bd8d6c1c5dc1211929846af1", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: serialization-type-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: could not determine the input type for the serialization function) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 41, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7759, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 41, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7759, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "5e5542994c401a76718d51c635c3c43eae63b317937886e0ea5a47ab986e0091", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: serialization-type-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: could not determine the input type for the serialization function) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 41, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7759, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 41, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7759, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "4f697d7e8c3baf15530441a569729b791c524c82ff4f52c09ae47147ebf8bec3", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: serialization-type-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: could not determine the input type for the serialization function) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 41, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7759, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 41, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 7759, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap new file mode 100644 index 0000000000..9a485f27b2 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "a78f8b097673c6e4caf19547688c1fb1a8d8ea4bf67c6d4d5e596747de8ff3fb", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: could-not-determine-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: type of expression cannot be determined) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1136, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1136, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "bb84844535aa3e3d57379939c3424394e2f0c01c1f1df320fddd72da8c40847e", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: could-not-determine-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: type of expression cannot be determined) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1124, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1124, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "aefebf3f3158906d5338dce46fc57251e21b705e698f9d9c4cb968b7d3deed4a", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: could-not-determine-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: type of expression cannot be determined) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1124, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1124, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "1f111241cd2ea6996e4d52b41c578684ea9d85c4cdf043a4cd05de70663ef177", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: could-not-determine-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: type of expression cannot be determined) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1124, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1124, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap new file mode 100644 index 0000000000..b85da32f42 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "6276b834655c2902ac0d201171078953802745a75d16a5dba2ed9905c19e2607", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: define-variable-bad-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: expecting 3 arguments, got 2) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "8ad493165cabfe2f219e760c0b60be8dcf788258867f8874a416f2cdae97ee5e", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: define-variable-bad-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: expecting 3 arguments, got 2) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "38bca8afcc7ce4463462d0f3e4080f843823c273ae33e5c91dd02e96c798cb6e", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: define-variable-bad-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: expecting 3 arguments, got 2) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "dab8eb21c35114d69adb73dc2e506fb57849b0b3717cb479d84342986bcd1c0b", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: define-variable-bad-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: expecting 3 arguments, got 2) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 936, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap new file mode 100644 index 0000000000..b2ccd17405 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "959b74fa7723534df5d5822bfc6a4b65f94aecff60da6ee5fd2fe9e565266fd1", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: expected-sequence-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: expecting expression of type \'list\', \'buff\', \'string-ascii\' or \'string-utf8\' - found \'int\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "d861454c8eb5589c523649b0fdfa33910f7a269c823694d0f7d480b964ce6eb8", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: expected-sequence-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: expecting expression of type \'list\', \'buff\', \'string-ascii\' or \'string-utf8\' - found \'int\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "f65904d48e816a4e25d3bc74ce4c469a022e1afe3f2c583b9712c16cd0816c6d", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: expected-sequence-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: expecting expression of type \'list\', \'buff\', \'string-ascii\' or \'string-utf8\' - found \'int\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "8389d0b2383acd3b375f3b2a6113f2af1d51ed9be0c36d7e5f441be60f04af48", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: expected-sequence-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: expecting expression of type \'list\', \'buff\', \'string-ascii\' or \'string-utf8\' - found \'int\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 5, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 713, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap new file mode 100644 index 0000000000..4657bb49d7 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "a896487ef5f6e69107c5ce347e3909e53679508f53ff12dec695ae166b11898c", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: invalid-type-desc-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: invalid variable definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "7879896844dca5905d064e4df19420f01161221f0c8be629f7a02a3302c67b2c", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: invalid-type-desc-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: invalid variable definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "e84039865cead4275fa18d6e2bcb0bca12538224828a7532ffbe037adb7bd547", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: invalid-type-desc-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: invalid variable definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "c43bbdd3bb61ce11c7128227d633f51c8d9f61f3e4ebbc284f8827f925745c07", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: invalid-type-desc-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: invalid variable definition) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1175, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap new file mode 100644 index 0000000000..80972c4d06 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "56c84c4dd86c9d8cc34a5af9d3f8db1096cbd2dd259a286f9b70b010b5f814e6", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: name-already-used-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: defining \'foo\' conflicts with previous value) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "20639c9aaa8179c523694d55e57abcb40a89465f819651b208a208f7691e8491", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: name-already-used-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: defining \'foo\' conflicts with previous value) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "1b65182fc4e2619839c427d8664e18fc184023202f0b55d49fb7dee5dcd6e7ab", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: name-already-used-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: defining \'foo\' conflicts with previous value) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "df6a4872a930c393febf878053fb7a2cae04b6280d783f2ab323a5dcc86cc96d", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: name-already-used-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: defining \'foo\' conflicts with previous value) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 9, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2187, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap new file mode 100644 index 0000000000..5f65c23e19 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "df29649662db7d5ed9b436cb977311889736c136ae36a08a00e84b03bff96d17", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: return-types-must-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: detected two execution paths, returning two different expression types (got \'(response UnknownType int)\' and \'(response UnknownType bool)\')) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "030bf686cd34631787d5e1ab897013b988f4ceeea7c1146d57482dbb90771e63", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: return-types-must-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: detected two execution paths, returning two different expression types (got \'(response UnknownType int)\' and \'(response UnknownType bool)\')) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "e8d05b287d9e7d2a08f7f4f70d448ae2d9af0afa2c64bfd05ec1fddf8ad64998", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: return-types-must-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: detected two execution paths, returning two different expression types (got \'(response UnknownType int)\' and \'(response UnknownType bool)\')) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "5876bb544c6cf3f68e59a3998c42ff517233e592db7d0701b5a5afe52dc3224d", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: return-types-must-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: detected two execution paths, returning two different expression types (got \'(response UnknownType int)\' and \'(response UnknownType bool)\')) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 42, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 9463, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap new file mode 100644 index 0000000000..b7ddcbb7b6 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap @@ -0,0 +1,10 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Failure("Invalid Stacks block 2de86356e65a970f5176ccb225cac8e8a4b511858a3a4a8d7db5c292b29f8825: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), + Failure("Invalid Stacks block 2326a3f1b052b024b17adf992dfbf618efe6b368ffc0d29db33f7966c7e9bd7f: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), + Failure("Invalid Stacks block 3e16b8aeea1eda4102d0a9a42f6d97d89026549a06163881cbb5abb1f17d5875: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), + Failure("Invalid Stacks block 9f34a7e963353e11238e352069aad620ec5c6525e0b1a59476377c65b8892e21: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap new file mode 100644 index 0000000000..ec39e92efe --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "dc84829630e85566a65f8075137c0e5f3f3f68dddb49409b20a2890b84c0556d", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: type-error-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: expecting expression of type \'int\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1288, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1288, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "a8a39a4c0094574d0ba7660340d0cded5c887b130fe8deeace81b371d48d2339", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: type-error-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: expecting expression of type \'int\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1277, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1277, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "79ece9fa771db166f70d2dd7687680fd9f29a9ce316ce29eb33d78851c7c6bd0", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: type-error-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: expecting expression of type \'int\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1277, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1277, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "813e29d03c5ccd651cadaa98213c154a366d233dfba57306399fd4a16ea832a5", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: type-error-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: expecting expression of type \'int\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1277, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1277, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap new file mode 100644 index 0000000000..1a0bb15fe2 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "f36e53c0b45292d4ec7cdb72183b48bb7065e5a7d6d24b5b84fca9dc0c212526", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: signature-too-deep-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: created a type which was deeper than maximum allowed type depth) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "dd7beef74128ff75f4fb54d0340dfb119b082fd38198e8098b8f443cd9a21fdc", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: signature-too-deep-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: created a type which was deeper than maximum allowed type depth) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "23c8d1205adacec3262941fb496c262b23ff74146ee41ed64543c6773dd87e76", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: signature-too-deep-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: created a type which was deeper than maximum allowed type depth) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "214d3549099da1f33020ac3b0b1a087611a6918d932d37ae03352b629d2ef4a1", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: signature-too-deep-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: created a type which was deeper than maximum allowed type depth) [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 77, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 12036, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap new file mode 100644 index 0000000000..d7f3929cf3 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "cf31cb38c44ff0d5b42ce40fe2bc025d143d7942204579533bb06d4ffb0bedca", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: undefined-variable-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: use of unresolved variable \'x\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "fe38f82b48438fa791690b89bc895b26879c175e4a1192f75159b4e6cfe84f99", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: undefined-variable-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: use of unresolved variable \'x\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "04a1714922a188e952cf0e5470aadc03b0d7e2370b33f0392d95422cd9b69221", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: undefined-variable-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: use of unresolved variable \'x\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "9548e6911212b439b5181ff3e13e993c4bc6db56318dd3459be19b4669dbead8", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: undefined-variable-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: use of unresolved variable \'x\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 6, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 517, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap new file mode 100644 index 0000000000..d58cacd823 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "f8aefcb7876caa94f341af4445df49d7bbf99a8f423dde85129eb52e5576f4a2", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: union-type-error-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: expecting expression of type \'int\' or \'uint\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "82423173f4b747c03e9f42c78cef1c66b178e5f9b7a2921d0b0e4b58810f79a4", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: union-type-error-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: expecting expression of type \'int\' or \'uint\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "f4255a5e48f848f3fb13d52b22ad781591bf92083d6f9257b208b1fb88f47c6f", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: union-type-error-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: expecting expression of type \'int\' or \'uint\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "3a7d845f425ac6dbf0eac3aae60bca7d9db0e3c885f15d018ed61615ef2122dd", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: union-type-error-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: expecting expression of type \'int\' or \'uint\', found \'bool\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 10, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 1532, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap new file mode 100644 index 0000000000..e460eca8e8 --- /dev/null +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap @@ -0,0 +1,126 @@ +--- +source: stackslib/src/chainstate/tests/static_analysis_tests.rs +expression: result +--- +[ + Success(ExpectedBlockOutput( + marf_hash: "89a2466377702f837fc64c085df66eba661492eab616e4f4e20015d969b376a5", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: unknown-type-name-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))", + vm_error: "Some(:0:0: use of unresolved function \'from-consensus-buff?\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 2394, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 0, + write_count: 0, + read_length: 0, + read_count: 0, + runtime: 2394, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "cfe6379f0bc6dd24e046e367165e811d839d48df95f47412b85e0dbf9c7cbd48", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: unknown-type-name-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))", + vm_error: "Some(:0:0: failed to parse type: \'foo\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 11, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2519, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 11, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2519, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "9a0be218512902609385530f0ac81ec8c81e8534aeb495490606095a23c0d94f", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: unknown-type-name-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))", + vm_error: "Some(:0:0: failed to parse type: \'foo\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 11, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2519, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 11, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2519, + ), + )), + Success(ExpectedBlockOutput( + marf_hash: "4a44779e3fcb663d5fa77a85a6570436384d7b1917de9280f9d6afce66cf1e58", + evaluated_epoch: Epoch33, + transactions: [ + ExpectedTransactionOutput( + tx: "SmartContract(name: unknown-type-name-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))", + vm_error: "Some(:0:0: failed to parse type: \'foo\') [NON-CONSENSUS BREAKING]", + return_type: Response(ResponseData( + committed: false, + data: Optional(OptionalData( + data: None, + )), + )), + cost: ExecutionCost( + write_length: 11, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2519, + ), + ), + ], + total_block_cost: ExecutionCost( + write_length: 11, + write_count: 1, + read_length: 1, + read_count: 1, + runtime: 2519, + ), + )), +] diff --git a/stackslib/src/chainstate/tests/static_analysis_tests.rs b/stackslib/src/chainstate/tests/static_analysis_tests.rs index c08b09d37e..f12c556d30 100644 --- a/stackslib/src/chainstate/tests/static_analysis_tests.rs +++ b/stackslib/src/chainstate/tests/static_analysis_tests.rs @@ -17,6 +17,7 @@ #[allow(unused_imports)] use clarity::vm::analysis::CheckErrorKind; +use clarity::vm::types::MAX_TYPE_DEPTH; use crate::chainstate::tests::consensus::contract_deploy_consensus_test; use crate::core::BLOCK_LIMIT_MAINNET_21; @@ -140,7 +141,7 @@ fn static_check_error_match_arms_must_match() { } /// CheckErrorKind: [`CheckErrorKind::BadMatchOptionSyntax`] -/// Caused by: option `match` expecting 4 arguments, got 3 +/// Caused by: option `match` expecting 4 arguments, got 3. /// Outcome: block accepted. #[test] fn static_check_error_bad_match_option_syntax() { @@ -204,3 +205,211 @@ fn static_check_error_expected_optional_type() { contract_code: "(default-to 3 5)", ); } + +/// CheckErrorKind: [`CheckErrorKind::NameAlreadyUsed`] +/// Caused by: redefining constant `foo` a second time. +/// Outcome: block accepted. +#[test] +fn static_check_error_name_already_used() { + contract_deploy_consensus_test!( + contract_name: "name-already-used", + contract_code: " + (define-constant foo 10) + (define-constant foo 20)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::ReturnTypesMustMatch`] +/// Caused by: `unwrap!` default returns `err 1` while the function returns `err false`, so response types diverge. +/// Outcome: block accepted. +#[test] +fn static_check_error_return_types_must_match() { + contract_deploy_consensus_test!( + contract_name: "return-types-must", + contract_code: " + (define-map tokens { id: int } { balance: int }) + (define-private (my-get-token-balance) + (let ((balance (unwrap! + (get balance (map-get? tokens (tuple (id 0)))) + (err 1)))) + (err false)))", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::TypeError`] +/// Caused by: initializing `define-data-var cursor int` with the boolean `true`. +/// Outcome: block accepted. +#[test] +fn static_check_error_type_error() { + contract_deploy_consensus_test!( + contract_name: "type-error", + contract_code: "(define-data-var cursor int true)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::DefineVariableBadSignature`] +/// Caused by: `define-data-var` is provided only a name and value, missing the required type. +/// Outcome: block accepted. +#[test] +fn static_check_error_define_variable_bad_signature() { + contract_deploy_consensus_test!( + contract_name: "define-variable-bad", + contract_code: "(define-data-var cursor 0x00)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::InvalidTypeDescription`] +/// Caused by: `define-data-var` uses `0x00` where a valid type description is required. +/// Outcome: block accepted. +#[test] +fn static_check_error_invalid_type_description() { + contract_deploy_consensus_test!( + contract_name: "invalid-type-desc", + contract_code: "(define-data-var cursor 0x00 true)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::TypeSignatureTooDeep`] +/// Caused by: parameter type nests `optional` wrappers deeper than [`MAX_TYPE_DEPTH`]. +/// Outcome: block accepted. +#[test] +fn static_check_error_type_signature_too_deep() { + contract_deploy_consensus_test!( + contract_name: "signature-too-deep", + contract_code: &{ + let depth: usize = MAX_TYPE_DEPTH as usize + 1; + let mut s = String::from("(define-public (f (x "); + for _ in 0..depth { + s.push_str("(optional "); + } + s.push_str("uint"); + for _ in 0..depth { + s.push_str(") "); + } + s.push_str(")) (ok x))"); + s + }, + ); +} + +/// CheckErrorKind: [`CheckErrorKind::SupertypeTooLarge`] +/// Caused by: combining tuples with `buff 600000` and `buff 10` forces a supertype beyond the size limit. +/// Outcome: block rejected. +#[test] +fn static_check_error_supertype_too_large() { + contract_deploy_consensus_test!( + contract_name: "supertype-too-large", + contract_code: " + (define-data-var big (buff 600000) 0x00) + (define-data-var small (buff 10) 0x00) + (define-public (trigger) + (let ((initial (list (tuple (a (var-get big)) (b (var-get small)))))) + (ok (append initial (tuple (a (var-get small)) (b (var-get big)))))))", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::ConstructedListTooLarge`] +/// Caused by: mapping `sha512` over a list capped at 65,535 elements constructs a list past [`MAX_VALUE_SIZE`]. +/// Outcome: block accepted. +#[test] +fn static_check_error_constructed_list_too_large() { + contract_deploy_consensus_test!( + contract_name: "constructed-list-large", + contract_code: " + (define-data-var ints (list 65535 int) (list 0)) + (define-public (trigger) + (let ((mapped (map sha512 (var-get ints)))) + (ok mapped) + ) + )", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::UnknownTypeName`] +/// Caused by: `from-consensus-buff?` references an undefined type named `foo`. +/// Outcome: block accepted. +/// Note: during analysis, this error can only be triggered by `from-consensus-buff?` +/// which is only available in Clarity 2 and later. So Clarity 1 will not trigger +/// this error. +#[test] +fn static_check_error_unknown_type_name() { + contract_deploy_consensus_test!( + contract_name: "unknown-type-name", + contract_code: " + (define-public (trigger) + (ok (from-consensus-buff? foo 0x00)))", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::UnionTypeError`] +/// Caused by: `map` applies subtraction to booleans. +/// Outcome: block accepted. +#[test] +fn static_check_error_union_type_error() { + contract_deploy_consensus_test!( + contract_name: "union-type-error", + contract_code: "(map - (list true false true false))", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::UndefinedVariable`] +/// Caused by: `x`, `y`, and `z` are referenced without being defined. +/// Outcome: block accepted. +#[test] +fn static_check_error_undefined_variable() { + contract_deploy_consensus_test!( + contract_name: "undefined-variable", + contract_code: "(+ x y z)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::BadMapTypeDefinition`] +/// Caused by: Invalid map type definition in a `(define-map ...)` expression. +/// Outcome: block accepted. +#[test] +fn static_check_error_bad_map_type_definition() { + contract_deploy_consensus_test!( + contract_name: "bad-map-type", + contract_code: "(define-map lists { name: int } contents)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::CouldNotDetermineType`] +/// Caused by: `(index-of (list) none)` supplies no concrete element types. +/// Outcome: block accepted. +#[test] +fn static_check_error_could_not_determine_type() { + contract_deploy_consensus_test!( + contract_name: "could-not-determine", + contract_code: "(index-of (list) none)", + ); +} + +/// CheckErrorKind: [`CheckErrorKind::ExpectedSequence`] +/// Caused by: passing integer `3` as the sequence argument to `index-of` instead of a list or string. +/// Outcome: block accepted. +#[test] +fn static_check_error_expected_sequence() { + contract_deploy_consensus_test!( + contract_name: "expected-sequence", + contract_code: r#"(index-of 3 "a")"#, + ); +} + +/// CheckErrorKind: [`CheckErrorKind::CouldNotDetermineSerializationType`] +/// Caused by: `to-consensus-buff?` over a list of trait references lacks a serialization type. +/// Outcome: block accepted. +/// Note: during analysis, this error can only be triggered by `from-consensus-buff?` +/// which is only available in Clarity 2 and later. So Clarity 1 will not trigger +/// this error. +#[test] +fn static_check_error_could_not_determine_serialization_type() { + contract_deploy_consensus_test!( + contract_name: "serialization-type", + contract_code: " + (define-trait trait-a ((ping () (response bool bool)))) + (define-trait trait-b ((pong () (response bool bool)))) + (define-public (trigger (first ) (second )) + (ok (to-consensus-buff? (list first second))))", + ); +} From 0e34ec275e8498393cdf8ecf26557e3b779b68b7 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 18 Nov 2025 12:39:50 +0000 Subject: [PATCH 2/2] update snapshots --- ...c_check_error_bad_map_type_definition.snap | 8 ++++---- ...heck_error_constructed_list_too_large.snap | 8 ++++---- ...ould_not_determine_serialization_type.snap | 8 ++++---- ..._check_error_could_not_determine_type.snap | 8 ++++---- ...k_error_define_variable_bad_signature.snap | 8 ++++---- ..._static_check_error_expected_sequence.snap | 8 ++++---- ..._check_error_invalid_type_description.snap | 8 ++++---- ..._static_check_error_name_already_used.snap | 8 ++++---- ...c_check_error_return_types_must_match.snap | 8 ++++---- ...tatic_check_error_supertype_too_large.snap | 20 +++++++++++++++---- ..._tests__static_check_error_type_error.snap | 8 ++++---- ...c_check_error_type_signature_too_deep.snap | 8 ++++---- ...static_check_error_undefined_variable.snap | 8 ++++---- ...__static_check_error_union_type_error.snap | 8 ++++---- ..._static_check_error_unknown_type_name.snap | 8 ++++---- 15 files changed, 72 insertions(+), 60 deletions(-) diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap index a99f901730..24563ee479 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_bad_map_type_definition.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "f2a5b27e6a489417fe7581d0575320cb9ecddcd31b353b0a0561f4aa62913618", + marf_hash: "4cca742df63dfae2a6082353ebd9528d316f13ae99fb29442bb8e53cc7342565", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "e18b5c0e4fee03924a5e4a6b57c7d3d474f8fe156f441057d0d3d4c408aa7575", + marf_hash: "20140d78c081fb88aa6389b2a11c24b3f98e14832df47562e52210c5145d91cb", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "acff901a79c66a64c1667e3e3b653f23b720d73e47383f9904f63962d46faa5a", + marf_hash: "00c123e8a822408dad4879b7e9d4158887a1d2750862ed15d3b34cc4cd7cc70b", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "ccd15f7b0f17b7b375d8ab4d46a92f4707406bd181caa4d044894aed1a3e3ebc", + marf_hash: "6feebdbc00848565df5f577460dcf3937f5518e4eb91d228d73d5ed09d3cb8b6", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap index 26f795efe6..db55afb0ff 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_constructed_list_too_large.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "44a54dcf1599905059d64d75504ba2412ce92145b16178bef7437cf84a99f753", + marf_hash: "4865d7980ca587867066c6e012ef04e079a89b2e97ef78d3a2248b34c38e3f41", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "1bc402bd4a15686f779661c47310b0fffd50861747daaa58f0adf0e7e20268d0", + marf_hash: "69fae186776e92cf6946ed6a4a83c28d0024e0390278df6e68a69e09482d16e7", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "ebac210926445c38c4df7a8fc7a1c498f79389918f2121e1b46f4dffca37a4cf", + marf_hash: "535d3cb64b5043bc386984fce0b0e71ad7c2f703b2f4a91bac5865227642b788", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "4383ce1a7360c4500ddf7f7fc4a663e48776ccb3692abe0265c4991495e5f138", + marf_hash: "7b61f5697e66a568a248c80b83cae3df329c6ef279c3076d441c5d833b71c898", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap index df22eadd45..83c2fecb9f 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_serialization_type.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "05e7bbac6f790865e3ff6cbc0b75f692dec217290feae9497e4af24f7578e1fd", + marf_hash: "b3b9782ccbe1bf3a66f1c34fe50c83c418fd9d6265761b0a82ffe9950dc8e30f", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "10d4c505f8a773261a728598c73d002c966f7ba4bd8d6c1c5dc1211929846af1", + marf_hash: "32e8a7c15c537c7cbffb74e28705816f8c607bd37d5b2fe9db78f24c697d506f", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "5e5542994c401a76718d51c635c3c43eae63b317937886e0ea5a47ab986e0091", + marf_hash: "a9b3550d29aff9a7a271ee1cb981e4bb3e1948d49026511cc8183fbe2aaeb8af", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "4f697d7e8c3baf15530441a569729b791c524c82ff4f52c09ae47147ebf8bec3", + marf_hash: "a390adec582f30b5d9b8cb0dec54acb082db7823cd7d55a11992fda3f5f96479", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap index 9a485f27b2..b30859a1ae 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_could_not_determine_type.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "a78f8b097673c6e4caf19547688c1fb1a8d8ea4bf67c6d4d5e596747de8ff3fb", + marf_hash: "a1ba1c6711af9225754f4503aaa15ea11c8b043513b5630c32582be50ebf43a3", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "bb84844535aa3e3d57379939c3424394e2f0c01c1f1df320fddd72da8c40847e", + marf_hash: "756733812c29ccf1a323bbe30003922119266675e389190d536ded2c2a35dea6", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "aefebf3f3158906d5338dce46fc57251e21b705e698f9d9c4cb968b7d3deed4a", + marf_hash: "ad3121ac68bbe2571d9714023de241967c72ea8e6819c85634f807ff3eba80a4", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "1f111241cd2ea6996e4d52b41c578684ea9d85c4cdf043a4cd05de70663ef177", + marf_hash: "44823046ccdb67c2ebfc133360d382729ae79a9bca0e108208f86fcfab950cbb", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap index b85da32f42..2061c96003 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_define_variable_bad_signature.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "6276b834655c2902ac0d201171078953802745a75d16a5dba2ed9905c19e2607", + marf_hash: "3986d2b49c834d730e91c37a0749894acbf15729a49fa0212b9972a2c44bbea2", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "8ad493165cabfe2f219e760c0b60be8dcf788258867f8874a416f2cdae97ee5e", + marf_hash: "c7bdfb39ef7286728ae1e059a341ba8c1d35c19e3ef052df10f616e01a1294d5", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "38bca8afcc7ce4463462d0f3e4080f843823c273ae33e5c91dd02e96c798cb6e", + marf_hash: "a147afd28647fc80fbea08e3e4e2f66421a443be6497f7db0acbeb8c313360e7", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "dab8eb21c35114d69adb73dc2e506fb57849b0b3717cb479d84342986bcd1c0b", + marf_hash: "006d8e80572233b24cead3478544649b58318c4beb72a4f598827f5b92e5c5cc", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap index b2ccd17405..050d7077c8 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_expected_sequence.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "959b74fa7723534df5d5822bfc6a4b65f94aecff60da6ee5fd2fe9e565266fd1", + marf_hash: "68e84be6abc605f8b749ffddc651ac1638855423b92fafc696e2838da89dcf88", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "d861454c8eb5589c523649b0fdfa33910f7a269c823694d0f7d480b964ce6eb8", + marf_hash: "fffbc8001d406da6c9d701e076029c33b44baaaceca50dc6f5d8bb717cad04ea", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "f65904d48e816a4e25d3bc74ce4c469a022e1afe3f2c583b9712c16cd0816c6d", + marf_hash: "f956aea7606dc0bd69e1cd3ec9be3e528469b8335752f1635d722c707857b2d3", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "8389d0b2383acd3b375f3b2a6113f2af1d51ed9be0c36d7e5f441be60f04af48", + marf_hash: "3eff9b43bb6fa8209b9ef1fa31f4539c5026ef47296a836e26bcfddb329059e1", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap index 4657bb49d7..8b9de5a3bd 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_invalid_type_description.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "a896487ef5f6e69107c5ce347e3909e53679508f53ff12dec695ae166b11898c", + marf_hash: "8d956af6b22c472853f432445276d339d3b57589470915f8cc1fad0bd18c925a", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "7879896844dca5905d064e4df19420f01161221f0c8be629f7a02a3302c67b2c", + marf_hash: "50c6da88adec86d434a6cca0862f53e7b6122afa51c4cdc0475e61996f20f6bd", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "e84039865cead4275fa18d6e2bcb0bca12538224828a7532ffbe037adb7bd547", + marf_hash: "9b7277c6c51eba3c77c38cda1c6ea16384121617cd587609a00b79e08565fbdd", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "c43bbdd3bb61ce11c7128227d633f51c8d9f61f3e4ebbc284f8827f925745c07", + marf_hash: "d21e9ecd5b113dcb0023aad628c58fd4f5e02382ea8c023dae664462cbf0addf", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap index 80972c4d06..f347796dac 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_name_already_used.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "56c84c4dd86c9d8cc34a5af9d3f8db1096cbd2dd259a286f9b70b010b5f814e6", + marf_hash: "ef8ca5e533b17f2746804c4ead9de18b1a04cb18dabe4c1c8d309a19628912e4", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "20639c9aaa8179c523694d55e57abcb40a89465f819651b208a208f7691e8491", + marf_hash: "d77984d1398e5f4200b6a21aa2758aa3d8f0b75c1d965349a72066db1608f6cb", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "1b65182fc4e2619839c427d8664e18fc184023202f0b55d49fb7dee5dcd6e7ab", + marf_hash: "e43f00aff1cbcbd51997927e276c050713caf919ad177650df2b40205c5019fa", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "df6a4872a930c393febf878053fb7a2cae04b6280d783f2ab323a5dcc86cc96d", + marf_hash: "1f82cfdc4fbbf5a4f08cb2b39eb2e499e392a167a4f07ca15b0102b1d4ac0a12", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap index 5f65c23e19..3661e1a834 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_return_types_must_match.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "df29649662db7d5ed9b436cb977311889736c136ae36a08a00e84b03bff96d17", + marf_hash: "7f0d4415c43fb0e25c9e4c06d9b3ba65180e232e1988fccb85c978d138b89f72", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "030bf686cd34631787d5e1ab897013b988f4ceeea7c1146d57482dbb90771e63", + marf_hash: "2437107153b4aa494ce6dc95a9d1d63dbf2c52e4b2a26633859fe634cb4ab17b", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "e8d05b287d9e7d2a08f7f4f70d448ae2d9af0afa2c64bfd05ec1fddf8ad64998", + marf_hash: "1d324958dccc3217e0ab81c63a043b7195ec9bc9e7c41dab31adef097e28351f", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "5876bb544c6cf3f68e59a3998c42ff517233e592db7d0701b5a5afe52dc3224d", + marf_hash: "39c2be546aa7b90c1a95055f6dca367ff2465422aeb0b10e8c9c2fbcb144ba1d", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap index b7ddcbb7b6..9824d0e21c 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_supertype_too_large.snap @@ -3,8 +3,20 @@ source: stackslib/src/chainstate/tests/static_analysis_tests.rs expression: result --- [ - Failure("Invalid Stacks block 2de86356e65a970f5176ccb225cac8e8a4b511858a3a4a8d7db5c292b29f8825: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), - Failure("Invalid Stacks block 2326a3f1b052b024b17adf992dfbf618efe6b368ffc0d29db33f7966c7e9bd7f: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), - Failure("Invalid Stacks block 3e16b8aeea1eda4102d0a9a42f6d97d89026549a06163881cbb5abb1f17d5875: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), - Failure("Invalid Stacks block 9f34a7e963353e11238e352069aad620ec5c6525e0b1a59476377c65b8892e21: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))"), + Failure(ExpectedFailureOutput( + evaluated_epoch: Epoch33, + error: "Invalid Stacks block 0d9a22b0addac68110e11145d19a57186b7e6b7ea42f2ed8027edc9ef93f5a86: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))", + )), + Failure(ExpectedFailureOutput( + evaluated_epoch: Epoch33, + error: "Invalid Stacks block df41e1ebe0ce7009fb04a926c36f91d2fed2f08df5ce309f42ac948d97051d18: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))", + )), + Failure(ExpectedFailureOutput( + evaluated_epoch: Epoch33, + error: "Invalid Stacks block cd532364f7eab92dad8d01e3f9f414b41deb8d0c6166b164f2ce12f0bbd76436: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))", + )), + Failure(ExpectedFailureOutput( + evaluated_epoch: Epoch33, + error: "Invalid Stacks block fedb5abccb1d54e207251e441644ae6a460eb8f159e90204d76a71758179b20e: ClarityError(StaticCheck(StaticCheckError { err: SupertypeTooLarge, expressions: Some([SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"append\")), id: 41 }, SymbolicExpression { expr: Atom(ClarityName(\"initial\")), id: 42 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"tuple\")), id: 44 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"a\")), id: 46 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 48 }, SymbolicExpression { expr: Atom(ClarityName(\"small\")), id: 49 }]), id: 47 }]), id: 45 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"b\")), id: 51 }, SymbolicExpression { expr: List([SymbolicExpression { expr: Atom(ClarityName(\"var-get\")), id: 53 }, SymbolicExpression { expr: Atom(ClarityName(\"big\")), id: 54 }]), id: 52 }]), id: 50 }]), id: 43 }]), id: 40 }]), diagnostic: Diagnostic { level: Error, message: \"supertype of two types is too large\", spans: [Span { start_line: 0, start_column: 0, end_line: 0, end_column: 0 }], suggestion: None } }))", + )), ] diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap index ec39e92efe..6456cb107f 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_error.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "dc84829630e85566a65f8075137c0e5f3f3f68dddb49409b20a2890b84c0556d", + marf_hash: "649dbc0fcb271409512009fd37644542578f70d371499e7e9ba1139a37bea3f4", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "a8a39a4c0094574d0ba7660340d0cded5c887b130fe8deeace81b371d48d2339", + marf_hash: "9e0346bac690a5ab54480ba4b21a444ff77e70268a3a6838277cae6d41e58dbc", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "79ece9fa771db166f70d2dd7687680fd9f29a9ce316ce29eb33d78851c7c6bd0", + marf_hash: "2fd93f350a09578a2a9b13e9e71fa7f477468488139f024ed736c6add75e141b", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "813e29d03c5ccd651cadaa98213c154a366d233dfba57306399fd4a16ea832a5", + marf_hash: "aa2415bf06af8e35464b356fd883fac1de6f723df6010e3fb29dc7df5028d201", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap index 1a0bb15fe2..7e29d6e19c 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_type_signature_too_deep.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "f36e53c0b45292d4ec7cdb72183b48bb7065e5a7d6d24b5b84fca9dc0c212526", + marf_hash: "21cdf140aba22fc6bcef7daa80b07ae37626be01cdd3f01b97ae853e01fdbeae", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "dd7beef74128ff75f4fb54d0340dfb119b082fd38198e8098b8f443cd9a21fdc", + marf_hash: "e7db8eca76b5504c7b85c6411dcdd610fcf3c32eb06380bf2cf037e94c887d54", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "23c8d1205adacec3262941fb496c262b23ff74146ee41ed64543c6773dd87e76", + marf_hash: "bf06432ec317866df4959ebd47b128cd073bb1239bb84199c8a127d79f79ca97", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "214d3549099da1f33020ac3b0b1a087611a6918d932d37ae03352b629d2ef4a1", + marf_hash: "ee8b2687c1a225f00b4cc5d0d0f1bbea3bec7efca2508469044dce9b1913e420", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap index d7f3929cf3..3a4878fdbd 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_undefined_variable.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "cf31cb38c44ff0d5b42ce40fe2bc025d143d7942204579533bb06d4ffb0bedca", + marf_hash: "9a7b61f181ef8592a441f9ecc91bbc12f9a1793cfbec3513e4721f18d67d759c", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "fe38f82b48438fa791690b89bc895b26879c175e4a1192f75159b4e6cfe84f99", + marf_hash: "f4b0a03b9ae73d9bd1e1ec77670fbcdd90191aaad5b777c134aa496698278c82", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "04a1714922a188e952cf0e5470aadc03b0d7e2370b33f0392d95422cd9b69221", + marf_hash: "2686a862c339bc8baea4ad14b9ef33ea86ab206d25181f612337e3c5ef52e934", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "9548e6911212b439b5181ff3e13e993c4bc6db56318dd3459be19b4669dbead8", + marf_hash: "623998e0fa8cec8ce015897237e9e27614819494755a4cb86254e7db04f78c73", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap index d58cacd823..6cd1e52128 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_union_type_error.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "f8aefcb7876caa94f341af4445df49d7bbf99a8f423dde85129eb52e5576f4a2", + marf_hash: "080e462a7a4181ec7a8eeecef8d0902641c1d9e71e8c70416c7dd1816231d41f", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "82423173f4b747c03e9f42c78cef1c66b178e5f9b7a2921d0b0e4b58810f79a4", + marf_hash: "e864ba8c401b6e6c98eddae56e8358d3fa7eac664522d575b455803a69f0dc71", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "f4255a5e48f848f3fb13d52b22ad781591bf92083d6f9257b208b1fb88f47c6f", + marf_hash: "a5c6e2ca93557a4e7a5654c5516f7adca43040a41cb1adf6e7b3b578cda1f0a7", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "3a7d845f425ac6dbf0eac3aae60bca7d9db0e3c885f15d018ed61615ef2122dd", + marf_hash: "8fedf9ed13bbc6ea39b40cdff9277bcf17d942aeed400fee09cfb49067ebe23e", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( diff --git a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap index e460eca8e8..1b07f47cf1 100644 --- a/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap +++ b/stackslib/src/chainstate/tests/snapshots/blockstack_lib__chainstate__tests__static_analysis_tests__static_check_error_unknown_type_name.snap @@ -4,7 +4,7 @@ expression: result --- [ Success(ExpectedBlockOutput( - marf_hash: "89a2466377702f837fc64c085df66eba661492eab616e4f4e20015d969b376a5", + marf_hash: "8d004a3557c0396f4fc38d9ce6bf700be2d07f6afab03f03ff4e97ab98fe0f01", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -34,7 +34,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "cfe6379f0bc6dd24e046e367165e811d839d48df95f47412b85e0dbf9c7cbd48", + marf_hash: "eb4d4eb367b43b2b4bc7d93341c6bca0a24204c2a0a30706a8a18b5dcaf146e3", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -64,7 +64,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "9a0be218512902609385530f0ac81ec8c81e8534aeb495490606095a23c0d94f", + marf_hash: "e34776337382364c9cad419d37cd265c7c9c62c36e404641a942ee13f6566562", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput( @@ -94,7 +94,7 @@ expression: result ), )), Success(ExpectedBlockOutput( - marf_hash: "4a44779e3fcb663d5fa77a85a6570436384d7b1917de9280f9d6afce66cf1e58", + marf_hash: "33484e3c68f4d42586a392be72eaf557996936ebd7cd002151817474bd409aee", evaluated_epoch: Epoch33, transactions: [ ExpectedTransactionOutput(