Use bitcoin core's txospenderindex to find spending transactions - #3279
Use bitcoin core's txospenderindex to find spending transactions#3279sstone wants to merge 2 commits into
Conversation
513211e to
d3d7f3c
Compare
00d357b to
7b7eb49
Compare
7b7eb49 to
cd31b14
Compare
|
As discussed offline, imo we should make |
done in cd31b14. Eclair won't start if the index is not enabled and synced. |
cd31b14 to
de16a8a
Compare
de16a8a to
c350f3b
Compare
ae37aec to
af477fd
Compare
This release contains a new index which we need for #3279.
af477fd to
e045d0b
Compare
e045d0b to
fe4b460
Compare
|
We should make sure that we only merge this PR once we're using a version of |
The first release that will contain that change will be |
|
Thanks @fanquake 🙏 |
|
32.0 will also contain this fix: bitcoin/bitcoin#35889 |
fe4b460 to
19e21c3
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3279 +/- ##
==========================================
- Coverage 88.64% 88.64% -0.01%
==========================================
Files 222 223 +1
Lines 21910 22107 +197
Branches 867 889 +22
==========================================
+ Hits 19423 19597 +174
- Misses 2487 2510 +23
🚀 New features to boost your workflow:
|
19e21c3 to
7c932d7
Compare
…r channels On startup, eclair will check that both txindex and txospenderindex are enabled and synced, and will stop if they're not. Block scanning code used to find spending transactions is removed, we just use the txospenderindex now. Te add a new RetryCheckSpent watch hint to retry finding transaction spenders when the first check was inconclusive (because a RPC call failed for example) or when RPC calls returned inconsistent results, so we can check again at every new block. For external channels, where there is no risk of losing funds, we don't retry (but we will when we restart).
7c932d7 to
e6f0935
Compare
Eclair now requires that bitcoin core's
txospenderindex(added in version 31.0) is available and synced, and will fail to start if it is not.Our Watcher will use the txospenderindex` to find spending transactions instead of scanning blocks (which was both expensive and limited as we would only scan a small number of blocks into the past).
Deployment note:
You must enable the new index on bitcoin core with
txospenderindex=1and wait until it is synchronised before you start eclair. Syncing the index from scratch will take a few hours, during which bitcoin core is usable (indexes are independent) but make be slower to respond.You can also copy the index from another node (that is running the same version), just copy the entire
.bitcoin/indexes/txospenderindexdirectory.The index requires an additional 88Gb as of block 944339.