Skip to content

Conversation

@agustinmista
Copy link
Contributor

TODO:

  • Write description
  • Add commit messages to individual commits
  • Add changelog entry

tbagrel1 and others added 4 commits November 28, 2025 14:16
…ObjectDiffusion) (#1679)

This pull request introduces support for the ObjectDiffusion
mini-protocol, required for Peras (for certificates and votes
diffusion). It also plugs the PerasCertDiffusion (instance of
ObjectDiffusion) mini-protocol in the networking layer.

This PR depends on an updated version of `ouroboros-network`, see
IntersectMBO/ouroboros-network#5202 and
https://github.com/IntersectMBO/ouroboros-network/tree/peras-staging/pr-5202-v2

---

- Added modules
`Ouroboros.Consensus.MiniProtocol.ObjectDiffusion{.Inbound,.Outbound}`
with implementations of the ObjectDiffusion protocol (quite
similar/inspired from TX-submission, except that client = inbound,
server = outbound)
- Added module
`Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.ObjectPool.API`
defining `ObjectPool{Reader,Writer}` interfaces, through which
ObjectDiffusion accesses/stores the objects to send/that have been
received.
- Added modules
`Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.PerasCert` and
`Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.ObjectPool.PerasCert`
containing definitions specific to `PerasCert` diffusion through the
ObjectDiffusion mini-protocol
- Modifies `Ouroboros.Consensus.Node.Serialisation` to add CBOR
serialisation (`SerialiseNodeToNode`) for `Point blk`, `Tip blk`, and
`PerasCert blk`
- Modifies `Ouroboros.Consensus{.Node,.Node.Tracer,.Network.NodeToNode}`
to wire-in PerasCertDiffusion similarly to other mini-protocols (e.g.
TX-submission)

---

- Added module `Test.Consensus.MiniProtocol.ObjectDiffusion.Smoke` with
smoke test for the general ObjectDiffusion mini-protocol (using mock
objects)
- Added module
`Test.Consensus.MiniProtocol.ObjectDiffusion.PerasCert.Smoke` with smoke
test specific to `PerasCert` diffusion through ObjectDiffusion

- Updates `Test.ThreadNet.Network` in `unstable-diffusion-testlib`
accordingly to the changes made in
`Ouroboros.Consensus.Network.NodeToNode`

---

**Network Protocol Version Updates:**

- Depends on `ouroboros-network` rev
https://github.com/IntersectMBO/ouroboros-network/tree/peras-staging/pr-5202-v2
through source-repository-package directive
- Added support in `ouroboros-consensus` for `NodeToNodeV_16`
…niProtocol.ObjectDiffusion.Inbound.V1

NOTE: if [Peras 8] gets merged before this PR, we will also need to rename:

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/Inbound/State.hs

to

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/Inbound/V1/State.hs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants