-
Notifications
You must be signed in to change notification settings - Fork 53
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: Add incentivization PoC with dummy request-response protocol #2816
feat: Add incentivization PoC with dummy request-response protocol #2816
Conversation
You can find the image built from this PR at
Built from a56efe6 |
You can find the image built from this PR at
Built from a56efe6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're overcomplicating this POC. For one, we shouldn't add test-only code to master outside of the test suites. But I also don't see the need to introduce a fully specified dummy protocol. We simply need to mimic request-response interactions with eligibility proof and status checks embedded, but this can be done within a single unit test without introducing any extensive protocol scaffolding. In other words, we show the generic flow of req-resp protocol with eligibility checks:
Within a single test module:
- sendRequestWithEligibilityProof
- checkEligibility
- sendResponseWithEligibilityStatus
(1) and (3) would in reality send only the raw encoded eligibility RPCs. Within the test setup code you may have to introduce a dummy protocol ID, but this should be minimal.
(2) is the main focus of the POC and should show that we can lookup a raw tx_id to "check" that payment has been made. It may introduce some basic helper functions in waku/incentivization
that will be reusable in future.
This POC simply illustrates our thinking around incentivisation so should be kept simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with @s-tikhomirov, I suggest that we keep the Dummy protocol, but move this feature only to an experimental feature branch and cut the scope of the POC significantly. Created a new issue to explain reduced scope here: #2847
Happy to approve merging this to a feature branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving merge to feature branch. See #2847
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
126b300
to
4815da5
Compare
You can find the image built from this PR at
Built from 1eebbdc |
4815da5
to
a3668b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think this should close the initial POC for now on merge. We can revisit once we add more complex incentivization logic, reputation, etc.
a3668b0
to
222e15d
Compare
Description
This is a proof-of-concept implementation of a dummy request-response protocol that illustrates how eligibility proofs and eligibility statuses (see spec 73) can be used in the context of light protocols. The PoC code is only called from within tests. In the tests, a client creates a dummy request with an eligibility proof attached, and sends it to the server. The server checks the validity of the eligibility proof, and returns a response formed accordingly.
The eligibility proof is a transaction ID. For testing purposes, a random confirmed transaction on Sepolia testnet is used. The server only checks that a transaction with the corresponding txid (i.e., hash) exists. If so, the proof is considered valid.
Changes
incentivization
directory with a dummy client-server protocol;How to test
./env.sh bash
nim c -r ./tests/incentivization/test_all.nim
Issue
Related to #1961, although this PoS is unrelated to Store protocol per se.