1-16-2020 Workshop - Accounts

Recording on Youtube: https://youtu.be/UM9Awo8HrWY

 

Dial in Information is at: https://casperlabs.atlassian.net/wiki/spaces/REL/pages/136544674/Weekly%2BWorkshops%2BHome

Participants

 

  • @Medha Parlikar

  • @Rita Allen (Unlicensed)

  • @Tom Vasile (Deactivated)

  • Ledger Leap

  • PureStake

  • @Maciej Zielinski (Deactivated)

  • @Mark Greenslade

  • @Piotr Dziubecki

  • Stefan

  • Nate

  • @Former user (Deleted)

  • Thomas

 

 

During this workshop, we will demonstrate how an owner of account 1 can grant signing authority to a another account - and then revoke this authority as well. CasperLabs accounts also support weights, so it is possible to require a certain weight in order to complete a transaction. For this demonstration, we will simply grant and revoke signing authority to an account.

Goals

  • Demonstrate the capability of CasperLabs accounts.

  • Install the client

  • Build the contracts

  • Deploy to DevNet

  • Check account balances in Clarity

 

  • We will record the session.

Step by Step Plan

  1. Clone the repository on your machine

git clone -b dev https://github.com/CasperLabs/CasperLabs.git

2. Install the CasperLabs client using brew, apt, docker or tarball ….

3. Compile contracts

cd CasperLabs cd execution-engine make setup make build-contracts

4. Fund accounts on DevNet - you can also create new accounts for the test as well. Make sure that all the keys you plan on using have been funded.

Create 3 keys - Key1, Key2, Key3 - and fund Key1. Leave Key2 and Key3 unfunded.

5. Export the session arguments (this simplifies the deploy command)

export NEW_KEY_HEX=[the base16 for key2]

Send a deployment to add a new key (key2)to the account of Key1 - this deploy is signed by key1

(path under CasperLabs is ‘execution-engine/target/wasm32-unknown-unknown/release/add_update_associated_key.wasm’)

Confirm that the deploy succeeded.

5. Now we will confirm that the key has the authority to run the contract.

Export our arguments for the session contract

 

6. Send the deployment to transfer the token. Sign this deployment with the key that you authorized in the earlier step.

7. Revoke the key

7. Re-try Step 6 - confirm that the key is not authorized.

We expect that the system will report an ‘Authorization failure’ - and no block is created.

Software Version (GitHash)

Docker tag: master

CasperLabs Client 0.11.0 (5777274434bf8cb676c43b0a0ca28f4e015c683e)

What you need to know:

  • The final deploy will succeed, but no block will be created, because the signature is not authorized. An error will appear in the node console. To see this, use the docker/hack and install a network locally - then deploy to ‘localhost’ instead of the DevNet.

Notes:

Title

Description

Notes

Title

Description

Notes

Verify pre-requisites

Check that everyone has managed to get through the setup.

Does everyone have keys in Clarity?

Has everyone cloned the repository and built the contracts?

Does everyone have the client installed? What is the version number for the Client?

 

 

 

Outcome:

  • Folks need to make sure they are running the latest version of Ubuntu.

 

Action items

For Help - go to Discord: https://discord.gg/mpZ9AYD

Decisions

  •