HomePhabricator

[Chronik] Index txs; add `/tx/:txid` HTTP endpoint

Description

[Chronik] Index txs; add /tx/:txid HTTP endpoint

Summary:
We add transactions to the DB as new blocks are coming in using TxWriter. Until we index the mempool, we set the time_first_seen to 0.

/tx/:txid returns txs by txid from the DB using the QueryTxs struct; not from the mempool yet though, which will be in a future diff.

We also add a few new protobuf messages: Tx, OutPoint, TxInput, TxOutput, BlockMetadata and Network.

Test Plan: ninja check-crates && ninja && ./test/functional/test_runner.py chronik_tx

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Mar 25 2023, 21:42
tobias_ruckPushed on Mar 27 2023, 17:32
Reviewer
Restricted Project
Differential Revision
D13467: [Chronik] Index txs; add `/tx/:txid` HTTP endpoint
Parents
rABC7e6289e4499d: [ecashaddrjs] Version bump
Branches
Unknown
Tags
Unknown