rust-electrum-client icon indicating copy to clipboard operation
rust-electrum-client copied to clipboard

Add support for Electrum protocol v1.6

Open tnull opened this issue 3 weeks ago • 0 comments

Electrum protocol v1.6 was merged a while ago: https://github.com/spesmilo/electrum-protocol/pull/6

See the docs for changes in the new version:

Changes

  • Breaking change for the version negotiation: we now mandate that the server.version() message must be the first message sent. That is, version negotiation must happen before any other messages.

  • Also for 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).

  • blockchain.scripthash.get_mempool() previously did not define an order for mempool transactions. We now mandate a specific ordering.

  • Optional mode argument added to blockchain.estimatefee().

  • blockchain.block.headers() now returns headers as a list, instead of a single concatenated hex string.

New methods

  • blockchain.transaction.broadcast_package() to broadcast a package of transactions (submitpackage).

  • mempool.get_info() to get more detailed and general relayfee info.

Removed methods

  • blockchain.relayfee() is removed. The minrelaytxfee field of the new mempool.get_info() RPC is a direct replacement.

By now some implementations have made some progress towards shipping support for it (see for example https://github.com/romanz/electrs/issues/1241), so it would be great to add support here, too.

For us (LDK), support for the new blockchain.transaction.broadcast_package is particularly important, as we want to lean on TRUC/v3 transaction relay ASAP.

tnull avatar Dec 23 '25 07:12 tnull