diff --git a/.github/env_nightly_conway_bootstrap b/.github/env_nightly_conway_bootstrap index 68ace95ae..48c7e5966 100644 --- a/.github/env_nightly_conway_bootstrap +++ b/.github/env_nightly_conway_bootstrap @@ -1,3 +1,4 @@ CLUSTER_ERA=conway COMMAND_ERA=conway ENABLE_P2P=true +CARDANO_CLI_REV=release/cardano-cli-9.0.0.1 diff --git a/.github/env_nightly_conway_cc b/.github/env_nightly_conway_cc index 287455cba..16bafc2d6 100644 --- a/.github/env_nightly_conway_cc +++ b/.github/env_nightly_conway_cc @@ -2,3 +2,4 @@ CLUSTER_ERA=conway COMMAND_ERA=conway PV10=true ENABLE_P2P=true +CARDANO_CLI_REV=release/cardano-cli-9.0.0.1 diff --git a/.github/env_nightly_conway_nocc b/.github/env_nightly_conway_nocc index 6e1be0a5a..d419f2f87 100644 --- a/.github/env_nightly_conway_nocc +++ b/.github/env_nightly_conway_nocc @@ -3,3 +3,4 @@ COMMAND_ERA=conway NO_CC=true PV10=true ENABLE_P2P=true +CARDANO_CLI_REV=release/cardano-cli-9.0.0.1 diff --git a/cardano_node_tests/cluster_scripts/babbage/genesis.conway.spec.json b/cardano_node_tests/cluster_scripts/babbage/genesis.conway.spec.json index 441178802..17b09d995 100644 --- a/cardano_node_tests/cluster_scripts/babbage/genesis.conway.spec.json +++ b/cardano_node_tests/cluster_scripts/babbage/genesis.conway.spec.json @@ -25,7 +25,259 @@ "dRepDeposit": 2000000, "dRepActivity": 100, "minFeeRefScriptCostPerByte": 0, - "plutusV3CostModel": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "plutusV3CostModel": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 201305, + 8356, + 4, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10, + 16000, + 100, + 16000, + 100, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 2261318, + 64571, + 4, + 207616, + 8310, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ], "constitution": { "anchor": { "url": "", diff --git a/cardano_node_tests/cluster_scripts/babbage_fast/genesis.conway.spec.json b/cardano_node_tests/cluster_scripts/babbage_fast/genesis.conway.spec.json index 441178802..17b09d995 100644 --- a/cardano_node_tests/cluster_scripts/babbage_fast/genesis.conway.spec.json +++ b/cardano_node_tests/cluster_scripts/babbage_fast/genesis.conway.spec.json @@ -25,7 +25,259 @@ "dRepDeposit": 2000000, "dRepActivity": 100, "minFeeRefScriptCostPerByte": 0, - "plutusV3CostModel": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "plutusV3CostModel": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 201305, + 8356, + 4, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10, + 16000, + 100, + 16000, + 100, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 2261318, + 64571, + 4, + 207616, + 8310, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ], "constitution": { "anchor": { "url": "", diff --git a/cardano_node_tests/cluster_scripts/conway/dbsync-config.yaml b/cardano_node_tests/cluster_scripts/conway/dbsync-config.yaml index f6724feb4..71b4b7269 100644 --- a/cardano_node_tests/cluster_scripts/conway/dbsync-config.yaml +++ b/cardano_node_tests/cluster_scripts/conway/dbsync-config.yaml @@ -4,6 +4,7 @@ NetworkName: localnet EnableLogMetrics: False EnableLogging: True +EnableFutureGenesis: True # The default port is 8080 # PrometheusPort: 8080 diff --git a/cardano_node_tests/cluster_scripts/conway_fast/dbsync-config.yaml b/cardano_node_tests/cluster_scripts/conway_fast/dbsync-config.yaml index f6724feb4..71b4b7269 100644 --- a/cardano_node_tests/cluster_scripts/conway_fast/dbsync-config.yaml +++ b/cardano_node_tests/cluster_scripts/conway_fast/dbsync-config.yaml @@ -4,6 +4,7 @@ NetworkName: localnet EnableLogMetrics: False EnableLogging: True +EnableFutureGenesis: True # The default port is 8080 # PrometheusPort: 8080 diff --git a/cardano_node_tests/tests/conftest.py b/cardano_node_tests/tests/conftest.py index 5baf06cb2..6f7b9cedc 100644 --- a/cardano_node_tests/tests/conftest.py +++ b/cardano_node_tests/tests/conftest.py @@ -141,37 +141,46 @@ def _skip_all_tests(config: tp.Any, items: list) -> bool: return True -def _mark_needs_dbsync_tests(items: list) -> bool: - """Mark 'needs_dbsync' tests with additional markers.""" - skip_marker = pytest.mark.skip(reason="db-sync not available") - dbsync_marker = pytest.mark.dbsync +@pytest.hookimpl(tryfirst=True) +def pytest_collection_modifyitems(config: tp.Any, items: list) -> None: # noqa: C901 + # prevent on slave nodes (xdist) + if hasattr(config, "slaveinput"): + return - for item in items: + if _skip_all_tests(config=config, items=items): + return + + skip_dbsync_marker = pytest.mark.skip(reason="db-sync not available") + + def _mark_needs_dbsync(item: tp.Any) -> None: + """Mark 'needs_dbsync' test with additional markers.""" if "needs_dbsync" not in item.keywords: - continue + return # all tests marked with 'needs_dbsync' are db-sync tests, and should be marked # with the 'dbsync' marker as well if "dbsync" not in item.keywords: - item.add_marker(dbsync_marker) + item.add_marker(pytest.mark.dbsync) # skip all tests that require db-sync when db-sync is not available if not configuration.HAS_DBSYNC: - item.add_marker(skip_marker) + item.add_marker(skip_dbsync_marker) - return True + def _skip_disabled(item: tp.Any) -> None: + """Skip disabled test.""" + if "disabled" not in item.keywords: + return + disabled_marker = list(item.iter_markers(name="disabled")) + if not disabled_marker: + return -@pytest.hookimpl(tryfirst=True) -def pytest_collection_modifyitems(config: tp.Any, items: list) -> None: - # prevent on slave nodes (xdist) - if hasattr(config, "slaveinput"): - return + disabled_reason = disabled_marker[0].kwargs.get("reason") or "disabled test" + item.add_marker(pytest.mark.skip(reason=f"DISABLED: {disabled_reason}")) - if _skip_all_tests(config=config, items=items): - return - - _mark_needs_dbsync_tests(items=items) + for item in items: + _mark_needs_dbsync(item) + _skip_disabled(item) @pytest.fixture(scope="session") diff --git a/cardano_node_tests/tests/data/cost_models_list.json b/cardano_node_tests/tests/data/cost_models_list.json index aeef62e29..008228faa 100644 --- a/cardano_node_tests/tests/data/cost_models_list.json +++ b/cardano_node_tests/tests/data/cost_models_list.json @@ -165,7 +165,7 @@ 32, 9462713, 1021, - 11 + 10 ], "PlutusV2": [ 205665, @@ -336,12 +336,12 @@ 38314, 32, 35892428, - 11, + 10, 9462713, 1021, - 11, + 10, 38887044, 32947, - 11 + 10 ] } diff --git a/cardano_node_tests/tests/data/cost_models_list_185_v2.json b/cardano_node_tests/tests/data/cost_models_list_185_v2.json new file mode 100644 index 000000000..03a606280 --- /dev/null +++ b/cardano_node_tests/tests/data/cost_models_list_185_v2.json @@ -0,0 +1,357 @@ +{ + "PlutusV1": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 9462713, + 1021, + 10 + ], + "PlutusV2": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1159724, + 392670, + 0, + 2, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 35892428, + 10, + 9462713, + 1021, + 10, + 38887044, + 32947, + 10, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ] +} diff --git a/cardano_node_tests/tests/data/cost_models_list_185_v2_v3.json b/cardano_node_tests/tests/data/cost_models_list_185_v2_v3.json new file mode 100644 index 000000000..4b8201a65 --- /dev/null +++ b/cardano_node_tests/tests/data/cost_models_list_185_v2_v3.json @@ -0,0 +1,610 @@ +{ + "PlutusV1": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 9462713, + 1021, + 10 + ], + "PlutusV2": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1159724, + 392670, + 0, + 2, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 35892428, + 10, + 9462713, + 1021, + 10, + 38887044, + 32947, + 10, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ], + "PlutusV3": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 201305, + 8356, + 4, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10, + 16000, + 100, + 16000, + 100, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 2261318, + 64571, + 4, + 207616, + 8310, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ] +} diff --git a/cardano_node_tests/tests/data/cost_models_list_v3.json b/cardano_node_tests/tests/data/cost_models_list_v3.json new file mode 100644 index 000000000..0a5c5951a --- /dev/null +++ b/cardano_node_tests/tests/data/cost_models_list_v3.json @@ -0,0 +1,600 @@ +{ + "PlutusV1": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 9462713, + 1021, + 10 + ], + "PlutusV2": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1159724, + 392670, + 0, + 2, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 35892428, + 10, + 9462713, + 1021, + 10, + 38887044, + 32947, + 10 + ], + "PlutusV3": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 201305, + 8356, + 4, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10, + 16000, + 100, + 16000, + 100, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 2261318, + 64571, + 4, + 207616, + 8310, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ] +} diff --git a/cardano_node_tests/tests/data/plutus/v2/byteStringToIntegerRoundtripPolicyV2.plutus b/cardano_node_tests/tests/data/plutus/v2/byteStringToIntegerRoundtripPolicyV2.plutus new file mode 100644 index 000000000..a198f0e89 --- /dev/null +++ b/cardano_node_tests/tests/data/plutus/v2/byteStringToIntegerRoundtripPolicyV2.plutus @@ -0,0 +1,5 @@ +{ + "type": "PlutusScriptV2", + "description": "", + "cborHex": "5822582001000022325333573466e1ccde5251333792945200000100111200116375a005" +} diff --git a/cardano_node_tests/tests/issues.py b/cardano_node_tests/tests/issues.py index 960050e24..4d598d38d 100644 --- a/cardano_node_tests/tests/issues.py +++ b/cardano_node_tests/tests/issues.py @@ -54,7 +54,7 @@ cli_799 = blockers.GH( issue=799, repo="IntersectMBO/cardano-cli", - fixed_in="8.24.0.1", # Fixed in a release after 8.24.0.0 + fixed_in="9.1.0.0", # Found in 8.24.0.0 message="Conway era fields shown in Babbage Tx.", ) cli_800 = blockers.GH( diff --git a/cardano_node_tests/tests/plutus_common.py b/cardano_node_tests/tests/plutus_common.py index c6b024f5c..aecbb6097 100644 --- a/cardano_node_tests/tests/plutus_common.py +++ b/cardano_node_tests/tests/plutus_common.py @@ -31,6 +31,7 @@ GUESSING_GAME_UNTYPED_PLUTUS_V2 = SCRIPTS_V2_DIR / "guess-42-datum-42-txin.plutus" SECP256K1_LOOP_ECDSA_PLUTUS_V2 = SCRIPTS_V2_DIR / "ecdsa-secp256k1-loop.plutus" SECP256K1_LOOP_SCHNORR_PLUTUS_V2 = SCRIPTS_V2_DIR / "schnorr-secp256k1-loop.plutus" +BYTE_STRING_ROUNDTRIP = SCRIPTS_V2_DIR / "byteStringToIntegerRoundtripPolicyV2.plutus" ALWAYS_SUCCEEDS_PLUTUS_V3 = SCRIPTS_V3_DIR / "alwaysSucceedPolicyScriptV3.plutus" ALWAYS_FAILS_PLUTUS_V3 = SCRIPTS_V3_DIR / "alwaysFailsPolicyScriptV3.plutus" @@ -100,6 +101,9 @@ class ExecutionCost: GUESSING_GAME_UNTYPED_V2_COST = ExecutionCost( per_time=4_985_806, per_space=11_368, fixed_cost=1_016 ) +BYTE_STRING_ROUNDTRIP_V2_COST = ExecutionCost( + per_time=168_868_800, per_space=540_612, fixed_cost=43_369 +) SECP256K1_ECDSA_LOOP_COST = ExecutionCost( per_time=397_863_996, per_space=128_584, fixed_cost=36_106 ) @@ -155,6 +159,13 @@ class PlutusScriptData: execution_cost: ExecutionCost +BYTE_STRING_ROUNDTRIP_V2_REC = PlutusScriptData( + script_file=BYTE_STRING_ROUNDTRIP, + script_type=clusterlib.ScriptTypes.PLUTUS_V2, + execution_cost=BYTE_STRING_ROUNDTRIP_V2_COST, +) + + ALWAYS_FAILS = { "v1": PlutusScriptData( script_file=ALWAYS_FAILS_PLUTUS_V1, diff --git a/cardano_node_tests/tests/reqs_conway.py b/cardano_node_tests/tests/reqs_conway.py index dbaa4e986..234953443 100644 --- a/cardano_node_tests/tests/reqs_conway.py +++ b/cardano_node_tests/tests/reqs_conway.py @@ -123,6 +123,13 @@ def __r(id: str) -> requirements.Req: cip081 = __r("CIP081") cip082 = __r("CIP082") cip083 = __r("CIP083") +cip084 = __r("CIP084") +cip085 = __r("CIP085") +cip086 = __r("CIP086") +cip087 = __r("CIP087") +cip088 = __r("CIP088") +cip089 = __r("CIP089") +cip090 = __r("CIP090") # https://github.com/IntersectMBO/cardano-test-plans/blob/main/docs/user-stories/02-cardano-cli.md cli001 = __r("CLI001") diff --git a/cardano_node_tests/tests/test_update_proposals.py b/cardano_node_tests/tests/test_update_proposals.py index f9189a7e2..e01171af0 100644 --- a/cardano_node_tests/tests/test_update_proposals.py +++ b/cardano_node_tests/tests/test_update_proposals.py @@ -360,3 +360,79 @@ def test_update_proposal( dbsync_utils.check_param_proposal(protocol_params=protocol_params) assert protocol_params.get("decentralization") is None + + +@pytest.mark.skipif( + VERSIONS.cluster_era >= VERSIONS.CONWAY, + reason="Doesn't run on cluster era >= Conway", +) +class TestNegativeCostModels: + """Negative tests for cost models update.""" + + @pytest.fixture + def payment_addr( + self, + cluster_manager: cluster_management.ClusterManager, + cluster: clusterlib.ClusterLib, + ) -> clusterlib.AddressRecord: + """Create new payment address.""" + with cluster_manager.cache_fixture() as fixture_cache: + if fixture_cache.value: + return fixture_cache.value # type: ignore + + addr = clusterlib_utils.create_payment_addr_records( + f"addr_test_neg_update_proposal_ci{cluster_manager.cluster_instance_num}_0", + cluster_obj=cluster, + )[0] + fixture_cache.value = addr + + # fund source addresses + clusterlib_utils.fund_from_faucet( + addr, + cluster_obj=cluster, + faucet_data=cluster_manager.cache.addrs_data["user1"], + ) + + return addr + + @allure.link(helpers.get_vcs_link()) + @pytest.mark.parametrize("cost_model", ("pv2_185", "pv3", "dict_pv1")) + def test_incompatible_cost_models( + self, + cluster: clusterlib.ClusterLib, + payment_addr: clusterlib.AddressRecord, + cost_model: str, + ): + """Test incompatible Plutus cost models.""" + common.get_test_id(cluster) + exp_error = "" + + if cost_model == "pv2_185": + cm_file = "cost_models_list_185_v2.json" + exp_error = "Expected array with 175 entries" + elif cost_model == "pv3": + cm_file = "cost_models_list_v3.json" + exp_error = "Legacy CostModel decoding is not supported" + elif cost_model == "dict_pv1": + cm_file = "cost_models_dict.json" + exp_error = "blake2b-cpu-arguments-intercept" + else: + _verr = f"Unknown cost model: {cost_model}" + raise ValueError(_verr) + + update_proposal = [ + clusterlib_utils.UpdateProposal( + arg="--cost-model-file", + value=str(DATA_DIR / cm_file), + name="", # needs custom check + ), + ] + + with pytest.raises(clusterlib.CLIError) as excinfo: + clusterlib_utils.update_params( + cluster_obj=cluster, + src_addr_record=payment_addr, + update_proposals=update_proposal, + ) + err_str = str(excinfo.value) + assert exp_error in err_str, err_str diff --git a/cardano_node_tests/tests/tests_conway/test_committee.py b/cardano_node_tests/tests/tests_conway/test_committee.py index 70858ae91..613a0def3 100644 --- a/cardano_node_tests/tests/tests_conway/test_committee.py +++ b/cardano_node_tests/tests/tests_conway/test_committee.py @@ -104,6 +104,7 @@ class TestCommittee: @pytest.mark.dbsync @pytest.mark.testnets @pytest.mark.smoke + @pytest.mark.disabled(reason="Needs to be fixed in 9.0.0+") def test_register_and_resign_committee_member( self, cluster_use_committee: governance_utils.GovClusterT, @@ -225,6 +226,7 @@ def test_register_and_resign_committee_member( @submit_utils.PARAM_SUBMIT_METHOD @common.PARAM_USE_BUILD_CMD @pytest.mark.smoke + @pytest.mark.disabled(reason="Needs to be fixed in 9.0.0+") def test_update_committee_action( self, cluster: clusterlib.ClusterLib, @@ -341,8 +343,12 @@ def test_update_committee_action( reqc.cip007.success() + # Check dbsync + dbsync_utils.check_committee_info(gov_state=gov_state, txid=txid) + @allure.link(helpers.get_vcs_link()) @pytest.mark.long + @pytest.mark.disabled(reason="Needs to be fixed in 9.0.0+") def test_add_rm_committee_members( # noqa: C901 self, cluster_lock_governance: governance_utils.GovClusterT, @@ -383,6 +389,7 @@ def test_add_rm_committee_members( # noqa: C901 - check that it's not possible to vote on enacted action * check output of votes and action `view` commands + * check deposit is returned to user reward account after enactment """ # pylint: disable=too-many-locals,too-many-statements,too-many-branches cluster, governance_data = cluster_lock_governance @@ -391,6 +398,10 @@ def test_add_rm_committee_members( # noqa: C901 if conway_common.is_in_bootstrap(cluster_obj=cluster): pytest.skip("Cannot run during bootstrap period.") + init_return_account_balance = cluster.g_query.get_stake_addr_info( + pool_user_lg.stake.address + ).reward_account_balance + deposit_amt = cluster.conway_genesis["govActionDeposit"] # Check if total delegated stake is below the threshold. This can be used to check that @@ -981,6 +992,18 @@ def _check_rem_state(gov_state: tp.Dict[str, tp.Any]): governance_utils.check_vote_view(cluster_obj=cluster, vote_data=voted_votes_rem.spo[0]) reqc.cip067.success() + reqc.cip034en.start(url=helpers.get_vcs_link()) + enact_deposit_returned = cluster.g_query.get_stake_addr_info( + pool_user_lg.stake.address + ).reward_account_balance + + assert ( + enact_deposit_returned + == init_return_account_balance + + deposit_amt * 2 # 2 * deposit_amt for add and rem actions + ), "Incorrect return account balance" + reqc.cip034en.success() + if xfail_ledger_4001_msgs: ledger_4001 = issues.ledger_4001.copy() ledger_4001.message = "; ".join(xfail_ledger_4001_msgs) diff --git a/cardano_node_tests/tests/tests_conway/test_drep.py b/cardano_node_tests/tests/tests_conway/test_drep.py index 474014333..1c46f7961 100644 --- a/cardano_node_tests/tests/tests_conway/test_drep.py +++ b/cardano_node_tests/tests/tests_conway/test_drep.py @@ -1,12 +1,16 @@ """Tests for Conway governance DRep functionality.""" +import binascii import dataclasses +import hashlib +import json import logging import pathlib as pl import pickle import typing as tp import allure +import cbor2 import pytest from _pytest.fixtures import FixtureRequest from cardano_clusterlib import clusterlib @@ -23,6 +27,7 @@ from cardano_node_tests.utils import dbsync_utils from cardano_node_tests.utils import governance_utils from cardano_node_tests.utils import helpers +from cardano_node_tests.utils import submit_api from cardano_node_tests.utils import submit_utils from cardano_node_tests.utils.versions import VERSIONS @@ -251,6 +256,49 @@ def custom_drep_wp( class TestDReps: """Tests for DReps.""" + @allure.link(helpers.get_vcs_link()) + @pytest.mark.testnets + @pytest.mark.smoke + def test_drep_id_is_blake2b_224_of_drep_vkey( + self, + cluster: clusterlib.ClusterLib, + ): + """Test proper drep id is being generated. + + * Register a drep + * Hash drep vkey using blake2b_224 + * Check drep ID generated from cli is same as blake2b_224 hash of drep vkey + """ + reqc.cip085.start(url=helpers.get_vcs_link()) + temp_template = common.get_test_id(cluster) + drep_metadata_url = "https://www.the-drep.com" + drep_metadata_file = f"{temp_template}_drep_metadata.json" + drep_metadata_content = {"name": "The DRep", "ranking": "uno"} + helpers.write_json(out_file=drep_metadata_file, content=drep_metadata_content) + drep_metadata_hash = cluster.g_conway_governance.drep.get_metadata_hash( + drep_metadata_file=drep_metadata_file + ) + # Get a drep registration record + reg_drep = governance_utils.get_drep_reg_record( + cluster_obj=cluster, + name_template=temp_template, + drep_metadata_url=drep_metadata_url, + drep_metadata_hash=drep_metadata_hash, + ) + vkey_file_path = reg_drep.key_pair.vkey_file + # Get drep vkey from vkey file + with open(vkey_file_path) as vkey_file: + vkey_file_json = json.loads(vkey_file.read()) + cbor_hex = vkey_file_json["cborHex"] + cbor_binary = binascii.unhexlify(cbor_hex) + decoded_data = cbor2.loads(cbor_binary) + blake2b_224 = hashlib.blake2b(digest_size=28) + blake2b_224.update(decoded_data) + # Obtain blake2b_224 hash of drep vkey + hash_digest = blake2b_224.hexdigest() + assert reg_drep.drep_id == hash_digest, "Drep ID hash is not blake2b_224." + reqc.cip085.success() + @allure.link(helpers.get_vcs_link()) @submit_utils.PARAM_SUBMIT_METHOD @common.PARAM_USE_BUILD_CMD @@ -527,6 +575,279 @@ def test_no_witness_register_and_retire( # noqa: C901 if errors_final: raise AssertionError("\n".join(errors_final)) + @allure.link(helpers.get_vcs_link()) + @pytest.mark.testnets + @pytest.mark.smoke + def test_no_multiple_delegation( + self, + cluster: clusterlib.ClusterLib, + cluster_manager: cluster_management.ClusterManager, + payment_addr: clusterlib.AddressRecord, + pool_user: clusterlib.PoolUser, + ): + """Test No multiple delegation to different dreps. + + * Create 2 Dreps + * Create vote delegation certifcate to both dreps + * Submit both certificates + * check that the Drep certificate placed at last of the certificates is delegated to + """ + temp_template = common.get_test_id(cluster) + deposit_amt = cluster.g_query.get_address_deposit() + key1 = helpers.get_current_line_str() + drep1 = get_custom_drep( + name_template=f"custom_drep_1_{temp_template}", + cluster_manager=cluster_manager, + cluster_obj=cluster, + payment_addr=payment_addr, + caching_key=key1, + ) + + key2 = helpers.get_current_line_str() + drep2 = get_custom_drep( + name_template=f"custom_drep_2_{temp_template}", + cluster_manager=cluster_manager, + cluster_obj=cluster, + payment_addr=payment_addr, + caching_key=key2, + ) + + # Create stake address registration cert + reg_cert = cluster.g_stake_address.gen_stake_addr_registration_cert( + addr_name=f"{temp_template}_addr0", + deposit_amt=deposit_amt, + stake_vkey_file=pool_user.stake.vkey_file, + ) + + reqc.cip087.start(url=helpers.get_vcs_link()) + # Create vote delegation cert for drep 1 + deleg_cert_1 = cluster.g_stake_address.gen_vote_delegation_cert( + addr_name=f"{temp_template}_addr1", + stake_vkey_file=pool_user.stake.vkey_file, + drep_key_hash=drep1.drep_id, + always_abstain=False, + always_no_confidence=False, + ) + + # Create vote delegation cert for drep 2 + deleg_cert_2 = cluster.g_stake_address.gen_vote_delegation_cert( + addr_name=f"{temp_template}_addr2", + stake_vkey_file=pool_user.stake.vkey_file, + drep_key_hash=drep2.drep_id, + always_abstain=False, + always_no_confidence=False, + ) + + # Submit two vote delegation certificate at once + tx_files = clusterlib.TxFiles( + certificate_files=[reg_cert, deleg_cert_2, deleg_cert_1], + signing_key_files=[payment_addr.skey_file, pool_user.stake.skey_file], + ) + + # Make sure we have enough time to finish the registration/delegation in one epoch + clusterlib_utils.wait_for_epoch_interval( + cluster_obj=cluster, start=1, stop=common.EPOCH_STOP_SEC_LEDGER_STATE + ) + + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=temp_template, + src_address=payment_addr.address, + use_build_cmd=True, + tx_files=tx_files, + deposit=deposit_amt, + ) + stake_addr_info = cluster.g_query.get_stake_addr_info(pool_user.stake.address) + + assert stake_addr_info.vote_delegation == governance_utils.get_drep_cred_name( + drep_id=drep1.drep_id + ), "Votes are NOT delegated to the correct DRep 1 placed at last of certificates list." + reqc.cip087.success() + + @allure.link(helpers.get_vcs_link()) + @pytest.mark.parametrize("drep", ("always_abstain", "always_no_confidence", "custom")) + @pytest.mark.testnets + @pytest.mark.smoke + def test_no_delegation_without_stake_registration( + self, + cluster: clusterlib.ClusterLib, + payment_addr: clusterlib.AddressRecord, + pool_user: clusterlib.PoolUser, + custom_drep: governance_utils.DRepRegistration, + drep: str, + ): + """Test No voting delegation without registering stake address first. + + * Use a wallet without registered stake address + * Create vote delegation certifcate using unregistered wallet stake key + * Submit the certificate + * Expect error StakeKeyNotRegisteredDELEG + """ + temp_template = common.get_test_id(cluster) + deposit_amt = cluster.g_query.get_address_deposit() + + reqc.cip088.start(url=helpers.get_vcs_link()) + # Create vote delegation cert + deleg_cert = cluster.g_stake_address.gen_vote_delegation_cert( + addr_name=f"{temp_template}_addr1", + stake_vkey_file=pool_user.stake.vkey_file, + drep_key_hash=custom_drep.drep_id if drep == "custom" else "", + always_abstain=drep == "always_abstain", + always_no_confidence=drep == "always_no_confidence", + ) + + tx_files = clusterlib.TxFiles( + certificate_files=[deleg_cert], + signing_key_files=[payment_addr.skey_file, pool_user.stake.skey_file], + ) + + # Make sure we have enough time to finish the delegation in one epoch + clusterlib_utils.wait_for_epoch_interval( + cluster_obj=cluster, start=1, stop=common.EPOCH_STOP_SEC_LEDGER_STATE + ) + + # Expecting error as stake address is not registered + with pytest.raises(clusterlib.CLIError) as excinfo: + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=temp_template, + src_address=payment_addr.address, + use_build_cmd=True, + tx_files=tx_files, + deposit=deposit_amt, + ) + + err_msg = str(excinfo.value) + assert "StakeKeyNotRegisteredDELEG" in err_msg, err_msg + reqc.cip088.success() + + @allure.link(helpers.get_vcs_link()) + @submit_utils.PARAM_SUBMIT_METHOD + @common.PARAM_USE_BUILD_CMD + @pytest.mark.testnets + @pytest.mark.smoke + def test_drep_no_retirement_before_register( + self, + cluster: clusterlib.ClusterLib, + payment_addr: clusterlib.AddressRecord, + use_build_cmd: bool, + submit_method: str, + ): + """Test No Drep retirement before register. + + * Create a retirement certificate without registering + * Submit certificate + * check it is not possible to retire before register + """ + temp_template = common.get_test_id(cluster) + drep_keys = cluster.g_conway_governance.drep.gen_key_pair( + key_name=temp_template, destination_dir="." + ) + deposit = cluster.conway_genesis["dRepDeposit"] + + reqc.cip089.start(url=helpers.get_vcs_link()) + ret_cert = cluster.g_conway_governance.drep.gen_retirement_cert( + cert_name=temp_template, + deposit_amt=deposit, + drep_vkey_file=drep_keys.vkey_file, + ) + tx_files_ret = clusterlib.TxFiles( + certificate_files=[ret_cert], + signing_key_files=[payment_addr.skey_file, drep_keys.skey_file], + ) + + # Expecting error for both cases as drep is not registered + with pytest.raises((clusterlib.CLIError, submit_api.SubmitApiError)) as excinfo: + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=f"{temp_template}_reg2", + src_address=payment_addr.address, + submit_method=submit_method, + use_build_cmd=use_build_cmd, + tx_files=tx_files_ret, + deposit=deposit, + ) + + err_msg = str(excinfo.value) + assert "ConwayDRepNotRegistered" in err_msg, err_msg + reqc.cip089.success() + + @allure.link(helpers.get_vcs_link()) + @submit_utils.PARAM_SUBMIT_METHOD + @common.PARAM_USE_BUILD_CMD + @pytest.mark.testnets + @pytest.mark.smoke + def test_drep_no_multiple_registration( + self, + cluster: clusterlib.ClusterLib, + payment_addr: clusterlib.AddressRecord, + use_build_cmd: bool, + submit_method: str, + ): + """Test Drep cannot be registered multiple time. + + * Generate drep keys + * Create a drep registration certificate + * Submit the registration certificate twice + * Expect ConwayDRepAlreadyRegistered on the second time + """ + temp_template = common.get_test_id(cluster) + drep_metadata_url = "https://www.the-drep.com" + drep_metadata_file = f"{temp_template}_drep_metadata.json" + drep_metadata_content = {"name": "The DRep", "ranking": "uno"} + helpers.write_json(out_file=drep_metadata_file, content=drep_metadata_content) + drep_metadata_hash = cluster.g_conway_governance.drep.get_metadata_hash( + drep_metadata_file=drep_metadata_file + ) + deposit_amt = cluster.conway_genesis["dRepDeposit"] + drep_keys = cluster.g_conway_governance.drep.gen_key_pair( + key_name=temp_template, destination_dir="." + ) + reqc.cip090.start(url=helpers.get_vcs_link()) + # Obtain drep registration certificate + reg_cert = cluster.g_conway_governance.drep.gen_registration_cert( + cert_name=temp_template, + deposit_amt=deposit_amt, + drep_vkey_file=drep_keys.vkey_file, + drep_metadata_url=drep_metadata_url, + drep_metadata_hash=drep_metadata_hash, + destination_dir=".", + ) + tx_files_reg = clusterlib.TxFiles( + certificate_files=[reg_cert], + signing_key_files=[payment_addr.skey_file, drep_keys.skey_file], + ) + + # Submit drep registration certificate + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=f"{temp_template}_reg", + src_address=payment_addr.address, + submit_method=submit_method, + use_build_cmd=use_build_cmd, + tx_files=tx_files_reg, + deposit=deposit_amt, + ) + + # Wait for some blocks and again submit drep registration certificate + cluster.wait_for_new_block(new_blocks=2) + + # Expecting error as drep is already registered + with pytest.raises((clusterlib.CLIError, submit_api.SubmitApiError)) as excinfo: + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=f"{temp_template}_reg2", + src_address=payment_addr.address, + submit_method=submit_method, + use_build_cmd=use_build_cmd, + tx_files=tx_files_reg, + deposit=deposit_amt, + ) + + err_msg = str(excinfo.value) + assert "ConwayDRepAlreadyRegistered" in err_msg, err_msg + reqc.cip090.success() + class TestDelegDReps: """Tests for votes delegation to DReps.""" @@ -916,6 +1237,120 @@ def _get_drep_rec( assert key in drep_states_all, f"DRep '{key}' not found in DRep state" assert rec == drep_states_all[key], f"DRep '{key}' state mismatch" + @allure.link(helpers.get_vcs_link()) + @pytest.mark.testnets + @pytest.mark.smoke + def test_change_delegation( + self, + cluster: clusterlib.ClusterLib, + cluster_manager: cluster_management.ClusterManager, + payment_addr: clusterlib.AddressRecord, + pool_user: clusterlib.PoolUser, + ): + """Test Change delegation to different dreps. + + * Create 2 Dreps + * Create vote delegation certifcate for first drep + * Submit certificate + * check that the delegation is of correct drep id + * Change delegation to drep2 and submit certificate + * Check vote delegation is updated to second drep + """ + temp_template = common.get_test_id(cluster) + deposit_amt = cluster.g_query.get_address_deposit() + key1 = helpers.get_current_line_str() + # Get first drep + drep1 = get_custom_drep( + name_template=f"custom_drep_1_{temp_template}", + cluster_manager=cluster_manager, + cluster_obj=cluster, + payment_addr=payment_addr, + caching_key=key1, + ) + + key2 = helpers.get_current_line_str() + # Get second drep + drep2 = get_custom_drep( + name_template=f"custom_drep_2_{temp_template}", + cluster_manager=cluster_manager, + cluster_obj=cluster, + payment_addr=payment_addr, + caching_key=key2, + ) + + # Create stake address registration cert + reg_cert = cluster.g_stake_address.gen_stake_addr_registration_cert( + addr_name=f"{temp_template}_addr0", + deposit_amt=deposit_amt, + stake_vkey_file=pool_user.stake.vkey_file, + ) + + # Create vote delegation cert + deleg_cert = cluster.g_stake_address.gen_vote_delegation_cert( + addr_name=f"{temp_template}_addr1", + stake_vkey_file=pool_user.stake.vkey_file, + drep_key_hash=drep1.drep_id, + always_abstain=False, + always_no_confidence=False, + ) + + tx_files = clusterlib.TxFiles( + certificate_files=[reg_cert, deleg_cert], + signing_key_files=[payment_addr.skey_file, pool_user.stake.skey_file], + ) + + # Make sure we have enough time to finish the registration/delegation in one epoch + clusterlib_utils.wait_for_epoch_interval( + cluster_obj=cluster, start=1, stop=common.EPOCH_STOP_SEC_LEDGER_STATE + ) + + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=temp_template, + src_address=payment_addr.address, + use_build_cmd=True, + tx_files=tx_files, + deposit=deposit_amt, + ) + stake_addr_info = cluster.g_query.get_stake_addr_info(pool_user.stake.address) + assert stake_addr_info.vote_delegation == governance_utils.get_drep_cred_name( + drep_id=drep1.drep_id + ), "Votes are NOT delegated to the correct DRep 1" + + reqc.cip086.start(url=helpers.get_vcs_link()) + # Change delegation to drep2 + deleg_cert = cluster.g_stake_address.gen_vote_delegation_cert( + addr_name=f"{temp_template}_addr2", + stake_vkey_file=pool_user.stake.vkey_file, + drep_key_hash=drep2.drep_id, + always_abstain=False, + always_no_confidence=False, + ) + + tx_files = clusterlib.TxFiles( + certificate_files=[deleg_cert], + signing_key_files=[payment_addr.skey_file, pool_user.stake.skey_file], + ) + + # Make sure we have enough time to finish the delegation in one epoch + clusterlib_utils.wait_for_epoch_interval( + cluster_obj=cluster, start=1, stop=common.EPOCH_STOP_SEC_LEDGER_STATE + ) + + clusterlib_utils.build_and_submit_tx( + cluster_obj=cluster, + name_template=temp_template, + src_address=payment_addr.address, + use_build_cmd=True, + tx_files=tx_files, + deposit=deposit_amt, + ) + stake_addr_info = cluster.g_query.get_stake_addr_info(pool_user.stake.address) + assert stake_addr_info.vote_delegation == governance_utils.get_drep_cred_name( + drep_id=drep2.drep_id + ), "Votes are NOT changed to the correct DRep 2" + reqc.cip086.success() + class TestDRepActivity: """Tests for DReps activity.""" diff --git a/cardano_node_tests/tests/tests_conway/test_info.py b/cardano_node_tests/tests/tests_conway/test_info.py index db6f2f902..10c0fd3dc 100644 --- a/cardano_node_tests/tests/tests_conway/test_info.py +++ b/cardano_node_tests/tests/tests_conway/test_info.py @@ -58,12 +58,18 @@ def test_info( * submit an "info" action * vote on the action * check the votes + * check for deposit return """ # pylint: disable=too-many-locals,too-many-statements cluster, governance_data = cluster_use_governance temp_template = common.get_test_id(cluster) action_deposit_amt = cluster.conway_genesis["govActionDeposit"] + # Get initial return account balance + init_return_account_balance = cluster.g_query.get_stake_addr_info( + pool_user_ug.stake.address + ).reward_account_balance + # Create an action rand_str = helpers.get_rand_str(4) @@ -101,6 +107,10 @@ def test_info( ) reqc.cli023.success() + # Get epoch where the action was submitted for keeping track of + # epoch to wait for the gov action expiry + action_epoch = cluster.g_query.get_epoch() + out_utxos_action = cluster.g_query.get_utxo(tx_raw_output=tx_output_action) assert ( clusterlib.filter_utxos(utxos=out_utxos_action, address=pool_user_ug.payment.address)[ @@ -223,6 +233,24 @@ def test_info( ], "Ratification is delayed unexpectedly" reqc.cip038_05.success() + # Check deposit is returned + reqc.cip034ex.start(url=helpers.get_vcs_link()) + + # First wait for gov action to expire according to gov action lifetime + # and epoch passed since + _cur_epoch = cluster.g_query.get_epoch() + action_lifetime_epoch = cluster.conway_genesis["govActionLifetime"] + epochs_to_expiration = action_lifetime_epoch + 2 + action_epoch - _cur_epoch + cluster.wait_for_new_epoch(new_epochs=epochs_to_expiration, padding_seconds=5) + + deposit_returned = cluster.g_query.get_stake_addr_info( + pool_user_ug.stake.address + ).reward_account_balance + assert ( + deposit_returned == init_return_account_balance + action_deposit_amt + ), "Incorrect return account balance" + reqc.cip034ex.success() + # Check action view governance_utils.check_action_view(cluster_obj=cluster, action_data=info_action) diff --git a/cardano_node_tests/tests/tests_conway/test_no_confidence.py b/cardano_node_tests/tests/tests_conway/test_no_confidence.py index 626436d93..55de7cd1b 100644 --- a/cardano_node_tests/tests/tests_conway/test_no_confidence.py +++ b/cardano_node_tests/tests/tests_conway/test_no_confidence.py @@ -333,6 +333,7 @@ def test_no_confidence_action( @allure.link(helpers.get_vcs_link()) @pytest.mark.skipif(not configuration.HAS_CC, reason="Runs only on setup with CC") @pytest.mark.long + @pytest.mark.disabled(reason="Needs to be fixed in 9.0.0+") def test_committee_min_size( self, cluster_manager: cluster_management.ClusterManager, diff --git a/cardano_node_tests/tests/tests_conway/test_pparam_update.py b/cardano_node_tests/tests/tests_conway/test_pparam_update.py index e43b9d7f9..fa36b43ac 100644 --- a/cardano_node_tests/tests/tests_conway/test_pparam_update.py +++ b/cardano_node_tests/tests/tests_conway/test_pparam_update.py @@ -240,18 +240,23 @@ def test_pparam_update( # noqa: C901 * check that the action is enacted * check that only the ratified action that got accepted first to the chain gets enacted * check that it's not possible to vote on enacted action + * check that all deposit required for actions is returned back for both expired + and enacted actions """ # pylint: disable=too-many-locals,too-many-statements cluster, governance_data = cluster_lock_governance temp_template = common.get_test_id(cluster) - cost_proposal_file = DATA_DIR / "cost_models_list.json" - proposal_records = [] + cost_proposal_file = DATA_DIR / "cost_models_list_185_v2_v3.json" db_errors_final = [] is_in_bootstrap = conway_common.is_in_bootstrap(cluster_obj=cluster) if is_in_bootstrap and not configuration.HAS_CC: pytest.skip("The test doesn't work in bootstrap period without CC.") + init_return_account_balance = cluster.g_query.get_stake_addr_info( + pool_user_lg.stake.address + ).reward_account_balance + # Check if total delegated stake is below the threshold. This can be used to check that # undelegated stake is treated as Abstain. If undelegated stake was treated as Yes, than # missing votes would approve the action. @@ -635,13 +640,19 @@ def test_pparam_update( # noqa: C901 gov_state=cluster.g_conway_governance.query.gov_state(), ) + # For keeping track of how many proposals were submitted + # to check for all deposit required for action is returned back + submitted_proposal_count = 0 + def _propose_pparams_update( name_template: str, proposals: tp.List[clusterlib_utils.UpdateProposal], ) -> conway_common.PParamPropRec: anchor_url = f"http://www.pparam-action-{clusterlib.get_rand_str(4)}.com" anchor_data_hash = cluster.g_conway_governance.get_anchor_data_hash(text=anchor_url) - + # Increment count for a submitted proposal + nonlocal submitted_proposal_count + submitted_proposal_count += 1 return conway_common.propose_pparams_update( cluster_obj=cluster, name_template=name_template, @@ -685,7 +696,6 @@ def _check_proposed_pparams( update_proposals=net_nodrep_prop_rec.proposals, protocol_params=net_nodrep_prop_rec.future_pparams, ) - proposal_records.append(net_nodrep_prop_rec) reqc.cip061_04.start(url=_url) @@ -724,7 +734,8 @@ def _check_proposed_pparams( # db-sync check try: dbsync_utils.check_conway_gov_action_proposal_description( - net_nodrep_prop_rec.future_pparams, net_nodrep_prop_rec.action_txid + update_proposal=net_nodrep_prop_rec.future_pparams, + txhash=net_nodrep_prop_rec.action_txid, ) dbsync_utils.check_conway_param_update_proposal(net_nodrep_prop_rec.future_pparams) except AssertionError as exc: @@ -736,7 +747,6 @@ def _check_proposed_pparams( net_nocc_prop_rec = _propose_pparams_update( name_template=f"{temp_template}_net_nocc", proposals=network_g_proposals ) - proposal_records.append(net_nocc_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -761,7 +771,6 @@ def _check_proposed_pparams( update_proposals=eco_nodrep_prop_rec.proposals, protocol_params=eco_nodrep_prop_rec.future_pparams, ) - proposal_records.append(eco_nodrep_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -776,14 +785,15 @@ def _check_proposed_pparams( else True, ) - # db-sync check - try: - dbsync_utils.check_conway_gov_action_proposal_description( - eco_nodrep_prop_rec.future_pparams, eco_nodrep_prop_rec.action_txid - ) - dbsync_utils.check_conway_param_update_proposal(eco_nodrep_prop_rec.future_pparams) - except AssertionError as exc: - db_errors_final.append(f"db-sync economic params update error: {exc}") + # db-sync check + try: + dbsync_utils.check_conway_gov_action_proposal_description( + update_proposal=eco_nodrep_prop_rec.future_pparams, + txhash=eco_nodrep_prop_rec.action_txid, + ) + dbsync_utils.check_conway_param_update_proposal(eco_nodrep_prop_rec.future_pparams) + except AssertionError as exc: + db_errors_final.append(f"db-sync economic params update error: {exc}") # Vote on update proposals from economic group that will NOT get approved by CC if configuration.HAS_CC: @@ -791,7 +801,6 @@ def _check_proposed_pparams( eco_nocc_prop_rec = _propose_pparams_update( name_template=f"{temp_template}_eco_nocc", proposals=eco_nocc_update_proposals ) - proposal_records.append(eco_nocc_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -814,7 +823,6 @@ def _check_proposed_pparams( update_proposals=tech_nodrep_prop_rec.proposals, protocol_params=tech_nodrep_prop_rec.future_pparams, ) - proposal_records.append(tech_nodrep_prop_rec) assert tech_nodrep_prop_rec.proposal_names.isdisjoint( SECURITY_PPARAMS @@ -857,7 +865,8 @@ def _check_proposed_pparams( # db-sync check try: dbsync_utils.check_conway_gov_action_proposal_description( - tech_nodrep_prop_rec.future_pparams, tech_nodrep_prop_rec.action_txid + update_proposal=tech_nodrep_prop_rec.future_pparams, + txhash=tech_nodrep_prop_rec.action_txid, ) dbsync_utils.check_conway_param_update_proposal(tech_nodrep_prop_rec.future_pparams) except AssertionError as exc: @@ -868,7 +877,6 @@ def _check_proposed_pparams( tech_nocc_prop_rec = _propose_pparams_update( name_template=f"{temp_template}_tech_nocc", proposals=technical_g_proposals ) - proposal_records.append(tech_nocc_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -895,7 +903,6 @@ def _check_proposed_pparams( update_proposals=sec_nonespo_prop_rec.proposals, protocol_params=sec_nonespo_prop_rec.future_pparams, ) - proposal_records.append(sec_nonespo_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -913,7 +920,6 @@ def _check_proposed_pparams( sec_nospo_prop_rec = _propose_pparams_update( name_template=f"{temp_template}_sec_nospo", proposals=security_proposals ) - proposal_records.append(sec_nospo_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -936,7 +942,6 @@ def _check_proposed_pparams( update_proposals=gov_nodrep_prop_rec.proposals, protocol_params=gov_nodrep_prop_rec.future_pparams, ) - proposal_records.append(gov_nodrep_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -951,14 +956,15 @@ def _check_proposed_pparams( else True, ) - # db-sync check - try: - dbsync_utils.check_conway_gov_action_proposal_description( - gov_nodrep_prop_rec.future_pparams, gov_nodrep_prop_rec.action_txid - ) - dbsync_utils.check_conway_param_update_proposal(gov_nodrep_prop_rec.future_pparams) - except AssertionError as exc: - db_errors_final.append(f"db-sync governance params update error: {exc}") + # db-sync check + try: + dbsync_utils.check_conway_gov_action_proposal_description( + update_proposal=gov_nodrep_prop_rec.future_pparams, + txhash=gov_nodrep_prop_rec.action_txid, + ) + dbsync_utils.check_conway_param_update_proposal(gov_nodrep_prop_rec.future_pparams) + except AssertionError as exc: + db_errors_final.append(f"db-sync governance params update error: {exc}") # Vote on update proposals from governance group that will NOT get approved by CC if configuration.HAS_CC: @@ -966,7 +972,6 @@ def _check_proposed_pparams( gov_nocc_prop_rec = _propose_pparams_update( name_template=f"{temp_template}_gov_nocc", proposals=gov_nocc_update_proposals ) - proposal_records.append(gov_nocc_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -1000,7 +1005,6 @@ def _check_proposed_pparams( update_proposals=mix_nodrep_prop_rec.proposals, protocol_params=mix_nodrep_prop_rec.future_pparams, ) - proposal_records.append(mix_nodrep_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -1015,14 +1019,15 @@ def _check_proposed_pparams( else True, ) - # db-sync check - try: - dbsync_utils.check_conway_gov_action_proposal_description( - mix_nodrep_prop_rec.future_pparams, mix_nodrep_prop_rec.action_txid - ) - dbsync_utils.check_conway_param_update_proposal(mix_nodrep_prop_rec.future_pparams) - except AssertionError as exc: - db_errors_final.append(f"db-sync mixed group params update error: {exc}") + # db-sync check + try: + dbsync_utils.check_conway_gov_action_proposal_description( + update_proposal=mix_nodrep_prop_rec.future_pparams, + txhash=mix_nodrep_prop_rec.action_txid, + ) + dbsync_utils.check_conway_param_update_proposal(mix_nodrep_prop_rec.future_pparams) + except AssertionError as exc: + db_errors_final.append(f"db-sync mixed group params update error: {exc}") # Vote on update proposals from mix of groups that will NOT get approved by CC if configuration.HAS_CC: @@ -1043,7 +1048,6 @@ def _check_proposed_pparams( update_proposals=mix_nocc_prop_rec.proposals, protocol_params=mix_nocc_prop_rec.future_pparams, ) - proposal_records.append(mix_nocc_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -1067,7 +1071,6 @@ def _check_proposed_pparams( update_proposals=fin_prop_rec.proposals, protocol_params=fin_prop_rec.future_pparams, ) - proposal_records.append(fin_prop_rec) # Vote & disapprove the action conway_common.cast_vote( @@ -1102,7 +1105,7 @@ def _check_proposed_pparams( [r.start(url=_url) for r in (reqc.cip080, reqc.cip081, reqc.cip082, reqc.cip083)] try: dbsync_utils.check_conway_gov_action_proposal_description( - fin_prop_rec.future_pparams, fin_prop_rec.action_txid + update_proposal=fin_prop_rec.future_pparams, txhash=fin_prop_rec.action_txid ) dbsync_utils.check_conway_param_update_proposal(fin_prop_rec.future_pparams) except AssertionError as exc: @@ -1123,11 +1126,14 @@ def _check_proposed_pparams( mix_approved_prop_rec = _propose_pparams_update( name_template=f"{temp_template}_mix_approved", proposals=mix_approved_update_proposals ) + # Get epoch where the last action was submitted for keeping track of + # epoch to wait for all the gov actions expiry + last_action_epoch = cluster.g_query.get_epoch() + _check_proposed_pparams( update_proposals=mix_approved_prop_rec.proposals, protocol_params=mix_approved_prop_rec.future_pparams, ) - proposal_records.append(mix_approved_prop_rec) conway_common.cast_vote( cluster_obj=cluster, governance_data=governance_data, @@ -1248,15 +1254,37 @@ def _check_state(state: dict): err_str = str(excinfo.value) assert "(GovActionsDoNotExist" in err_str, err_str + # Check deposit return for both after enactment and expiration + _url = helpers.get_vcs_link() + [r.start(url=_url) for r in (reqc.cip034ex, reqc.cip034en)] + + # First wait to ensure that all proposals are expired/enacted for deposit to be retuned + _cur_epoch = cluster.g_query.get_epoch() + action_lifetime_epoch = cluster.conway_genesis["govActionLifetime"] + epochs_to_expiration = action_lifetime_epoch + last_action_epoch - _cur_epoch + cluster.wait_for_new_epoch(new_epochs=epochs_to_expiration, padding_seconds=5) + + deposit_amt = cluster.conway_genesis["govActionDeposit"] + total_deposit_return = cluster.g_query.get_stake_addr_info( + pool_user_lg.stake.address + ).reward_account_balance + # Check total deposit return accounting for both expired and enacted actions + assert ( + total_deposit_return + == init_return_account_balance + deposit_amt * submitted_proposal_count + ), "Incorrect return account balance" + [r.success() for r in (reqc.cip034ex, reqc.cip034en)] + # Check vote view if fin_voted_votes.cc: governance_utils.check_vote_view(cluster_obj=cluster, vote_data=fin_voted_votes.cc[0]) if fin_voted_votes.drep: governance_utils.check_vote_view(cluster_obj=cluster, vote_data=fin_voted_votes.drep[0]) - issued_props_num = len(proposal_records) try: - dbsync_utils.check_proposal_refunds(pool_user_lg.stake.address, issued_props_num) + dbsync_utils.check_proposal_refunds( + pool_user_lg.stake.address, submitted_proposal_count + ) except AssertionError as exc: db_errors_final.append(f"db-sync proposal refunds error: {exc}") diff --git a/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py b/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py index 05f73739a..903ffa8b5 100644 --- a/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py +++ b/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py @@ -15,6 +15,7 @@ from cardano_node_tests.tests.tests_conway import conway_common from cardano_node_tests.utils import clusterlib_utils from cardano_node_tests.utils import configuration +from cardano_node_tests.utils import dbsync_utils from cardano_node_tests.utils import governance_utils from cardano_node_tests.utils import helpers from cardano_node_tests.utils import submit_utils @@ -354,6 +355,17 @@ def _cast_vote( governance_utils.check_vote_view(cluster_obj=cluster, vote_data=voted_votes.cc[0]) governance_utils.check_vote_view(cluster_obj=cluster, vote_data=voted_votes.drep[0]) + reqc.cip084.start(url=helpers.get_vcs_link()) + # Check dbsync + dbsync_utils.check_treasury_withdrawal( + actions_num=actions_num, + stake_address=recv_stake_addr_rec.address, + transfer_amt=transfer_amt, + txhash=action_txid, + ) + + reqc.cip084.success() + if xfail_ledger_3979_msgs: ledger_3979 = issues.ledger_3979.copy() ledger_3979.message = " ;".join(xfail_ledger_3979_msgs) diff --git a/cardano_node_tests/tests/tests_conway/test_update_plutusv2_builtins.py b/cardano_node_tests/tests/tests_conway/test_update_plutusv2_builtins.py new file mode 100644 index 000000000..6c2b7620d --- /dev/null +++ b/cardano_node_tests/tests/tests_conway/test_update_plutusv2_builtins.py @@ -0,0 +1,176 @@ +"""Tests for updating PlutusV2 built-ins in Conway.""" + +import logging +import pathlib as pl +import typing as tp + +import allure +import pytest +from cardano_clusterlib import clusterlib + +from cardano_node_tests.cluster_management import cluster_management +from cardano_node_tests.tests import common +from cardano_node_tests.tests.tests_conway import conway_common +from cardano_node_tests.tests.tests_plutus_v2 import mint_raw +from cardano_node_tests.utils import clusterlib_utils +from cardano_node_tests.utils import configuration +from cardano_node_tests.utils import governance_utils +from cardano_node_tests.utils import helpers +from cardano_node_tests.utils.versions import VERSIONS + +LOGGER = logging.getLogger(__name__) +DATA_DIR = pl.Path(__file__).parent.parent / "data" + +pytestmark = pytest.mark.skipif( + VERSIONS.transaction_era < VERSIONS.CONWAY, + reason="runs only with Tx era >= Conway", +) + + +@pytest.fixture +def pool_user_lg( + cluster_manager: cluster_management.ClusterManager, + cluster_lock_governance: governance_utils.GovClusterT, +) -> clusterlib.PoolUser: + """Create a pool user for "lock governance".""" + cluster, __ = cluster_lock_governance + key = helpers.get_current_line_str() + name_template = common.get_test_id(cluster) + return conway_common.get_registered_pool_user( + cluster_manager=cluster_manager, + name_template=name_template, + cluster_obj=cluster, + caching_key=key, + fund_amount=2000_000_000, + ) + + +@pytest.fixture +def payment_addrs_lg( + cluster_manager: cluster_management.ClusterManager, + cluster_lock_governance: governance_utils.GovClusterT, +) -> tp.List[clusterlib.AddressRecord]: + """Create new payment address.""" + cluster, __ = cluster_lock_governance + test_id = common.get_test_id(cluster) + addrs = clusterlib_utils.create_payment_addr_records( + *[f"{test_id}_payment_addr_{i}" for i in range(2)], + cluster_obj=cluster, + ) + + # fund source address + clusterlib_utils.fund_from_faucet( + addrs[0], + cluster_obj=cluster, + faucet_data=cluster_manager.cache.addrs_data["user1"], + amount=3_000_000_000, + ) + + return addrs + + +class TestUpdateBuiltIns: + """Tests for updating PlutusV2 built-ins.""" + + @allure.link(helpers.get_vcs_link()) + @pytest.mark.skipif(not configuration.HAS_CC, reason="Runs only on setup with CC") + @pytest.mark.long + @pytest.mark.upgrade + def test_update_in_pv9( + self, + cluster_lock_governance: governance_utils.GovClusterT, + payment_addrs_lg: tp.List[clusterlib.AddressRecord], + pool_user_lg: clusterlib.PoolUser, + ): + """Test updating PlutusV2 cost model in PV9. + + Checks behavior with PlutusV2 script that uses built-ins added from PlutusV3. + So far the new built-ins are enabled only in PV10, and are expected to fail in PV9. + + * check that Plutus script fails as expected in PV9 + * update the PlutusV2 cost model + * check again that the Plutus script fails as expected in PV9 + """ + cluster, governance_data = cluster_lock_governance + temp_template = common.get_test_id(cluster) + + if not conway_common.is_in_bootstrap(cluster_obj=cluster): + pytest.skip("Can run only during bootstrap period.") + + cost_proposal_file = DATA_DIR / "cost_models_list_185_v2_v3.json" + + def _update_cost_model() -> None: + anchor_url = "http://www.update-cost-model.com" + anchor_data_hash = "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d" + _name_template = f"{temp_template}_cost_model" + + update_proposals = [ + clusterlib_utils.UpdateProposal( + arg="--cost-model-file", + value=str(cost_proposal_file), + name="", # costModels + ) + ] + + cost_model_proposal = conway_common.propose_pparams_update( + cluster_obj=cluster, + name_template=_name_template, + anchor_url=anchor_url, + anchor_data_hash=anchor_data_hash, + pool_user=pool_user_lg, + proposals=update_proposals, + ) + + # Vote & approve the action + conway_common.cast_vote( + cluster_obj=cluster, + governance_data=governance_data, + name_template=f"{_name_template}_yes", + payment_addr=pool_user_lg.payment, + action_txid=cost_model_proposal.action_txid, + action_ix=cost_model_proposal.action_ix, + approve_cc=True, + ) + + # Wait for ratification + _cur_epoch = cluster.wait_for_new_epoch(padding_seconds=5) + rat_gov_state = cluster.g_conway_governance.query.gov_state() + conway_common.save_gov_state( + gov_state=rat_gov_state, name_template=f"{_name_template}_{_cur_epoch}" + ) + rat_action = governance_utils.lookup_ratified_actions( + gov_state=rat_gov_state, + action_txid=cost_model_proposal.action_txid, + action_ix=cost_model_proposal.action_ix, + ) + assert rat_action, "Action not found in ratified actions" + + # Wait for enactment + _cur_epoch = cluster.wait_for_new_epoch(padding_seconds=5) + enact_gov_state = cluster.g_conway_governance.query.gov_state() + conway_common.save_gov_state( + gov_state=enact_gov_state, name_template=f"{temp_template}_enact_{_cur_epoch}" + ) + pparams = ( + enact_gov_state.get("curPParams") or enact_gov_state.get("currentPParams") or {} + ) + assert len(pparams["costModels"]["PlutusV2"]) == 185 + + # Check that Plutus script fails as expected in PV9 + mint_raw.check_missing_builtin( + cluster_obj=cluster, + temp_template=temp_template, + payment_addr=payment_addrs_lg[0], + issuer_addr=payment_addrs_lg[1], + ) + + # Update the PlutusV2 cost model + _update_cost_model() + + # Check again that the Plutus script fails as expected in PV9 + mint_raw.check_missing_builtin( + cluster_obj=cluster, + temp_template=temp_template, + payment_addr=payment_addrs_lg[0], + issuer_addr=payment_addrs_lg[1], + ) diff --git a/cardano_node_tests/tests/tests_plutus/test_delegation.py b/cardano_node_tests/tests/tests_plutus/test_delegation.py index 2c1f3e433..61bd9c723 100644 --- a/cardano_node_tests/tests/tests_plutus/test_delegation.py +++ b/cardano_node_tests/tests/tests_plutus/test_delegation.py @@ -785,7 +785,11 @@ def test_delegate_deregister( # noqa: C901 or "points to a script hash that is not known" in str_exc ): issues.cli_297.finish_test() - if use_build_cmd and "overspent budget" in str_exc: + if ( + use_build_cmd + and "overspent budget" in str_exc + and VERSIONS.transaction_era >= VERSIONS.CONWAY + ): issues.cli_650.finish_test() raise diff --git a/cardano_node_tests/tests/tests_plutus_v2/mint_raw.py b/cardano_node_tests/tests/tests_plutus_v2/mint_raw.py index c2f178f11..eca56fb63 100644 --- a/cardano_node_tests/tests/tests_plutus_v2/mint_raw.py +++ b/cardano_node_tests/tests/tests_plutus_v2/mint_raw.py @@ -2,13 +2,10 @@ import pathlib as pl import typing as tp -import pytest from cardano_clusterlib import clusterlib -from cardano_node_tests.cluster_management import cluster_management from cardano_node_tests.tests import common from cardano_node_tests.tests import plutus_common -from cardano_node_tests.utils import clusterlib_utils LOGGER = logging.getLogger(__name__) @@ -16,29 +13,6 @@ FEE_MINT_TXSIZE = 400_000 -@pytest.fixture -def payment_addrs( - cluster_manager: cluster_management.ClusterManager, - cluster: clusterlib.ClusterLib, -) -> tp.List[clusterlib.AddressRecord]: - """Create new payment address.""" - test_id = common.get_test_id(cluster) - addrs = clusterlib_utils.create_payment_addr_records( - *[f"{test_id}_payment_addr_{i}" for i in range(2)], - cluster_obj=cluster, - ) - - # fund source address - clusterlib_utils.fund_from_faucet( - addrs[0], - cluster_obj=cluster, - faucet_data=cluster_manager.cache.addrs_data["user1"], - amount=3_000_000_000, - ) - - return addrs - - def _fund_issuer( cluster_obj: clusterlib.ClusterLib, temp_template: str, @@ -132,3 +106,113 @@ def _fund_issuer( ] return mint_utxos, collateral_utxos, reference_utxo, tx_raw_output + + +def check_missing_builtin( + cluster_obj: clusterlib.ClusterLib, + temp_template: str, + payment_addr: clusterlib.AddressRecord, + issuer_addr: clusterlib.AddressRecord, +): + """Check builtins added to PlutusV2 from PlutusV3.""" + lovelace_amount = 2_000_000 + token_amount = 5 + fee_txsize = 600_000 + + plutus_v_record = plutus_common.BYTE_STRING_ROUNDTRIP_V2_REC + + minting_cost = plutus_common.compute_cost( + execution_cost=plutus_v_record.execution_cost, + protocol_params=cluster_obj.g_query.get_protocol_params(), + ) + + # Step 1: fund the token issuer + + mint_utxos, collateral_utxos, __, tx_raw_output_step1 = _fund_issuer( + cluster_obj=cluster_obj, + temp_template=temp_template, + payment_addr=payment_addr, + issuer_addr=issuer_addr, + minting_cost=minting_cost, + amount=lovelace_amount, + fee_txsize=fee_txsize, + ) + + issuer_fund_balance = cluster_obj.g_query.get_address_balance(issuer_addr.address) + + # Step 2: mint the "qacoin" + + policyid = cluster_obj.g_transaction.get_policyid(plutus_v_record.script_file) + asset_name_a = f"qacoina{clusterlib.get_rand_str(4)}".encode().hex() + token_a = f"{policyid}.{asset_name_a}" + mint_txouts = [ + clusterlib.TxOut(address=issuer_addr.address, amount=token_amount, coin=token_a), + ] + + plutus_mint_data = [ + clusterlib.Mint( + txouts=mint_txouts, + script_file=plutus_v_record.script_file, + collaterals=collateral_utxos, + execution_units=( + plutus_v_record.execution_cost.per_time, + plutus_v_record.execution_cost.per_space, + ), + redeemer_value="3735928559", + ) + ] + + tx_files_step2 = clusterlib.TxFiles( + signing_key_files=[issuer_addr.skey_file], + ) + txouts_step2 = [ + clusterlib.TxOut(address=issuer_addr.address, amount=lovelace_amount), + *mint_txouts, + ] + tx_raw_output_step2 = cluster_obj.g_transaction.build_raw_tx_bare( + out_file=f"{temp_template}_step2_tx.body", + txins=mint_utxos, + txouts=txouts_step2, + mint=plutus_mint_data, + tx_files=tx_files_step2, + fee=minting_cost.fee + fee_txsize, + ) + tx_signed_step2 = cluster_obj.g_transaction.sign_tx( + tx_body_file=tx_raw_output_step2.out_file, + signing_key_files=tx_files_step2.signing_key_files, + tx_name=f"{temp_template}_step2", + ) + + err = "" + try: + cluster_obj.g_transaction.submit_tx(tx_file=tx_signed_step2, txins=mint_utxos) + except clusterlib.CLIError as excp: + err = str(excp) + + def _check_txout() -> None: + assert ( + cluster_obj.g_query.get_address_balance(issuer_addr.address) + == issuer_fund_balance - tx_raw_output_step2.fee + ), f"Incorrect balance for token issuer address `{issuer_addr.address}`" + + out_utxos = cluster_obj.g_query.get_utxo(tx_raw_output=tx_raw_output_step2) + + token_utxo_a = clusterlib.filter_utxos( + utxos=out_utxos, address=issuer_addr.address, coin=token_a + ) + assert ( + token_utxo_a and token_utxo_a[0].amount == token_amount + ), "The 'token a' was not minted" + + common.check_missing_utxos(cluster_obj=cluster_obj, utxos=out_utxos) + + prot_params = cluster_obj.g_query.get_protocol_params() + prot_ver = prot_params["protocolVersion"]["major"] + cost_model_len = len(prot_params["costModels"]["PlutusV2"]) + + if prot_ver < 10: + assert "(MalformedScriptWitnesses" in err, err + elif cost_model_len < 185: + assert "overspending the budget" in err, err + else: + _check_txout() diff --git a/cardano_node_tests/tests/tests_plutus_v2/test_mint_raw.py b/cardano_node_tests/tests/tests_plutus_v2/test_mint_raw.py index 0bd916940..33123a645 100644 --- a/cardano_node_tests/tests/tests_plutus_v2/test_mint_raw.py +++ b/cardano_node_tests/tests/tests_plutus_v2/test_mint_raw.py @@ -384,3 +384,26 @@ def test_datum_hash_visibility( assert not reference_utxo or cluster.g_query.get_utxo( utxo=reference_utxo ), "Reference UTxO was spent" + + @allure.link(helpers.get_vcs_link()) + def test_missing_builtin( + self, + cluster: clusterlib.ClusterLib, + payment_addrs: tp.List[clusterlib.AddressRecord], + ): + """Test builtins added to PlutusV2 from PlutusV3. + + * fund the token issuer and create a UTxO for collateral + * check that the expected amount was transferred to token issuer's address + * try to mint the tokens using a Plutus script + * check that the tokens were minted and collateral UTxO was not spent + -OR- + check the expected failure + """ + temp_template = common.get_test_id(cluster) + mint_raw.check_missing_builtin( + cluster_obj=cluster, + temp_template=temp_template, + payment_addr=payment_addrs[0], + issuer_addr=payment_addrs[1], + ) diff --git a/cardano_node_tests/utils/dbsync_queries.py b/cardano_node_tests/utils/dbsync_queries.py index 5b05742b0..2474a09e1 100644 --- a/cardano_node_tests/utils/dbsync_queries.py +++ b/cardano_node_tests/utils/dbsync_queries.py @@ -496,6 +496,31 @@ class VotingProcedureDBRow: vote: str +@dataclasses.dataclass(frozen=True) +class NewCommitteeInfoDBRow: + # pylint: disable-next=invalid-name + id: int + quorum_numerator: str + quorum_denominator: int + + +@dataclasses.dataclass(frozen=True) +class NewCommitteeMemberDBRow: + # pylint: disable-next=invalid-name + gov_id: int + committee_hash_id: str + expiration_epoch: int + + +@dataclasses.dataclass(frozen=True) +class TreasuryWithdrawalDBRow: + # pylint: disable-next=invalid-name + expiration: int + enacted_epoch: int + addr_view: str + amount: int + + @contextlib.contextmanager def execute(query: str, vars: tp.Sequence = ()) -> tp.Iterator[psycopg2.extensions.cursor]: # pylint: disable=redefined-builtin @@ -1254,3 +1279,50 @@ def query_voting_procedure(txhash: str) -> tp.Generator[VotingProcedureDBRow, No with execute(query=query, vars=(rf"\x{txhash}",)) as cur: while (result := cur.fetchone()) is not None: yield VotingProcedureDBRow(*result) + + +def query_new_committee_info(txhash: str) -> tp.Generator[NewCommitteeInfoDBRow, None, None]: + """Query new committee proposed in db-sync.""" + query = ( + "SELECT" + " committee.id, committee.quorum_numerator, committee.quorum_denominator " + "FROM committee " + "INNER JOIN gov_action_proposal as gap ON gap.id = committee.gov_action_proposal_id " + "INNER JOIN tx ON tx.id = gap.tx_id " + "WHERE tx.hash = %s;" + ) + + with execute(query=query, vars=(rf"\x{txhash}",)) as cur: + while (result := cur.fetchone()) is not None: + yield NewCommitteeInfoDBRow(*result) + + +def query_committee_members(committee_id: int) -> tp.Generator[NewCommitteeMemberDBRow, None, None]: + """Query committee members in db-sync.""" + query = ( + "SELECT" + " cm.id, cm.committee_hash_id, cm.expiration_epoch " + "FROM committee_member as cm " + "WHERE cm.committee_id = %s;" + ) + + with execute(query=query, vars=(committee_id,)) as cur: + while (result := cur.fetchone()) is not None: + yield NewCommitteeMemberDBRow(*result) + + +def query_treasury_withdrawal(txhash: str) -> tp.Generator[TreasuryWithdrawalDBRow, None, None]: + """Query treasury_withdrawal table in db-sync.""" + query = ( + "SELECT" + " gap.expiration, gap.enacted_epoch, stake_address.view, treasury_withdrawal.amount " + "FROM gov_action_proposal as gap " + "INNER JOIN treasury_withdrawal ON treasury_withdrawal.gov_action_proposal_id = gap.id " + "INNER JOIN stake_address ON treasury_withdrawal.stake_address_id = stake_address.id " + "INNER JOIN tx ON tx.id = gap.tx_id " + "WHERE tx.hash = %s;" + ) + + with execute(query=query, vars=(rf"\x{txhash}",)) as cur: + while (result := cur.fetchone()) is not None: + yield TreasuryWithdrawalDBRow(*result) diff --git a/cardano_node_tests/utils/dbsync_utils.py b/cardano_node_tests/utils/dbsync_utils.py index c16905221..0b6df77a1 100644 --- a/cardano_node_tests/utils/dbsync_utils.py +++ b/cardano_node_tests/utils/dbsync_utils.py @@ -1195,3 +1195,46 @@ def check_votes(votes: governance_utils.VotedVotes, txhash: str) -> None: dbsync_votes_by_role[d_vote.voter_role].append(d_vote.vote.upper()) assert expected_votes_by_role == dbsync_votes_by_role, "Votes didn't match in dbsync" + + +def check_committee_info(gov_state: dict, txid: str) -> None: + """Check committee info in db-sync.""" + if not configuration.HAS_DBSYNC: + return + + prop = governance_utils.lookup_proposal(gov_state=gov_state, action_txid=txid) + + # Check dbsync + dbsync_committee_threshold = list(dbsync_queries.query_new_committee_info(txhash=txid)) + assert ( + dbsync_committee_threshold[0].quorum_denominator == 3 + ), "Incorrect committee threshold denominator in dbsync" + assert ( + dbsync_committee_threshold[0].quorum_numerator == 2 + ), "Incorrect committee threshold numerator in dbsync" + + dbsync_committee_members = list( + dbsync_queries.query_committee_members(committee_id=dbsync_committee_threshold[0].id) + ) + size_of_proposed_cm = len(prop["proposalProcedure"]["govAction"]["contents"][2]) + len( + gov_state["committee"]["members"] + ) + assert ( + len(dbsync_committee_members) == size_of_proposed_cm + ), "The number of committee members doesn't match in dbsync" + + +def check_treasury_withdrawal( + actions_num: int, stake_address: str, transfer_amt: int, txhash: str +) -> None: + """Check treasury_withdrawal in db-sync.""" + if not configuration.HAS_DBSYNC: + return + + dbsync_data = list(dbsync_queries.query_treasury_withdrawal(txhash=txhash)) + assert len(dbsync_data) == actions_num + + for entry in dbsync_data: + assert entry.addr_view == stake_address, "Wrong stake address on dbsync" + assert entry.amount == transfer_amt, "Wrong transfer amount in dbsync" + assert entry.enacted_epoch, "Action not marked as enacted in dbsync" diff --git a/cardano_node_tests/utils/governance_setup.py b/cardano_node_tests/utils/governance_setup.py index 49924d0be..8158469b4 100644 --- a/cardano_node_tests/utils/governance_setup.py +++ b/cardano_node_tests/utils/governance_setup.py @@ -271,7 +271,7 @@ def refresh_cc_keys( cc_members: tp.List[clusterlib.CCMember], governance_data: governance_utils.GovernanceRecords, ) -> governance_utils.GovernanceRecords: - """Refresh ho certs for original CC members.""" + """Refresh hot certs for original CC members.""" gov_data_dir = pl.Path(cc_members[0].hot_vkey_file).parent new_cc_members = [] diff --git a/pyproject.toml b/pyproject.toml index 88089ae4f..1f461dad1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,4 +134,5 @@ markers = [ "smoke: fast test(s) under 1 minute", "upgrade: test(s) for upgrade testing", "plutus: test(s) for plutus", + "disabled: temporarily disabled test(s)", ] diff --git a/src_docs/source/test_results/node/tag_9_0_0.rst b/src_docs/source/test_results/node/tag_9_0_0.rst new file mode 100644 index 000000000..37307b10e --- /dev/null +++ b/src_docs/source/test_results/node/tag_9_0_0.rst @@ -0,0 +1,91 @@ +9.0.0 +===== + +* Release notes - +* Tag commits - + + +Regression testing on a local cluster +------------------------------------- + +.. list-table:: Regression Testsuite + :widths: 64 7 + :header-rows: 0 + + * - P2P ON - `Babbage with Babbage TX `__ + - |:heavy_check_mark:| + * - P2P OFF - `Babbage with default (Babbage) TX `__ + - |:heavy_check_mark:| + * - Mix P2P and Legacy - `Babbage with default (Babbage) TX `__ + - |:heavy_check_mark:| + * - P2P ON - Conway PV9 + - |:heavy_check_mark:| \* + * - P2P ON - Conway PV10 + - |:heavy_check_mark:| \* + +\* - Node functionality is ok |:heavy_check_mark:|, however testing results were affected by `cardano-cli issue #825 `__ + +.. list-table:: Other Testing + :widths: 64 7 + :header-rows: 0 + + * - Upgrade testing (8.12.2 to 9.0.0) + - |:heavy_check_mark:| + * - Rollback testing + - |:heavy_check_mark:| + * - Reconnection testing + - |:heavy_check_mark:| + * - Block production testing on network with 10 pools, 5 of them P2P, 5 of them Legacy - `results (sqlite db) `__ + - |:heavy_check_mark:| + * - Sanity checks of the submit-api REST service + - |:heavy_check_mark:| + * - P2P Dynamic Block Production testing + - |:heavy_check_mark:| + + +Release testing checklist +------------------------- + +.. list-table:: + :widths: 64 7 + :header-rows: 0 + + * - `9.0.0` pushed to `shelley-qa` + - |:heavy_check_mark:| + * - `9.0.0` pushed to `preview` + - |:hourglass_flowing_sand:| + * - Grafana metrics OK + - |:hourglass_flowing_sand:| + * - Regression testing against `shelley-qa` + - |:heavy_check_mark:| + * - Regression testing against `preview` + - |:hourglass_flowing_sand:| + * - `Sync testing ran against shelley_qa & Preview & Preprod & Mainnet (Windows, Linux, macOS) `__ + - |:heavy_check_mark:| + * - DB re-validation testing (ledger snapshots compatibility) + - |:heavy_check_mark:| + * - Backward compatibility testing (Node with version N-1) + - |:heavy_check_mark:| + * - Check build instructions changes + - |:heavy_check_mark:| + + +New functionalities in this tag +------------------------------- + + +Known issues +------------ + +* `Up-to-date list of existing issues `__ +* `The build command calculates insufficient Plutus script cost in Conway `__ + + +New issues +---------- + +* `Build cmd is populating currentTreasuryValue on every TX. It should not. `__ + + +Breaking changes +---------------- diff --git a/src_docs/source/test_results/tag_tests.rst b/src_docs/source/test_results/tag_tests.rst index 0416ae15c..476a5441c 100644 --- a/src_docs/source/test_results/tag_tests.rst +++ b/src_docs/source/test_results/tag_tests.rst @@ -4,6 +4,7 @@ Tag Testing .. toctree:: :maxdepth: 4 + node/tag_9_0_0.rst node/tag_8_11_0.rst node/tag_8_9_3.rst node/tag_8_9_1.rst