We're updating the issue view to help you get more done. 

Rholang API to fund contract deployment (Short Leash Deploy)


Documentation https://rchain.atlassian.net/wiki/spaces/RHOL/pages/564331259/Rholang+Short-leash+deployment+API?atlOrigin=eyJpIjoiZGE0MzI5Nzg2ZGM2NDQ2OGE1MDBlZWVmMGU4YWI2ODQiLCJwIjoiYyJ9

This api will needs all the portions of the deployment that are unique to the deployment. Code hash, signature, timestamp. In essence this api will validate that the user really wants to deploy this code at this time.

The user does the following:

  • creates their code (deployment of contract)

  • Adds a timestamp, signature and nonce

  • Takes the hash of all of this

Then to deploy the code they do the following:

  • Create the payment deployment

  • Provide the hash of the big deploy

  • Provide the wallet for payment

  • Provide the signature

The payment deploy is sent first. 'Lookup something in the registry, use the api's to get the timestamp, hash and nonce' Send those to the name that has been looked up. Now the wallet is registered and ready to pay for something. By the end of execution, the cost API will be triggered to deduct cost.

The second deploy is then processed with the longer leash that has been purchased.

Some API of where the money goes.

Inside the hash of the code we have the signature.

API needs the following:

  • Deployment uniqueness criteria (timestamp, signature, code hash)

  • Signature of the code hash (the big deploy - contains signatures, timestamp)

Wallet has an additional method that is specific for paying for computation.

  • Payment is given only for a deploy with a matching code hash and timestamp.

If 2 deployments contain the same timestamp and nonce, they conflict. will think about what needs to be done here.





Medha Parlikar


Story Points






Epic Name

Short Leash Deploy