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
6 changes: 6 additions & 0 deletions cardano_node_tests/tests/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
repo="IntersectMBO/cardano-db-sync",
message="Wrong PlutusV2 script cost when the same script is used twice.",
)
dbsync_2105 = blockers.GH(
issue=2105,
repo="IntersectMBO/cardano-db-sync",
fixed_in="13.7.0.3",
message="Swapped min_pool_cost / coins_per_utxo_size.",
)

ledger_3731 = blockers.GH(
issue=3731,
Expand Down
31 changes: 29 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 @@ -4,6 +4,7 @@
import logging
import pathlib as pl
import random
import re

import allure
import pytest
Expand Down Expand Up @@ -1357,10 +1358,36 @@ def _check_state(state: dict):
except AssertionError as exc:
db_errors_final.append(f"db-sync proposal refunds error: {exc}")

if db_errors_final:
raise AssertionError("\n".join(db_errors_final))
def _is_dbsync_2105(dbe: str) -> bool:
header = re.search(
r"Unexpected parameter proposal values in db-sync:\n(.*)", dbe, re.DOTALL
)
if not header:
return False
names = []
for line in header.group(1).strip().splitlines():
name_match = re.match(r"Param value for (\w+):", line)
if not name_match:
return False
names.append(name_match.group(1))
return set(names) == {"min_pool_cost", "coins_per_utxo_size"}

matched_2105 = []
remaining_errors = []
for dbe in db_errors_final:
if _is_dbsync_2105(dbe):
matched_2105.append(dbe)
else:
remaining_errors.append(dbe)

if remaining_errors:
annotated = [f"{m} (db-sync issue #2105)" for m in matched_2105]
raise AssertionError("\n".join(remaining_errors + annotated))
[r.success() for r in (reqc.cip080, reqc.cip081, reqc.cip082, reqc.cip083)]

if matched_2105:
issues.dbsync_2105.finish_test()

@allure.link(helpers.get_vcs_link())
@pytest.mark.smoke
def test_pparam_negative_value(
Expand Down
2 changes: 0 additions & 2 deletions cardano_node_tests/utils/dbsync_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,6 @@ def _check_param_proposal(
failures = []

for param_name, protocol_value in params_map.items():
if protocol_value is None:
continue
db_value = getattr(param_proposal_db, param_name, _MISSING)
if db_value is _MISSING or db_value == protocol_value:
continue
Expand Down
Loading