Skip to content

Commit

Permalink
Update conway coverage with db-sync tables with new/updated parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
saratomaz committed Sep 13, 2024
1 parent f3a9f59 commit 4f86130
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cardano_node_tests/tests/reqs_conway.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,5 @@ def __dr(id: str) -> requirements.Req:
db020 = __dr("off_chain_vote_external_update")
db021 = __dr("off_chain_vote_fetch_error")
db022 = __dr("reward_rest")
db023 = __dr("param_proposal") # new/updated fields
db024 = __dr("epoch_param") # new/updated fields
11 changes: 7 additions & 4 deletions cardano_node_tests/tests/tests_conway/test_pparam_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_pparam_update( # noqa: C901
).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
# undelegated stake is treated as Abstain. If undelegated stake was treated as Yes, then
# missing votes would approve the action.
delegated_stake = governance_utils.get_delegated_stake(cluster_obj=cluster)
cur_pparams = cluster.g_conway_governance.query.gov_state()["currentPParams"]
Expand Down Expand Up @@ -935,6 +935,7 @@ def _check_proposed_pparams(
approve_spo=False,
)

reqc.db023.start(url=helpers.get_vcs_link())
# Vote on update proposals from governance group that will NOT get approved by DReps
if not is_in_bootstrap:
gov_nodrep_update_proposals = list(helpers.flatten(governance_g_proposals))
Expand Down Expand Up @@ -1134,6 +1135,8 @@ def _check_proposed_pparams(
update_proposals=mix_approved_prop_rec.proposals,
protocol_params=mix_approved_prop_rec.future_pparams,
)
reqc.db023.success()

conway_common.cast_vote(
cluster_obj=cluster,
governance_data=governance_data,
Expand Down Expand Up @@ -1239,9 +1242,9 @@ def _check_state(state: dict):

# db-sync check
try:
dbsync_utils.check_conway_param_update_enactment(
gov_state=enact_gov_state, epoch_no=enact_epoch
)
reqc.db024.start(url=helpers.get_vcs_link())
dbsync_utils.check_conway_param_update_enactment(enact_gov_state, enact_epoch)
reqc.db024.success()
except AssertionError as exc:
db_errors_final.append(f"db-sync params enactment error: {exc}")

Expand Down
14 changes: 14 additions & 0 deletions src_docs/chang_user_stories_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,16 @@ DB Sync - Conway related tables
- |image-off_chain_vote_fetch_error|
- Errors while fetching or validating offchain Voting Anchor metadata.
`<https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/schema.md#off_chain_vote_fetch_error>`__
-

- |image-param_proposal|
- A table containing block chain parameter change proposals.
`<https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/schema.md#param_proposal>`__
-

- |image-epoch_param|
- The accepted protocol parameters for an epoch.
`<https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/schema.md#epoch_param>`__

.. |Success Badge| image:: https://img.shields.io/badge/success-green
.. |Failure Badge| image:: https://img.shields.io/badge/failure-red
Expand Down Expand Up @@ -1753,3 +1763,7 @@ DB Sync - Conway related tables
:target: https://github.com/off_chain_vote_external_update-404
.. |image-off_chain_vote_fetch_error| image:: https://img.shields.io/badge/off_chain_vote_fetch_error-grey
:target: https://github.com/off_chain_vote_fetch_error-404
.. |image-param_proposal| image:: https://img.shields.io/badge/param_proposal-grey
:target: https://github.com/param_proposal-404
.. |image-epoch_param| image:: https://img.shields.io/badge/epoch_param-grey
:target: https://github.com/epoch_param-404

0 comments on commit 4f86130

Please sign in to comment.