Difference between revisions of "Version Handshake"

From Bitcoin Wiki
Jump to: navigation, search
(Created page with "On connect, version and verack messages are exchanged, in order to ensure compatibility between peers. ==...")
 
(Version Handshake)
Line 5: Line 5:
 
When the local peer (L) connects to a remote peer (R), the remote peer will not send any data until it receives a version message.
 
When the local peer (L) connects to a remote peer (R), the remote peer will not send any data until it receives a version message.
  
  L -> R: Send version message with the local peer's version
+
L -> R: Send version message with the local peer's version
  R -> L: Send version message back
+
R -> L: Send version message back
  R:      Sets version to the minimum of the 2 versions
+
R -> L: Send verack message
  R -> L: Send verack message
+
R:      Sets version to the minimum of the 2 versions
  L:      Sets version to the minimum of the 2 versions
+
L -> R: Send verack message after receiving version message from R
 +
L:      Sets version to the minimum of the 2 versions
  
 
Note: A version number of 10300 is converted to 300 before being processed and versions below 209 are no longer supported.
 
Note: A version number of 10300 is converted to 300 before being processed and versions below 209 are no longer supported.

Revision as of 13:33, 28 September 2017

On connect, version and verack messages are exchanged, in order to ensure compatibility between peers.

Version Handshake

When the local peer (L) connects to a remote peer (R), the remote peer will not send any data until it receives a version message.

L -> R: Send version message with the local peer's version
R -> L: Send version message back
R -> L: Send verack message
R:      Sets version to the minimum of the 2 versions
L -> R: Send verack message after receiving version message from R
L:      Sets version to the minimum of the 2 versions

Note: A version number of 10300 is converted to 300 before being processed and versions below 209 are no longer supported.