HomePhabricator

[chronik] Add the blockchain.headers.unsubscribe endpoint

Description

[chronik] Add the blockchain.headers.unsubscribe endpoint

Summary:
Implements https://electrum-cash-protocol.readthedocs.io/en/latest/protocol-methods.html#blockchain-headers-unsubscribe.

Since there is a single possible subscription for now, it is hardcoded as zero. This might change (or not) when the address/scripthash subscription is implemented.

This requires a new version of the karyon library to support arbitraty subscription ID, so the code also adapts to this new version.
In particular it handles duplicated subscription as no-op, but will not send the same notification several times (as opposed to Fulcrum).

Test Plan:

./test/functional/test_runner.py chronik_electrum_blockchain

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Tue, May 13, 11:59
FabienPushed on Thu, May 15, 20:19
Reviewer
Restricted Project
Differential Revision
D18092: [chronik] Add the blockchain.headers.unsubscribe endpoint
Parents
rABC5bfbdb51bd4e: Add checkoints after the May 2025 network upgrade
Branches
Unknown
Tags
Unknown