-
Notifications
You must be signed in to change notification settings - Fork 11
Parallel Silent Payment index #96
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
base: 2025/04/bip352-index
Are you sure you want to change the base?
Conversation
3e4eb1e
to
9f441e8
Compare
5f23fa1
to
a5fe4b9
Compare
@furszy I rebased on the latest #86 and the latest commits from bitcoin#26966. I then used b8883fa from your branch. But it still segfaults. Maybe I missed something?
|
9f441e8
to
cdf7de3
Compare
And add option to customize thread pool workers count
Conflicts: - src/index/base.cpp Resolved by passing m_start_height to NextSyncBlock.
It also adds coverage for initial sync from a particular block. Mimicking a node restart.
a5fe4b9
to
0e75edb
Compare
It fails due to the custom diff --git a/src/index/base.cpp b/src/index/base.cpp
--- a/src/index/base.cpp (revision 0e75edb4e2c1242f541c6208cdf22d411cf22d7a)
+++ b/src/index/base.cpp (date 1753454368355)
@@ -263,6 +263,13 @@
return;
}
+ // If pindex_next is our first block and we are starting from a custom height,
+ // set pindex to be the previous block. This ensures we test that we can still rewind
+ // from our custom start height in the event of a reorg.
+ if (pindex_next->nHeight == m_start_height && m_start_height > 0) {
+ pindex = pindex_next->pprev;
+ }
+
// Handle potential reorgs; if the next block's parent doesn't match our current tip,
// rewind our index state to match the chain and resume from there.
if (pindex_next->pprev != pindex && !Rewind(pindex, pindex_next->pprev)) { That being said, 1fb0a3c code seems a bit flaky during startup (what if the index receives a block through the validation events - it seems it will still try to connect it even when it is below the |
@furszy thanks. It doesn't need to be very robust, I'm just trying to measure the performance difference. And for the base index PR it's mainly about checking the SP crypto matches other implementations. I think the way to really add new indexes, e.g. to help lite clients, is to have an IPC interface for external indexers. |
yeah, that's where bitcoin#24230 is heading to. |
7c42695
to
5a7ac49
Compare
This was dropped while dealing with merge conflict in "implement index parallel sync".
5a7ac49
to
2a2bc0b
Compare
I noticed a huge amount of disk reading on my spinning disk and it taking a long time before index actually started building. Added an early return to Despite the change it still spends 7 minutes rattling the disk before finally showing a "Syncing bip352 index with ..." log message. But it just continues the heavy disk i/o for at least another 10 minutes before I gave up. |
Based on:
Usage
Caveats: