|
|
@@ -43,21 +43,6 @@ The `Event` could have many actions according to the underlying data.
|
|
|
|-------------- | -------------------- | ---------------------------------------------- |
|
|
|
| seen | HashSet<`EventId`> | A list of `Event`s have imported from Model |
|
|
|
|
|
|
-
|
|
|
-## UnreadMessages
|
|
|
-
|
|
|
-Once a `Event` received from the network it will be added to this list unless it has `read_confirms` above the `MAXIMUM CONFIRMATION`.
|
|
|
-All unread `Event`s are continually sent until receiving confirmations from other nodes.
|
|
|
-
|
|
|
-All the `Event`s will apply to these filtering rules:
|
|
|
-- Reject new `Event` too far in the future from now (20 Minutes)
|
|
|
-- Reject old `Event` too far in the past from now (1 Hour)
|
|
|
-- All `Event`s are organized by timestamp. Older `Event`s just gently expired and are then ignored.
|
|
|
-
|
|
|
-| Description | Data Type | Comments |
|
|
|
-|-------------|---------------------------- | -------------------------------------------------------------------------------------|
|
|
|
-| Messages | HashMap<`InvItem`, `Event`> | Hold all the `Event`s that have broadcasted to other nodes but haven't confirmed yet |
|
|
|
-
|
|
|
## InvItem
|
|
|
|
|
|
Unique generated integer
|
|
|
@@ -68,18 +53,32 @@ Unique generated integer
|
|
|
|
|
|
On receiving a new `Event`, the node must advertise its knowledge for this `Event` to confirm receipt
|
|
|
|
|
|
-| Description | Data Type | Comments |
|
|
|
-|-------------|-------------------- |---------------------- |
|
|
|
-| Invs | Vec<`InvItem`> | A list of `InvItem` |
|
|
|
+| Description | Data Type | Comments |
|
|
|
+|-------------- | -------------------- | -------------------------- |
|
|
|
+| Invs | Vec<`InvItem`> | A list of `InvItem` |
|
|
|
|
|
|
## GetData
|
|
|
|
|
|
On receiving an `Inv` message if the client doesn't have the `InvItem`s,
|
|
|
Sending back `GetData` message contain the missing `InvItem`s
|
|
|
|
|
|
-| Description | Data Type | Comments |
|
|
|
-|-------------|-------------------- |---------------------- |
|
|
|
-| Invs | Vec<`InvItem`> | A list of `EventId` |
|
|
|
+| Description | Data Type | Comments |
|
|
|
+|-------------- | -------------------- | -------------------------- |
|
|
|
+| Invs | Vec<`InvItem`> | A list of `EventId` |
|
|
|
+
|
|
|
+## UnreadMessages
|
|
|
+
|
|
|
+Once a `Event` received from the network it will be added to this list unless it has `read_confirms` above the `MAXIMUM CONFIRMATION`.
|
|
|
+All unread `Event`s are continually sent until receiving confirmations from other nodes.
|
|
|
+
|
|
|
+All the `Event`s will apply to these filtering rules:
|
|
|
+- Reject new `Event` too far in the future from now (20 Minutes)
|
|
|
+- Reject old `Event` too far in the past from now (1 Hour)
|
|
|
+- All `Event`s are organized by timestamp. Older `Event`s just gently expired and are then ignored.
|
|
|
+
|
|
|
+| Description | Data Type | Comments |
|
|
|
+|-------------|---------------------------- | -------------------------------------------------------------------------------------|
|
|
|
+| Messages | HashMap<`InvItem`, `Event`> | Hold all the `Event`s that have broadcasted to other nodes but haven't confirmed yet |
|
|
|
|
|
|
## Sync
|
|
|
|