Skip to content

Conversation

michaelsproul
Copy link
Member

Issue Addressed

Closes #4751

Proposed Changes

Prevent state_root_at_slot and block_root_at_slot from erroring out due to a call to self.slot()? that fails before genesis. This fixes pre-genesis queries for:

  • block at slot 0
  • block by genesis block root
  • state at slot 0
  • state by genesis state root
  • state at finalized tag
  • state at justified tag

@michaelsproul michaelsproul added ready-for-review The code is ready for review v4.5.0 ETA Q4 2023 low-hanging-fruit Easy to resolve, get it before someone else does! labels Sep 21, 2023
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 21, 2023
@paulhauner
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 21, 2023
## Issue Addressed

Closes #4751

## Proposed Changes

Prevent `state_root_at_slot` and `block_root_at_slot` from erroring out due to a call to `self.slot()?` that fails before genesis. This fixes pre-genesis queries for:

- block at slot 0
- block by genesis block root
- state at slot 0
- state by genesis state root
- state at `finalized` tag
- state at `justified` tag
@bors
Copy link

bors bot commented Sep 21, 2023

@bors bors bot changed the title Fix block & state queries prior to genesis [Merged by Bors] - Fix block & state queries prior to genesis Sep 21, 2023
@bors bors bot closed this Sep 21, 2023
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Closes sigp#4751

## Proposed Changes

Prevent `state_root_at_slot` and `block_root_at_slot` from erroring out due to a call to `self.slot()?` that fails before genesis. This fixes pre-genesis queries for:

- block at slot 0
- block by genesis block root
- state at slot 0
- state by genesis state root
- state at `finalized` tag
- state at `justified` tag
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Closes sigp#4751

## Proposed Changes

Prevent `state_root_at_slot` and `block_root_at_slot` from erroring out due to a call to `self.slot()?` that fails before genesis. This fixes pre-genesis queries for:

- block at slot 0
- block by genesis block root
- state at slot 0
- state by genesis state root
- state at `finalized` tag
- state at `justified` tag
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Closes sigp#4751

## Proposed Changes

Prevent `state_root_at_slot` and `block_root_at_slot` from erroring out due to a call to `self.slot()?` that fails before genesis. This fixes pre-genesis queries for:

- block at slot 0
- block by genesis block root
- state at slot 0
- state by genesis state root
- state at `finalized` tag
- state at `justified` tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge. v4.5.0 ETA Q4 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants