Request guide

A guide for creating service requests in the CommerceBlock chain.

1. Running the service chain full node

Download the docker-compose file from ocean github and follow the docs instructions on how to run the node using data persistence.

The full node wallet will need to be funded with PERMISSION assets in order to create requests. This can be done by paying to an address generated by the node or import a private key from another wallet.

2. Create a request

The script can be used to create a request. It takes the following arguments:

  • Client chain genesis hash
  • Start price
  • End price
  • Auction duration
  • Service period duration
  • Number of tickets
  • Fee percentage to reward guardnodes
  • Private key of address containing permission asset (optional)
  • txid of previous request transaction to fund new request (optional)
  • vout of previous request transaction to fund new request (optional)

Node information is gathered from ENV variables:

Env variable Decription
RPC_USER RPC username
RPC_PASS RPC password

The script checks for currently active requests for the given client chain genesis hash. If none are currently active then a new request is created and pulished, therefore allowing for automatic request generation when the script is run as a cron job.

3. Monitor a request

Check that a request has been included in the chain using:

ocean-cli getrequests

Download the report script, replace the txid parameter with the request id parameter and run this script to monitor the guardnode response performance and pays due to be paid to each by the end of the service. This information will only become available once the service request has started.