Giter Club home page Giter Club logo

Comments (6)

papacarp avatar papacarp commented on June 14, 2024 2

Quickstart for using CNTOOLS

CNTOOLS is a simple shell script that will simplify typical operations used in FF and HTN testnets. We have developed this for our own use, and as such tend to follow some well worn paths when using it. See below for simple step by step guide for getting a pool setup on the FF network. Please note that this tool is tested on linux platforms only at this point.

Configuration

CNTOOLS connects to your node through the configuration in the env file located in the same directory as the script. Customize this file for your needs. CNTOOLS will start even if you node is offline, but don't expect to get very far.

Start

Insure the tool is executable and start it with:

$ ./cntools.sh

You should get a screen that looks something like this:

 >> CNTOOLS <<                                       A Guild Operators collaboration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Main Menu
   1) update
   2) wallet  [ new / upgrade | list | show | remove |
                decrypt / unlock | encrypt / lock ]
   3) funds   [ send | delegate ]
   4) pool    [ new | register | list | show | rotate KES |
                decrypt / unlock | encrypt / lock ]
   q) quit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What would you like to do? (1-4):

Step by Step to create a pool with CNTOOLS

  1. Choose wallet (option 2)
 >> WALLET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Wallet Management

   1) new / upgrade
   2) list
   3) show
   4) remove
   5) decrypt / unlock
   6) encrypt / lock
   h) home
   q) quit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What wallet operation would you like to perform? (1-6):
  1. Choose new / upgrade (option 1)
 >> WALLET >> NEW / UPGRADE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Wallet Type

   1) payment  - First step for a new wallet
                 A payment wallet can send and receive funds but not delegate/pledge.

   2) stake    - Upgrade existing payment wallet to a stake wallet
                 Make sure there are funds available in payment wallet before upgrade
                 as this is needed to pay for the stake wallet registration fee.
                 A stake wallet is needed to be able to delegate and pledge to a pool.
                 All funds from payment address will be moved to base address.
   h) home
   q) quit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Choose wallet type (1-2):
  1. Choose payment type of wallet (option 1)
  2. Give the wallet a name
  3. CNTOOLS will give you your payment address. For example:
>> WALLET >> NEW >> PAYMENT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Name of new wallet: bob

Wallet: bob
Payment Address: 60ca926192c09b2fc689b5258d9265038c4270e1f1934413255822db1f9645e2c1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1. Send some money to this wallet. Either through the faucet or have a friend send you some. IMPORTANT... The wallet must have funds in it before you can proceed.
  2. From the main menu choose wallet (option #2) and then this time choose stake (option #2) to upgrade your wallet
  3. CNTOOLS will give you a list of wallets you can upgrade. choose the wallet you created in step 4. In this example case that wallet is called bob. This will send a transaction to the blockchain to upgrade your wallet to a staking wallet. the result should look something like this:
--- Balance Check Source Address -------------------------------------------------------

Total balance in 0 UTxO is 0 Lovelaces or 0 ADA
Wallet: bob
Payment Address: 60ca926192c09b2fc689b5258d9265038c4270e1f1934413255822db1f9645e2c1
Reward Address:  5821e00e0798d1028c9fcd1a1ac2cb0a6af63dd51deb018dfd2fa91abe32c27490e980
Base Address:    00ca926192c09b2fc689b5258d9265038c4270e1f1934413255822db1f9645e2c10e0798d1028c9fcd1a1ac2cb0a6af63dd51deb018dfd2fa91abe32c27490e980
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The total balance is 0 for the payment address because ALL funds have been moved to the base address.
9. From the main menu select pool (option 4)

>> POOL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Pool Management

   1) new
   2) register
   3) list
   4) show
   5) rotate KES keys
   6) decrypt / unlock
   7) encrypt / lock
   h) home
   q) quit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What pool operation would you like to perform? (1-7):
  1. select new to create a new pool (option 1)
  2. Give the pool a name. in our case we call it LOVE. The result should look something like this:
 >> POOL >> NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pool Name: LOVE

Pool: LOVE
PoolPubKey: 687c3f588d996ee5fc751cc581826f63c407b1c46514ef9fe3001fa96d3a75bc
Start cardano node with the following run arguments:
--shelley-kes-key /opt/cardano/cnode/priv/pool/LOVE/hot.skey
--shelley-vrf-key /opt/cardano/cnode/priv/pool/LOVE/vrf.skey
--shelley-operational-certificate /opt/cardano/cnode/priv/pool/LOVE/op.cert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1. start or restart your cardano-node with the parameters as shown. This will insure your node has all the information necessary to create blocks. IMPORTANT. If you do not start your node with these parameters you won't be able to make blocks.
  2. from the main menu select pool (option 4)
  3. select register (option 2)
  4. select the pool you just created in step 11 above
  5. CNTOOLS will give you prompts to set pledge, margin and cost. Enter values that are useful to you. Make sure you set your pledge low enough to insure your funds in your wallet will cover pledge plus pool registration fees. It will look something like this:
Pledge in ADA (default: 50000): 899
Margin (default: 0.07): 0.10
Cost in ADA (default: 256): 500
  1. select the wallet you want to register the pool with.
  2. DONE! The output should look something like this:
New block was created - 107

--- Balance Check Source Address -------------------------------------------------------
                           TxHash                                 TxIx        Lovelace
----------------------------------------------------------------------------------------
7f4294db8036bf985bea434d2b910176d8b274f8b7a413748b53540138e3dfaa     0         899947600

Total balance in 1 UTxO is 899947600 Lovelaces or 899.9476 ADA

Pool LOVE successfully registered using wallet bob for pledge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

from guild-operators.

gufmar avatar gufmar commented on June 14, 2024 1

Perfect. I had a plan to do this during weekend. Now it's already done

from guild-operators.

papacarp avatar papacarp commented on June 14, 2024 1

pr in #197

from guild-operators.

papacarp avatar papacarp commented on June 14, 2024

where should this documentation live? readme.md in the scripts section?

from guild-operators.

rdlrt avatar rdlrt commented on June 14, 2024

I'd say here

from guild-operators.

Scitz0 avatar Scitz0 commented on June 14, 2024

Merged into master by 9ce59b1

from guild-operators.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.