HomePhabricator

[chronik] store a scripthash -> script index

Description

[chronik] store a scripthash -> script index

Summary:
The index is wiped/reindexed depending on the -chronikscripthashindex (init param) value, the reindexing process takes about 12 minutes with the current blockchain.

After the initial is sync, new scripts are added to the index via the ScriptGroup index.

This will be needed for the ElectrumX API. Ref T3598

This diff does not deal with mempool data. This needs to be done in a separate diff.

Test Plan:
Test the wiping and reindexing of the new index by alternating bitcoind -chronikscripthashindex=1 and bitcoind -chronikscripthashindex=1

Tests are added in a child revision to keep the review manageable. On D16937, run ninja all check-all

Reviewers: #bitcoin_abc, tobias_ruck

Reviewed By: #bitcoin_abc, tobias_ruck

Subscribers: tobias_ruck

Maniphest Tasks: T3598

Differential Revision: https://reviews.bitcoinabc.org/D16827

Details

Provenance
PiRKAuthored on Sep 30 2024, 10:34
PiRKPushed on Oct 25 2024, 08:59
Reviewer
Restricted Project
Differential Revision
D16827: [chronik] store a scripthash -> script index
Parents
rABCf0bb80a474c9: [Cashtab] Add a blacklist to remove scams from agora
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task