@@ -264,12 +264,12 @@ where
264264 Arc :: clone ( & self . custodian_meta_store ) ,
265265 )
266266 . await ;
267-
268- // TODO I am unsure what should be stored in the backup vault and what should be in the public storage.
269- // Basically everything can be released publicly and have build in ways of protecting against tampering.
270- // Hence for now I store everything in the public storage since the backup vault is now used for export
271- // Log after lock is released
272-
267+ tracing :: info! (
268+ "New custodian context created with context_id={}, threshold={} from {} custodians" ,
269+ context_id ,
270+ context . threshold ,
271+ context . custodian_nodes . len ( )
272+ ) ;
273273 Ok ( ( ) )
274274 }
275275
@@ -295,18 +295,18 @@ where
295295 verification_key,
296296 priv_key. clone ( ) ,
297297 pub_enc_key,
298- custodian_context. threshold . try_into ( ) . unwrap ( ) ,
298+ custodian_context. threshold as usize ,
299299 ) ?;
300- // TODO should commitments be moved into secret_share_and_encrypt? Since this should basically just be used to share the private key
301300 let mut serialized_priv_key = Vec :: new ( ) ;
302301 safe_serialize ( & priv_key, & mut serialized_priv_key, SAFE_SER_SIZE_LIMIT ) ?;
303- let ( ct_map, commitments) = operator
304- . secret_share_and_encrypt ( rng, & serialized_priv_key, backup_id)
305- . unwrap ( ) ;
302+ let ( ct_map, commitments) =
303+ operator. secret_share_and_encrypt ( rng, & serialized_priv_key, backup_id) ?;
306304 let mut ciphertexts = BTreeMap :: new ( ) ;
307305 for custodian_index in 1 ..=custodian_context. custodian_nodes . keys ( ) . len ( ) {
308306 let custodian_role = Role :: indexed_from_one ( custodian_index) ;
309- let ct = ct_map. get ( & custodian_role) . unwrap ( ) ;
307+ let ct = ct_map. get ( & custodian_role) . expect ( & format ! (
308+ "Missing operator backup output for role {custodian_role}"
309+ ) ) ;
310310 ciphertexts. insert ( custodian_role, ct. to_owned ( ) ) ;
311311 }
312312 let recovery_request = RecoveryRequest :: new (
0 commit comments