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

Implement Fork Choice Rule for Beacon Chain #255

Closed
terencechain opened this issue Jul 13, 2018 · 1 comment · Fixed by #643
Closed

Implement Fork Choice Rule for Beacon Chain #255

terencechain opened this issue Jul 13, 2018 · 1 comment · Fixed by #643
Milestone

Comments

@terencechain
Copy link
Member

terencechain commented Jul 13, 2018

To resolve this issue, we will implement beacon chain fork choice rule for ethereum 2.0. We need to implement beacon chain as standalone PoS chain which tags alone with the PoW main chain. There is a dependent fork choice rule where the head of the beacon chain is the highest scoring beacon chain block along with a main chain block reference that points to the highest scoring main chain block. This implies that every beacon chain block will contain main chain block reference that has the highest score. Then the head of of the beacon chain block is the one with the highest beacon chain score.

Whenever beacon chain node receives a new block, it should apply the fork choice rule to keep track of the head of main and beacon chains. When the node receives a new block, it changes the head only if the block score is an improvement over the existing head and also the new block's main chain reference is in the main chain.

@rauljordan
Copy link
Contributor

To update this, we have implemented all of the block processing + head update logic with a naive fork choice rule as a stub (see #422) that selects the first received processed block during a slot as canonical. A PR that successfully fulfills this issue will implement a minimal, immediate message driven GHOST protocol as a real fork choice rule in our beacon chain instead of our current stub. This will require a design doc before diving into implementation details, as it is a non-trivial feature to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants