HomePhabricator

[chronik] Create a new optional JSON RPC interface

Description

[chronik] Create a new optional JSON RPC interface

Summary:
This will be used to serve the result in an Electrum compliant way if possible.

Note that the Electrum protocol is not 100% compliant with the JSON RPC standard as it enforces the use of a newline as a delimiter.
This diff also updates ElectrumABC so it is compatible with both versions.

Test Plan:

./src/bitcoind -regtest -chronik -chronikelectrumbind="[::1]:50001" -chronikelectrumbind="127.0.0.1:50001"

then:

echo '{"jsonrpc": "2.0", "method": "server.ping", "id": "test"}' | nc 127.0.0.1 50001

ninja all check-all

Reviewers: #bitcoin_abc, tobias_ruck, PiRK

Reviewed By: #bitcoin_abc, tobias_ruck, PiRK

Subscribers: tobias_ruck, PiRK

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

Details

Provenance
FabienAuthored on Fri, Nov 22, 15:43
FabienPushed on Fri, Dec 6, 13:31
Reviewer
Restricted Project
Differential Revision
D17185: [chronik] Create a new optional JSON RPC interface
Parents
rABC054a6e95e582: [electrum] fix the minimum python version
Branches
Unknown
Tags
Unknown