extension
extension copied to clipboard
Improve handling when hitting API "Too many history entries" limit
A user is experiencing this issue where no balance is shown in the wallet for bitcoin:
Other assets such as STX, Stacks NFT's are displayed normally.
bc1qpyjutel6d4gj50dscphjrqcp29ljtfjel7ccap does have balance as seen on mempool.space explorer
I have seen this issue before and often it is due to local restrictions, firewall, vpn etc. this time it looks like there is a different cause.
Console displays a error 400 for the blockstream API
The API checked manually shows this
https://blockstream.info/api/address/bc1qpyjutel6d4gj50dscphjrqcp29ljtfjel7ccap/utxo
"Too many history entries"
I think we need better error handling for this. Preferably also a way to display the balance anyway.
Needs design input for how we visually display the error cc/ @mica000 @fabric-8
Another wallet affected by this issue, 16,725 transactions bc1qwafz80ygxpurl9fqmldp4x2z7z5g2p3ned68lf
https://mempool.space/address/bc1qwafz80ygxpurl9fqmldp4x2z7z5g2p3ned68lf
https://blockstream.info/api/address/bc1qwafz80ygxpurl9fqmldp4x2z7z5g2p3ned68lf/utxo
Will we work around this issue in the future. Would it require running a local node /API server for example?
Would be great to discuss constraints & possibilities here to better understand what's feasible from a design perspective cc @markmhendrickson
I noticed this issue is similar: https://github.com/leather-wallet/extension/issues/3631#issuecomment-1941071023 Mark suggested a possible solution there.
another wallet affected by this today:
https://blockstream.info/api/address/bc1qke8cq9kkvpwvm74rrvd7lhxl3d0faw4qau8lzn/utxo
Can we use blockchain.info as a backup e.g. https://blockchain.info/balance?active=bc1qke8cq9kkvpwvm74rrvd7lhxl3d0faw4qau8lzn ?
This might help us display the balance, but nothing else would work, sending txs, showing transactions etc
Even with a node, getting all the utxos of a given address isn't supported well.
Solutions like Quicknode also don't have a the full suite of RPC commands, and misses the ones we'd need e.g. listunspent
. It does however have a paid add-on that supports querying utxos, Blockbook.
If we take this approach, we'll need to investigate the rate limiting tooling they also offer, to avoid abuse of our key that would always be public.
Another case like this
https://blockstream.info/api/address/bc1qc4a54g4y7pyq5mcqys8xp4k4k7rkumv9zyt980/utxo
https://blockstream.info/api/address/bc1qc4a54g4y7pyq5mcqys8xp4k4k7rkumv9zyt980
If we switch to BIS, would that resolve this issue?
Another address affected (for mocking/retesting): https://mempool.space/address/bc1qvvlpmskgaq0uulja7nj0wu7m6sk46vearwxwyf
If we switch to BIS, would that resolve this issue?
This is unrelated to BIS since it involves Blockstream, not Hiro or Ordinals APIs generally
@markmhendrickson do you have an estimate when a fix for this could be live?
Not yet, since it hasn't been prioritized
Another report from one of our partners
I'm moving to our dev backlog and assigning @alter-eggo to investigate solutions, presumably by implementing an alternative to Blockstream for the relevant query/ies
The build on https://github.com/leather-io/extension/pull/5690 resolves this issue for me.
@markmhendrickson which wallet/address are you using that triggers this error?
https://github.com/leather-io/extension/issues/3631#issuecomment-2258312130
Ah fantastic, I see it's fixed since using paid Mempool space plan.