lightninglabs / neutrino

Privacy-Preserving Bitcoin Light Client
MIT License
900 stars 183 forks source link

filters: add additional verification of filters for p2wsh inputs #207

Closed Roasbeef closed 3 years ago

Roasbeef commented 4 years ago

As is, we can improve the verification of the filters we receive (given they aren't yet committed) by also verifying proper inclusion fo the expected pkScript for a given segwit input. Using the code from btcutil's new pkscript package, we can derive the expected pkScript for a given witness and/or sigScript instance. This allows us to assert that the filter has the information we (typically) care about, as in LN-land, we always use native segwit outputs.