get First Available Block
Returns the oldest block from which every later block can be retrieved with getBlock.
getFirstAvailableBlock returns the oldest block from which every later block can be retrieved with getBlock. With long-term storage (Blade Runner and Nexus plans) it returns 0, the genesis block, because Cube Runner can retrieve every block since genesis from long-term storage.
Without it (Free and Operator plans) it returns the oldest block from which the region holds every later block, in its cache or its ledger. The value rises as old blocks are pruned. Older blocks are still returned when a cache in any region holds them.
A backward walk through getBlock history that needs every block stops at this slot. minimumLedgerSlot marks the same limit for getTransaction.
Historical lookups
| Plan | Returns |
|---|---|
| Free | The region's oldest block |
| Operator | The region's oldest block |
| Blade Runner | 0 (genesis) |
| Nexus | 0 (genesis) |
Parameters
This method takes no parameters.
Result
The oldest slot from which every later block can be retrieved with getBlock. 0 in the Blade Runner and Nexus plans.
Notes
- In the Free and Operator plans, a
getBlockrequest for a block that no cache, ledger or other region holds returns code-32001with HTTP200. The message anddata.firstAvailableBlockcarry this value.