friday

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2019 License: Apache-2.0

README

Travis codecov

TESTNET

Prerequisites

Build

make install

Run

Setup a genesis status and run a genesis node
  • note: Fill the name what you want inside < >
# run execution engine grpc server
./CasperLabs/execution-engine/target/release/casperlabs-engine-grpc-server $HOME/.casperlabs/.casper-node.sock

# init node
nodef init <node_name> --chain-id testnet

# copy execution engine chain configurations
cp ./x/executionlayer/resources/manifest.toml ~/.nodef/config

# create a wallet key
clif keys add elsa # select password
clif keys add anna # select password

# add genesis node
nodef add-genesis-account $(clif keys show elsa -a) 5000000000000dummy,100000000stake
nodef add-genesis-account $(clif keys show anna -a) 5000000000000dummy,100000000stake
nodef add-el-genesis-account $(clif keys show elsa -a) "5000000000000" "100000000"
nodef add-el-genesis-account $(clif keys show anna -a) "5000000000000" "100000000"
nodef load-chainspec ~/.nodef/config/manifest.toml

# apply default clif configure
clif config chain-id testnet
clif config output json
clif config indent true
clif config trust-node true

# prepare genesis status
nodef gentx --name elsa # insert password
nodef collect-gentxs
nodef validate-genesis
  • edit ~/.nodef/config/config.toml
...
# Maximum size of request body, in bytes
max_body_bytes = 1000000 -> 3000000
...
# Maximum size of a single transaction.
# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}.
max_tx_bytes = 1048576 -> 3145728
...
  • genesis node start
nodef start
  • note your genesis node's ID and genesis file
  • you can get your node ID using clif
clif status | grep \"id\"
  • your genesis file exists ~/.nodef/config/genesis.json
Clif usage
  • query
    • usage: clif query executionlayer getbalance [address]
clif query executionlayer getbalance $(clif keys show elsa -a)

{
   "value": "5000000000000"
}
  • transfer (send)
    • usage: clif tx send [from address] [to address] [amount] [fee] [gas_price]
clif tx send $(clif keys show elsa -a) $(clif keys show anna -a) 100dummy 100000000 20000000

...
confirm transaction before signing and broadcasting [y/N]: y
Password to sign with 'elsa': # input your password
{
  "height": "0",
  "txhash": "141F12A891659F52B055EF7F701B1D406E5F1721CE929630CC5CE3CE0C4C8718",
  "raw_log": "[{\"msg_index\":0,\"success\":true,\"log\":\"\",\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"executionengine\"}]}]}]",
  "logs": [
    {
      "msg_index": 0,
      "success": true,
      "log": "",
      "events": [
        {
          "type": "message",
          "attributes": [
            {
              "key": "action",
              "value": "executionengine"
            }
          ]
        }
      ]
    }
  ]
}
  • bond
    • usage: clif executionlayer bond [from address] [bond amount] [fee] [gas_price]
  • unbond
    • usage: clif executionlayer unbond [from address] [unbond amount] [fee] [gas_price]
Connect to seed node
  • run this on another machine
# run execution engine grpc server
./CasperLabs/execution-engine/target/release/casperlabs-engine-grpc-server $HOME/.casperlabs/.casper-node.sock

# init node
nodef init <node_name> --chain-id testnet
  • edit ~/.nodef/config/config.toml
...
# Maximum size of request body, in bytes
max_body_bytes = 1000000 -> 3000000
...
# Comma separated list of seed nodes to connect to
seeds = "" -> "<genesis node's ID>@<genesis node's IP>:26656"
...
# Maximum size of a single transaction.
# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}.
max_tx_bytes = 1048576 -> 3145728
...
  • replace ~/.nodef/config/genesis.json to genesis node's one what you saved above.

Test

$ make test

Directories

Path Synopsis
nolint
nolint
Package baseapp contains data structures that provide basic data storage functionality and act as a bridge between the ABCI interface and the SDK abstractions.
Package baseapp contains data structures that provide basic data storage functionality and act as a bridge between the ABCI interface and the SDK abstractions.
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/client/context ALIASGEN: github.com/cosmos/cosmos-sdk/client/flags ALIASGEN: github.com/cosmos/cosmos-sdk/client/keys ALIASGEN: github.com/cosmos/cosmos-sdk/client/lcd ALIASGEN: github.com/cosmos/cosmos-sdk/client/rest ALIASGEN: github.com/cosmos/cosmos-sdk/client/rpc ALIASGEN: github.com/cosmos/cosmos-sdk/client/tx ALIASGEN: github.com/cosmos/cosmos-sdk/client/utils ALIASGEN: github.com/cosmos/cosmos-sdk/client/input
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/client/context ALIASGEN: github.com/cosmos/cosmos-sdk/client/flags ALIASGEN: github.com/cosmos/cosmos-sdk/client/keys ALIASGEN: github.com/cosmos/cosmos-sdk/client/lcd ALIASGEN: github.com/cosmos/cosmos-sdk/client/rest ALIASGEN: github.com/cosmos/cosmos-sdk/client/rpc ALIASGEN: github.com/cosmos/cosmos-sdk/client/tx ALIASGEN: github.com/cosmos/cosmos-sdk/client/utils ALIASGEN: github.com/cosmos/cosmos-sdk/client/input
lcd
lcd/statik
Package statik contains static assets.
Package statik contains static assets.
rpc
cmd
keys/hd
Package hd provides basic functionality Hierarchical Deterministic Wallets.
Package hd provides basic functionality Hierarchical Deterministic Wallets.
mock
nolint
nolint
Package simapp implements a full fledged Cosmos SDK application used for executing simulation test suites.
Package simapp implements a full fledged Cosmos SDK application used for executing simulation test suites.
module
Package module contains application module patterns and associated "manager" functionality.
Package module contains application module patterns and associated "manager" functionality.
rest
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package rest provides HTTP types and primitives for REST requests validation and responses handling.
Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.
Package version is a convenience utility that provides SDK consumers with a ready-to-use version command that produces apps versioning information based on flags passed at compile time.
x
auth
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/auth/types nolint
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/auth/types nolint
auth/legacy/v0_34
DONTCOVER nolint
DONTCOVER nolint
auth/legacy/v0_36
DONTCOVER nolint DONTCOVER nolint
DONTCOVER nolint DONTCOVER nolint
auth/types
nolint noalias
nolint noalias
bank
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/bank/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/bank/types
crisis
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/crisis/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/crisis/types
nolint
distribution
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/distribution/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/distribution/types ALIASGEN: github.com/cosmos/cosmos-sdk/x/distribution/client
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/distribution/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/distribution/types ALIASGEN: github.com/cosmos/cosmos-sdk/x/distribution/client
nolint
distribution/legacy/v0_34
DONTCOVER nolint
DONTCOVER nolint
distribution/legacy/v0_36
DONTCOVER nolint
DONTCOVER nolint
distribution/types
nolint nolint
nolint nolint
genaccounts
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/genaccounts/internal/types Package genaccounts contains specialized functionality for initializing accounts from genesis including: - genesis account validation, - initchain processing of genesis accounts, - export processing (to genesis) of accounts, - server command for adding accounts to the genesis file.
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/genaccounts/internal/types Package genaccounts contains specialized functionality for initializing accounts from genesis including: - genesis account validation, - initchain processing of genesis accounts, - export processing (to genesis) of accounts, - server command for adding accounts to the genesis file.
genaccounts/legacy/v0_34
DONTCOVER nolint
DONTCOVER nolint
genaccounts/legacy/v0_36
DONTCOVER nolint DONTCOVER nolint
DONTCOVER nolint DONTCOVER nolint
genutil
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/genutil/types Package genutil contains a variety of genesis utility functionality for usage within a blockchain application.
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/genutil/types Package genutil contains a variety of genesis utility functionality for usage within a blockchain application.
gov
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/gov/types nolint:deadcode unused
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/gov/types nolint:deadcode unused
gov/legacy/v0_34
DONTCOVER nolint
DONTCOVER nolint
gov/legacy/v0_36
DONTCOVER nolint
DONTCOVER nolint
gov/types
nolint
nolint
mint
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/mint/internal/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/mint/internal/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/mint/internal/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/mint/internal/types
mint/internal/keeper
nolint:deadcode unused
nolint:deadcode unused
mock
Package mock provides utility methods to ease writing tests.
Package mock provides utility methods to ease writing tests.
params
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/params/subspace ALIASGEN: github.com/cosmos/cosmos-sdk/x/params/types nolint: deadcode unused
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/params/subspace ALIASGEN: github.com/cosmos/cosmos-sdk/x/params/types nolint: deadcode unused
simulation
Package simulation implements a simulation framework for any state machine built on the SDK which utilizes auth.
Package simulation implements a simulation framework for any state machine built on the SDK which utilizes auth.
slashing
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/slashing/types nolint nolint:deadcode unused
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/slashing/types nolint nolint:deadcode unused
nolint
staking
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/types ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/exported
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/types ALIASGEN: github.com/cosmos/cosmos-sdk/x/staking/exported
staking/legacy/v0_34
DONTCOVER nolint
DONTCOVER nolint
staking/legacy/v0_36
DONTCOVER nolint DONTCOVER nolint
DONTCOVER nolint DONTCOVER nolint
staking/types
nolint
nolint
supply
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/internal/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/internal/types
nolint autogenerated code using github.com/rigelrozanski/multitool aliases generated for the following subdirectories: ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/internal/keeper ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/internal/types
supply/legacy/v0_36
DONTCOVER nolint
DONTCOVER nolint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL