-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
Description
While doing some testing I noticed that we're unable to load the block at the oldest_block_slot by slot:
curl -s "http://localhost:5052/eth/v1/beacon/blinded_blocks/3174625" | jq
{
"code": 404,
"message": "NOT_FOUND: beacon block at slot 3174625",
"stacktraces": []
}
This is because block_root_at_slot_skips_none always tries to load the block root of the previous slot to the one queried, which fails when requesting the oldest_block_slot.
lighthouse/beacon_node/beacon_chain/src/beacon_chain.rs
Lines 1036 to 1047 in 999b045
| if let Some(((prev_root, _), (curr_root, curr_slot))) = process_results( | |
| self.forwards_iter_block_roots_until(prev_slot, request_slot)?, | |
| |iter| iter.tuple_windows().next(), | |
| )? { | |
| // Sanity check. | |
| if curr_slot != request_slot { | |
| return Err(Error::InconsistentForwardsIter { | |
| request_slot, | |
| slot: curr_slot, | |
| }); | |
| } | |
| Ok((curr_root != prev_root).then_some(curr_root)) |