@@ -56,7 +56,18 @@ impl Spec {
56
56
wait_for_target_epoch (
57
57
self . infrastructure . chain_observer ( ) ,
58
58
target_epoch,
59
- "epoch after which the certificate chain will be long enough to catch most common troubles" . to_string ( ) ,
59
+ "epoch after which the certificate chain will be long enough to catch most common troubles with stake distribution" . to_string ( ) ,
60
+ )
61
+ . await ?;
62
+
63
+ // Wait 5 epochs after updating protocol parameters, so that we make sure that we use new protool parameters a few times
64
+ update_protocol_parameters ( self . infrastructure . aggregator_mut ( ) ) . await ?;
65
+ wait_for_epoch_settings ( & aggregator_endpoint) . await ?;
66
+ target_epoch += 5 ;
67
+ wait_for_target_epoch (
68
+ self . infrastructure . chain_observer ( ) ,
69
+ target_epoch,
70
+ "epoch after which the certificate chain will be long enough to catch most common troubles with protocol parameters" . to_string ( ) ,
60
71
)
61
72
. await ?;
62
73
@@ -210,6 +221,19 @@ async fn delegate_stakes_to_pools(devnet: &Devnet) -> Result<(), String> {
210
221
Ok ( ( ) )
211
222
}
212
223
224
+ async fn update_protocol_parameters ( aggregator : & mut Aggregator ) -> Result < ( ) , String > {
225
+ info ! ( "Update protocol parameters" ) ;
226
+
227
+ info ! ( "> stopping aggregator" ) ;
228
+ aggregator. stop ( ) . await ?;
229
+ info ! ( "> updating protocol parameters ..." ) ;
230
+ aggregator. update_protocol_parameters ( ) ;
231
+ info ! ( "> done, restarting aggregator" ) ;
232
+ aggregator. serve ( ) ?;
233
+
234
+ Ok ( ( ) )
235
+ }
236
+
213
237
async fn assert_node_producing_snapshot ( aggregator_endpoint : & str ) -> Result < String , String > {
214
238
let url = format ! ( "{}/snapshots" , aggregator_endpoint) ;
215
239
info ! ( "Waiting for the aggregator to produce a snapshot" ) ;
0 commit comments