Skip to content

Conversation

tbagrel1
Copy link

@tbagrel1 tbagrel1 commented Sep 12, 2025

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#5181


Peras ObjectDiffusion Mini-protocol:

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

Tests and benchmarks

  • 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:

@tbagrel1 tbagrel1 changed the base branch from main to main-pr/weighted-chain-selec September 12, 2025 13:09
@tbagrel1 tbagrel1 changed the title Add ObjectDiffusion and PerasCert diffusion (instace of ObjectDiffusion) Add ObjectDiffusion and PerasCert diffusion (instance of ObjectDiffusion) Sep 12, 2025
@tbagrel1 tbagrel1 added the Peras label Sep 12, 2025
@tbagrel1 tbagrel1 changed the title Add ObjectDiffusion and PerasCert diffusion (instance of ObjectDiffusion) [Peras #4] Add ObjectDiffusion and PerasCert diffusion (instance of ObjectDiffusion) Sep 12, 2025
@tbagrel1 tbagrel1 force-pushed the main-pr/object-diffusion branch from 80d3c69 to f88b3ae Compare September 12, 2025 14:32
@tbagrel1 tbagrel1 force-pushed the main-pr/weighted-chain-selec branch 6 times, most recently from dca0315 to d7c3c64 Compare September 18, 2025 08:47
@tbagrel1 tbagrel1 force-pushed the main-pr/object-diffusion branch 3 times, most recently from 37a9f85 to 222f4be Compare September 18, 2025 09:25
@tbagrel1 tbagrel1 force-pushed the main-pr/weighted-chain-selec branch from d7c3c64 to f1158c0 Compare September 19, 2025 07:58
tbagrel1 and others added 7 commits September 19, 2025 09:58
Also use defaultMiniProtocolParameters instead of hardcoded value in unstable-diffusion-testlib
to account for newly defined parameters in the new `ouroboros-network`
version.
Also integrate `NodeToNodeV_16`.

Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
…eader,Writer}` API

Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
…fusion

Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
Co-authored-by: Agustin Mista <[email protected]>
Co-authored-by: Alexander Esgen <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: Thomas BAGREL <[email protected]>
Co-authored-by: Nicolas BACQUEY <[email protected]>
Co-authored-by: Nicolas "Niols" Jeannerod <[email protected]>
@tbagrel1 tbagrel1 force-pushed the main-pr/object-diffusion branch from 222f4be to d47c331 Compare September 19, 2025 08:04
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.

1 participant