Skip to content

Add support for the blockchain.scripthash.get_mempool endpoint #120

Closed

Description

@evanlinjin

This is part of the Protocol Methods.

Currently, if a client attempts to call this, it is met with EOF (which is rather confusing since electrs advertises a protocol version of 1.4).

Activity

  1. EddieHouston commented on Jun 17, 2026

    @EddieHouston
    Collaborator

    PR #226 implements blockchain.scripthash.get_mempool.

    It returns the unconfirmed history of a script hash as a list of {tx_hash, height, fee}, where height is 0 when all inputs are confirmed and -1 when the tx has unconfirmed parents, per the protocol spec. It performs a mempool-only lookup and enforces the same txs_limit / "too popular" guard as get_history.

    On ordering: at protocol 1.4 (which electrs advertises) the result order is undefined, so this PR returns results in mempool order. Protocol 1.6 tightens this to require canonical ordering ((-height, tx_hash), matching the script-hash status order). That's tracked as part of the broader 1.6 work in #172 and can be added here or there.

    Thanks @SomberNight for the pointer to the up-to-date docs at spesmilo/electrum-protocol.

  2. self-assigned this
    on Jun 17, 2026
  3. added a commit that references this issue on Jul 1, 2026
    eda9dbd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions