memoriesadrift / tuw-cryptocurrencies-blockchain

Blockchain created for the Cryptocurrencies course at TU Wien
0 stars 0 forks source link

T1: Protocol Handshake #4

Closed memoriesadrift closed 11 months ago

memoriesadrift commented 11 months ago

Description

Note: Every message you send on the network must have a newline, i.e. "\n" at the end. Your node should use this to help parse and defragment valid messages. If you do not receive a hello message after 20s or receive a second hello message, you should send an error message (again with name INVALID_HANDSHAKE) and close the connection.

Scope

  1. Send hello message to newly discovered nodes
  2. Error when receiving anything but a hello from unknown nodes
  3. Reply with hello when receiving hello from unknown nodes
memoriesadrift commented 11 months ago

Not mentioned in scope, just noticed: " If you do not receive a hello message after 20s or receive a second hello message, you should send an error message (again with name INVALID_HANDSHAKE) and close the connection."