Skip to content

Conversation

@bernd2022
Copy link
Collaborator

Summary

  • Fix jq output logic that was silently failing for array results
  • Add token caching (~58 min) to speed up repeated queries
  • Cache file stored in /tmp with chmod 600 for security

Changes

Output fix: The script was receiving valid API responses but not displaying them because jq's error check (.message) failed on array results like [{"count":"1"}].

Token caching:

  • First call authenticates and caches token to /tmp/lds-debug-token-<hash>.json
  • Subsequent calls reuse cached token until ~58 min (before JWT expires at 60 min)
  • Separate cache per DEBUG_ADDRESS using md5 hash

Test plan

  • Verify simple queries return results
  • Verify cache is used on subsequent calls
  • Verify queries with WHERE clause work
  • Verify invalid SQL returns proper error message

- Fix jq output logic for array results (was silently failing)
- Add token caching to /tmp with 58min expiry
- Cache file uses chmod 600 for security
- Separate cache per DEBUG_ADDRESS (md5 hash)
@bernd2022 bernd2022 merged commit 242d735 into develop Jan 28, 2026
1 check passed
@bernd2022 bernd2022 deleted the fix/improve-boltz-debug-script branch January 28, 2026 10:14
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