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

Calling example_electrum sync on an unconfirmed tx may result in the tx being stuck as unconfirmed eternally (according to the cli)) #1125

Closed
Tracked by #86 ...
evanlinjin opened this issue Sep 14, 2023 · 6 comments · Fixed by #1145 or #1535
Assignees
Labels
bug Something isn't working module-blockchain
Milestone

Comments

@evanlinjin
Copy link
Member

Describe the bug
Calling example_electrum sync on an unconfirmed tx may result in the tx being stuck as unconfirmed eternally (according to the cli)).

To Reproduce

  1. Send a transaction: example_electrum send 123456 <insert-address-here>.
  2. Perform example_electrum sync until the transaction is confirmed (according to the block explorer).
  3. Do example_electrum balance -> You'll see that the transaction is not confirmed (according to our cli).
  4. Do example_electrum scan && example_electrum balance -> The transaction is still NOT confirmed!

The transaction is forever stuck as unconfirmed according to our cli.

Expected behavior

That the tx is viewed as confirmed by our cli.

@evanlinjin evanlinjin added the bug Something isn't working label Sep 14, 2023
@evanlinjin evanlinjin added this to the 1.0.0-alpha.2 milestone Sep 14, 2023
@evanlinjin evanlinjin added this to BDK Sep 14, 2023
@evanlinjin
Copy link
Member Author

New discovery: The cli saw it as confirmed after I called scan after one additional confirmation.

@danielabrozzoni
Copy link
Member

Re-opening as #1145 didn't fix this

@notmandatory notmandatory moved this from Done to Todo in BDK Nov 13, 2023
@notmandatory notmandatory modified the milestones: 1.0.0-alpha.3, 1.0.0-alpha.4 Nov 15, 2023
@nondiremanuel nondiremanuel modified the milestones: 1.0.0-alpha.4, 1.0.0 Jan 6, 2024
@nondiremanuel nondiremanuel added api A breaking API change and removed api A breaking API change labels Jan 25, 2024
@evanlinjin
Copy link
Member Author

May be fixed by this: #1354

@notmandatory
Copy link
Member

Move to beta milestone to re-test.

@notmandatory notmandatory modified the milestones: 1.0.0-alpha, 1.0.0-beta Jun 19, 2024
@evanlinjin
Copy link
Member Author

Because bdk_electrum has already been re-architectured so that chain updates and anchor updates are fetched orthogonal to each other, I don't think this bug can occur any longer...

However let's have tests to make sure previously unconfirmed transactions get confirmed again in both reorg and no-reorg situations.

@LagginTimes
Copy link
Contributor

I'll take a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment