This document lists changes made by protocol version.
- improved semantics of :func:`server.version` to aid protocol negotiation, and a changed return value.
- :func:`blockchain.transaction.get` no longer takes the height argument that was ignored anyway.
- :func:`blockchain.transaction.broadcast` returns errors like any other JSON RPC call. A transaction hash result is only returned on success.
- :func:`blockchain.transaction.get` now has an optional parameter verbose.
- :func:`blockchain.headers.subscribe` now has an optional parameter raw.
- :func:`server.version` should not be used for "ping" functionality; use the new :func:`server.ping` method instead.
- :func:`blockchain.block.get_chunk`. Switch to :func:`blockchain.block.headers`
- :func:`blockchain.address.get_balance`. Switch to :func:`blockchain.scripthash.get_balance`.
- :func:`blockchain.address.get_history`. Switch to :func:`blockchain.scripthash.get_history`.
- :func:`blockchain.address.get_mempool`. Switch to :func:`blockchain.scripthash.get_mempool`.
- :func:`blockchain.address.listunspent`. Switch to :func:`blockchain.scripthash.listunspent`.
- :func:`blockchain.address.subscribe`. Switch to :func:`blockchain.scripthash.subscribe`.
- :func:`blockchain.headers.subscribe` with raw other than :const:`True`.
- :func:`blockchain.headers.subscribe` argument raw switches default to :const:`True`
This version removes all support for :ref:`deserialized headers <deserialized header>`.
- Deserialized headers are no longer available, so removed argument raw from :func:`blockchain.headers.subscribe`.
- Only the first :func:`server.version` message is accepted.
- Optional cp_height argument added to :func:`blockchain.block.header` and :func:`blockchain.block.headers` to return merkle proofs of the header to a given checkpoint.
- :func:`blockchain.transaction.id_from_pos` to return a transaction hash, and optionally a merkle proof, given a block height and position in the block.
- :func:`blockchain.block.header` and :func:`blockchain.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.
- :func:`blockchain.scripthash.unsubscribe` to unsubscribe from a script hash.
- :func:`blockchain.name.get_value_proof` to resolve a name (with proof). Name index coins (e.g. Namecoin) only.
(this version number was skipped, no corresponding protocol is defined)
- Breaking change for the version negotiation: we now mandate that the :func:`server.version` message must be the first message sent. That is, version negotiation must happen before any other messages.
- Also for :func:`server.version`, the server must tolerate and ignore extraneous arguments, to allow for extensions in future protocol versions.
- The status of a scripthash has its definition tightened in a backwards-compatible way: mempool txs now have a canonical ordering defined for the calculation (previously their order was undefined).
- :func:`blockchain.scripthash.get_mempool` previously did not define an order for mempool transactions. We now mandate a specific ordering.
- Optional mode argument added to :func:`blockchain.estimatefee`.
- :func:`blockchain.block.headers` now returns headers as a list, instead of a single concatenated hex string.
- :func:`blockchain.transaction.broadcast_package` to broadcast a package of transactions (submitpackage).
- :func:`mempool.get_info` to get more detailed and general relayfee info.
- :func:`blockchain.relayfee` is removed. The minrelaytxfee field of the new :func:`mempool.get_info` RPC is a direct replacement.
:func:`server.ping` can now also be sent as an unrequested notification, by both the client and the server. The request/response signature also changed.
The blockchain.scripthash.* methods are all replaced with blockchain.scriptpubkey.* methods. Note: sha256(scriptPubKey) == scripthash. Besides taking a scriptPubKey instead of a scripthash as input param, the new methods also have some minor functional changes.
- the notifications for :func:`blockchain.scriptpubkey.subscribe` still contain the scripthash
- the protocol now guarantees that a notification is sent even if the status of the scriptPubKey did not change but there was a reorg affecting a relevant tx
- many RPC results now contain the chaintip (and hence return dict instead of array)
The hash_function field is removed from the :func:`server.features` response.
Standardize "history too large" error code for blockchain.scriptpubkey.* methods.
- :func:`blockchain.scriptpubkey.get_balance`
- :func:`blockchain.scriptpubkey.get_history`
- :func:`blockchain.scriptpubkey.get_mempool`
- :func:`blockchain.scriptpubkey.listunspent`
- :func:`blockchain.scriptpubkey.subscribe`
- :func:`blockchain.scriptpubkey.unsubscribe`
- :func:`blockchain.outpoint.subscribe` to subscribe to a transaction outpoint, and get a notification when it gets spent.
- :func:`blockchain.outpoint.unsubscribe` to unsubscribe from a TXO.
- :func:`blockchain.outpoint.get_status` to get current status of a TXO, without subscribing to changes.
- :func:`blockchain.transaction.testmempoolaccept`
- :func:`mempool.recent` to list a few of the latest txs just added to the mempool.