Debug: trace BBTC balance through refresh pipeline#3667
Merged
TaprootFreak merged 4 commits intodevelopfrom May 2, 2026
Merged
Debug: trace BBTC balance through refresh pipeline#3667TaprootFreak merged 4 commits intodevelopfrom
TaprootFreak merged 4 commits intodevelopfrom
Conversation
Add verbose logging to trace token balance values through the pipeline: - BlockchainAdapter: log when balance changes between cache updates - BlockchainAdapter: log assets missing from cache after update - BalanceService: log when saves are skipped (updated > startDate) - BalanceService: log when balance values actually change
- Only log uncached assets when an update was actually attempted - Log balance changes for all chains, not just Ethereum - Remove redundant chainId from log message
- Only log balance changes when cache was previously populated - Add always-on BBTC (394) trace to capture Alchemy response value even when unchanged (covers the case where Alchemy returns stale data)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
liquidity_balanceshows 0.001 while on-chain balance is 1.73 BBTCDebug logging added
updateCoinAndTokenBalance: logs when a balance value changes between cache updates (old → new), including whether the chainId was found in the Alchemy response mapgetForBlockchain: logs any assets missing from cache after an update cyclesaveBalanceResults: logs when saves are skipped due toupdated > startDate, and when balance values actually changeAll logs are
verboselevel — they'll appear in Application Insights but won't spam error channels.After deploy
Search traces for:
"Balance change for Ethereum/BBTC"— confirms Alchemy returns different value than cache"missing from cache after update"— confirms BBTC is dropped from cache"Skipping save for Ethereum/BBTC"— confirms save is skipped due to timing"Saving balance for Ethereum/BBTC"— confirms save goes through