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

Check attestation has pre state before retrieving it #6149

Merged
merged 10 commits into from Jun 5, 2020

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Jun 5, 2020

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
To verify the signature of an incoming unaggregated attestation over the wire, the beacon node will retrieve the pre state of block voted by that attestation. The current order of operation is the following:

1. Get attestation pre state
2. Check if pre state for block exists, if not, place the attestation in pending queue
3. Verify attestation signature using pre state

The order of operation was obvious wrong before. This PR updates to the following:

1. Check if pre state for block exists, if not, place the attestation in pending queue
2. Get attestation pre state
3. Verify attestation signature using pre state

Which issues(s) does this PR fix?
Fixes part of #6148

Other notes for review
Tested run time

cc: @farazdagi

@terencechain terencechain added the Ready For Review A pull request ready for code review label Jun 5, 2020
@terencechain terencechain requested a review from a team as a code owner June 5, 2020 18:13
@terencechain terencechain self-assigned this Jun 5, 2020
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