Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cardano_node_tests/tests/tests_conway/test_pparam_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,8 @@ def _check_proposed_pparams(
)
fin_approve_epoch = cluster.g_query.get_epoch()

assert not cluster.g_query.get_future_pparams(), "Future pparams should be empty"

# db-sync check
[r.start(url=_url) for r in (reqc.cip080, reqc.cip081, reqc.cip082, reqc.cip083)]
try:
Expand Down Expand Up @@ -1194,7 +1196,7 @@ def _check_proposed_pparams(
)

def _check_state(state: dict):
pparams = state.get("curPParams") or state.get("currentPParams") or {}
pparams = state.get("curPParams") or state.get("currentPParams") or state or {}
clusterlib_utils.check_updated_params(
update_proposals=fin_update_proposals, protocol_params=pparams
)
Expand All @@ -1213,7 +1215,6 @@ def _check_state(state: dict):
gov_state=rat_gov_state, action_txid=fin_prop_rec.action_txid
)
assert rat_action, "Action not found in ratified actions"

# Disapprove ratified action, the voting shouldn't have any effect
conway_common.cast_vote(
cluster_obj=cluster,
Expand All @@ -1228,6 +1229,7 @@ def _check_state(state: dict):

next_rat_state = rat_gov_state["nextRatifyState"]
_check_state(next_rat_state["nextEnactState"])
_check_state(cluster.g_query.get_future_pparams())
reqc.cip038_04.start(url=helpers.get_vcs_link())
assert not next_rat_state["ratificationDelayed"], "Ratification is delayed unexpectedly"
reqc.cip038_04.success()
Expand Down Expand Up @@ -1282,6 +1284,8 @@ def _check_state(state: dict):
if is_spo_total_below_threshold:
reqc.cip064_04.success()

assert not cluster.g_query.get_future_pparams(), "Future pparams should be empty"

# db-sync check
try:
reqc.db024.start(url=helpers.get_vcs_link())
Expand Down
4 changes: 4 additions & 0 deletions cardano_node_tests/utils/clusterlib_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@ def _get_param(key: str) -> tp.Any:

def check_updated_params(*, update_proposals: list[UpdateProposal], protocol_params: dict) -> None:
"""Compare update proposals with actual protocol parameters."""
if not protocol_params:
msg = "Protocol parameters dictionary is empty!"
raise ValueError(msg)

failures = []
for u in update_proposals:
if u.check_func:
Expand Down
9 changes: 5 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ packages = [{include = "cardano_node_tests"}]
[tool.poetry.dependencies]
python = ">=3.11,<4.0"
allure-pytest = "^2.14.3"
cardano-clusterlib = "^0.9.6"
cardano-clusterlib = "^0.9.7"
cbor2 = "^5.6.5"
filelock = "^3.18.0"
hypothesis = "^6.135.17"
Expand Down
Loading