@@ -11,7 +11,7 @@ use cb_common::{
1111} ;
1212use rand:: Rng ;
1313use tonic:: transport:: { Channel , ClientTlsConfig } ;
14- use tracing:: info;
14+ use tracing:: { info, trace } ;
1515use tree_hash:: TreeHash ;
1616
1717use crate :: {
@@ -58,6 +58,8 @@ impl DirkManager {
5858 tls_config = tls_config. domain_name ( server_domain) ;
5959 }
6060
61+ trace ! ( url=%config. url, "Stablishing connection with Dirk" ) ;
62+
6163 let channel = Channel :: from_shared ( config. url . to_string ( ) )
6264 . map_err ( |_| eyre:: eyre!( "Invalid Dirk URL" ) ) ?
6365 . tls_config ( tls_config)
@@ -293,6 +295,8 @@ impl DirkManager {
293295 account : String ,
294296 password : String ,
295297 ) -> Result < ( ) , SignerModuleError > {
298+ trace ! ( account, "Sending AccountManager/Unlock request to Dirk" ) ;
299+
296300 let mut client = AccountManagerClient :: new ( self . channel . clone ( ) ) ;
297301 let unlock_request = tonic:: Request :: new ( UnlockAccountRequest {
298302 account : account. clone ( ) ,
@@ -336,6 +340,8 @@ impl DirkManager {
336340 let account_name = format ! ( "{consensus_account}/{module_id}/{uuid}" ) ;
337341 let new_password = Self :: random_password ( ) ;
338342
343+ trace ! ( account = account_name, "Sending AccountManager/Generate request to Dirk" ) ;
344+
339345 let mut client = AccountManagerClient :: new ( self . channel . clone ( ) ) ;
340346 let generate_request = tonic:: Request :: new ( GenerateRequest {
341347 account : account_name. clone ( ) ,
@@ -383,6 +389,13 @@ impl DirkManager {
383389 ) -> Result < BlsSignature , SignerModuleError > {
384390 let domain = compute_domain ( self . chain , COMMIT_BOOST_DOMAIN ) ;
385391
392+ trace ! (
393+ %pubkey,
394+ object_root = hex:: encode( object_root) ,
395+ domain = hex:: encode( domain) ,
396+ "Sending Signer/Sign request to Dirk"
397+ ) ;
398+
386399 let mut signer_client = SignerClient :: new ( self . channel . clone ( ) ) ;
387400 let sign_request = tonic:: Request :: new ( SignRequest {
388401 id : Some ( SignerId :: PublicKey ( pubkey. to_vec ( ) ) ) ,
@@ -410,6 +423,13 @@ impl DirkManager {
410423 )
411424 . await ?;
412425
426+ trace ! (
427+ %pubkey,
428+ object_root = hex:: encode( object_root) ,
429+ domain = hex:: encode( domain) ,
430+ "Sending Signer/Sign request to Dirk"
431+ ) ;
432+
413433 let sign_request = tonic:: Request :: new ( SignRequest {
414434 id : Some ( SignerId :: PublicKey ( pubkey. to_vec ( ) ) ) ,
415435 domain : domain. to_vec ( ) ,
@@ -439,6 +459,8 @@ async fn get_accounts_in_wallets(
439459 channel : Channel ,
440460 wallets : Vec < String > ,
441461) -> Result < Vec < DirkAccount > , SignerModuleError > {
462+ trace ! ( ?wallets, "Sending Lister/ListAccounts request to Dirk" ) ;
463+
442464 let mut client = ListerClient :: new ( channel) ;
443465 let pubkeys_request = tonic:: Request :: new ( ListAccountsRequest { paths : wallets } ) ;
444466 let pubkeys_response = client
0 commit comments