How does my bitcoin node know that a node it connects to is running the same version of the protocol?

0

As stated in the title. How do I know that when my node gets data from, or sends data to another node, that this other node is on the same version of the protocol? What prevents my node and their node from getting confused and communicating data between different versions of the network?

master565

Posted 2017-05-27T02:53:14.353

Reputation: 103

Answers

1

What different versions of the protocol/network? All protocol changes were backwards compatible, so there really is only one Bitcoin protocol. There are a few op_codes that old nodes don't interpret correctly, but they're fine with that.

Unless you're talking about altcoins and Bitcoin, they don't have the same seed nodes, so they wouldn't find each other. Even if they were, they'd ban each other for relaying invalid information.

This it's for example what happens if a protocol is upgraded that is not backwards compatible. Old nodes see that information from new nodes doesn't adhere to the rules and stop talking to them.

Murch

Posted 2017-05-27T02:53:14.353

Reputation: 41 609

I think your second answer had what I was looking for. I was thinking in the sense that someone maliciously produced a new bitcoin node with a modified version of the protocol that only they run. But if, as you say, any node with invalid information is banned, that makes sense.master565 2017-05-27T15:36:46.697