lightninglabs / neutrino

Privacy-Preserving Bitcoin Light Client
MIT License
894 stars 182 forks source link

blockmanager.go: use btcd libs to validate headers #263

Closed Crypt-iQ closed 1 year ago

Crypt-iQ commented 1 year ago

This uses btcd's HeaderCtx and ChainCtx interfaces to be able to validate headers, both contextually and context-free. This allows neutrino to call blockchain.CheckBlockHeaderContext and blockchain.CheckBlockHeaderSanity. Also included is a check to assert that when neutrino receives a p2p headers message, that each header connects to the previous one.

TODO:

Roasbeef commented 1 year ago

Can be rebased now!

guggero commented 1 year ago

Replaced by https://github.com/lightninglabs/neutrino/pull/283, addressed all open review comments there.