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

Part 10 of proto array fork choice - Add Store #4644

Merged
merged 8 commits into from Jan 24, 2020

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Jan 24, 2020

This PR implements the store functions that satisfies fork choice interface:

type ForkChoice interface {
	HeadRetriever        // to compute head.
	BlockProcessor       // to track new block for fork choice.
	AttestationProcessor // to track new attestation for fork choice.
	Pruner               // to clean old data for fork choice.
}

Please don't be discourage with the diff, the implementation is just 80 lines that's in in store.go. Rest 800 lines are tests with clear commentary and text graphs 👍

// 0
// / \
// justified: 0, finalized: 0 -> 1 2 <- justified: 0, finalized: 0
// | |
Copy link
Member Author

Choose a reason for hiding this comment

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

this looks good on my IDE, but looks messed up here

@terencechain terencechain self-assigned this Jan 24, 2020
@terencechain terencechain added Ready For Review A pull request ready for code review Forkchoice labels Jan 24, 2020
@terencechain terencechain merged commit 0f730b5 into master Jan 24, 2020
@delete-merged-branch delete-merged-branch bot deleted the proto-array-forkchoice-11 branch January 24, 2020 18:58
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 24, 2020
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 28, 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