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

Abandon anchor tx when competing commit tx has been confirmed #1898

Closed
t-bast opened this issue Aug 9, 2021 · 0 comments · Fixed by #1905
Closed

Abandon anchor tx when competing commit tx has been confirmed #1898

t-bast opened this issue Aug 9, 2021 · 0 comments · Fixed by #1905
Assignees

Comments

@t-bast
Copy link
Member

t-bast commented Aug 9, 2021

We use fundrawtransaction to create our claim-anchor transactions, which means bitcoind will not check whether our parent (the commit tx) exists. If we try to claim the anchor of our local commit but the remote commit gets confirmed first, our claim anchor tx will stay in our bitcoind wallet (hoping that the parent tx will eventually appear in the mempool or in the blockchain).

When we detect that the other commit tx has won the race, we should call bitcoind's abandontransaction RPC to clean up the anchor tx that will never complete.

@t-bast t-bast self-assigned this Aug 9, 2021
t-bast added a commit that referenced this issue Aug 12, 2021
This ensures the bitcoind wallet won't keep the transaction around and
avoid using its inputs for other transactions.

Fixes #1898
t-bast added a commit that referenced this issue Aug 16, 2021
This ensures the bitcoind wallet won't keep the transaction around and
avoid using its inputs for other transactions.

Fixes #1898
t-bast added a commit that referenced this issue Aug 23, 2021
* Never retry anchor publish when commit confirmed

We used to check the feerate before checking whether the commit tx was
already confirmed: when the commit feerate was good enough, we would
respawn a publish actor every block whereas the commit tx was already
confirmed.

* Abandon evicted replaceable txs

This ensures the bitcoind wallet won't keep the transaction around and
avoid using its inputs for other transactions.

Fixes #1898
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant