@@ -852,10 +852,11 @@ def _check_resign_dbsync(res_member: clusterlib.CCMember) -> None:
852
852
reqc .cip003 .success ()
853
853
854
854
# Check enactment of add action
855
- _cur_epoch = cluster .wait_for_new_epoch (padding_seconds = 5 )
855
+ _cur_epoch_add_action = cluster .wait_for_new_epoch (padding_seconds = 5 )
856
856
enact_add_gov_state = cluster .g_conway_governance .query .gov_state ()
857
857
conway_common .save_gov_state (
858
- gov_state = enact_add_gov_state , name_template = f"{ temp_template } _enact_add_{ _cur_epoch } "
858
+ gov_state = enact_add_gov_state ,
859
+ name_template = f"{ temp_template } _enact_add_{ _cur_epoch_add_action } " ,
859
860
)
860
861
861
862
reqc .cip073_03 .start (url = helpers .get_vcs_link ())
@@ -870,9 +871,11 @@ def _check_resign_dbsync(res_member: clusterlib.CCMember) -> None:
870
871
enact_add_committee_state = cluster .g_conway_governance .query .committee_state ()
871
872
conway_common .save_committee_state (
872
873
committee_state = enact_add_committee_state ,
873
- name_template = f"{ temp_template } _enact_add_{ _cur_epoch } " ,
874
+ name_template = f"{ temp_template } _enact_add_{ _cur_epoch_add_action } " ,
875
+ )
876
+ _check_cc_member1_expired (
877
+ committee_state = enact_add_committee_state , curr_epoch = _cur_epoch_add_action
874
878
)
875
- _check_cc_member1_expired (committee_state = enact_add_committee_state , curr_epoch = _cur_epoch )
876
879
877
880
_url = helpers .get_vcs_link ()
878
881
[r .start (url = _url ) for r in (reqc .cip009 , reqc .cip010 )]
@@ -913,7 +916,7 @@ def _check_resign_dbsync(res_member: clusterlib.CCMember) -> None:
913
916
reqc .cip038_01 .success ()
914
917
915
918
# The proposal was enacted, but it is already expired
916
- assert _cur_epoch == actions_epoch + 3 , "Unexpected epoch"
919
+ assert _cur_epoch_add_action == actions_epoch + 3 , "Unexpected epoch"
917
920
with pytest .raises (clusterlib .CLIError ) as excinfo :
918
921
conway_common .cast_vote (
919
922
cluster_obj = cluster ,
@@ -939,23 +942,26 @@ def _check_resign_dbsync(res_member: clusterlib.CCMember) -> None:
939
942
), "CC Member is not marked for removal"
940
943
941
944
# Check enactment of removal action
942
- _cur_epoch = cluster .wait_for_new_epoch (padding_seconds = 5 )
945
+ _cur_epoch_rem_action = cluster .wait_for_new_epoch (padding_seconds = 5 )
943
946
enact_rem_gov_state = cluster .g_conway_governance .query .gov_state ()
944
947
conway_common .save_gov_state (
945
- gov_state = enact_rem_gov_state , name_template = f"{ temp_template } _enact_rem_{ _cur_epoch } "
948
+ gov_state = enact_rem_gov_state ,
949
+ name_template = f"{ temp_template } _enact_rem_{ _cur_epoch_rem_action } " ,
946
950
)
947
951
_check_cc_member2_removed (gov_state = enact_rem_gov_state )
948
952
949
953
# Check committee state after enactment of removal action
950
954
enact_rem_committee_state = cluster .g_conway_governance .query .committee_state ()
951
955
conway_common .save_committee_state (
952
956
committee_state = enact_rem_committee_state ,
953
- name_template = f"{ temp_template } _enact_rem_{ _cur_epoch } " ,
957
+ name_template = f"{ temp_template } _enact_rem_{ _cur_epoch_rem_action } " ,
954
958
)
955
959
enact_rem_member_rec = enact_rem_committee_state ["committee" ].get (cc_member2_key )
956
960
assert not enact_rem_member_rec , "Removed committee member still present"
957
961
958
- _check_cc_member1_expired (committee_state = enact_rem_committee_state , curr_epoch = _cur_epoch )
962
+ _check_cc_member1_expired (
963
+ committee_state = enact_rem_committee_state , curr_epoch = _cur_epoch_rem_action
964
+ )
959
965
reqc .cip011 .success ()
960
966
961
967
# Try to vote on enacted removal action
@@ -1020,6 +1026,16 @@ def _check_resign_dbsync(res_member: clusterlib.CCMember) -> None:
1020
1026
_msg = f"db-sync error: { dbsync_resign_err } "
1021
1027
raise AssertionError (_msg )
1022
1028
1029
+ # Check epoch state in dbsync
1030
+ reqc .db023_01 .start (url = helpers .get_vcs_link ())
1031
+ dbsync_utils .check_epoch_state (
1032
+ epoch_no = _cur_epoch_add_action , txid = action_add_txid , change_type = "committee"
1033
+ )
1034
+ dbsync_utils .check_epoch_state (
1035
+ epoch_no = _cur_epoch_rem_action , txid = action_rem_txid , change_type = "committee"
1036
+ )
1037
+ reqc .db023_01 .success ()
1038
+
1023
1039
@allure .link (helpers .get_vcs_link ())
1024
1040
@pytest .mark .skipif (not configuration .HAS_CC , reason = "Runs only on setup with CC" )
1025
1041
@pytest .mark .long
0 commit comments