Protocol Changes¶
This documents lists changes made by protocol version.
Version 1.1¶
Changes¶
- improved semantics of
server.version()
to aid protocol negotiation, and a changed return value.blockchain.transaction.get()
no longer takes the height argument that was ignored anyway.blockchain.transaction.broadcast()
returns errors like any other JSON RPC call. A transaction hash result is only returned on success.
New methods¶
Removed methods¶
Version 1.2¶
Changes¶
blockchain.transaction.get()
now has an optional parameter verbose.blockchain.headers.subscribe()
now has an optional parameter raw.server.version()
should not be used for “ping” functionality; use the newserver.ping()
method instead.
Deprecated methods¶
blockchain.block.get_chunk()
. Switch toblockchain.block.headers()
blockchain.address.get_balance()
. Switch toblockchain.scripthash.get_balance()
.blockchain.address.get_history()
. Switch toblockchain.scripthash.get_history()
.blockchain.address.get_mempool()
. Switch toblockchain.scripthash.get_mempool()
.blockchain.address.listunspent()
. Switch toblockchain.scripthash.listunspent()
.blockchain.address.subscribe()
. Switch toblockchain.scripthash.subscribe()
.blockchain.headers.subscribe()
with raw other thanTrue
.
Version 1.3¶
Changes¶
blockchain.headers.subscribe()
argument raw switches default toTrue
New methods¶
Removed methods¶
Deprecated methods¶
Version 1.4¶
This version removes all support for deserialized headers.
Changes¶
- Deserialized headers are no longer available, so removed argument raw from
blockchain.headers.subscribe()
.- Only the first
server.version()
message is accepted.- Optional cp_height argument added to
blockchain.block.header()
andblockchain.block.headers()
to return merkle proofs of the header to a given checkpoint.
New methods¶
blockchain.transaction.id_from_pos()
to return a transaction hash, and optionally a merkle proof, given a block height and position in the block.
Removed methods¶
Version 1.4.1¶
Changes¶
blockchain.block.header()
andblockchain.block.headers()
now truncate AuxPoW data (if using an AuxPoW chain) when cp_height is nonzero. AuxPoW data is still present when cp_height is zero. Non-AuxPoW chains are unaffected.
Version 1.5¶
Note
This is a draft of ideas for protocol 1.5; they are not implemented
This protocol version makes changes intended to allow clients and servers to more easily scale to support queries about busy addresses. It has changes to reduce the amount of round-trip queries made in common usage, and to make results more compact to reduce bandwidth consumption.
RPC calls with potentially large responses have pagination support,
and the return value of blockchain.scripthash.subscribe()
changes. Script hash status had to be recalculated
with each new transaction and was undefined if it included more than
one mempool transaction. Its calculation is linear in history length
resulting in quadratic complexity as history grows. Its calculation
for large histories was demanding for both the server to compute and
the client to check.
RPC calls and notifications that combined the effects of the mempool and confirmed history are removed.
The changes are beneficial to clients and servers alike, but will require changes to both client-side and server-side logic. In particular, the client should track what block (by hash and height) wallet data is synchronized to, and if that hash is no longer part of the main chain, it will need to remove wallet data for blocks that were reorganized away and get updated information as of the first reorganized block. The effects are limited to script hashes potentially affected by the reorg, and for most clients this will be the empty set.
New notifications¶
Changes¶
blockchain.scripthash.subscribe()
has changed its return value and the notifications it sendsblockchain.transaction.get()
takes an additional optional argument merkle
Removed methods¶
blockchain.scripthash.get_history()
. Switch toblockchain.scripthash.history()
blockchain.scripthash.get_mempool()
. Switch to handlingmempool.changes()
notificationsblockchain.scripthash.listunspent()
. Switch toblockchain.scripthash.utxos()