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

Prepaid rholang execution PRE #38

Open
fabcotech opened this issue Jun 3, 2021 · 0 comments
Open

Prepaid rholang execution PRE #38

fabcotech opened this issue Jun 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@fabcotech
Copy link

fabcotech commented Jun 3, 2021

There is a need for having unknown users, that have never interacted with RChain / the blockchain, being able to deploy. Four propositions/way ofhow to do this have been discussed. Two of them are ready, and can be done with existing rnode.

1 - (ready) Prepaid with public keys list

The dapp develoepr knows the public keys:

Then just send REV to each public key

cons:

  • you have to monitor the money left for each, and eventually refill individually
  • can be abused, a malicious public key can do a REV transaction and get around initial dapp

pro

  • no need to change existing rnode/rholang

2 - (ready) Delayed deploy

(1) The user

  • create an account to centralized service
  • create a signed deploy (metamask, dappy, else)

(2) centralized authentication (email, captcha)

(3) dapp developer fills the account with REV + deploys the deploy signed by user

pros: impossible DDOS, already possible
cons: more complicated than onchain authentication

3 - Specific rholang execution, for specific process/rholang (SRE)

The dapp developers expresses his agreement to paying for a given rholang execution after having done the proper verification (rholang)

match (*x == "valid", *process) {
  (true, { "key": "value" }) => {
    if (*registeredUsers < 100) {
      registeredUsersCh!(*registeredUsers + 1) |

      // here dapp developer can send REV to deployed if he wants to
      payForCurrentDeploy!(
        *dappDeployerId,
        {
          limit: 2000 (phlo or dust ?),
          allowVault: true/false
        })
    }
  }
  _ => {
    Nil
  }
}

cons:

  • risk for DDOS

pros:

  • no need to know public key in advance
  • only a precise operation/rholang/deploy is permitted
  • no incentive for hackers, no REV

4 - Pay after

a deployer starts with negative balance, the deploy is recorded / the change is saved ONLY IF the balance becomes positive or 0 at the end of the deploy

@fabcotech fabcotech added the enhancement New feature or request label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant