prysm
prysm copied to clipboard
Archive node API is limited to the last 8192 states
Description
The state API is limited to the last 8192 states even for archive nodes.
🔬 Minimal Reproduction
Start an archive node by adding the parameter --slots-per-archive-point=1
and let it sync for more than 8192 blocks.
Get the state root of a block:
curl -s http://127.0.0.1:3500/eth/v2/beacon/blocks/1 | jq '.data.message.state_root'
Make a query for that state root:
curl -s http://127.0.0.1:3500/eth/v1/beacon/states/0x71ddf39322af21eeabda04f605992ab5027533eb8e9ab915075d432a886c6e51/committees
🔥 Error
{
"message": "State not found: state not found in the last 8192 state roots",
"code": 404
}
🌍 Your Environment
The issue can be reproduced with the following docker-compose file:
version: "3"
services:
beacon-chain:
image: gcr.io/prysmaticlabs/prysm/beacon-chain:stable
volumes:
- "./data:/tmp/datadir"
ports:
- "3500:3500"
command:
- --slots-per-archive-point=1
- --datadir=/tmp/datadir
- --rpc-host=0.0.0.0
- --accept-terms-of-use