HomePhabricator

[Chronik] Add LOKAD ID index

Description

[Chronik] Add LOKAD ID index

Summary:
Protocols on eCash are specified using a LOKAD ID, a 4 byte identifier. There are a few popular protocols, like SLP and ALP, however, it's not easy adding other protocols them as the infrastructure is not quite ready.

This diff adds a simple index, which finds txs with LOKAD IDs and groups them. A UTXO index is not added because LOKAD IDs are per-tx, not per-output.

The index is enabled by default, however, existing instances without the LOKAD ID index will have to manually specify -chroniklokadidindex=1, which will reindex the LOKAD IDs from genesis.

Specifying -chroniklokadidindex=0 manually on an instance with the index enabled will wipe the index.

This index is also useful for the Plugin interface, i.e. when a plugin is added for a LOKAD ID, we know exactly which txs will have to be indexed already and don't need to search all blocks again.

Depends on D15913.

Test Plan: ./test/functional/test_runner.py chronik_lokad_id_group

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Subscribers: PiRK, bytesofman

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

Details

Provenance
tobias_ruckAuthored on Sat, Apr 20, 10:43
tobias_ruckPushed on Wed, Apr 24, 16:29
Reviewer
Restricted Project
Differential Revision
D15921: [Chronik] Add LOKAD ID index
Parents
rABCa8aee3304a71: [ecash-lib] Bump integration-tests timeout
Branches
Unknown
Tags
Unknown