IntersectMBO / IntersectMBO/ouroboros-network

Relax handshake negotiation

Open
#4,599 1 comment 0 reactions 0 assignees View on GitHub
handshake
Dominant language
Haskell
Stars
296
Forks
104
Avg merge
2d 10h
Merged PRs (30d)
4

Description

When negotiating versions we should ignore versions for which version data
cannot be decoded. We do that only in [`codecHandshake`] which decodes bytes
to `cborg` `Term`, but not in [`acceptOrRefuse`] which decodes the `Term`
to a Haskell data type.

The PR should also enhance our test suite to send a mixture of:
* valid version data
* invalid CBOR bytestring of version data
* valid CBOR bytestring, but invalid CBOR encoding of version data

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).

[`codecHandshake`]: https://input-output-hk.github.io/ouroboros-network/ouroboros-network-framework/Ouroboros-Network-Protocol-Handshake-Codec.html#v:codecHandshake
[`acceptOrRefuse`]: https://input-output-hk.github.io/ouroboros-network/ouroboros-network-framework/Ouroboros-Network-Protocol-Handshake-Client.html#v:acceptOrRefuse

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.