Skip to content

0.8: mempool.space Core + electrs drop-in - #632

Open
rearden-grok[bot] wants to merge 21 commits into
masterfrom
docs/0.8-q68
Open

rearden-grok[bot] wants to merge 21 commits into
masterfrom
docs/0.8-q68

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Esplora is a mempool/electrs HTTP drop-in except /address-prefix (404). nginx /api/ → this process; /api/v1/ stays mempool Node.
  • Core RPC for that stack is unix {datadir}/rpc.sock (filesystem auth) plus a documented mempool bitcoin-client socketPath patch. TCP stays Bearer. That is the one documented RPC difference.
  • HTTP SH join is last-1 GET + last-bulk POST (16 MiB/client) keyed by X-Rbitcoin-Client (unix/loopback, 30s idle, 256 clients). Not an 8-script LRU and not a >5s process whale cache. Unbounded process LRU stays X-M3. Extra RAM is kernel page cache; public whale GETs are CDN.
  • Also: Core getblock header fields / v2 size+fee, Core getnetworkhashps, incremental mempool snapshot (no {}), electrs GET /txs/outspends, ?after_txid=, POST /addresses|scripthashes/txs, GET /broadcast, POST /txs/test, tx JSON sigops.

Test plan

  • cargo test -p rbitcoin-esplora --lib join
  • cargo test -p rbitcoin-electrum --lib dispatch_casa_sequence_reuses_sh_join_slot
  • cargo clippy --workspace --all-targets -- -D warnings
  • required CI green on rewritten esplora/mempool-drop-in

Do not merge unless asked.

@rearden-grok rearden-grok Bot changed the title docs: 0.8 Core+electrs drop-in plan (Q-68) 0.8: Core + electrs HTTP drop-in (Q-68) Sep 18, 2026
let (dir, q) = temp_query();
let (parent, prev) = connect_op_true_blocks(&q, 3);
let merkle = [0xcd; 32];
let hash = rbitcoin_store::block_header_hash(1, &parent, &merkle, 4, 0x207f_ffff, 3);
);
assert_eq!(v["txid"], block_hash_hex(&spend2_txid));
assert_eq!(v["vin"][0]["prevout"]["value"].as_i64(), Some(49_0000_0000));
assert_eq!(v["sigops"], 4, "OP_CHECKSIG output scaled: {v}");
rearden-grok Bot and others added 21 commits September 18, 2026 23:47
Park the mempool/electrs REST surface as 0.8 work. Core RPC for that
stack is unix rpc.sock, not cookie. Liquid and in-binary /api/v1/ stay out.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stock mempool bitcoin-client is TCP+cookie. Point it at {datadir}/rpc.sock
with the documented socketPath patch.

Co-authored-by: Cursor <cursoragent@cursor.com>
--esplora-listen a filesystem path binds AF_UNIX (mode 0660) so nginx can
proxy without exposing TCP.

Co-authored-by: Cursor <cursoragent@cursor.com>
electrs /internal mempool pages need a stable published JSON snapshot
instead of walking the admit lock.

Co-authored-by: Cursor <cursoragent@cursor.com>
Serve the electrs frontend bulk routes from the published snapshot and
store, not a second address index.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the axum worker free while snapshot and Class A reads run on the
blocking pool.

Co-authored-by: Cursor <cursoragent@cursor.com>
One catalog entry for the bulk REST paths on the live node.

Co-authored-by: Cursor <cursoragent@cursor.com>
COMPAT/OPERATOR match the shipped unix listen, /internal/*, and unix
rpc.sock recipe.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clippy: sort_by_key on snapshot objects; unix listen already returns
the handle.

Co-authored-by: Cursor <cursoragent@cursor.com>
Emit difficulty, versionHex, chainwork, and nextblockhash. Verbosity 1
still skip-reconstructs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match Core verbosity 2 sizing. Per-tx fee is BTC and omitted on coinbase.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use chainwork delta over min/max header time; nblocks<=0 is the retarget
window. Not dummy 2-work-per-block.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rebuild the published snapshot incrementally so unchanged txs keep their
pre-serialized JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
Never cache {}; serve the array by joining already-serialized entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
electrs frontend batch outspends. Over 50 is 400.

Co-authored-by: Cursor <cursoragent@cursor.com>
Skip through a known tx (mempool then chain). Unknown or unparseable is
422 after_txid not found.

Co-authored-by: Cursor <cursoragent@cursor.com>
POST /addresses|scripthashes/txs and /txs/summary merge unique scripts
(max 300).

Co-authored-by: Cursor <cursoragent@cursor.com>
GET /broadcast?tx= admits like POST /tx. POST /txs/test is dry-run
test_accept with electrs maxfeerate BTC/kvB. No hub is 503 before decode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Lift tx_sigop_cost and depend on rbitcoin-consensus so production lib
builds sigops (BIP16+BIP141), not only tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Unix/loopback X-Rbitcoin-Client reuse: one completed GET slot plus a
16 MiB last-bulk POST bag, 30s idle, 256 clients. Public TCP stays
stack-local. Unbounded process LRU stays out.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend the live Esplora/RPC/Electrum journey with GET /broadcast (live
duplicate is 400), POST /txs/test, GET /txs/outspends, after_txid,
POST /scripthashes/txs, and tx JSON sigops.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rearden-grok
rearden-grok Bot deleted the docs/0.8-q68 branch September 19, 2026 06:51
@rearden-grok rearden-grok Bot changed the title 0.8: Core + electrs HTTP drop-in (Q-68) 0.8: mempool.space Core + electrs drop-in Sep 19, 2026
@rearden-grok

rearden-grok Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Refreshing head after branch rename to esplora/mempool-drop-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant