The Evolution of the RPC Interface: From JSON to REST
27. The Evolution of the RPC Interface: From JSON to REST
For years, the JSON-RPC interface was the only way to talk to Bitcoin Core. It is a "Request-Response" model.
-
The Problem: If you want to monitor blocks in real-time, you have to "Poll" the node every second, which is wasteful.
-
The Innovation: The REST API: Bitcoin Core now includes a REST interface (
rest=1) that allows for much faster, non-authenticated access to non-sensitive data like block headers and the mempool. -
The Future: gRPC: There is an ongoing effort to implement gRPC (Google Remote Procedure Call), which would allow for even faster, typed communication between Bitcoin and other services.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: