-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sponsored data APIs #21
Comments
building rnode: https://github.com/rchain/rchain/blob/dev/DEVELOPER.md |
@9rb offers to get @raviclalwani in touch with @leithaus experimenting at the rholang level: new result, publish, read, contentCh in {
contract publish(@withAds, @withoutAds, @price /* @url?*/, return ) = {
contentCh!({"with": withAds, "without": withoutAds, "price": price})
|
return!(Nil)
}
|
contract read(/*@url?,*/ @tokens, return) = {
for (@current <<- contentCh) {
match current {
{"with": with, "without": without, "price": price} => {
if(tokens >= price) {
return!(without)
} else {
return!(with)
}
}
}
}
}
|
// testing... publisher:
new ack in {
publish!("interesting story... buy my product.",
"interesting story",
10, *ack)
}
|
// reader...
new x in {
read!(11, *x) |
for (@stuff <- x) {
result!(stuff)
}
}
} https://rchain.coop/hackathon#dev-apis esp https://developer.rchain.coop/rholang-playground (https://rgov1.netlify.app/ is like the playground but has auto-indentation support) https://github.com/rchain/rchain/blob/dev/rholang/src/main/bnfc/rholang_mercury.cf |
raw notes from chat with @leithaus ... why not just a contract... directly typable status quo: new idea: types... threads in java are not directly visible. likewise, if this were a contract, it wouldn't be evident to types. statically evident from syntax |
Description: Implement sponsored data API.
Motivation/Impact/Importance: allows on-chain data to be sponsored by advertisers and other sponsors.
Completion/Success Criteria: Provide a modified version of for-comprehension with an additional parameter for sponsorship tokens. When sufficient tokens are supplied the data brought back is free of sponsored impressions. When insufficient tokens are supplied sponsored impressions are delivered along with the data. Likewise, extend send to mark it as storing sponsored impressions.
Bonus points: 1. Extend the model to include sponsored deployments and not just sponsored data.
Link to specs and additional info :
https://drive.google.com/drive/folders/1yWb8-92OfzVtccsm9hNW1AR7HtUsyxzO
Current Interpreter code https://github.com/rchain/rchain/tree/dev/rholang/src/main/scala/coop/rchain/rholang
https://github.com/rchain/rchain/tree/dev/rholang (The read.me needs a review and may be old)
Mentors : @leithaus
Team :
Skills : Scala required, Rholang knowledge helps. Interest in implementing translators, interpreters, compilers etc.
Judgment criteria :
Rchain Priority :
The text was updated successfully, but these errors were encountered: