gouroboros
gouroboros copied to clipboard
Support for handshake query flag
The handshake protocol has a separate mode that queries available versions rather than performing a handshake. This operation must be done on a fresh connection, which then cannot be used after that.
We have support for a "query" flag in the handshake version data, but we don't do anything with it. From the Ouroboros network spec:
query, a boolean value: True will send back all supported versions & version data and terminate the connection.
We need to wire it up on both the client and server side. We'll need to add a new message type and add it as a possible response to MsgProposeVersions in the protocol state table.
msgQueryReply = [3 , versionTable ]
The versionTable above is the same one used in MsgProposeVersions, which we already have implemented.