Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions docs/protocol-basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ revision number.

A party to a connection will speak all protocol versions in a range,
say from `protocol_min` to `protocol_max`, which may be the same.
When a connection is made, both client and server must initially
assume the protocol to use is their own `protocol_min`.

The client should send a :func:`server.version` RPC call as early as
possible in order to negotiate the precise protocol version; see its
description for more detail. All responses received in the stream
from and including the server's response to this call will use its
negotiated protocol version.
The client must send a :func:`server.version` RPC call as the first
message on the wire, in order to negotiate the precise protocol
version; see its description for more detail.
All responses received in the stream from and including the server's
response to this call will use its negotiated protocol version.


.. _script hashes:
Expand Down Expand Up @@ -144,23 +142,31 @@ Status
To calculate the `status` of a :ref:`script hash <script hashes>` (or
address):

1. order confirmed transactions to the script hash by increasing
height (and position in the block if there are more than one in a
block)
1. Consider all transactions touching the script hash (both those spending
from it, and those funding it), both confirmed and unconfirmed (in mempool).

2. form a string that is the concatenation of strings
2. Order confirmed transactions by increasing height (and position in the
block if there are more than one in a block).

3. form a string that is the concatenation of strings
``"tx_hash:height:"`` for each transaction in order, where:

* ``tx_hash`` is the transaction hash in hexadecimal

* ``height`` is the height of the block it is in.

3. Next, with mempool transactions in any order, append a similar
string for those transactions, but where **height** is ``-1`` if the
transaction has at least one unconfirmed input, and ``0`` if all
inputs are confirmed.
4. For mempool transactions, we define **height** to be ``-1`` if the
transaction has at least one unconfirmed input, and ``0`` if all inputs are
confirmed.

5. Order mempool transactions by ``(-height, tx_hash)``, that is,
``0`` height txs come before ``-1`` height txs, and secondarily the
txid (in network byteorder) is used to arrive at a canonical ordering.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the byteorder used for the sorting is not the human-readable txid byteorder but the network one.
I chose this because it fits the existing internals of electrumx much nicer.

However in cculianu/electrum-cash-protocol#5 (comment) @cculianu expressed frustration about this choice.

I guess I don't mind either way though.
Any strong opinions?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your asking others for feedback on this.

the network one.

Just to be annoying -- I'll smartly say that it can be argued the "network" order is only useful if you speak the p2p protocol. Otherwise it can be argued the true network order is the RPC order. :P

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any strong opinions?

Network byteorder makes sense to me for such an internal behavior, IMO. But, the most important thing is that it's well defined.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a detailed example in 919df4f, to try to avoid any misunderstanding.

Copy link
Copy Markdown

@cculianu cculianu Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You guys are seriously muddled in your thinking:

  • First off, referring to it as "network" order is misleading. WHICH network are we referring to here? The p2p protocol? Nobody involved in Electrum-style wallets speaks that protocol.
  • For the purposes of this discussion, let's be more precise:
    • Electrum protocol uses "big endian" hash order (that is, reversed from the in-memory order one gets from sha256d) -- it uses this EVERYWHERE in the protocol.
    • Bitcoin p2p network, for its messages, etc, uses "little endian" hash order (that is, exactly what you get from sha256d).

This latter thing you are calling "network" order. However the term is misleading because for our network, the network order is actually the other order! The big endian order!

Are we clear on that?

So what you are proposing is that this will be the only place anywhere within this protocol where we are to look at txn hashes as being in the opposite order from every other place.

Are we clear on what is happening here?

I strongly disagree with this approach since:

  • It's unexpected
  • It's ugly
  • There is no justification for it other than "well Electrum does it this way..."

Please change this to what Fulcrum was already doing since 2020.

I won't comply with this in Fulcrum because it's dumb. Sorry. I already solved this problem in 2020 and it's doing the "natural" thing -- using the hash order for the hashes as they appear everywhere else in the protocol. That's what most people expect.

What you want to do here is just unexpected and creates more work for me. And all for no good reason. No can do. Sorry.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion, but Cormorant (Sparrow's EPS clone) is using big endian order as well. And I agree stating 'big endian' or 'little endian' is clearer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First off, referring to it as "network" order is misleading. WHICH network are we referring to here? The p2p protocol? Nobody involved in Electrum-style wallets speaks that protocol.

Fair enough, I meant the bitcoin p2p network.

  • For the purposes of this discussion, let's be more precise:
    • Electrum protocol uses "big endian" hash order (that is, reversed from the in-memory order one gets from sha256d) -- it uses this EVERYWHERE in the protocol.
    • Bitcoin p2p network, for its messages, etc, uses "little endian" hash order (that is, exactly what you get from sha256d).

Is that really more precise? Unlike what you say, the output of sha256 is big-endian. :D

see page 12 (of 36) of https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf :

Throughout this specification, the “big-endian” convention is used

See also, https://en.wikipedia.org/wiki/SHA-256, where at least for the pseudo-code it states:

Big-endian convention is used [...]

Or see e.g. https://learnmeabitcoin.com/technical/general/little-endian/ , which says little-endian is used for integers but big-endian is used for hashes in the bitcoin p2p protocol.

Even if you still disagree, at least please accept that it is not intuitive or clear what big-endian or little-endian is when thinking of the byte-vector output of a hash function. The output is not an integer.
Clearly it is not intuitive if what you thought is actually the opposite of what the standard says.

I won't comply with this in Fulcrum because it's dumb. [...] No can do. Sorry.

Ok, I changed the order to what you suggested.
I wish you had been clearer from the start that this is a complete blocker for you.

See 394a8fd

And I agree stating 'big endian' or 'little endian' is clearer.

I disagree. I hope I illustrated how that would not be clear at all. :P
The updated text now says:

the txid (endianness same as human-readable hex string used for display) is used to arrive at a canonical ordering.

I think that should be clear. And in any case, there is an example.

and creates more work for me.

I just spent an hour updating the server code, the client code, and writing a new example for the spec.
It was writing the new example that took most of that time.

Is it really that much work to add a reverse iterator or a minus sign to your comparator?
The diff was 6 characters in e-x:
spesmilo/electrumx@0f3e261


6. Next, with mempool transactions in the specified order, append a similar
string.

4. The :dfn:`status` of the script hash is the :func:`sha256` hash of the
7. The :dfn:`status` of the script hash is the :func:`sha256` hash of the
full string expressed as a hexadecimal string, or :const:`null` if the
string is empty because there are no transactions.

Expand Down
41 changes: 40 additions & 1 deletion docs/protocol-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Protocol Changes
================

This documents lists changes made by protocol version.
This document lists changes made by protocol version.

Version 1.0
===========
Expand Down Expand Up @@ -175,3 +175,42 @@ New methods
-----------

* :func:`blockchain.name.get_value_proof` to resolve a name (with proof). Name index coins (e.g. Namecoin) only.


Version 1.5
===========

(this version number was skipped, no corresponding protocol is defined)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I skipped 1.5.x as Fulcrum and https://github.com/cculianu/electrum-cash-protocol uses these version numbers.
However I now realise this is nevertheless somewhat problematic:
if a client wants to support protocol version 1.4 and 1.6 but not 1.5.x, they are in quite a pickle.
If the client sends server.version("electrum/4.6.2", ["1.4", "1.6"]) to Fulcrum 2.0, the server will select protocol version 1.5.x.

By design of server.version, clients must support a continuous range of versions.
OTOH, servers are free to pick-and-choose any particular protocol version they want and can skip interim versions.

From a quick read of "electrum-cash-protocol", I think all the changes in the interim versions are backwards compatible. So maybe this is all ~fine... Nevertheless, the situation is unfortunate.



.. _version 1.6:

Version 1.6
===========

Changes
-------

* 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.
* 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.

New methods
-----------

* :func:`blockchain.transaction.broadcast_package` to broadcast a package of transactions (submitpackage).
* :func:`mempool.get_info` to get more detailed and general relayfee info.

Removed methods
---------------

* :func:`blockchain.relayfee` is removed. The `minrelaytxfee` field
of the new :func:`mempool.get_info` RPC is a direct replacement.
190 changes: 155 additions & 35 deletions docs/protocol-methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ With *cp_height* 8::
blockchain.block.headers
========================

Return a concatenated chunk of block headers from the main chain.
Return a chunk of block headers from the main chain.

**Signature**

Expand All @@ -85,6 +85,8 @@ Return a concatenated chunk of block headers from the main chain.
.. versionchanged:: 1.4
*cp_height* parameter added
.. versionchanged:: 1.4.1
.. versionchanged:: 1.6
response contains *headers* field instead of *hex*

*start_height*

Expand All @@ -106,17 +108,16 @@ Return a concatenated chunk of block headers from the main chain.
A dictionary with the following members:

* *count*

The number of headers returned, between zero and the number
requested. If the chain has not extended sufficiently far, only
the available headers will be returned. If more headers than
*max* were requested at most *max* will be returned.

* *hex*
* *headers*

The binary block headers concatenated together in-order as a
hexadecimal string. Starting with version 1.4.1, AuxPoW data (if present
in the original header) is truncated if *cp_height* is nonzero.
An array containing the binary block headers in-order; each header is a
hexadecimal string. AuxPoW data (if present in the original header) is
truncated if *cp_height* is nonzero.
Comment on lines +116 to +120
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re #6 (comment)
@cculianu

Looks very reasonable!

regarding the concatenation -> list for headers — what is the rationale for this?

my biggest concern here is I really hate apis that return different results based on versioning — although I know that is the philosophy behind the electrum protocol — it just makes me uneasy that some wallet dev or some api out there will have extra burden created by a breaking api

I would prefer adding a new method name that returns list or having it take an optional extra arg to indicate list

Rationale again is I fear negative value is created for the world every time some devs (in this case us) introduce api breakage and in this case it’s not like there’s that much burden on us to continue to send it as a concatenation… literally in python joining a string from a list is implemented on the C side anyway so..

Yes in hindsight it would have been more aesthetic had the headers response been a list… for sure.

but again I feel more burden is exacted on the world now to change it.. my two cents.

edit: also note it’s faster in general in most json libs to parse 1 giant string that is N 80-byte headers concatenated than it is to parse a list of N items, each being a string of 80 bytes .. so there’s that.. but that is minor


regarding the concatenation -> list for headers — what is the rationale for this?

That change was originally asked for Namecoin as it has variable sized headers.
For any of our use cases, there is no practical gain at all. In fact it makes the response size around 2% larger :P
Nevertheless, it is a conceptual clean-up, and even if we don't care about altcoins I think it's nice to do this small cheap generalisation here.

The earliest non-IRC discussion about it is probably:
spesmilo/electrumx#109

I also think putting this small breaking change into the API serves as a sanity-check whether an implementation that bumps the version number really read and implemented the spec :)

One of the main points of having a version number and negotiation is to allow making breaking changes.

I would prefer [...] having it take an optional extra arg to indicate list

I don't want the API to offer a choice between concatted str and a list. Would rather keep the API simple.

I would prefer adding a new method name that returns list

Sure, if you think that's better, we could rename the method to make the breaking change obvious. (i.e. rm the old method and add a new method with a different name)

But then I would remove the current method (so just do a rename). I already gave this some thought in the context of blockchain.relayfee vs mempool.get_info, where we could e.g. mark blockchain.relayfee as deprecated and then only rm it in a later version, but as there is a direct replacement API, I think there is no point and we should just rm it right away. Same thinking here if we rename it.


Ultimately it's the least interesting change, so if controversial, we could also drop it.

Copy link
Copy Markdown

@cculianu cculianu Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable sized headers.

Ahh. Well that settles it, then. Yes, if the protocol is to support such coins, one needs this.

bumps the version number really read and implemented the spec :)

Ha ha.

Sure, if you think that's better, we could rename the method to make the breaking change obvious. (i.e. rm the old method and add a new method with a different name)

No, it's fine. Since you prefer simplicity (as do I), it's ok. Yes, that is a good point about namecoin needing this and a good point as well about the entire point of version negotiation. I think it's fine as proposed, then.


As for mempool.relayfee vs mempool.get_info.. I also think as proposed it's fine. No need to change anything. Stick to the proposal you have so you can get this out the door faster.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it's nicer to keep discussions threaded)

That change was originally asked for Namecoin as it has variable sized headers.

Making a change to blockchain.block.headers is unnecessary for this (niche) use case - Namecoin can already use JSON-RPC batching with blockchain.block.header to retrieve a bunch of variable sized headers. Given this, consider whether making this breaking change actually does more harm than good?

Using JSON-RPC batching to fetch n single headers compared to a single RPC to fetch a list/concat increases the upstream bandwidth to around n times as large (and the downstream to around 20% more - less if the headers are much larger than 2*80 bytes). (Then as n reaches the chunk size, e.g. 2016, the factor stops growing. Requesting 10**6 headers only increases the upstream bw to 2016x)
It is also higher CPU load on the server to process 2016 RPCs vs just 1.

So yes, indeed requesting headers one-by-one is a workaround. Though there is a reason this separate RPC for requesting a chunk of headers exists in the first place - it is purely for efficiency.

EDIT: I can demonstrate why it creates more work for wallet devs even if they implement version negotiation correctly.

Any change in the protocol creates some work for client/server devs, even more so if they want to support multiple protocol versions at the same time.

Copy link
Copy Markdown

@cculianu cculianu Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any change in the protocol creates some work for client/server devs, even more so if they want to support multiple protocol versions at the same time.

Fair enough. However I'd like to say that when one "breaks" an existing API, in order to avoid annoying people, it's nice to also "reward" the dev who now has extra work to do.. with some new feature or facility on account of the fact that he was asked to do some extra work. This is how one makes people happy, and keeps them from being resentful.

In this case: an API nobody ever worries about (headers), now needs to be worried-about, with 0 or almost no benefit for 99.9% of code out there. Would have been less antagonistic to users of this protocol to just offer up a blockchain.block.headers2 or somesuch for the headers-as-list people. Just sayin'.

Anyway yeah I'm fine with moving ahead and not belaboring this point any further... let's get 1.6 out the door.


* *max*

Expand Down Expand Up @@ -149,7 +150,11 @@ See :ref:`here <cp_height example>` for an example of *root* and

{
"count": 2,
"hex": "0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c010000006fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e61bc6649ffff001d01e36299"
"headers":
[
"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c",
"010000006fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e61bc6649ffff001d01e36299"
],
"max": 2016
}

Expand All @@ -161,12 +166,21 @@ be confirmed within a certain number of blocks.

**Signature**

.. function:: blockchain.estimatefee(number)
.. function:: blockchain.estimatefee(number, mode=None)
.. versionchanged:: 1.6
*mode* argument added

*number*

The number of blocks to target for confirmation.

*mode*

A string to pass to the bitcoind *estimatesmartfee* RPC as the
*estimate_mode* parameter. Optional. If omitted, the corresponding
parameter to the bitcoind RPC is also omitted, i.e. the default
value is determined by bitcoind.

**Result**

The estimated transaction fee in whole coin units per kilobyte, as a
Expand All @@ -179,6 +193,11 @@ be confirmed within a certain number of blocks.

0.00101079

.. note:: This estimate typically comes from the Bitcoin daemon, which only updates
its estimate when new blocks are mined. The server is free to cache this internally
for performance reasons, however it SHOULD avoid sending stale estimates
by e.g. invalidating the cache before notifying clients of a new block header.


blockchain.headers.subscribe
============================
Expand Down Expand Up @@ -234,31 +253,6 @@ Subscribe to receive block headers when a new block is found.
block headers to acquire a consistent view of the chain state.


blockchain.relayfee
===================

Feerates lower than this are considered zero fee and are not being
relayed to the bitcoin network by the server.
This feerate does not guarantee acceptance into the mempool of the server.

**Signature**

.. function:: blockchain.relayfee()

**Result**

The feerate in BTC/kvB, as a floating point number.

**Example Results**

::

1e-05

::

0.0

blockchain.scripthash.get_balance
=================================

Expand Down Expand Up @@ -359,15 +353,18 @@ hashes>`.

.. function:: blockchain.scripthash.get_mempool(scripthash)
.. versionadded:: 1.1
.. versionchanged:: 1.6
results must be sorted (previously undefined order)

*scripthash*

The script hash as a hexadecimal string.

**Result**

A list of mempool transactions in arbitrary order. Each mempool
transaction is a dictionary with the following keys:
A list of mempool transactions. The order is the same as when computing the
:ref:`status <status>` of the script hash.
Each mempool transaction is a dictionary with the following keys:

* *height*

Expand Down Expand Up @@ -552,6 +549,92 @@ Protocol version 1.0 returning an error as the result:

"258: txn-mempool-conflict"

blockchain.transaction.broadcast_package
========================================

Broadcast a package of transactions to the network (submitpackage). The package must consist of a child with its parents,
and none of the parents may depend on one another. The package must be topologically sorted,
with the child being the last element in the array.

**Signature**

.. function:: blockchain.transaction.broadcast_package(raw_txs, verbose=false)

*raw_txs*

An array of raw transactions, each as a hexadecimal string.

*verbose*

Whether a verbose coin-specific response is required.

**Result**

If *verbose* is :const:`false`:

A dictionary with the following keys:

* `success`
Comment thread
SomberNight marked this conversation as resolved.
* Type: bool
* Value: Indicating the result of the package submission
* `errors`
* Type: Optional[List[Dict]]
* Value: Error message and txid (NOT wtxid) of transactions that were not accepted

If *verbose* is :const:`true`:

The bitcoind response according to its RPC API documentation.
Comment thread
SomberNight marked this conversation as resolved.
Outdated
Note that the exact structure and semantics can depend on the bitcoind version,
and hence the electrum protocol can make no guarantees about it.

**Result Example**

When *verbose* is :const:`false`::

{
"success": true
}

With errors:

{
"success": false,
"errors":
[
{
"txid": "ec6f295cd4b1b91f59cabb0ab8fdc7c76580db08be6426e465f75a69d82b9659",
"error": "bad-txns-inputs-missingorspent"
}
]
}

When *verbose* is :const:`true`::
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we really care that this endpoint could ever be implemented by something else than Bitcoin Core, it might make sense to simplify the return values (esp. the verbose one), as they are very specific to Bitcoin Core. However, the chances are rather slim that we'll see any other implementation supporting package relay/TRUC any time soon.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verbose=True response should not be relied upon by clients, its structure entirely depends on bitcoind.

This is similar to the existing blockchain.transaction.get:

**Result**
If *verbose* is :const:`false`:
The raw transaction as a hexadecimal string.
If *verbose* is :const:`true`:
The result is a bitcoind-specific dictionary -- whatever bitcoind
returns when asked for a verbose form of the raw transaction.

Clients are expected to use verbose=False, which is guaranteed stable. verbose=True is there for debugging or quick scripts, or potentially hacky stopgaps if bitcoind adds some useful field in the future and the electrum protocol moves slow. (some prior discussion in #1 (comment))

I have clarified this more now in a new commit:
b269a8f

Copy link
Copy Markdown

@tnull tnull Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clients are expected to use verbose=False, which is guaranteed stable. verbose=True is there for debugging or quick scripts, or potentially hacky stopgaps if bitcoind adds some useful field in the future and the electrum protocol moves slow. (some prior discussion in #1 (comment))

Btw., note that this instability for tranaction_get has been pretty annoying for us in the past, as AFAIU it's the only way to get the status of a transaction in a single call (i.e., get if/in which block hash / height a transaction was confirmed). All other ways to get the same data require sequential calls, which is not only much less efficient, but also error prone to become inconsistent as the chain might change while we're still trying to aggregate all the necessary data.

And independent of whether Core changes any return values, it can't be currently leaned on, as some implementation simply don't handle it (see for example Blockstream/electrs here: https://github.com/Blockstream/electrs/blob/f1823d82b03dbd1dfef53f7b3611128dd2f4c1d2/src/electrum/server.rs#L386 , even though they happily announce support for protocol v1.4). I'm noting this here as it is a prime example why I'm strongly against advertising a protocol version for which you don't support the full feature set.


{ (json object)
"package_msg" : "str", (string) The transaction package result message. "success" indicates all transactions were accepted into or are already in the mempool.
"tx-results" : { (json object) transaction results keyed by wtxid
"wtxid" : { (json object) transaction wtxid
"txid" : "hex", (string) The transaction hash in hex
"other-wtxid" : "hex", (string, optional) The wtxid of a different transaction with the same txid but different witness found in the mempool. This means the submitted transaction was ignored.
"vsize" : n, (numeric, optional) Sigops-adjusted virtual transaction size.
"fees" : { (json object, optional) Transaction fees
"base" : n, (numeric) transaction fee in BTC
"effective-feerate" : n, (numeric, optional) if the transaction was not already in the mempool, the effective feerate in BTC per KvB. For example, the package feerate and/or feerate with modified fees from prioritisetransaction.
"effective-includes" : [ (json array, optional) if effective-feerate is provided, the wtxids of the transactions whose fees and vsizes are included in effective-feerate.
"hex", (string) transaction wtxid in hex
...
]
},
"error" : "str" (string, optional) The transaction error string, if it was rejected by the mempool
},
...
},
"replaced-transactions" : [ (json array, optional) List of txids of replaced transactions
"hex", (string) The transaction id
...
]
}

blockchain.transaction.get
==========================

Expand Down Expand Up @@ -795,6 +878,42 @@ pool, weighted by transaction size.
[[59.5, 30324], [40.1, 34305], [35.0, 38459], [29.3, 41270], [27.0, 45167], [24.3, 53512], [22.9, 53488], [21.8, 70279], [20.0, 65328], [18.2, 72180], [18.1, 5254], [18.0, 191579], [16.5, 103640], [15.7, 106715], [15.1, 141776], [14.0, 183261], [13.5, 166496], [11.8, 166050], [11.1, 242436], [9.2, 184043], [7.1, 202137], [5.2, 222011], [4.8, 344788], [4.6, 17101], [4.5, 1696864], [4.1, 598001], [4.0, 32688687], [3.9, 505192], [3.8, 38417], [3.7, 2944970], [3.3, 693364], [3.2, 726373], [3.1, 308878], [3.0, 11884957], [2.6, 996967], [2.3, 822802], [2.2, 9075547], [2.1, 12149801], [2.0, 16387874], [1.4, 873120], [1.3, 3493364], [1.1, 2302460], [1.0, 23204633]]


mempool.get_info
================

Returns details on the active state of the TX memory pool.

**Signature**

.. function:: mempool.get_info()

**Result**

A dictionary with the following keys:

* `mempoolminfee`
* Type: floating point number
* Value:
Dynamic minimum fee rate in BTC/kvB for tx to be accepted given current conditions.
The maximum of minrelaytxfee and minimum mempool fee, in BTC/kvB.
* `minrelaytxfee`
* Type: floating point number
* Value: Static operator-configurable minimum relay fee for transactions, in BTC/kvB.
* `incrementalrelayfee`
* Type: floating point number
* Value: Static operator-configurable minimum fee rate increment for mempool limiting or replacement, in BTC/kvB.

**Example Result**

::

{
"mempoolminfee": 0.00001000,
"minrelaytxfee": 0.00001000,
"incrementalrelayfee": 0.00001000
}


server.add_peer
===============

Expand Down Expand Up @@ -991,6 +1110,7 @@ server.version
==============

Identify the client to the server and negotiate the protocol version.
This must be the first message sent on the wire.
Only the first :func:`server.version` message is accepted.

**Signature**
Expand Down
Loading