IntersectMBO / IntersectMBO/ouroboros-consensus

Crash during deserialisation of of protocol magic, when it's too large to fit `int32`.

Open
#759 2 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

Whenever nodes are configured with a value of protocol magic too large to fit `int32`, this makes the receiving side crash.

https://github.com/input-output-hk/ouroboros-network/blob/master/ouroboros-consensus/src/Ouroboros/Consensus/Ledger/Byron.hs#L780

```
Sep 12 15:24:40 a-node 3xihbn4f05nyd2q38sk8ylr0xiszww26-unit-script-cardano-node_-start[21794]: cardano-node: ExceptionInLinkedThread "ThreadId 43" annotateBoundary: serialization roundtrip failure: DeserialiseFailure 2 "expected int32"
Sep 12 15:24:40 a-node 3xihbn4f05nyd2q38sk8ylr0xiszww26-unit-script-cardano-node_-start[21794]: CallStack (from HasCallStack):
Sep 12 15:24:40 a-node 3xihbn4f05nyd2q38sk8ylr0xiszww26-unit-script-cardano-node_-start[21794]: error, called at src/Ouroboros/Consensus/Ledger/Byron.hs:780:7 in ouroboros-consensus-0.1.0.0-EEi65UrUq7lCWnkSf1LDCN:Ouroboros.Consensus.Ledger.Byron
```

This is as per:
- `cardano-ledger` 22363162ee08039ec6158c24a0882c9357e9e35e
- `ouroboros-network` 05a62acdd64405e284d54a94d55cda832855a84e

Contributor guide

Open the contributing guide

Research direction

Start in Ouroboros/Consensus/Ledger/Byron.hs around line 780 and inspect the deserialization and serialization roundtrip involved in the reported failure. Use the provided oversized protocol-magic scenario and the referenced cardano-ledger and ouroboros-network revisions; done means the receiving side no longer crashes when the value does not fit int32.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
blockchain, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.