Skip to content

Conversation

@martinserts
Copy link
Contributor

@martinserts martinserts commented Nov 26, 2025

Description

Adds new items to ENV configuration.
Regenerated Payment Receiver client.
Moved locking of funds via PR and creating signing request in PP.
We support multiple recipients per batch (all signed)!

How Has This Been Tested?

  1. Run Payment Receiver (minotari_cli)
$ cargo run --bin minotari   -- daemon \
   --password password \
   --base-url https://rpc.esmeralda.tari.com \
   --database-file data/wallet.db \
   --batch-size 100 \
   --network esmeralda
  1. Run this Payment Processor
$ cargo run
  1. Go to swagger UI and POST a new request:
    http://localhost:9145/swagger-ui
curl -X 'POST' \
  'http://localhost:9145/v1/payments' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "account_name": "default",
  "amount": 2000000,
  "client_id": "client_id_3",
  "payment_id": "my payment 3",
  "recipient_address": "f2MWPuubAoeJyhgeNqaPTG4xXeo4rjtSFWLcXysboCwC2ZAJuD4pb7Ldkd9BCFACf77K4RiEufCi7e6D52fQEnTR3CA"
}'
{
  "payment_id": "4cd645a4-eee6-45b9-a2f0-ae7766f8ac60",
  "status": "RECEIVED",
  "client_id": "client_id_3",
  "account_name": "default",
  "recipient_address": "f2MWPuubAoeJyhgeNqaPTG4xXeo4rjtSFWLcXysboCwC2ZAJuD4pb7Ldkd9BCFACf77K4RiEufCi7e6D52fQEnTR3CA",
  "amount": 2000000,
  "created_at": "2025-11-27T13:13:22Z",
  "updated_at": "2025-11-27T13:13:22Z"
}
  1. Follow Payment Processor logs.
$ cargo run                                                                                                                                                                                
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s                                                                                                                                                                      
     Running `target/debug/minotari_payment_processor`                                                                                                                                                                                       
Starting Minotari Payment Processor...                                                                                                                                                                                                       
Database initialized.                                                                                                                                                                                                                        
Unsigned Transaction Creator worker started. Polling every 15 seconds.                                                                                                                                                                       
Minotari Payment Processor started. Press Ctrl+C to shut down.                                                                                                                                                                               
Transaction Broadcaster worker started. Polling every 15 seconds.                                                                                                                                                                            
Transaction Signer worker started. Polling every 10 seconds.                                                                                                                                                                                 
Confirmation Checker worker started. Polling every 60 seconds. Required Confirmations: 10                                                                                                                                                    
Batch Creator worker started. Cycle interval: 15s.                                                                    
Axum API server listening on 0.0.0.0:9145                                                                                                                                                                                                    
INFO: Found 1 receivable payments to process.                                                                         
INFO: Processing group for account 'default' with 1 payments.                                                                                                                                                                                
INFO: Creating batch for Account: 'default'. Idempotency Key: 2bf233ee-3b7b-41b7-98fd-303aa49d0a71. Payment Count: 1                                                                                                                         
INFO: Successfully committed batch for Account: 'default'.                                                                                                                                                                                   
INFO: Found 1 batches pending unsigned transaction creation.                                                          
INFO: Starting processing for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b                                          
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Locking funds via API. Account: 'default', Total Amount: 2000000    
Error processing batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Network error calling PR API: Reqwest(reqwest::Error { kind: Request, url: "http://localhost:9000/accounts/default/lock_funds", source: hyper_util::client::legacy::Error(Connec
t, ConnectError("tcp connect error", [::1]:9000, Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })) }). Incrementing retry count.                                                                                     
INFO: Found 1 batches pending unsigned transaction creation.                                                                                                                                                                                 
INFO: Starting processing for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b                                                                                                                                                                 
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Locking funds via API. Account: 'default', Total Amount: 2000000                                                                                                                           
Error processing batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Network error calling PR API: Reqwest(reqwest::Error { kind: Request, url: "http://localhost:9000/accounts/default/lock_funds", source: hyper_util::client::legacy::Error(Connec
t, ConnectError("tcp connect error", [::1]:9000, Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })) }). Incrementing retry count.                                                                                     
INFO: Found 1 batches pending unsigned transaction creation.                                                                                                                                                                                 
INFO: Starting processing for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b                                                                                                                                                                 
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Locking funds via API. Account: 'default', Total Amount: 2000000                                                                                                                           
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Funds locked successfully. Received 1 inputs (UTXOs).                                                                                                                                      
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Preparing local offline signer...                                                                                                                                                          
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Building transaction outputs...                                                                                                                                                            
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Unsigned transaction created. Status updated to 'AwaitingSignature'
INFO: Found 1 batches awaiting signature.                                                                             
INFO: Starting processing for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b                                          
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Status updated to 'SigningInProgress'.                              
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Temp files prepared. Input: "/var/folders/xc/ndyh8xdj0bd40stsm523xv5w0000gn/T/unsigned-tx-0mO9Fi", Output: "/var/folders/xc/ndyh8xdj0bd40stsm523xv5w0000gn/T/signed-tx-6IxgYN"             
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Invoking external signer CLI...                                                                                                                                                            
DEBUG: Executing Command: MINOTARI_WALLET_PASSWORD=*** /Users/martinserts/Projects/Tari/tari-main/target/release/minotari_console_wallet --command-mode-auto-exit --base-path /Users/martinserts/Projects/WALLETS/Esmeralda/WALLET-1-NEW-SEE$
S --network esmeralda --skip-recovery sign-one-sided-transaction --input-file /var/folders/xc/ndyh8xdj0bd40stsm523xv5w0000gn/T/unsigned-tx-0mO9Fi --output-file /var/folders/xc/ndyh8xdj0bd40stsm523xv5w0000gn/T/signed-tx-6IxgYN            
DEBUG: CLI Stdout: Initializing logging according to "/Users/martinserts/Projects/WALLETS/Esmeralda/WALLET-1-NEW-SEEDS/esmeralda/config/wallet/log4rs.yml"                                                                                   
Minotari Console Wallet running... (Command mode started)                                                             
==============                                                                                                                                                                                                                               
Command Runner                                                                                                        
==============                                                                                                        
                                                                                                                      
1. SignOneSidedTransaction(SignOneSidedTransactionArgs { input_file: "/var/folders/xc/ndyh8xdj0bd40stsm523xv5w0000gn/T/unsigned-tx-0mO9Fi", output_file: "/var/folders/xc/ndyh8xdj0bd40stsm523xv5w0000gn/T/signed-tx-6IxgYN" })              
                                                                                                                      
Minotari Console Wallet running... (Command mode completed)                                                                                                                                                                                  
                                                                                                                      
Shutting down wallet... Done.                                                                                         
                                                                                                                      
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: External signer CLI finished successfully.                          
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Status updated to 'AwaitingBroadcast'. Processing complete.
INFO: Found 1 batches awaiting broadcast.                                                                                                                                                                                                    
INFO: Starting broadcast sequence for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b                                  
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Status updated to 'Broadcasting'. Submitting to Base Node...  
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Transaction ACCEPTED by Base Node.                                  
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Status updated to 'AwaitingConfirmation'.                           
INFO: Found 1 batches awaiting confirmation.                                                                          
INFO: Checking status for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b                                              
DEBUG: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Querying Base Node for Kernel Signature (Nonce start: [100, 18, 211, 224])                                                                                                                
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Location 'Mined'. Processing confirmations...
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Mined Height: 344032, Tip Height: 344032, Confirmations: 1/10
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b awaiting more confirmations. (Current: 1, Required: 10)
INFO: Found 1 batches awaiting confirmation.
INFO: Checking status for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b
DEBUG: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Querying Base Node for Kernel Signature (Nonce start: [100, 18, 211, 224])
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Location 'Mined'. Processing confirmations...
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Mined Height: 344032, Tip Height: 344036, Confirmations: 5/10
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b awaiting more confirmations. (Current: 5, Required: 10)
INFO: Found 1 batches awaiting confirmation.
INFO: Checking status for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b
DEBUG: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Querying Base Node for Kernel Signature (Nonce start: [100, 18, 211, 224])
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Location 'Mined'. Processing confirmations...
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Mined Height: 344032, Tip Height: 344040, Confirmations: 9/10
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b awaiting more confirmations. (Current: 9, Required: 10)
INFO: Found 1 batches awaiting confirmation.
INFO: Found 1 batches awaiting confirmation.
INFO: Checking status for Batch ID: de0c0ee6-9b04-4a3e-99c2-4213a48d464b
DEBUG: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Querying Base Node for Kernel Signature (Nonce start: [100, 18, 211, 224])
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Location 'Mined'. Processing confirmations...
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Mined Height: 344032, Tip Height: 344041, Confirmations: 10/10
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Confirmation threshold reached. Finalizing...
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b: Marking 1 associated payments as confirmed.
INFO: Batch de0c0ee6-9b04-4a3e-99c2-4213a48d464b confirmed successfully and DB updated.

What process can a PR reviewer use to test or verify this change?

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@martinserts martinserts marked this pull request as ready for review November 27, 2025 14:08
@SWvheerden SWvheerden merged commit 74eb52c into tari-project:main Nov 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants