Skip to content

Orphans - the lazy approach

David Vorick requested to merge orphans into master

I had some good ideas about better ways to deal with orphans. I pretty much disregarded everything that I wrote in the issue.

What happens, is when the state gets an orphan block it stores it for safekeeping. When it gets a new block it checks the orphans list to see if it has reconciled any orphans. If it has, it calls AcceptBlock() on them.

I did not write any code that actively searches for parents. I assume that CatchUp() will find anything important, and that if there really is an important orphan that needs to get reconciled, whoever has the full chain will actively tell everyone and get nodes to all agree about the new longest chain.

Honestly I feel like this approach is good enough.

Merge request reports