Skip to content

Commit

Permalink
feat: fix #1805 by implementing Nakamoto consensus on the history of …
Browse files Browse the repository at this point in the history
…anchor blocks. The canonical Stacks fork must pass through the longest history of anchor blocks (by number of anchor blocks and empty reward cycles). Use anchor block affirmation maps to identify and track the heaviest anchor block history, and if the heaviest affirmation map changes, invalidate sortitions and reprocess them, but this time, use the new heaviest affirmation map to deduce which anchor blocks *must exist*. This not only makes it possible to reorg the Stacks blockchain if the network loses an anchor block, but also makes the act of re-affirming an anchor block N reward cycles ago *at least as hard as* mining N+1 new reward cycles.
  • Loading branch information
jcnelson committed Jun 14, 2021
1 parent 365e10c commit f5da764
Showing 1 changed file with 898 additions and 82 deletions.
Loading

0 comments on commit f5da764

Please sign in to comment.