cloudhead / nakamoto

Privacy-preserving Bitcoin light-client implementation in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementing BIP 152

vincenzopalazzo opened this issue · comments

Something is changing in bitcoin-rust rust-bitcoin/rust-bitcoin#249 (review) after that we could implement the complete BIP 152 for nakamoto.

I'm happy to have assigned this issue if you agree

What would that mean exactly, for nakamoto to support BIP 152?

Thanks for pinging me back @cloudhead, I was following the rust-bitcoin PR to achieve this goal here #44 (comment) for the moment we fall into an unsupported message but when rust-bitcoin handle this message, we can do the same things with Nakamoto.

BIP 152 Spec talks about the bandwidth for nodes on the P2P network, but I'm not very good at the p2p side to see if this impacts on Nakamoto client. BTW, I said somethings wrong with this issue? I'm missing some things that I need to go in deep?

As far as I'm aware, nakamoto has no use for BIP 152, since it only concerns block relay, and light-clients do not relay blocks. 🤷‍♂️

I can see why #44 confused you -- the problem is that before this change, the decoder would panic when it received a sendcmpct message, because NetworkMessage was non-exhaustive, so the only way to prevent that error was to send a lower protocol version. Now that unknown messages pose no problem, we can simply ignore the message,

Thanks, @cloudhead,

BIP 152, since it only concerns block relay, and light-clients do not relay blocks. man_shrugging

Right, this is why I feel stupid a little bit in my previous message, but I mean does quite not help to learn but only avoid making mistakes.

I can see why #44 confused you -- the problem is that before this change, the decoder would panic when it received a sendcmpct message, because NetworkMessage was non-exhaustive, so the only way to prevent that error was to send a lower protocol version. Now that unknown messages pose no problem, we can simply ignore the message,

Yep, I was missing the history of rust-bitcoin here, thanks for this clear explanation and sorry if I missed here the point.

No worries, we're all learning here :)