@@ -44,69 +44,77 @@ async fn test_create_immutable_files_full_single_signature() {
4444 . cycle_unregistered ( ) . await . unwrap ( )
4545 . check_era_checker_last_updated_at ( Epoch ( 2 ) ) . await . unwrap ( )
4646
47- . comment ( "getting an epoch settings changes the state → Registered " )
47+ . comment ( "getting an epoch settings changes the state → RegisteredNotAbleToSign " )
4848 . aggregator_send_epoch_settings ( ) . await
49- . cycle_registered ( ) . await . unwrap ( )
49+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
5050 . register_signers ( & signers_with_stake[ ..2 ] ) . await . unwrap ( )
5151 . check_protocol_initializer ( Epoch ( 3 ) ) . await . unwrap ( )
5252 . check_stake_store ( Epoch ( 3 ) ) . await . unwrap ( )
5353
54- . comment ( "more cycles does not change the state = Registered " )
55- . cycle_registered ( ) . await . unwrap ( )
54+ . comment ( "more cycles does not change the state = RegisteredNotAbleToSign " )
55+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
5656
57- . comment ( "changing immutable does not change the state = Registered " )
57+ . comment ( "changing immutable does not change the state = RegisteredNotAbleToSign " )
5858 . increase_immutable ( 1 , 3 ) . await . unwrap ( )
59- . cycle_registered ( ) . await . unwrap ( )
59+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
6060
6161 . comment ( "changing Epoch changes the state → Unregistered" )
6262 . increase_epoch ( 3 ) . await . unwrap ( )
6363 . cycle_unregistered ( ) . await . unwrap ( )
6464 . check_era_checker_last_updated_at ( Epoch ( 3 ) ) . await . unwrap ( )
6565
66- . comment ( "creating a new certificate pending with new signers and new beacon → Registered " )
67- . cycle_registered ( ) . await . unwrap ( )
66+ . comment ( "creating a new certificate pending with new signers and new beacon → RegisteredNotAbleToSign " )
67+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
6868 . check_protocol_initializer ( Epoch ( 4 ) ) . await . unwrap ( )
6969 . check_stake_store ( Epoch ( 4 ) ) . await . unwrap ( )
7070
71- . comment ( "more cycles do not change the state → Registered " )
72- . cycle_registered ( ) . await . unwrap ( )
73- . cycle_registered ( ) . await . unwrap ( )
71+ . comment ( "more cycles do not change the state → RegisteredNotAbleToSign " )
72+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
73+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
7474
75- . comment ( "increment immutable, the state does not change = Registered " )
75+ . comment ( "increment immutable, the state does not change = RegisteredNotAbleToSign " )
7676 . increase_immutable ( 5 , 8 ) . await . unwrap ( )
77- . cycle_registered ( ) . await . unwrap ( )
77+ . cycle_registered_not_able_to_sign ( ) . await . unwrap ( )
7878
7979 . comment ( "changing epoch changes the state → Unregistered" )
8080 . increase_epoch ( 4 ) . await . unwrap ( )
8181 . cycle_unregistered ( ) . await . unwrap ( )
8282 . check_era_checker_last_updated_at ( Epoch ( 4 ) ) . await . unwrap ( )
8383
84- . comment ( "creating a new certificate pending with new signers and new beacon → Registered " )
85- . cycle_registered ( ) . await . unwrap ( )
84+ . comment ( "creating a new certificate pending with new signers and new beacon → ReadyToSign " )
85+ . cycle_ready_to_sign ( ) . await . unwrap ( )
8686 . check_protocol_initializer ( Epoch ( 4 ) ) . await . unwrap ( )
8787
88- . comment ( "signer can now create a single signature → Signed" )
89- . cycle_signed ( ) . await . unwrap ( )
88+ . comment ( "signer can now create a single signature → ReadyToSign" )
89+ . cycle_ready_to_sign ( ) . await . unwrap ( )
90+ . comment ( "signer signs a single signature = ReadyToSign" )
91+ . cycle_ready_to_sign ( ) . await . unwrap ( )
92+ // TODO?
93+ // .expect_new_signature()
9094
91- . comment ( "more cycles do not change the state = Signed" )
92- . cycle_signed ( ) . await . unwrap ( )
93- . cycle_signed ( ) . await . unwrap ( )
95+ // Should we remove this case?
96+ //.comment("more cycles do not change the state = ReadyToSign")
97+ //.cycle_ready_to_sign().await.unwrap()
98+ // .cycle_ready_to_sign().await.unwrap()
9499
95- . comment ( "new immutable means a new signature with the same stake distribution → Signed " )
100+ . comment ( "new immutable means a new signature with the same stake distribution → ReadyToSign " )
96101 . increase_immutable ( 1 , 9 ) . await . unwrap ( )
97- . cycle_registered ( ) . await . unwrap ( )
98- . cycle_signed ( ) . await . unwrap ( )
102+ . cycle_ready_to_sign ( ) . await . unwrap ( )
103+ // TODO?
104+ // .expect_new_signature()
99105
100106 . comment ( "changing epoch changes the state → Unregistered" )
101107 . increase_epoch ( 5 ) . await . unwrap ( )
102108 . cycle_unregistered ( ) . await . unwrap ( )
103109 . check_era_checker_last_updated_at ( Epoch ( 5 ) ) . await . unwrap ( )
104- . cycle_registered ( ) . await . unwrap ( )
110+ . comment ( "signer should be able to create a single signature → ReadyToSign" )
111+ . cycle_ready_to_sign ( ) . await . unwrap ( )
112+ . cycle_ready_to_sign ( ) . await . unwrap ( )
113+ // TODO?
114+ // .expect_new_signature()
115+ //.check_total_signature_registrations_metrics(3).await.unwrap()
105116 . check_protocol_initializer ( Epoch ( 5 ) ) . await . unwrap ( )
106117
107- . comment ( "signer should be able to create a single signature → Signed" )
108- . cycle_signed ( ) . await . unwrap ( )
109-
110118 . comment ( "metrics should be correctly computed" )
111119 . check_metrics ( total_signer_registrations_expected, total_signature_registrations_expected) . await . unwrap ( )
112120 ;
0 commit comments