IntersectMBO / ouroboros-network

Specifications of network protocols and implementations of components running these protocols which support a family of Ouroboros Consesus protocols; the diffusion layer of the Cardano Node.
https://ouroboros-network.cardano.intersectmbo.org
Apache License 2.0
276 stars 86 forks source link

WIP: annotated decoder #4949

Open crocodile-dentist opened 2 months ago

crocodile-dentist commented 2 months ago

todo: tests

Description

Annotated decoder

Checklist

Quality

Maintenance

crocodile-dentist commented 2 months ago

Having a single runDecoderWithChannel and runDecoderWithLimit avoids some code duplication to ease maintenance, but to avoid leaking space for codec's that do not need annotation capability there should probably be a custom monoid instance for the bytes type which is strict in the accumulator and essentially a no-op.