-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
supplierChanges related to the Supplier actorChanges related to the Supplier actor
Milestone
Description
Objective
Make "fallback nodes" (formerly known as altruist nodes in Morse) part of the default onchain configurations.
Origin Document
- Pocket Network is dependent on a primitive called Sessions. See
proto/pocket/session/types.protofor details - Sessions work well for distributing and accounting rework fairly, but have limitations
- In Morse, there were offhcain altruists or the "shelter network"
- In Shannon, path has custom configurations for fallbacks
Goals
Create an "onchain" shelter network that has:
- A set of suppliers that remain constant across sessions, allowing to short-circuit
Session Rolloverissues - A set of suppliers that's trusted by the onchain authority, allowing to fallback to reliable nodes during major issues
Enable - A parallel mechanism to the fair distribution of relays
- Future work that builds on top of this to create an "Uber like" experience for relays
Deliverables
The deliverables below are directional suggestions on how to approach this. They shouldn't be followed verbatim.
- New messages in
proto/pocket/supplier/tx.protocalledAddShelterSupplierandRemoveShelterSupplier - Ensure the above are
authoritygated - New global variable that limits the number of shelter suppliers per service to some constant (e.g.
N=5) - Keep track of a list:
service_id -> [] suppliersonchain - During session generation, the first
Nsuppliers will ALWAYS be the shelter suppliers. The rest will be random - Create a followup ticket in
PATHto use the shelter suppleirs as fallback rather than a random endpoint (@adshmh)
Example:
- Assume
svc_idhas3shleter suppliers:ss1,ss2,ss3 - Assume there are 5 suppliers per session
- Assume
svc_idhas a total of 100 suppliers onchain (excludin shelter suppliers) session1: [ss1,ss2,ss3,random supplier 10,random supplier 20`]session2: [ss1,ss2,ss3,random supplier 15,random supplier 40`]
Non-goals / Non-deliverables
- Over-engineering this
Creator: @Olshansk
Co-Owners: @red-0ne @adshmh @fredteumer
Example:
- 3 shelter suppliers
- N supplies
- 2 sessions
- 5 supplier per session
flowchart TD
classDef shelterStyle fill:#FFB6C1,stroke:#333,stroke-width:2px,color:black
classDef randomStyle fill:#87CEEB,stroke:#333,stroke-width:2px,color:black
classDef sessionStyle fill:#DDA0DD,stroke:#333,stroke-width:2px,color:black
%% Supplies S pool
subgraph SuppliesS["Supplies for Service"]
direction TB
SS1(["SS1"])
SS2(["SS2"])
SS3(["SS3"])
S1(["S1"])
dots1["..."]
SN(["SN"])
end
%% Session 1
subgraph Session1["Session 1"]
direction TB
S1_1(["SS1"])
S1_2(["SS2"])
S1_3(["SS3"])
S1_5(["S_5"])
S1_10(["S_10"])
end
%% Session 2
subgraph Session2["Session 2"]
direction TB
S2_1(["SS1"])
S2_2(["SS2"])
S2_3(["SS3"])
S2_15(["S15"])
S2_25(["S25"])
end
%% Connections from Supplies S to Sessions
SuppliesS -.->|"Session Generation"| Session1
SuppliesS -.->|"Session Generation"| Session2
%% Apply styles
class SS1,SS2,SS3,S1_1,S1_2,S1_3,S2_1,S2_3,S2_2 shelterStyle
class S1,SN,S1_4,S1_S2_2,S2_4,S2_5,S1_5,S1_10,S2_15,S2_25 randomStyle
class dots1 randomStyle
Metadata
Metadata
Assignees
Labels
supplierChanges related to the Supplier actorChanges related to the Supplier actor
Type
Projects
Status
🔖 Ready