You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/ObjectPool/API.hs
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,30 @@
1
+
--| API for reading from and writing to object pools in the ObjectDiffusion
2
+
-- miniprotocol.
3
+
--
4
+
-- The underlying object pool can be any database, such as a 'PerasCertDb' in
5
+
-- Peras certificate diffusion.
6
+
--
7
+
-- 'ObjectPoolReader' is used on the outbound side of the protocol. Objects in
8
+
-- the pool are ordered by a strictly increasing ticket number ('ticketNo'),
9
+
-- which represents their time of arrival. Ticket numbers are local to each
10
+
-- node, unlike object IDs, which are global. Object IDs are not used for
11
+
-- ordering, since objects may arrive slightly out of order from peers.
12
+
--
13
+
-- To read from the pool, one requests objects with a ticket number strictly
14
+
-- greater than the last known one. 'oprZeroTicketNo' provides an initial ticket
15
+
-- number for the first request.
16
+
--
17
+
-- 'ObjectPoolWriter' is used on the inbound side of the protocol. It allows
18
+
-- checking whether an object is already present (to avoid re-requesting it) and
19
+
-- appending new objects. Ticket numbers are not part of the inbound interface,
20
+
-- but are used internally: newly added objects always receive a ticket number
21
+
-- strictly greater than those of older ones.
22
+
--
23
+
-- This API design is inspired by 'MempoolSnapshot' from the TX-submission
0 commit comments