Skip to content

Conversation

@hulxv
Copy link
Collaborator

@hulxv hulxv commented Nov 4, 2025

Adds comprehensive debug logging to track critical state changes, message flows, and decision points in both Maker, Taker implementations (legacy + taproot protocols), and CLI binaries. Logs are conditionally compiled with #[cfg(debug_assertions)] and use structured formats with category prefixes.

Logging Categories

Maker

Category Description
STATE_CHANGE ConnectionState mutations (IP, fields, timers)
WALLET_STATE Swapcoin additions/removals, UTXO pool changes, fidelity bonds
MSG_FLOW Message handler entry/exit with validation results
CRYPTO_OP Key generation, nonces, signatures (first 8 bytes only)
RECOVERY Contract broadcasts, idle timeouts, recovery triggers
THREAD_POOL Thread spawning, joining, active count

Taker

Category Description
SWAP_STATE Swap lifecycle, preimage, position changes, maker lists
MAKER_SELECTION Candidate evaluation, selection logic, bad makers
TX_FLOW Transaction creation, broadcasting, confirmations
MSG_EXCHANGE Protocol messages with makers (direction, type, attempts)
HOP_PROGRESS Multi-hop progression with locktime and position
CONTRACT_OP Signature verification, contract validation, key operations
RECOVERY Error detection, recovery triggers, timelock/hashlock spending
OFFERBOOK Tracker sync, offer downloads, verification results
FEE_CALC Coinswap and mining fees per hop
SWEEP_COORD Taproot backwards sweep coordination (makers chain)

Close #549

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 26.92308% with 190 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.69%. Comparing base (776b75d) to head (80c5868).
⚠️ Report is 65 commits behind head on master.

Files with missing lines Patch % Lines
src/maker/handlers.rs 28.26% 33 Missing ⚠️
src/maker/server2.rs 30.23% 30 Missing ⚠️
src/taker/routines.rs 34.88% 28 Missing ⚠️
src/bin/taker.rs 29.41% 24 Missing ⚠️
src/maker/api.rs 22.58% 24 Missing ⚠️
src/bin/maker-cli.rs 0.00% 21 Missing ⚠️
src/maker/api2.rs 35.29% 11 Missing ⚠️
src/maker/rpc/server.rs 0.00% 7 Missing ⚠️
src/maker/handlers2.rs 25.00% 6 Missing ⚠️
src/taker/offers.rs 33.33% 4 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #625      +/-   ##
==========================================
+ Coverage   68.87%   76.69%   +7.81%     
==========================================
  Files          35       49      +14     
  Lines        4932    14570    +9638     
==========================================
+ Hits         3397    11174    +7777     
- Misses       1535     3396    +1861     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hulxv hulxv closed this Dec 24, 2025
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.

Add Debug Log

1 participant