Commit 9172e9e
[Peras 4] Add ObjectDiffusion and
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`PerasCert diffusion (instance of ObjectDiffusion) (#1679)File tree
22 files changed
+1781
-45
lines changed- ouroboros-consensus-cardano
- changelog.d
- src
- ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano
- shelley/Ouroboros/Consensus/Shelley/Ledger
- ouroboros-consensus-diffusion
- changelog.d
- src
- ouroboros-consensus-diffusion/Ouroboros/Consensus
- Network
- Node
- unstable-diffusion-testlib/Test/ThreadNet
- test/mock-test/Test/ThreadNet
- ouroboros-consensus
- changelog.d
- src/ouroboros-consensus/Ouroboros/Consensus
- MiniProtocol/ObjectDiffusion
- Inbound
- ObjectPool
- Node
- test
- consensus-test
- Test/Consensus/MiniProtocol/ObjectDiffusion
- PerasCert
- storage-test/Test/Ouroboros/Storage/PerasCertDB
22 files changed
+1781
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
87 | | - | |
88 | | - | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments