Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve delay in recognizing confirmed transactions #2898

Closed
314159265359879 opened this issue Nov 22, 2022 · 6 comments · Fixed by #2899
Closed

Resolve delay in recognizing confirmed transactions #2898

314159265359879 opened this issue Nov 22, 2022 · 6 comments · Fixed by #2899
Assignees
Labels
bug Functionality broken bug-p2 Critical functionality broken for few users, with no clear workarounds

Comments

@314159265359879
Copy link
Contributor

Here transaction in microblock
image

Yet on wallet shown as available

trying to sign a transaction will fail because the balance isn't actually available:
image

This is happening on mainnet too:
https://discord.com/channels/621759717756370964/745197302255321108/1044462352642363412

Additionally when the transaction was confirmed in an anchorblock. I tried to send the transaction again from the btc.us testenvironment. And it would still show "insufficient" balance error on the confirm screen. I was only able to resolve this after logging out from the dapp and then logging in again, then the confirm screen still blinked "insufficient balance" for a split second before showing the expected:
image

@314159265359879 314159265359879 added the bug-p1 Critical functionality broken for many customers, with no clear workarounds label Nov 22, 2022
@314159265359879
Copy link
Contributor Author

Steps to reproduce on testnet:

  1. create new account
  2. get funds from faucet via explorer sandbox
  3. login on https://btc-website.tintashlabs.com/ (when faucet transaction is in microblock, before confirmed in anchor)
  4. Try to register a domain
  5. --> try to sign first transaction
  6. see error

@314159265359879 314159265359879 added the bug Functionality broken label Nov 22, 2022
@314159265359879
Copy link
Contributor Author

I would expect the balance not to show as available as long as the transaction is only in a microblock and not anchored yet. This is adding to the confusion.

After being anchored I would expect not to see any "insufficient balance" errors. I am not sure why I need to relog on the dapp.

@markmhendrickson
Copy link
Collaborator

I would expect the balance not to show as available as long as the transaction is only in a microblock and not anchored yet. This is adding to the confusion.

I agree. It's unexpected and incorrect to include microblock amounts in the app nav balance here. We should update to show just anchored amounts.

After being anchored I would expect not to see any "insufficient balance" errors. I am not sure why I need to relog on the dapp.

To be clear here, you had to sign out of the dapp itself and re-authenticate entirely? Not just close the transaction signing window and reopen it with the app-based action?

I can't imagine why re-authenticating the app should affect the behavior here, so I suspect it may have been simply a question of timing in that the wallet hadn't yet recognized the anchor block.

Mind trying to recreate this problem but waiting 1 minute after the transaction is included in an anchor block to see if the wallet recognizes it?

then the confirm screen still blinked "insufficient balance" for a split second before showing the expected:

This sounds like a visual bug of sorts we should also iron out, if this error is showing incorrectly during load for accounts that do have sufficient balances.

@314159265359879
Copy link
Contributor Author

314159265359879 commented Nov 22, 2022

To be clear here, you had to sign out of the dapp itself and re-authenticate entirely? Not just close the transaction signing window and reopen it with the app-based action?

That is correct, re-authenticating.

I can't imagine why re-authenticating the app should affect the behavior here, so I suspect it may have been simply a question of timing in that the wallet hadn't yet recognized the anchor block.

Mind trying to recreate this problem but waiting 1 minute after the transaction is included in an anchor block to see if the wallet recognizes it?

Yes I can recheck that. Also waiting to hear back from another user.

@314159265359879
Copy link
Contributor Author

314159265359879 commented Nov 22, 2022

@markmhx
This is two minutes after the anchor block confirmation
(after 6 minutes it is fine without re-authenticating, see further down but wallet balance updating so slowly is a problem)
image

image

oddly the wallet shows:
image

with this in the activities tab (upto 5 minutes after the anchor block):
image

This is what Bruffstar was reporting earlier in the wallet channel on Discord.

This is 6 minutes after the anchor block... all good (no re-authentication needed)
image

(6 minutes is not normal, different issue most likely something with API service?)

@markmhendrickson
Copy link
Collaborator

markmhendrickson commented Nov 22, 2022

Are you checking the explorer specifically for confirmation and it does show as confirmed there before the wallet? If so, that might suggest it's a wallet-specific problem because the explorer and wallet are using the same API.

However, it's also possible they're using different endpoints with different behaviors here.

I'm going to relabel this as P2 at least until we get reports that these delays are widespread. Mind splitting the problem with displaying microblock effects in the app nav balance into a separate issue for tracking there as a P2?

@markmhendrickson markmhendrickson added bug-p2 Critical functionality broken for few users, with no clear workarounds and removed bug-p1 Critical functionality broken for many customers, with no clear workarounds labels Nov 22, 2022
@kyranjamie kyranjamie self-assigned this Nov 22, 2022
@markmhendrickson markmhendrickson changed the title Microblock confirmed STX shown as available and showing unavailable after confirmation in anchor Resolve delay in recognizing confirmed transactions Nov 22, 2022
blockstack-devops pushed a commit that referenced this issue Nov 24, 2022
## [3.26.0](v3.25.0...v3.26.0) (2022-11-24)

### Features

* send form amount field ([ab3a10a](ab3a10a))
* send form details ([b6a54bb](b6a54bb))
* support bns recipients, closes [#1840](#1840) ([55bf5ef](55bf5ef))

### Bug Fixes

* amount input in extension ([9b31782](9b31782))
* **balances:** query correct balance, show microblock balance, closes [#2898](#2898) ([da58732](da58732))
* missing address chars, closes [#2860](#2860) ([95bee55](95bee55))
* theme analytics, closes [#2799](#2799) ([8c85177](8c85177))
* typo ([f5f68f3](f5f68f3))

### Internal

* add error handling to form ([fb19774](fb19774))
* base forms for all currencies ([3eec893](3eec893))
* be explicit about address, allow reuse for non-current account ([153b961](153b961))
* form field error styles ([7ebe8c9](7ebe8c9))
* home page with facade pattern ([c1bbd29](c1bbd29))
* improve errors, add focus state ([0d193af](0d193af))
* init new integration tests ([5de2613](5de2613))
* initial test forms ([601c4a8](601c4a8))
* initial value helper, inline error ([15fe88d](15fe88d))
* react query pattern, form routes ([7860ee9](7860ee9))
* remove coupling of balances types, subBalance ([de94f2c](de94f2c))
* remove okcoin ([b34e214](b34e214))
* remove unused suspense ([8369e32](8369e32))
* rename existing tests as legacy ([7b97265](7b97265))
* rename original balance queries with stx naming ([1770e3d](1770e3d))
* semantic form elements ([6f9b123](6f9b123))
* tightens rules against orphan files ([950569a](950569a))
* use factory fn ([b43159a](b43159a))
* validation schemas ([3cd15c5](3cd15c5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality broken bug-p2 Critical functionality broken for few users, with no clear workarounds
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants