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

Add vote-graph nodes for fork blocks #3

Open
rphmeier opened this issue Aug 24, 2018 · 0 comments
Open

Add vote-graph nodes for fork blocks #3

rphmeier opened this issue Aug 24, 2018 · 0 comments

Comments

@rphmeier
Copy link
Contributor

Currently, we only add vote-graph nodes for blocks which have been voted upon. Because of this, in the GHOST operation, we sometimes need to find a "merge point" under the following circumstances

  • We have a node which fulfills a condition (i.e. supermajority)
  • The node's children don't fulfill the condition
  • We need to find the highest descendent block of the node (possibly the node block itself) which fulfills the condition.

If we had nodes for fork blocks as well as voted-on blocks, the "merge" point operation (potentially expensive) would become unnecessary. The downside is that the add_vote operation may introduce up to two nodes to the graph, doubling the number of nodes and cost of search operations in the worst case.

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

No branches or pull requests

1 participant