66from cardano_clusterlib import clusterlib
77from packaging import version
88
9- from cardano_node_tests .tests import issues
109from cardano_node_tests .utils import cluster_nodes
1110from cardano_node_tests .utils import clusterlib_utils
1211from cardano_node_tests .utils import dbsync_utils
2726ALWAYS_FAILS_PLUTUS_V1 = SCRIPTS_V1_DIR / "always-fails.plutus"
2827GUESSING_GAME_PLUTUS_V1 = SCRIPTS_V1_DIR / "custom-guess-42-datum-42.plutus"
2928GUESSING_GAME_UNTYPED_PLUTUS_V1 = SCRIPTS_V1_DIR / "guess-42-datum-42-txin.plutus"
30- CONTEXT_EQUIVALENCE_PLUTUS_V1 = SCRIPTS_V1_DIR / "context-equivalence-test.plutus"
3129
3230ALWAYS_SUCCEEDS_PLUTUS_V2 = SCRIPTS_V2_DIR / "always-succeeds-spending.plutus"
3331ALWAYS_FAILS_PLUTUS_V2 = SCRIPTS_V2_DIR / "always-fails.plutus"
4240
4341MINTING_PLUTUS_V1 = SCRIPTS_V1_DIR / "anyone-can-mint.plutus"
4442MINTING_TIME_RANGE_PLUTUS_V1 = SCRIPTS_V1_DIR / "time_range.plutus"
45- MINTING_CONTEXT_EQUIVALENCE_PLUTUS_V1 = SCRIPTS_V1_DIR / "minting-context-equivalence-test.plutus"
4643MINTING_WITNESS_REDEEMER_PLUTUS_V1 = SCRIPTS_V1_DIR / "witness-redeemer.plutus"
4744MINTING_TOKENNAME_PLUTUS_V1 = SCRIPTS_V1_DIR / "mint-tokenname.plutus"
4845
@@ -96,8 +93,6 @@ class ExecutionCost:
9693ALWAYS_SUCCEEDS_COST = ExecutionCost (per_time = 368_100 , per_space = 1_700 , fixed_cost = 125 )
9794GUESSING_GAME_COST = ExecutionCost (per_time = 282_016_214 , per_space = 1_034_516 , fixed_cost = 80_025 )
9895GUESSING_GAME_UNTYPED_COST = ExecutionCost (per_time = 4_985_806 , per_space = 11_368 , fixed_cost = 1_016 )
99- # TODO: fix once context equivalence tests can run again
100- CONTEXT_EQUIVALENCE_COST = ExecutionCost (per_time = 100_000_000 , per_space = 1_000_00 , fixed_cost = 947 )
10196
10297ALWAYS_FAILS_V2_COST = ExecutionCost (per_time = 230_100 , per_space = 1_100 , fixed_cost = 81 )
10398ALWAYS_SUCCEEDS_V2_COST = ExecutionCost (per_time = 230_100 , per_space = 1_100 , fixed_cost = 81 )
@@ -122,10 +117,6 @@ class ExecutionCost:
122117MINTING_TIME_RANGE_COST = ExecutionCost (
123118 per_time = 277_239_670 , per_space = 1_044_064 , fixed_cost = 80_232
124119)
125- # TODO: fix once context equivalence tests can run again
126- MINTING_CONTEXT_EQUIVALENCE_COST = ExecutionCost (
127- per_time = 358_849_733 , per_space = 978_434 , fixed_cost = 82_329
128- )
129120MINTING_WITNESS_REDEEMER_COST = ExecutionCost (
130121 per_time = 261_056_789 , per_space = 1_013_630 , fixed_cost = 75_278
131122)
@@ -895,34 +886,3 @@ def xfail_on_secp_error(cluster_obj: clusterlib.ClusterLib, algorithm: str, err_
895886
896887 if before_pv8 and (is_forbidden or is_overspending ):
897888 pytest .xfail ("The SECP256k1 builtin functions are not allowed before protocol version 8" )
898-
899-
900- def create_script_context_w_blockers (
901- cluster_obj : clusterlib .ClusterLib ,
902- plutus_version : int ,
903- redeemer_file : pl .Path ,
904- tx_file : pl .Path | None = None ,
905- ) -> None :
906- """Run the `create-script-context` command (available in plutus-apps).
907-
908- This variant of the `create_script_context` function catches known errors and fails the test
909- with a blocker issue.
910- """
911- try :
912- clusterlib_utils .create_script_context (
913- cluster_obj = cluster_obj ,
914- plutus_version = plutus_version ,
915- redeemer_file = redeemer_file ,
916- tx_file = tx_file ,
917- )
918- except RuntimeError as err :
919- str_err = str (err )
920- if "Unwitnessed Tx ConwayEra" in str_err :
921- pytest .xfail ("create-script-context: unsupported 'Unwitnessed Tx ConwayEra'" )
922- if "DeserialiseFailure" in str_err :
923- issues .plutus_apps_583 .finish_test ()
924- if "TextEnvelopeTypeError" in str_err :
925- issues .plutus_apps_1078 .finish_test ()
926- if "PlutusScriptV1 custom redeemer not wired up" in str_err :
927- issues .plutus_apps_1107 .finish_test ()
928- raise
0 commit comments