Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: experimental incentivize store protocol #1961

Open
Tracked by #150
alrevuelta opened this issue Aug 28, 2023 · 17 comments
Open
Tracked by #150

feat: experimental incentivize store protocol #1961

alrevuelta opened this issue Aug 28, 2023 · 17 comments
Assignees
Labels
E:nwaku Store Incentivisation effort/weeks Estimated to be completed in a few weeks

Comments

@alrevuelta
Copy link
Contributor

alrevuelta commented Aug 28, 2023

Context

The goal of this issue is to create a proof of concept branching out nwaku, with the following new feature. Incentivize store protocol requests requiring a proof of payment of x tokens to an address in order to be processed. After successfully proving that the payment was done, then the node will return the requested messages. Note that this is intended to stay as an experimental branch, and most likely not merged into master in the short term.

For context, see this.

Store protocol is one of waku's service protocols, based on a simple req/resp protocol where a node (full or light) requests the messages of a given topic from start/end dates and gets them in return. The implementation is here, which is triggered when a node receives the request.

Feature

Some informal requirements. Let requester be the node that requests messages from store and responder the full node that stores messages and offers store capabilities:

  • Introduce a new req/resp interaction that is done before the actual store req/resp (explained above). In this new interaction, both requester and responder agree on a price and amount of messages for given topic that will be paid and served. The requester gets an invoice id to be paid.
  • The requester pays the invoice and performs the store request including this proof. This would require modifying request.
  • After the responder verifies that the payment was completed, it returns the agreed messages, completing the interaction.

Some notes:

  • We can use Ethereum, Sepolia testnet would be fine, as we have nodes to use, and RLN is already integrated with this. Of course in reality it wouldn't be feasible to do this due to fees and processing times, but for the proof of concept its fine. As long as we target EVM (or Ethereum RPC compatible chains, we can then change).
  • Nodes must have a new parameter, where they configure the "fee recipient" aka address where they will be getting the fees.
  • To cut scope for this proof of concept, we can avoid having smart contracts and just use vanilla rawTx, using the data field to include the invoice id explained above.

The deliverable would be a branch with such feature, where multiple wakunode2 instances can be run + interconnected in requester and responder mode. It must include the instruction (cli commands, etc) on how to see this feature live, where a node pays some ETH in return of a message.

@chair28980
Copy link
Contributor

No deadline set as this is highly experimental task.

@fryorcraken fryorcraken added the track:protocol-incentivization Protocol Incentivization track (Secure Messaging), e.g. service credentials label Sep 27, 2023
@s-tikhomirov
Copy link
Contributor

An observation extracted from a discussion in the research repo.

Storing nodes are supposed to take on risk without being sure that they will get reimbursed in the future. A full node must store non-ephemeral messages as they arrive, in the hope that someone, sometime in the future will be interested in them. This is akin to PoW mining where miners expend energy first hoping to get rewarded later, so that's not to say this cannot work, but it's something I'd keep in mind.

@s-tikhomirov
Copy link
Contributor

s-tikhomirov commented Oct 16, 2023

Weekly Update

@fryorcraken fryorcraken added the E:Basic service incentivization See https://github.com/waku-org/pm/issues/96 for details label Oct 17, 2023
@fryorcraken
Copy link
Collaborator

@alrevuelta should we move this issue to the research repo?

@alrevuelta
Copy link
Contributor Author

@fryorcraken We have a tracker for the idea here waku-org/research#21 but I would like to keep this one in nwaku, since this issue relates to a nwaku implementation with code, implementing the idea of waku-org/research#21

@s-tikhomirov
Copy link
Contributor

s-tikhomirov commented Oct 20, 2023

Weekly Update

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: (was mostly afk last week)
  • next: merge initial version of the incentivization outline; set priorities w.r.t. next steps

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: re-structured the incentivization outline with a more practice-oriented approach
  • next: propose the initial MVP version of Store incentivization protocol and gather feedback

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: gathered feedback for the incentivization outline
  • next: continue the discussion, prioritize what's most relevant for the MVP

@s-tikhomirov
Copy link
Contributor

s-tikhomirov commented Nov 17, 2023

Weekly Update

achieved: gathered more feedback for the incentivization outline, edited with a more practical focus
next: establish next steps towards a PoC

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: merged the incentivization outline
  • next: start drafting a raw RFC for Store incentivization PoC

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: started drafting a raw incentivization RFC
  • next: continue drafting, gather feedback

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: finish the first draft of the incentivization RFC
  • next: discuss, gather feedback

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: collected feedback incentivization RFC
  • next: continue discussion, outline steps for implementation

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: continued discussion on incentivization RFC
  • next: move towards implementation

@s-tikhomirov
Copy link
Contributor

Weekly Update

  • achieved: RFC discussion continued; learning Nim
  • next: move towards implementation

@jm-clius
Copy link
Contributor

Note that we may want to continue work on this POC for push-as-a-service rather than store: #2593

@gabrielmer gabrielmer added the effort/weeks Estimated to be completed in a few weeks label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:nwaku Store Incentivisation effort/weeks Estimated to be completed in a few weeks
Projects
Status: In Progress
Status: In Progress
Development

No branches or pull requests

6 participants