@@ -152,16 +152,30 @@ impl AggregatorRunner {
152
152
impl AggregatorRunnerTrait for AggregatorRunner {
153
153
/// Return the current beacon from the chain
154
154
async fn get_beacon_from_chain ( & self ) -> Result < Beacon , RuntimeError > {
155
- info ! ( "RUNNER: get beacon from chain" ) ;
155
+ debug ! ( "RUNNER: get beacon from chain" ) ;
156
156
Ok ( self
157
157
. dependencies
158
158
. beacon_provider
159
159
. get_current_beacon ( )
160
160
. await ?)
161
161
}
162
162
163
+ async fn does_certificate_exist_for_beacon (
164
+ & self ,
165
+ beacon : & Beacon ,
166
+ ) -> Result < bool , RuntimeError > {
167
+ debug ! ( "RUNNER: does_certificate_exist_for_beacon" ) ;
168
+ let certificate_exist = self
169
+ . dependencies
170
+ . certificate_store
171
+ . get_from_beacon ( beacon)
172
+ . await ?
173
+ . is_some ( ) ;
174
+ Ok ( certificate_exist)
175
+ }
176
+
163
177
async fn is_certificate_chain_valid ( & self ) -> Result < bool , RuntimeError > {
164
- info ! ( "RUNNER: is_certificate_chain_valid" ) ;
178
+ debug ! ( "RUNNER: is_certificate_chain_valid" ) ;
165
179
let certificate_store = self . dependencies . certificate_store . clone ( ) ;
166
180
let latest_certificates = certificate_store. get_list ( 1 ) . await ?;
167
181
let latest_certificate = latest_certificates. first ( ) ;
@@ -181,44 +195,30 @@ impl AggregatorRunnerTrait for AggregatorRunner {
181
195
{
182
196
Ok ( ( ) ) => Ok ( true ) ,
183
197
Err ( error) => {
184
- warn ! ( "Invalid certificate chain" ; "error" => ?error) ;
198
+ warn ! ( " > invalid certificate chain" ; "error" => ?error) ;
185
199
Ok ( false )
186
200
}
187
201
}
188
202
}
189
203
190
- async fn does_certificate_exist_for_beacon (
191
- & self ,
192
- beacon : & Beacon ,
193
- ) -> Result < bool , RuntimeError > {
194
- info ! ( "RUNNER: does_certificate_exist_for_beacon" ) ;
195
- let certificate_exist = self
196
- . dependencies
197
- . certificate_store
198
- . get_from_beacon ( beacon)
199
- . await ?
200
- . is_some ( ) ;
201
- Ok ( certificate_exist)
202
- }
203
-
204
204
async fn compute_digest ( & self , new_beacon : & Beacon ) -> Result < String , RuntimeError > {
205
- info ! ( "RUNNER: compute_digest" ) ;
205
+ debug ! ( "RUNNER: compute_digest" ) ;
206
206
let digester = self . dependencies . digester . clone ( ) ;
207
207
208
- debug ! ( "computing digest" ; "db_directory " => self . config. db_directory. display( ) ) ;
208
+ debug ! ( " > computing digest" ; "cardano_db_directory " => self . config. db_directory. display( ) ) ;
209
209
210
- debug ! ( "launching digester thread" ) ;
210
+ debug ! ( " > launching digester thread" ) ;
211
211
let digest = digester
212
212
. compute_digest ( new_beacon)
213
213
. await
214
214
. map_err ( |e| RuntimeError :: General ( e. into ( ) ) ) ?;
215
- debug ! ( "computed digest: {}" , digest) ;
215
+ debug ! ( " > computed digest: {}" , digest) ;
216
216
217
217
Ok ( digest)
218
218
}
219
219
220
220
async fn update_beacon ( & self , new_beacon : & Beacon ) -> Result < ( ) , RuntimeError > {
221
- info ! ( "RUNNER: update beacon" ; "beacon" => #?new_beacon) ;
221
+ debug ! ( "RUNNER: update beacon" ; "beacon" => #?new_beacon) ;
222
222
self . dependencies
223
223
. multi_signer
224
224
. write ( )
@@ -229,7 +229,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
229
229
}
230
230
231
231
async fn update_stake_distribution ( & self , new_beacon : & Beacon ) -> Result < ( ) , RuntimeError > {
232
- info ! ( "RUNNER: update stake distribution" ; "beacon" => #?new_beacon) ;
232
+ debug ! ( "RUNNER: update stake distribution" ; "beacon" => #?new_beacon) ;
233
233
let stake_distribution = self
234
234
. dependencies
235
235
. chain_observer
@@ -254,7 +254,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
254
254
& self ,
255
255
new_beacon : & Beacon ,
256
256
) -> Result < ( ) , RuntimeError > {
257
- info ! ( "RUNNER: update protocol parameters" ; "beacon" => #?new_beacon) ;
257
+ debug ! ( "RUNNER: update protocol parameters" ; "beacon" => #?new_beacon) ;
258
258
let protocol_parameters = self . dependencies . config . protocol_parameters . clone ( ) ;
259
259
Ok ( self
260
260
. dependencies
@@ -266,7 +266,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
266
266
}
267
267
268
268
async fn update_message_in_multisigner ( & self , digest : String ) -> Result < ( ) , RuntimeError > {
269
- info ! ( "RUNNER: update message in multisigner" ) ;
269
+ debug ! ( "RUNNER: update message in multisigner" ) ;
270
270
let mut multi_signer = self . dependencies . multi_signer . write ( ) . await ;
271
271
let mut protocol_message = ProtocolMessage :: new ( ) ;
272
272
protocol_message. set_message_part ( ProtocolMessagePartKey :: SnapshotDigest , digest) ;
@@ -288,7 +288,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
288
288
& self ,
289
289
beacon : Beacon ,
290
290
) -> Result < CertificatePending , RuntimeError > {
291
- info ! ( "RUNNER: create new pending certificate from multisigner" ) ;
291
+ debug ! ( "RUNNER: create new pending certificate from multisigner" ) ;
292
292
let multi_signer = self . dependencies . multi_signer . read ( ) . await ;
293
293
294
294
let signers = match multi_signer. get_signers ( ) . await {
@@ -328,7 +328,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
328
328
& self ,
329
329
pending_certificate : CertificatePending ,
330
330
) -> Result < ( ) , RuntimeError > {
331
- info ! ( "RUNNER: saving pending certificate" ) ;
331
+ debug ! ( "RUNNER: saving pending certificate" ) ;
332
332
333
333
self . dependencies
334
334
. certificate_pending_store
@@ -338,11 +338,11 @@ impl AggregatorRunnerTrait for AggregatorRunner {
338
338
}
339
339
340
340
async fn drop_pending_certificate ( & self ) -> Result < Option < CertificatePending > , RuntimeError > {
341
- info ! ( "RUNNER: drop pending certificate" ) ;
341
+ debug ! ( "RUNNER: drop pending certificate" ) ;
342
342
343
343
let certificate_pending = self . dependencies . certificate_pending_store . remove ( ) . await ?;
344
344
if certificate_pending. is_none ( ) {
345
- warn ! ( "drop_pending_certificate::no certificate pending in store, did the previous loop crashed ?" ) ;
345
+ warn ! ( " > drop_pending_certificate::no certificate pending in store, did the previous loop crashed ?" ) ;
346
346
}
347
347
348
348
Ok ( certificate_pending)
@@ -351,7 +351,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
351
351
/// Is a multi-signature ready?
352
352
/// Can we create a multi-signature.
353
353
async fn is_multisig_created ( & self ) -> Result < bool , RuntimeError > {
354
- info ! ( "RUNNER: check if we can create a multi-signature" ) ;
354
+ debug ! ( "RUNNER: check if we can create a multi-signature" ) ;
355
355
let has_multisig = self
356
356
. dependencies
357
357
. multi_signer
@@ -362,9 +362,9 @@ impl AggregatorRunnerTrait for AggregatorRunner {
362
362
. is_some ( ) ;
363
363
364
364
if has_multisig {
365
- debug ! ( "new MULTISIG created" ) ;
365
+ debug ! ( " > new multi-signature created" ) ;
366
366
} else {
367
- info ! ( "no multisig created" ) ;
367
+ info ! ( " > no multi-signature created" ) ;
368
368
}
369
369
Ok ( has_multisig)
370
370
}
@@ -373,7 +373,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
373
373
& self ,
374
374
beacon : & Beacon ,
375
375
) -> Result < OngoingSnapshot , RuntimeError > {
376
- info ! ( "RUNNER: create snapshot archive" ) ;
376
+ debug ! ( "RUNNER: create snapshot archive" ) ;
377
377
378
378
let snapshotter = self . dependencies . snapshotter . clone ( ) ;
379
379
let protocol_message = self
@@ -401,7 +401,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
401
401
. await
402
402
. map_err ( |e| RuntimeError :: General ( e. into ( ) ) ) ??;
403
403
404
- debug ! ( "snapshot created: '{:?}'" , ongoing_snapshot) ;
404
+ debug ! ( " > snapshot created: '{:?}'" , ongoing_snapshot) ;
405
405
406
406
Ok ( ongoing_snapshot)
407
407
}
@@ -410,7 +410,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
410
410
& self ,
411
411
ongoing_snapshot : & OngoingSnapshot ,
412
412
) -> Result < Vec < SnapshotLocation > , RuntimeError > {
413
- info ! ( "RUNNER: upload snapshot archive" ) ;
413
+ debug ! ( "RUNNER: upload snapshot archive" ) ;
414
414
let location = self
415
415
. dependencies
416
416
. snapshot_uploader
@@ -420,7 +420,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
420
420
421
421
if let Err ( error) = tokio:: fs:: remove_file ( ongoing_snapshot. get_file_path ( ) ) . await {
422
422
warn ! (
423
- "Post upload ongoing snapshot file removal failure: {}" ,
423
+ " > Post upload ongoing snapshot file removal failure: {}" ,
424
424
error
425
425
) ;
426
426
}
@@ -432,7 +432,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
432
432
& self ,
433
433
beacon : & Beacon ,
434
434
) -> Result < Certificate , RuntimeError > {
435
- info ! ( "RUNNER: create and save certificate" ) ;
435
+ debug ! ( "RUNNER: create and save certificate" ) ;
436
436
let certificate_store = self . dependencies . certificate_store . clone ( ) ;
437
437
let latest_certificates = certificate_store. get_list ( 2 ) . await ?;
438
438
let last_certificate = latest_certificates. get ( 0 ) ;
@@ -480,7 +480,7 @@ impl AggregatorRunnerTrait for AggregatorRunner {
480
480
ongoing_snapshot : & OngoingSnapshot ,
481
481
remote_locations : Vec < String > ,
482
482
) -> Result < Snapshot , RuntimeError > {
483
- info ! ( "RUNNER: create and save snapshot" ) ;
483
+ debug ! ( "RUNNER: create and save snapshot" ) ;
484
484
let snapshot_digest = certificate
485
485
. protocol_message
486
486
. get_message_part ( & ProtocolMessagePartKey :: SnapshotDigest )
0 commit comments