[Minor] Deterministic block rejections return HTTP 503 with retryable:true
Report
Summary: Several deterministic, permanent block-validation failures are returned as HTTP 503 (Service Unavailable) with "retryable": true, even though resubmitting the identical block will never succeed. Per the API spec, errors should be a JSON object with error.code / error.message / error.hint; these responses carry no code/hint, and the 503/retryable semantics incorrectly signal a transient server problem.
Affected component:
- HTTP API block ingestion (POST /api/v1/blocks/send, POST /api/v1/blocks/receive) on testnet node (https://test.network/api/v1)
- Scope per program: HTTP API
Evidence (reproduced 2026-11-09, testnet-0005):
Case 1 — "previous mismatch" (permanent client error) → 503 + retryable:true Submitting a valid, correctly signed send block whose previous references a hash that is not the account's frontier: {"error":"block rejected: previous mismatch: block references 3f681f61... but account frontier is 967416ba...","retryable":true}
HTTP status: 503
Case 2 — "source send not pending" → 503 + retryable:true Submitting a receive block whose source send is not pending (e.g. replayed claim, or non-existent source): {"error":"block rejected: source send not pending: abababababab...","retryable":true}
HTTP status: 503
In both cases the identical block resubmitted later returns the same permanent rejection — the error is not transient. For comparison, correctly-classified permanent errors on the same endpoints return 400 with "retryable": false (e.g. "block rejected: invalid proof of work"), so classification is inconsistent between error paths.
Impact:
- Incorrect retry semantics: HTTP-aware clients, SDKs, and load balancers treat 503/retryable as transient and will retry with backoff — generating pointless load and "stuck" integrations that loop forever on a permanently invalid block.
- Monitoring/alerting skew: 503s are typically routed to infrastructure on-call (server health), not to client-side validation bugs.
- Inconsistent contract: identical severity of error (permanent validation failure) yields 400/retryable:false on some paths and 503/retryable:true on others.
Suggested fix: Return 400 with retryable: false for deterministic validation failures (previous mismatch, source not pending, conflicts with finalized block), keep 503 only for genuinely transient conditions, and include error.code/error.hint per the documented error schema.
Reproduction: Any correctly-signed block can be replayed against a stale previous hash:
- Submit a valid send block (201).
- Resubmit another valid send block built on an older frontier hash → 503, retryable: true, identical result on every retry.
Full PoC scripts (Python, ed25519 signing + canonical v2 encoding) available on request.
Proposed tier: Minor (inconsistent/incorrect API error semantics, no direct economic impact)
Reporter:
- XE address for reward: afdc3f26ac9fabbecdfd4130c0c8990cc3ab367c9c4c1c82cda5ddb4d1d23692
- Only my own accounts were used; no third-party accounts or infrastructure were affected.
📍 Address XE : afdc3f26ac9fabbecdfd4130c0c8990cc3ab367c9c4c1c82cda5ddb4d1d23692
Thread
Thanks for the quick fix — I'm the original reporter of #319. The classification matches my suggested fix exactly (400 + retryable:false for deterministic rejections, 503 reserved for transient conditions).
For the record: reproduced on testnet-0005 on 2026-11-09 via signed blocks (previous mismatch on POST /blocks/send, source-not-pending on POST /blocks/receive). Happy to share the full PoC scripts (Python, ed25519 signing + canonical v2 encoding) if maintainers need them.
Payout addresses:
- XE L1: afdc3f26ac9fabbecdfd4130c0c8990cc3ab367c9c4c1c82cda5ddb4d1d23692
- Base USDC: 0xba7015ea1de4b84626dbebece3807a21206642ed
Thanks. This is the same finding as https://bounty.xe.network/XE-0014, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, reply with what differs and we will look again.