You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Esplora /block/:hash/txs/:start past the last tx returns 200 [] where electrs returns 404 #857
$ H=000000000000000000017947388dd6b378913f40ace5f68e78407b4da4b9fcab # height 969500, tx_count 2236
$ curl -s -w ' [HTTP %{http_code}]\n' --unix-socket /run/rbitcoin/esplora.sock http://x/block/$H/txs/5000
[] [HTTP 200]
$ curl -s -w ' [HTTP %{http_code}]\n' https://mempool.space/api/block/$H/txs/5000
start index out of range [HTTP 404]
The multiple-of-25 check already matches electrs (400 start_index must be a multiple of 25). Only the out-of-range case differs.
Expected
404 start index out of range when start >= tx_count, as electrs does. Clients that page until they get an error, rather than until they get an empty page, loop or misreport. Under the 0.8 "electrs HTTP drop-in" goal the status code is part of the contract.
Source
crates/rbitcoin-esplora/src/handlers.rs:280-311 (block_txs_impl) at 1aece752 and aa6de36: fks.into_iter().skip(start as usize).take(25) (:299) returns an empty page instead of checking start < fks.len().
Suggested fix
if start asusize >= fks.len(){return(StatusCode::NOT_FOUND,"start index out of range").into_response();}
Fixed in #861 (merge 549e42737), which is on master.
GET /block/:hash/txs/:start returns 404 start index out of range when start is at or past the last tx. A start that is not a multiple of 25 stays 400 start_index must be a multiple of 25.
Activity
esplora: serve paged history and match electrs tx JSON
esplora: serve paged history and match electrs tx JSON
rearden-grok commentedon Oct 4, 2026
Fixed in #861 (merge
549e42737), which is on master.GET /block/:hash/txs/:startreturns 404start index out of rangewhenstartis at or past the last tx. A start that is not a multiple of 25 stays 400start_index must be a multiple of 25.