HomePhabricator

[Chronik] Add `Chronik`, connect it to `CValidationInterface`

Description

[Chronik] Add Chronik, connect it to CValidationInterface

Summary:

  1. Add Chronik, which will contain all the data/handles required to run Chronik.
  2. Make setup_bridge return a boxed Chronik.
  3. Add ChronikValidationInterface, to capture all the tx/block events happening in bitcoind.
  4. Add Start-/StopChronikValidationInterface to create a Chronik and start + register / stop + unregister ChronikValidationInterface.

Test Plan:

  1. ninja
  2. ./src/bitcoind -regtest -reindex -debug=chronik -> displays "Chronik: block connected" (for the genesis block)
  3. In a new window ./src/bitcoin-cli -regtest generatetoaddress ecregtest:qqmuvc70ttys4lg8se5tt7rgk53q6cmthuamcuaexg -> displays

"Chronik: block connected" in bitcoind

  1. ./src/bitcoin-cli invalidateblock <hash> -> displays "Chronik: block disconnected" in bitcoind
  2. Can also test adding/removing tx to/from mempool

A proper python-based HTTP test will be added in future diffs.

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Sep 22 2022, 16:25
tobias_ruckPushed on Sep 23 2022, 10:34
Reviewer
Restricted Project
Differential Revision
D12035: [Chronik] Add `Chronik`, connect it to `CValidationInterface`
Parents
rABC59c5d6a0133b: add a release note for debug log changes
Branches
Unknown
Tags
Unknown