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

Failed to find coin for address re-use in regtest #508

Closed
ffranr opened this issue Sep 18, 2023 · 2 comments · Fixed by #529
Closed

Failed to find coin for address re-use in regtest #508

ffranr opened this issue Sep 18, 2023 · 2 comments · Fixed by #529
Assignees
Labels
addrs bug Something isn't working

Comments

@ffranr
Copy link
Contributor

ffranr commented Sep 18, 2023

This issue tracks a bug reported here: jamaljsr/polar#775 (comment)

Some aspects that I've found interesting whilst investigating so far:

  • This bug was encountered in Polar.
  • The relevant LND wallet in Polar manages a single UTXO where as in our integration tests each wallet manages ~100 UTXOs.
  • This issue/bug may only be relevant in a regtest environment where mining can happen significantly faster than on mainnet.

Developers who have encountered this issue are requesting a new feature which will allow them to customise the coin lock time in a regtest environment. Or to observe minting rather than a set lock time. See this request: jamaljsr/polar#775 (comment)

This is the coin lock/lease 10 min constant:
https://github.com/ffranr/taproot-assets/blob/main/tapfreighter/wallet.go#L35-L37

A similar issue was reported here: https://lightningcommunity.slack.com/archives/C03B3556HQ8/p1694700896132179

@ffranr ffranr added bug Something isn't working addrs labels Sep 18, 2023
@ffranr ffranr self-assigned this Sep 19, 2023
@dstadulis dstadulis added the v0.3 label Sep 19, 2023
@Roasbeef Roasbeef moved this from 🆕 New to 🔖 Ready in Taproot-Assets Project Board Sep 19, 2023
@ffranr ffranr moved this from 🔖 Ready to 🏗 In progress in Taproot-Assets Project Board Sep 20, 2023
@ffranr
Copy link
Contributor Author

ffranr commented Sep 20, 2023

Attempt at reproducing bug: #515

@ffranr
Copy link
Contributor Author

ffranr commented Sep 22, 2023

I've spoken again with @jamaljsr . He mentioned that there was a delay message between send events. And that the coin locking error message was produced whilst attempting to kick off send during that delay.

I'm pretty certain that the delay was caused by the proof courier's backoff procedure erroneously resuming (with a delay) from the stale state of a previous send. This is what I've observed via debugging.

Not too long ago we merged this commit into main: 328e909 It stops the itests from complaining when the courier's backoff procedure resumes from a bad state.

I've created this PR to fix the courier's backoff procedure initial state: #529

I think that the coin locking error message is valid and doesn't need to be changed. If the coin was locked in a send event (which was ongoing because of the erroneous courier delay) then it was correct to raise the error message it did.

@ffranr ffranr moved this from 🏗 In progress to 👀 In review in Taproot-Assets Project Board Sep 22, 2023
@Roasbeef Roasbeef moved this from 👀 In review to ✅ Done in Taproot-Assets Project Board Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addrs bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants