HomePhabricator

[Chronik] Add `Group` and `GroupHistoryReader/-Writer` to index the tx history…

Description

[Chronik] Add Group and GroupHistoryReader/-Writer to index the tx history of a group

Summary:
A group can be "address", or "SLP token ID" or other protocols.

This struct allows us to conveniently and generically index the tx history of all such groups. The legacy Chronik indexer only allowed indexing by script/address, however, many people have been asking to add support to index by other predicates.

Since the tx history for some addresses is already +1M, we store the history paginated. This also allows APIs to more easily and efficiently serve paginated tx history.

Txs can be grouped by implementing Group on some struct, which then receives GroupQuerys, and returns Members, which are then grouped and sorted into the DB.

Depends on D13498.

Test Plan: ninja check-crates

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Mar 29 2023, 17:38
tobias_ruckPushed on Mar 29 2023, 20:06
Reviewer
Restricted Project
Differential Revision
D13487: [Chronik] Add `Group` and `GroupHistoryReader/-Writer` to index the tx history of a group
Parents
rABC91bd7476d68e: [Chronik] Add `Default` derive to ffi structs in `chronik-bridge`
Branches
Unknown
Tags
Unknown