Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prysm rpc: Get local header #14409

Open
wants to merge 57 commits into
base: epbs
Choose a base branch
from
Open

Prysm rpc: Get local header #14409

wants to merge 57 commits into from

Conversation

terencechain
Copy link
Member

This PR adds a Prysm RPC endpoint to retrieve the local header for the proposer to sign. The getLocalHeader call uses the existing getLocalPayloadFromEngine method and the input slot and proposer index to obtain the payload from the execution client.

This PR does not include caching the payload, we should implement caching once the end-to-end process is more defined, so we have a clearer understanding of what the cache's API will look like.

@terencechain terencechain requested a review from a team as a code owner September 2, 2024 02:37
@terencechain terencechain requested review from kasey, rauljordan and nisdas and removed request for a team September 2, 2024 02:37
return nil, status.Errorf(codes.FailedPrecondition, "EPBS fork has not occurred yet")
}

st, parentRoot, err := vs.getParentState(ctx, slot)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not good enough, this path will get the parent state from the blockroot without caring for full vs empty. I am not sure how to proceed, while this would be outside of the scope of this PR, I feel like merging this right now may turn out to surface subtle bugs later.

}

proposerIndex := req.ProposerIndex
localPayload, err := vs.getLocalPayloadFromEngine(ctx, st, parentRoot, slot, proposerIndex)
Copy link
Contributor

Choose a reason for hiding this comment

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

This function is still not compatible with ePBS, it doesn't handle the fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Blocked by research or external factors ePBS EIP-7732
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants