Skip to content

Add balance debugging scripts#3333

Merged
TaprootFreak merged 1 commit intodevelopfrom
chore/add-balance-debug-scripts-v2
Mar 4, 2026
Merged

Add balance debugging scripts#3333
TaprootFreak merged 1 commit intodevelopfrom
chore/add-balance-debug-scripts-v2

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

Add three debugging scripts for analyzing financial data logs:

  • compare-balance-logs.sh: Compares two FinancialDataLog entries and shows asset-level changes
  • sum-asset-balances.sh: Sums asset balances for a specific financial type
  • inspect-asset-balance.sh: Shows detailed balance breakdown (liquidity, custom, pending) for a specific asset

Purpose

These scripts are diagnostic tools for investigating balance calculation issues in the financial logging system. They query the /gs/debug endpoint and parse the complex JSON structures.

Usage

All scripts require DEBUG_ADDRESS and DEBUG_SIGNATURE in .env:

# Compare two logs to find what changed
./scripts/compare-balance-logs.sh 1304695 1304720

# Sum all EUR asset balances from a log
./scripts/sum-asset-balances.sh 1304749 EUR

# Inspect detailed balance structure for Asset 401
./scripts/inspect-asset-balance.sh 1304749 401

Notes

- compare-balance-logs.sh: Compare two log entries and show asset changes
- sum-asset-balances.sh: Sum asset balances by financial type
- inspect-asset-balance.sh: Inspect detailed balance structure for specific assets

These scripts help diagnose balance calculation issues and analyze
financial data logs from the /gs/debug endpoint.
@TaprootFreak TaprootFreak merged commit 724ce4b into develop Mar 4, 2026
8 checks passed
@TaprootFreak TaprootFreak deleted the chore/add-balance-debug-scripts-v2 branch March 4, 2026 10:13
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