Skip to content
Closed
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
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have this clusterlib_utils.check_updated_params function for comparing pparams dict with update proposal. We can re-use it also for checking future pparams query output.

)
Expand Down Expand Up @@ -1228,6 +1230,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 +1285,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 @@ -642,6 +642,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
Loading