Skip to content

Commit dda2efe

Browse files
authored
Merge pull request #3363 from IntersectMBO/remove_context_equivalence_tests
feat: remove context equivalence Plutus tests and related scripts
2 parents 5e6c89a + 2bb9896 commit dda2efe

12 files changed

Lines changed: 1 addition & 703 deletions

.github/regression.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,6 @@ case "${DBSYNC_REV:-}" in
9898
;;
9999
esac
100100

101-
# Setup plutus-apps (disabled by default).
102-
# The "plutus-apps" repo is needed for the `create-script-context` tool, which is used by the
103-
# Plutus tests that are testing script context.
104-
# TODO: The `create-script-context` tool is broken for a very long time, hence disabled.
105-
# See https://github.com/IntersectMBO/plutus-apps/issues/1107
106-
case "${PLUTUS_APPS_REV:="none"}" in
107-
"none" )
108-
unset PLUTUS_APPS_REV
109-
;;
110-
* )
111-
# shellcheck disable=SC1091
112-
. .github/source_plutus_apps.sh
113-
;;
114-
esac
115-
116101
# setup cardano-cli (use the built-in version by default)
117102
case "${CARDANO_CLI_REV:-}" in
118103
"" )

.github/source_plutus_apps.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

cardano_node_tests/tests/common.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@
4848
reason="`build-estimate` fails to balance tx with no txouts",
4949
)
5050

51-
SKIPIF_MISMATCHED_ERAS = pytest.mark.skipif(
52-
VERSIONS.transaction_era != VERSIONS.cluster_era,
53-
reason="transaction era must be the same as node era",
54-
)
55-
5651
SKIPIF_WRONG_ERA = pytest.mark.skipif(
5752
not (
5853
VERSIONS.cluster_era >= VERSIONS.DEFAULT_CLUSTER_ERA

cardano_node_tests/tests/data/plutus/v1/context-equivalence-test.plutus

Lines changed: 0 additions & 5 deletions
This file was deleted.

cardano_node_tests/tests/data/plutus/v1/minting-context-equivalence-test.plutus

Lines changed: 0 additions & 5 deletions
This file was deleted.

cardano_node_tests/tests/plutus_common.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from cardano_clusterlib import clusterlib
77
from packaging import version
88

9-
from cardano_node_tests.tests import issues
109
from cardano_node_tests.utils import cluster_nodes
1110
from cardano_node_tests.utils import clusterlib_utils
1211
from cardano_node_tests.utils import dbsync_utils
@@ -27,7 +26,6 @@
2726
ALWAYS_FAILS_PLUTUS_V1 = SCRIPTS_V1_DIR / "always-fails.plutus"
2827
GUESSING_GAME_PLUTUS_V1 = SCRIPTS_V1_DIR / "custom-guess-42-datum-42.plutus"
2928
GUESSING_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

3230
ALWAYS_SUCCEEDS_PLUTUS_V2 = SCRIPTS_V2_DIR / "always-succeeds-spending.plutus"
3331
ALWAYS_FAILS_PLUTUS_V2 = SCRIPTS_V2_DIR / "always-fails.plutus"
@@ -42,7 +40,6 @@
4240

4341
MINTING_PLUTUS_V1 = SCRIPTS_V1_DIR / "anyone-can-mint.plutus"
4442
MINTING_TIME_RANGE_PLUTUS_V1 = SCRIPTS_V1_DIR / "time_range.plutus"
45-
MINTING_CONTEXT_EQUIVALENCE_PLUTUS_V1 = SCRIPTS_V1_DIR / "minting-context-equivalence-test.plutus"
4643
MINTING_WITNESS_REDEEMER_PLUTUS_V1 = SCRIPTS_V1_DIR / "witness-redeemer.plutus"
4744
MINTING_TOKENNAME_PLUTUS_V1 = SCRIPTS_V1_DIR / "mint-tokenname.plutus"
4845

@@ -96,8 +93,6 @@ class ExecutionCost:
9693
ALWAYS_SUCCEEDS_COST = ExecutionCost(per_time=368_100, per_space=1_700, fixed_cost=125)
9794
GUESSING_GAME_COST = ExecutionCost(per_time=282_016_214, per_space=1_034_516, fixed_cost=80_025)
9895
GUESSING_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

10297
ALWAYS_FAILS_V2_COST = ExecutionCost(per_time=230_100, per_space=1_100, fixed_cost=81)
10398
ALWAYS_SUCCEEDS_V2_COST = ExecutionCost(per_time=230_100, per_space=1_100, fixed_cost=81)
@@ -122,10 +117,6 @@ class ExecutionCost:
122117
MINTING_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-
)
129120
MINTING_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

Comments
 (0)