Skip to content

Commit f30d1ed

Browse files
authored
Merge pull request #3169 from IntersectMBO/future_pparam
future pparam inclusion
2 parents f48ad28 + 452b44b commit f30d1ed

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

cardano_node_tests/tests/tests_conway/test_pparam_update.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,8 @@ def _check_proposed_pparams(
11451145
)
11461146
fin_approve_epoch = cluster.g_query.get_epoch()
11471147

1148+
assert not cluster.g_query.get_future_pparams(), "Future pparams should be empty"
1149+
11481150
# db-sync check
11491151
[r.start(url=_url) for r in (reqc.cip080, reqc.cip081, reqc.cip082, reqc.cip083)]
11501152
try:
@@ -1194,7 +1196,7 @@ def _check_proposed_pparams(
11941196
)
11951197

11961198
def _check_state(state: dict):
1197-
pparams = state.get("curPParams") or state.get("currentPParams") or {}
1199+
pparams = state.get("curPParams") or state.get("currentPParams") or state or {}
11981200
clusterlib_utils.check_updated_params(
11991201
update_proposals=fin_update_proposals, protocol_params=pparams
12001202
)
@@ -1213,7 +1215,6 @@ def _check_state(state: dict):
12131215
gov_state=rat_gov_state, action_txid=fin_prop_rec.action_txid
12141216
)
12151217
assert rat_action, "Action not found in ratified actions"
1216-
12171218
# Disapprove ratified action, the voting shouldn't have any effect
12181219
conway_common.cast_vote(
12191220
cluster_obj=cluster,
@@ -1228,6 +1229,7 @@ def _check_state(state: dict):
12281229

12291230
next_rat_state = rat_gov_state["nextRatifyState"]
12301231
_check_state(next_rat_state["nextEnactState"])
1232+
_check_state(cluster.g_query.get_future_pparams())
12311233
reqc.cip038_04.start(url=helpers.get_vcs_link())
12321234
assert not next_rat_state["ratificationDelayed"], "Ratification is delayed unexpectedly"
12331235
reqc.cip038_04.success()
@@ -1282,6 +1284,8 @@ def _check_state(state: dict):
12821284
if is_spo_total_below_threshold:
12831285
reqc.cip064_04.success()
12841286

1287+
assert not cluster.g_query.get_future_pparams(), "Future pparams should be empty"
1288+
12851289
# db-sync check
12861290
try:
12871291
reqc.db024.start(url=helpers.get_vcs_link())

cardano_node_tests/utils/clusterlib_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,10 @@ def _get_param(key: str) -> tp.Any:
638638

639639
def check_updated_params(*, update_proposals: list[UpdateProposal], protocol_params: dict) -> None:
640640
"""Compare update proposals with actual protocol parameters."""
641+
if not protocol_params:
642+
msg = "Protocol parameters dictionary is empty!"
643+
raise ValueError(msg)
644+
641645
failures = []
642646
for u in update_proposals:
643647
if u.check_func:

poetry.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ packages = [{include = "cardano_node_tests"}]
2626
[tool.poetry.dependencies]
2727
python = ">=3.11,<4.0"
2828
allure-pytest = "^2.14.3"
29-
cardano-clusterlib = "^0.9.6"
29+
cardano-clusterlib = "^0.9.7"
3030
cbor2 = "^5.6.5"
3131
filelock = "^3.18.0"
3232
hypothesis = "^6.135.17"

0 commit comments

Comments
 (0)