Open coot opened 1 year ago
Output from a broken cardano-ping
which sends invalid data for NodeToClientV_16
:
$ cardano-cli ping -Q -u /run/user/1000/coot-node.socket
/run/user/1000/coot-node.socket network rtt: 0.000
/run/user/1000/coot-node.socket handshake rtt: 0.127011123s
/run/user/1000/coot-node.socket Protocol error DecodeError 32783 "unknown encoding: TInt 764824073"
When negotiating versions we should ignore versions for which version data cannot be decoded. We do that only in
codecHandshake
which decodes bytes tocborg
Term
, but not inacceptOrRefuse
which decodes theTerm
to a Haskell data type.The PR should also enhance our test suite to send a mixture of:
One can easily test this by breaking encoding of one of the version data in
cardano-ping
library (that's how the issue was discovered).