-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
Description
Describe the bug
Hi there,
This appears to be a discompliance of Prysm implementation of endpoint getStateRandao
with the specification.
According to the Beacon-API spec:
By adjusting the state_id parameter you can query for any historic value of the RANDAO mix.
However, when querying the state from an older history (e.g., in slot 431, epoch 13, querying slot 31 from epoch 0), I receive the following error:
{"message":"Epoch is out of range for the randao mixes of the state","code":400}
In contrast, other clients like Nimbus, Teku, and Lodestar successfully return the RANDAO
mix for the same query:
{"execution_optimistic":false,"finalized":true,"data":{"randao":"0x9504f7c08724a673793669c15bb6b4b77d456ae0d216cfe4868a41e798d70244"}}
Related implementation in Prysm:
prysm/beacon-chain/rpc/eth/beacon/handlers_state.go
Lines 115 to 118 in 278b796
if epoch > stEpoch || uint64(epoch) < randaoEpochLowerBound+1 { | |
httputil.HandleError(w, "Epoch is out of range for the randao mixes of the state", http.StatusBadRequest) | |
return | |
} |
Thanks for your time!
Has this worked before in a previous version?
N/A
🔬 Minimal Reproduction
curl -s -X GET "http://127.0.0.1:$port/eth/v1/beacon/states/31/randao" -H "Content-Type: application/json" -d {}
Error
{"message":"Epoch is out of range for the randao mixes of the state","code":400}
Platform(s)
Linux (x86)
What version of Prysm are you running? (Which release)
Prysm/v6.0.4 (linux amd64)
Anything else relevant (validator index / public key)?
gcr.io/offchainlabs/prysm/beacon-chain:HEAD-278b79
gcr.io/offchainlabs/prysm/validator:HEAD-278b79