HomePhabricator

[Chronik] Add `GroupUtxoWriter` and `GroupUtxoReader`

Description

[Chronik] Add GroupUtxoWriter and GroupUtxoReader

Summary:
Update UTXO set for each group member.

We store a list of ordered UTXOs (sorted by tx_num, then out_idx) for each group member.

We also also attach the value to each UTXO, which allows us to return the UTXO set for scripts very efficiently, without having to look up the spent tx from the node.

It's unclear at this point whether this is useful for other kinds of groups, but if it isn't, we can make UtxoEntry more generic in the future.

Depends on D13717.

Test Plan: ninja check-crates

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Apr 14 2023, 13:03
tobias_ruckPushed on Apr 14 2023, 14:14
Reviewer
Restricted Project
Differential Revision
D13718: [Chronik] Add `GroupUtxoWriter` and `GroupUtxoReader`
Parents
rABCb8cc24e5917f: [Chronik] Refactor `Group`, add `input_members` and `output_members`
Branches
Unknown
Tags
Unknown