Since the #30 deploy, the intents backfill on bob has logged near shard layout unreadable … 422 Unprocessable Entity for url (https://near.internal/) every 15 s: 57 times in 15 minutes. indexed_from has been stuck at 218,363,445 since the deploy before it.
Two bugs, either one enough to stall the scan.
NEAR skips heights, and a batch reads its shard layout at its first height. Block 218,363,445 has prev_height 218,363,443. Height 218,363,444 was never produced, and every endpoint, including the archive, answers UNKNOWN_BLOCK for it. The descending batch starts at low - 1 = 218,363,444, asks EXPERIMENTAL_protocol_config at that height, fails, and retries the same question forever. The ascending side runs the same code and will freeze the same way the first time a batch begins on a skipped height. On NEAR that is a matter of when, not if.
Our neard answers JSON-RPC errors with HTTP 422; FastNEAR answered them with 200.RpcClient::call_one calls error_for_status() before reading the body. A well-formed {"error": {"cause": {"name": "UNKNOWN_BLOCK"}}} therefore arrives as DataError::Http, a transport failure, and the error is never classified. chunk() cannot recognise a skipped height (it treats UNKNOWN_BLOCK at or above the live endpoint's earliest height as skipped), and deep() never asks the archive. It also breaks the house rule that a JSON-RPC error is the node answering: on a multi-endpoint chain, a 4xx with an error body would fail over.
What
call_one reads the body whatever the status. A JSON-RPC error is DataError::Rpc; a non-success status without a JSON-RPC body stays a transport-class failure that fails over.
The scan takes the shard layout from the first height in the batch that exists. It skips heights that are unknown everywhere rather than failing the batch on them.
A test for each.
## Why
Since the #30 deploy, the intents backfill on bob has logged `near shard layout unreadable … 422 Unprocessable Entity for url (https://near.internal/)` every 15 s: 57 times in 15 minutes. `indexed_from` has been stuck at 218,363,445 since the deploy before it.
**Two bugs, either one enough to stall the scan.**
1. **NEAR skips heights, and a batch reads its shard layout at its first height.** Block 218,363,445 has `prev_height` 218,363,443. Height 218,363,444 was never produced, and every endpoint, including the archive, answers `UNKNOWN_BLOCK` for it. The descending batch starts at `low - 1` = 218,363,444, asks `EXPERIMENTAL_protocol_config` at that height, fails, and retries the same question forever. The ascending side runs the same code and will freeze the same way the first time a batch begins on a skipped height. On NEAR that is a matter of when, not if.
2. **Our neard answers JSON-RPC errors with HTTP 422; FastNEAR answered them with 200.** `RpcClient::call_one` calls `error_for_status()` before reading the body. A well-formed `{"error": {"cause": {"name": "UNKNOWN_BLOCK"}}}` therefore arrives as `DataError::Http`, a transport failure, and the error is never classified. `chunk()` cannot recognise a skipped height (it treats `UNKNOWN_BLOCK` at or above the live endpoint's earliest height as skipped), and `deep()` never asks the archive. It also breaks the house rule that a JSON-RPC error is the node answering: on a multi-endpoint chain, a 4xx with an error body would fail over.
## What
- `call_one` reads the body whatever the status. A JSON-RPC `error` is `DataError::Rpc`; a non-success status without a JSON-RPC body stays a transport-class failure that fails over.
- The scan takes the shard layout from the first height in the batch that exists. It skips heights that are unknown everywhere rather than failing the batch on them.
- A test for each.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Since the #30 deploy, the intents backfill on bob has logged
near shard layout unreadable … 422 Unprocessable Entity for url (https://near.internal/)every 15 s: 57 times in 15 minutes.indexed_fromhas been stuck at 218,363,445 since the deploy before it.Two bugs, either one enough to stall the scan.
prev_height218,363,443. Height 218,363,444 was never produced, and every endpoint, including the archive, answersUNKNOWN_BLOCKfor it. The descending batch starts atlow - 1= 218,363,444, asksEXPERIMENTAL_protocol_configat that height, fails, and retries the same question forever. The ascending side runs the same code and will freeze the same way the first time a batch begins on a skipped height. On NEAR that is a matter of when, not if.RpcClient::call_onecallserror_for_status()before reading the body. A well-formed{"error": {"cause": {"name": "UNKNOWN_BLOCK"}}}therefore arrives asDataError::Http, a transport failure, and the error is never classified.chunk()cannot recognise a skipped height (it treatsUNKNOWN_BLOCKat or above the live endpoint's earliest height as skipped), anddeep()never asks the archive. It also breaks the house rule that a JSON-RPC error is the node answering: on a multi-endpoint chain, a 4xx with an error body would fail over.What
call_onereads the body whatever the status. A JSON-RPCerrorisDataError::Rpc; a non-success status without a JSON-RPC body stays a transport-class failure that fails over.