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

Refactor ProcessAttestationNoVerifySignature to VerifyAttestationNoVerifySignature #8566

Merged
merged 2 commits into from
Mar 6, 2021

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Mar 5, 2021

What type of PR is this?

Refactor

What does this PR do? Why is it needed?

Currently

ProcessAttestationNoVerifySignature {
// Verify attestation slot, epoch... etc
// Modify beacon state with attestation
// Verify attestation valid indices
}

In Prysm, we use ProcessAttestationNoVerifySignature as a pure verification function without the advertised side effect as modifying beacon state. This PR changes:

VerifyAttestationNoVerifySignature {
// Verify attestation slot, epoch... etc
// Verify attestation valid indices
}

ProcessAttestationNoVerifySignature {
VerifyAttestationNoVerifySignature
// Modify beacon state with attestation
}

Note that Verify attestation valid indices now comes before Modify beacon state with attestation. That is ok and arguably better

Which issues(s) does this PR fix?

Helps #8563

Other notes for review

#8563 is blocked until this

@terencechain terencechain requested a review from a team as a code owner March 5, 2021 17:13
@terencechain terencechain self-assigned this Mar 5, 2021
@terencechain terencechain added the Ready For Review A pull request ready for code review label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants