beacon-APIs icon indicating copy to clipboard operation
beacon-APIs copied to clipboard

clarification on what is expected with `/eth/v1/beacon/headers`

Open rolfyone opened this issue 5 years ago • 1 comments

  • 2 Query parameters, slot and parent_root, and it's stipulated if no parameters are specified that slot defaults to head...

  • what if both parameters are specified? is it invalid, an OR, or an AND condition?

  • Assuming it's an AND (or OR really), does slot default to head only if there's no parent_root specified?

  • Assuming it's not defaulting slot, and a user specifies parent_root only, then is the expectation that the result would be all canonical and non canonical blocks with this parent?

  • If the block is finalized and only the canonical chain is stored, then we might only get the block with the parent_root on the canonical chain, because some clients may not store blocks that didn't make the chain long term. is that adequate for this endpoint?

rolfyone avatar Oct 22 '20 03:10 rolfyone

what if both parameters are specified? is it invalid, an OR, or an AND condition?

I don't think there is much benefit in OR condition while AND can be useful to get blocks with parentRoot where slot is immeditately after parent slot.

Assuming it's not defaulting slot, and a user specifies parent_root only, then is the expectation that the result would be all canonical and non canonical blocks with this parent?

yes

If the block is finalized and only the canonical chain is stored, then we might only get the block with the parent_root on the canonical chain, because some clients may not store blocks that didn't make the chain long term. is that adequate for this endpoint?

You are returning what you have, if that's only canonical block thats fine, if client has some flag to keep all non-canonical blocks they can return those as well I guess.

mpetrunic avatar Oct 22 '20 07:10 mpetrunic

closing ticket, I think this has pretty much gone stale at this point.

rolfyone avatar Oct 31 '22 02:10 rolfyone