vacp2p / research

Thinking in code
MIT License
62 stars 4 forks source link

Waku mode accounting for resources spike #3

Closed oskarth closed 3 years ago

oskarth commented 4 years ago

We want to use Waku mode https://github.com/status-im/specs/pull/54 as a testing ground for accounting for resources.

(Later iterations leads into settlement).

Waku mode is a bit simpler than a larger network, since end nodes are in a direct relationship with the consuming node. However, this can be generalized later.

Also see:

Acceptance criteria

There's some notion of accounting for resources for Waku-san and Waku-chan. Most likely for bandwidth. Under some rough guarantees.

oskarth commented 4 years ago

Sketch based on SWAP model:

  1. The minimal accounting unit is a Whisper Envelope
  2. If a node has requested envelopes over some topic, we assume delivery of an envelope over this topic is a valuable service
  3. Each node keeps a tally of offered and received services
  4. These tallies are independently maintained, and there's no need for consent of pairwise balances
  5. There's a faux payment threshold and faux disconnect threshold
  6. The settlement implied in step 5 isn't active, instead it is simply logged as events
oskarth commented 4 years ago

Should be doable in a spec for v1 and some print statements for PoC.

Additional nice to have: have different weight for expired messages, which reflects storage cost

oskarth commented 4 years ago

Also look into PSS postage stamp idea

oskarth commented 4 years ago

The basic scaffolding is done in spec. Next up are implementing it in the Nim version and playing around with it. This issue is fairly broad right now so I'll keep it open for now, might fork it later.

oskarth commented 4 years ago

Putting in backlog and unassigning for holidays. Free to be picked up. Should be cut up further.