stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3k stars 660 forks source link

[Nakamoto] Block anti-entropy state machine #4065

Open jcnelson opened 7 months ago

jcnelson commented 7 months ago

Specific to the current (and possibly last N) tenures, the node must constantly make sure it has the latest blocks. It does so by executing a separate anti-entropy state machine for (1) determining what the current chain tip is, and (2) fetching the missing blocks from nodes that have a later chain tip than itself. It can perform (1) by piggy-backing the chain tip within a dedicated HTTP header, and in doing so, learn it in-band with any other HTTP-oriented protocol. It would run (2) constantly -- i.e. once per block time if need be.

saralab commented 2 months ago