@@ -242,6 +242,7 @@ impl StacksClient {
242
242
& self ,
243
243
tx : & StacksTransaction ,
244
244
) -> Result < u64 , ClientError > {
245
+ debug ! ( "stacks_node_client: Getting estimated fee..." ) ;
245
246
let request = FeeRateEstimateRequestBody {
246
247
estimated_len : Some ( tx. tx_len ( ) ) ,
247
248
transaction_payload : to_hex ( & tx. payload . serialize_to_vec ( ) ) ,
@@ -306,6 +307,11 @@ impl StacksClient {
306
307
307
308
/// Submit the block proposal to the stacks node. The block will be validated and returned via the HTTP endpoint for Block events.
308
309
pub fn submit_block_for_validation ( & self , block : NakamotoBlock ) -> Result < ( ) , ClientError > {
310
+ debug ! ( "stacks_node_client: Submitting block for validation..." ;
311
+ "signer_sighash" => %block. header. signer_signature_hash( ) ,
312
+ "block_id" => %block. header. block_id( ) ,
313
+ "block_height" => %block. header. chain_length,
314
+ ) ;
309
315
let block_proposal = NakamotoBlockProposal {
310
316
block,
311
317
chain_id : self . chain_id ,
@@ -439,6 +445,10 @@ impl StacksClient {
439
445
chosen_parent : & ConsensusHash ,
440
446
last_sortition : & ConsensusHash ,
441
447
) -> Result < VecDeque < TenureForkingInfo > , ClientError > {
448
+ debug ! ( "stacks_node_client: Getting tenure forking info..." ;
449
+ "chosen_parent" => %chosen_parent,
450
+ "last_sortition" => %last_sortition,
451
+ ) ;
442
452
let path = self . tenure_forking_info_path ( chosen_parent, last_sortition) ;
443
453
let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
444
454
let send_request = || {
@@ -459,6 +469,7 @@ impl StacksClient {
459
469
460
470
/// Get the sortition information for the latest sortition
461
471
pub fn get_latest_sortition ( & self ) -> Result < SortitionInfo , ClientError > {
472
+ debug ! ( "stacks_node_client: Getting latest sortition..." ) ;
462
473
let path = self . sortition_info_path ( ) ;
463
474
let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
464
475
let send_request = || {
@@ -478,6 +489,7 @@ impl StacksClient {
478
489
479
490
/// Get the sortition information for a given sortition
480
491
pub fn get_sortition ( & self , ch : & ConsensusHash ) -> Result < SortitionInfo , ClientError > {
492
+ debug ! ( "stacks_node_client: Getting sortition with consensus hash {ch}..." ) ;
481
493
let path = format ! ( "{}/consensus/{}" , self . sortition_info_path( ) , ch. to_hex( ) ) ;
482
494
let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
483
495
let send_request = || {
@@ -497,7 +509,7 @@ impl StacksClient {
497
509
498
510
/// Get the current peer info data from the stacks node
499
511
pub fn get_peer_info ( & self ) -> Result < PeerInfo , ClientError > {
500
- debug ! ( "Getting stacks node info..." ) ;
512
+ debug ! ( "stacks_node_client: Getting peer info..." ) ;
501
513
let timer =
502
514
crate :: monitoring:: new_rpc_call_timer ( & self . core_info_path ( ) , & self . http_origin ) ;
503
515
let send_request = || {
@@ -547,6 +559,7 @@ impl StacksClient {
547
559
& self ,
548
560
reward_cycle : u64 ,
549
561
) -> Result < Option < Vec < NakamotoSignerEntry > > , ClientError > {
562
+ debug ! ( "stacks_node_client: Getting reward set signers for reward cycle {reward_cycle}..." ) ;
550
563
let timer = crate :: monitoring:: new_rpc_call_timer (
551
564
& self . reward_set_path ( reward_cycle) ,
552
565
& self . http_origin ,
@@ -584,7 +597,7 @@ impl StacksClient {
584
597
585
598
/// Retrieve the current pox data from the stacks node
586
599
pub fn get_pox_data ( & self ) -> Result < RPCPoxInfoData , ClientError > {
587
- debug ! ( "Getting pox data..." ) ;
600
+ debug ! ( "stacks_node_client: Getting pox data..." ) ;
588
601
let timer = crate :: monitoring:: new_rpc_call_timer ( & self . pox_path ( ) , & self . http_origin ) ;
589
602
let send_request = || {
590
603
self . stacks_node_client
@@ -630,7 +643,7 @@ impl StacksClient {
630
643
& self ,
631
644
address : & StacksAddress ,
632
645
) -> Result < AccountEntryResponse , ClientError > {
633
- debug ! ( "Getting account info..." ) ;
646
+ debug ! ( "stacks_node_client: Getting account info..." ) ;
634
647
let timer =
635
648
crate :: monitoring:: new_rpc_call_timer ( & self . accounts_path ( address) , & self . http_origin ) ;
636
649
let send_request = || {
@@ -707,6 +720,10 @@ impl StacksClient {
707
720
/// Returns `true` if the block was accepted or `false` if the block
708
721
/// was rejected.
709
722
pub fn post_block ( & self , block : & NakamotoBlock ) -> Result < bool , ClientError > {
723
+ debug ! ( "stacks_node_client: Posting block to the stacks node..." ;
724
+ "block_id" => %block. header. block_id( ) ,
725
+ "block_height" => %block. header. chain_length,
726
+ ) ;
710
727
let path = format ! ( "{}{}?broadcast=1" , self . http_origin, postblock_v3:: PATH ) ;
711
728
let timer = crate :: monitoring:: new_rpc_call_timer ( & path, & self . http_origin ) ;
712
729
let send_request = || {
@@ -734,6 +751,9 @@ impl StacksClient {
734
751
pub fn submit_transaction ( & self , tx : & StacksTransaction ) -> Result < Txid , ClientError > {
735
752
let txid = tx. txid ( ) ;
736
753
let tx = tx. serialize_to_vec ( ) ;
754
+ debug ! ( "stacks_node_client: Submitting transaction to the stacks node..." ;
755
+ "txid" => %txid,
756
+ ) ;
737
757
let timer =
738
758
crate :: monitoring:: new_rpc_call_timer ( & self . transaction_path ( ) , & self . http_origin ) ;
739
759
let send_request = || {
@@ -763,7 +783,7 @@ impl StacksClient {
763
783
function_name : & ClarityName ,
764
784
function_args : & [ ClarityValue ] ,
765
785
) -> Result < ClarityValue , ClientError > {
766
- debug ! ( "Calling read-only function {function_name} with args {function_args:?}..." ) ;
786
+ debug ! ( "stacks_node_client: Calling read-only function {function_name} with args {function_args:?}..." ) ;
767
787
let args = function_args
768
788
. iter ( )
769
789
. filter_map ( |arg| arg. serialize_to_hex ( ) . ok ( ) )
0 commit comments