Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose:

This document walks you through how to connect to our DevNet, bond, deploy, and unbond using docker. If you wish to perform a deployment, smart contracts must be built locally.  We have example contracts you can build.  Please also check your Network Configuration

...

Note
titleSystem Configuration!

We currently recommended a system with at least 2 GB of RAM and a  large disk (1 Tb) that is separate from your OS/Home directories.

We use the Home directory in this doc only as an example. The same methods apply with using a different disk by just updating the paths in your commands.


Step 1 - Create your keys and fund them on DevNet

Funding Your Account for DevNet:

Browse to explorer.casperlabs.io

...

You will see a deploy kicked off that will fund your account. When it's finished you will see a green check. You may need to click the refresh icon.



Step 2 - Set Up and Run your node


Pull down the latest casperlabs docker images

...

This will launch the node.  The first step after connecting to the network will be to start downloading blocks. You will know when your node is caught up by verifying your last synced block matches what is shown under "Blocks" on explorer.casperlabs.io


Sending a Bonding Request


A bonding request is a special kind of transaction.  For the DevNet, transactions can be sent to deploy.casperlabs.io.

Info

It is possible to send a bonding request to deploy.casperlabs.io at any time, but the your node will not be able to propose blocks until it receives and processes the block containing the bonding request from the network.  


Example Bonding Request

info
Code Block
docker run --rm --network casperlabs -v ~/.casperlabs/:/root/.casperlabs/ casperlabs/client:latest --host deploy.casperlabs.io bond --amount 10000 --private-key /root/.casperlabs/my_key.private.key -n-payment-amount 1
titleNonce

Remember to keep track of your nonce and start with 1. Nonce is unique for the account sending the deployment


You can verify your bond by viewing the deploy hash you received either through the command line with show-deploy or with the explorer.

Code Block
docker run casperlabs/client:devlatest --host deploy.casperlabs.io --port 40401 show-deploy 72e8f74211d0fd7f7694c44d36671fc15e4169f854b12de30d2a5b092088f844

...

--from will be your public key in Base16

remember the nonce!

Example Deployment from the newly bonded node

Code Block
docker run --rm --network casperlabs -v ~/contract-examples/target/wasm32-unknown-unknown/release/:/data/ -v ~/.casperlabs/:/root/.casperlabs/ casperlabs/client:latest --host cl-node deploy --from  <public key base16> --gas-limit 100000000 --gas-price 1 --session /data/helloname.wasm --payment /data/helloname.wasm --public-key /root/.casperlabs/my_key.public.key --private-key /root/.casperlabs/my_key.private.key -n 2


You should see your node validate and propose the block in your logs!

Lastly, when you are finished with your node you can unbond it from the network.Remember the nonce!


Code Block
docker run --rm --network casperlabs -v ~/.casperlabs/:/root/.casperlabs/ casperlabs/client:latest --host deploy.casperlabs.io unbond --amount 10000 --private-key /root/.casperlabs/my_key.private.key --payment-namount 31