@@ -2,7 +2,7 @@ use crate::utils::AttemptResult;
2
2
use crate :: { attempt, Aggregator , Client , ClientCommand , Devnet , MithrilInfrastructure } ;
3
3
use mithril_common:: chain_observer:: { CardanoCliChainObserver , ChainObserver } ;
4
4
use mithril_common:: digesters:: ImmutableFile ;
5
- use mithril_common:: entities:: { Certificate , Epoch , EpochSettings , Snapshot } ;
5
+ use mithril_common:: entities:: { Certificate , Epoch , EpochSettings , ProtocolParameters , Snapshot } ;
6
6
use reqwest:: StatusCode ;
7
7
use slog_scope:: { info, warn} ;
8
8
use std:: error:: Error ;
@@ -60,7 +60,7 @@ impl Spec {
60
60
)
61
61
. await ?;
62
62
63
- // Wait 5 epochs after updating protocol parameters, so that we make sure that we use new protool parameters a few times
63
+ // Wait 5 epochs after updating protocol parameters, so that we make sure that we use new protocol parameters a few times
64
64
update_protocol_parameters ( self . infrastructure . aggregator_mut ( ) ) . await ?;
65
65
wait_for_epoch_settings ( & aggregator_endpoint) . await ?;
66
66
target_epoch += 5 ;
@@ -188,7 +188,7 @@ async fn wait_for_target_epoch(
188
188
}
189
189
} ) {
190
190
AttemptResult :: Ok ( _) => {
191
- info ! ( "Target epoch reached !" ; "target_epoch" => ?target_epoch) ;
191
+ info ! ( "Target epoch reached!" ; "target_epoch" => ?target_epoch) ;
192
192
Ok ( ( ) )
193
193
}
194
194
AttemptResult :: Err ( error) => Err ( error) ,
@@ -205,7 +205,7 @@ async fn bootstrap_genesis_certificate(aggregator: &mut Aggregator) -> Result<()
205
205
206
206
info ! ( "> stopping aggregator" ) ;
207
207
aggregator. stop ( ) . await ?;
208
- info ! ( "> bootstrapping genesis using signers registered two epochs ago ..." ) ;
208
+ info ! ( "> bootstrapping genesis using signers registered two epochs ago..." ) ;
209
209
aggregator. bootstrap_genesis ( ) . await ?;
210
210
info ! ( "> done, restarting aggregator" ) ;
211
211
aggregator. serve ( ) ?;
@@ -226,8 +226,16 @@ async fn update_protocol_parameters(aggregator: &mut Aggregator) -> Result<(), S
226
226
227
227
info ! ( "> stopping aggregator" ) ;
228
228
aggregator. stop ( ) . await ?;
229
- info ! ( "> updating protocol parameters ..." ) ;
230
- aggregator. update_protocol_parameters ( ) ;
229
+ let protocol_parameters_new = ProtocolParameters {
230
+ k : 150 ,
231
+ m : 200 ,
232
+ phi_f : 0.95 ,
233
+ } ;
234
+ info ! (
235
+ "> updating protocol parameters to {:?}..." ,
236
+ protocol_parameters_new
237
+ ) ;
238
+ aggregator. set_protocol_parameters ( & protocol_parameters_new) ;
231
239
info ! ( "> done, restarting aggregator" ) ;
232
240
aggregator. serve ( ) ?;
233
241
0 commit comments