[<https://github.com/penumbra-zone/penumbra>](<https://github.com/penumbra-zone/penumbra>)
Build pcli
# install packets
sudo apt update && sudo apt upgrade
sudo apt install make curl tar wget clang pkg-config libssl-dev jq build-essential -y
# install rust and cargo
curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs> | sh
# press 1
source ~/.cargo/env
# build
rm -rf penumbra
git clone <https://github.com/penumbra-zone/penumbra>
cd penumbra
#git fetch
git checkout 005-mneme
cargo build --release --bin pcli
**# this warning is ok**
warning: field is never read: `transactions`
--> wallet/src/state.rs:52:5
|
52 | transactions: BTreeMap<note::Commitment, Option<Vec<u8>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `penumbra-wallet` (lib) generated 1 warning
Compiling git2 v0.13.25
Compiling pcli v0.1.0 (/root/penumbra/pcli)
Finished release [optimized] target(s) in 4m 20s
Generate/restore wallet and sync
**# If this is your first testnet, then create new wallet (skip command if you already got one)**
cargo run --quiet --release --bin pcli wallet generate
**# and ask for tokens in discord**
# Backup your wallet just in case
# ./root/.local/share/penumbra-testnet-archive/
# Make sure to run commands from /penumbra dir!
**c**d $HOME/penumbra
****# learn help
****cargo run --quiet --release --bin pcli help
# reset old state (if you participated in previous testnet)
cargo run --quiet --release --bin pcli wallet reset
# check wallet list
cargo run --quiet --release --bin pcli addr list
# OUTPUT EXAMPLE
# Index Label Address
# 0 Default penumbrav0t13f0pl626x88ewt38t6j2h7gzrwj4vmf2szaeacaduc9hnvf9mvcx00rqyvkgxxu58mwqdxznx4v0npy2yf8wjwmqwpugfmhjx2hvshgm0aacf05v2kztf0s9r06lyf
# enable logs
export RUST_LOG=info
# sync
cargo run --quiet --release --bin pcli sync
**# wait for sync**
# OUTPUT EXAMPLE
Feb 11 22:35:21.707 INFO sync: pcli::sync: finished sync end_height=738493
Feb 11 22:35:22.050 INFO assets: pcli::fetch: updated asset registry
# check balance
cargo run --quiet --release --bin pcli balance
# OUTPUT
#Jan 29 01:28:02.356 INFO sync{start_height=738493}: pcli::sync: syncing... height=738579
#Jan 29 01:28:12.175 INFO sync{start_height=738493}: pcli::sync: syncing... height=738580
#Jan 29 01:28:20.240 INFO sync{start_height=738493}: pcli::sync: finished sync end_height=738581
#Jan 29 01:28:24.386 INFO assets: pcli::fetch: updated asset registry
# Total
# 1cube
# 100gm
# 1077.376168penumbra
Do some tasks (staking)
# learn new staking functionality
cargo run --quiet --release --bin pcli stake --help
# list of current validators (in this case, just the one, which we are running)
cargo run --quiet --release --bin pcli stake list-validators
#Jan 29 01:41:46.334 INFO sync{start_height=327504}: pcli::sync: starting client sync
#Jan 29 01:41:51.266 INFO sync{start_height=327504}: pcli::sync: syncing... height=327505
#Jan 29 01:41:58.231 INFO sync{start_height=327504}: pcli::sync: finished sync end_height=328028
#Jan 29 01:42:02.799 INFO assets: pcli::fetch: updated asset registry
# Voting Power Commission Validator Info
# 100.00% 484bps Penumbra Labs CI
# **penumbravalid1hz7u6jr9gcg54xycd7yry77sqah36xmauw4z2zpckjhfgs2h7s9s8x0pek**
**# delegate 10penumbra to validator**
cargo run --quiet --release --bin pcli stake delegate 10penumbra --to **penumbravalid1hz7u6jr9gcg54xycd7yry77sqah36xmauw4z2zpckjhfgs2h7s9s8x0pek**
**# Example of success tx - code":0**
#Jan 29 01:50:19.503 INFO submit_transaction: pcli::network: broadcasting transaction...
#Jan 29 01:50:20.818 INFO submit_transaction: pcli::network: {"code":0,"data":"","log":"","codespace":"","mempool_error":"","hash":"447E06FFF3608FDDA9A2A3D0CDA7F24F97B1C206E856555AFAB07E39B5ED59C0"}
**# repeat if fails**
**# Example of failed tx**
#Jan 29 01:47:45.513 INFO submit_transaction: pcli::network: {"code":1,"data":"","log":"Delegation was prepared for next epoch 5473 but the next epoch is 5474","codespace":"","mempool_error":"","hash":"1C346221947847BEA6BE14C4C5BBD8F6AFFCC95797DF0FB8E17037F6079D5E7E"}
#Error: Error submitting transaction: code 1, log: Delegation was prepared for next epoch 5473 but the next epoch is 5474
**# show delegation (delegations converts in other denom)**
cargo run --quiet --release --bin pcli stake show
#Jan 29 02:07:18.483 INFO sync{start_height=329461}: pcli::sync: syncing... height=329462
#Jan 29 02:07:22.779 INFO sync{start_height=329461}: pcli::sync: finished sync end_height=329534
#Jan 29 02:07:27.412 INFO assets: pcli::fetch: updated asset registry
# Name Value Exch. Rate Tokens
# Penumbra Labs CI 10.048735penumbra 4.7938 2.053**delegation_penumbravalid1hz7u6jr9gcg54xycd7yry77sqah36xmauw4z2zpckjhfgs2h7s9s8x0pek**
# Unbonded Stake 1076.470425penumbra 1.0000 1076.470425penumbra
# Total 1077.470423penumbra
**# undelegate 1delegation_penumbravalid1... from validator**
cargo run --quiet --release --bin pcli stake undelegate **1delegation_penumbravalid1hz7u6jr9gcg54xycd7yry77sqah36xmauw4z2zpckjhfgs2h7s9s8x0pek**
#Jan 29 02:14:03.630 INFO submit_transaction: pcli::network: {"code":0,"data":"","log":"","codespace":"","mempool_error":"","hash":"E966288EE618BA3AA4A05ABF7FEC0B990EFF509F71BE4012C5336FD72AD15779"}
#END
WALLET import /export
# seed export
cargo run --quiet --release --bin pcli wallet export
# seed import
cargo run --quiet --release --bin pcli wallet import <spend-seed>