Pre-genesis network participants

The pre-genesis network participants are the entities that are participating in the genesis ceremony. The pre-genesis network participants are responsible for:

  1. Generating their public and private keys
  2. Submitting their public keys and addresses to the network coordinator
  3. Generating their pre-genesis transactions
  4. Signing their pre-genesis transactions
  5. Submitting their pre-genesis transactions to the network coordinator

Generating keys

Before the genesis ceremony begins, the pre-genesis network participants must generate their public and private keys. The pre-genesis network participants must ensure that their private keys are kept secret and that their public keys are submitted to the network coordinator in due time.

This can be done through the namada cli:

ALIAS="<your-key-alias>"
namadaw --pre-genesis gen --alias $ALIAS

After the user has entered their passwords and written down their mnemonic phrase, the namada cli will save the keys to the pre-genesis folder inside the base directory.

In order to print the keys, the user can run the following command:

# Not recommended in production since it will print the private key to the terminal (which can be recovered)
cat $BASE_DIR/pre-genesis/wallet.toml

It is the public keys that the pre-genesis network participants must submit to the network coordinator.

# Example wallet.toml
[public_keys]
bengt = "ED25519_PK_PREFIXtpknam1qq2vscpcvhdwht9tldj9ntxnknandhnerhzd6d42xqzukw2kpcfpudh3dl2"
 
...
 
[addresses]
bengt = "tnam1qq97eqvv4lam8ds00j9em2s2f0r8e7r60qw9fdfq"

It is then the right hand side of each of these fields that is submitted to the network coordinator, i.e ED25519_PK_PREFIXtpknam1qq2vscpcvhdwht9tldj9ntxnknandhnerhzd6d42xqzukw2kpcfpudh3dl2 and tnam1qq97eqvv4lam8ds00j9em2s2f0r8e7r60qw9fdfq in the example above.

The network coordinator should specify the schema in which the pre-genesis network participants should submit their public keys and addresses. A toml file with the following schema is recommended:

[<pre-genesis-participant-alias>]
"public-key" = "ED25519_PK_PREFIXtpknam1qpjs6jrjuu5cj508ys7ezee4r40v8as6vz4j3ddc9qm68nfhf5n7clp4xse"
"address" = "tnam1qq5skuga54tfs7422hzz8sqvk3s6lhe2dg32jjhd"

Submitting keys and addresses

After the network coordinator has published the location (conventionally a git repository) for the pre-genesis network participants to submit their public keys, the participants are expected to submit their generated public keys (and their corresponding addresses) to the network coordinator in due time. The deadline will be set by the network coordinator.

Generating transactions

Participants are also responsible for generating the genesis-block transactions that set the initial state of the blockchain, including initialising genesis validator accounts and bonding to them. However, it is only possible to make transactions that require value once the balances of the keys become agreed upon (once the balances.toml file has been published).

Generate an established account

In order to generate a pre-genesis validator account, the pre-genesis network participants must first generate an established account. This can be done through the namada cli:

💡

The $ALIAS variable is the alias of the pre-genesis keys that were generated in the Generating keys step.

#Ensure $BASE_DIR is set to the base directory
TX_FILE_PATH="$BASE_DIR/pre-genesis/transactions.toml"
namadac utils init-genesis-established-account --path $TX_FILE_PATH --aliases $ALIAS
 
# You can change the `--path` argument to any file path, but the recommended is `$BASE_DIR/pre-genesis/transactions.toml`

The command will output the generated address of the established account.

Derived established account address: tnam1q8lsztqqhpjxdwzw88mqqc2mun7dvpxvas3v2dxk

It is useful to save this address for later use.

ESTABLISHED_ACCOUNT_ADDRESS=tnam1q8lsztqqhpjxdwzw88mqqc2mun7dvpxvas3v2dxk

This will generate a transactions.toml file that contains the pre-genesis transaction that will establish the account. The transactions.toml file should look something like this:

[[established_account]]
vp = "vp_user"
threshold = 1
public_keys = ["tpknam1qr872zwdvw4u4nkpl0ykmvhyvxw7j0u6g7ymz03d7he0jr3szkuwczddjp2"]

Generate a pre-genesis multisignature account

In order to generate a pre-genesis multisignature account, just add --aliases. With the list of key aliases to use, separated by commas.

# Ensure $BASE_DIR is set to the base directory
# Assuming that the values of $ALIAS1, $ALIAS2, and $ALIAS3 are the aliases of the pre-genesis keys that were generated in the [Generating keys](#generating-keys) step.
TX_FILE_PATH="$BASE_DIR/pre-genesis/transactions.toml"
 
namadac utils init-genesis-established-account --path $TX_FILE_PATH --aliases $ALIAS1,$ALIAS2,$ALIAS3

The command will output the generated address of the multisignature account.

Derived established account address: tnam1q8qvns6ndpff03wmszkhgepk2r8f9ws68ugktfml

The corresponding transactions.toml file should look something like this:

[[established_account]]
vp = "vp_user"
threshold = 1
public_keys = ["tpknam1qr872zwdvw4u4nkpl0ykmvhyvxw7j0u6g7ymz03d7he0jr3szkuwczddjp2", "tpknam1qpz5n0u49s6s5jx4nyycyw0w288yfq96p3lvwxkedxyw77y0vd53sqmryce"]

Generate a pre-genesis validator account

This step will require the balances.toml file to have been published by the network coordinator.

Once the pre-genesis network participants have generated respective pre-genesis established accounts, they can generate their pre-genesis validator accounts. This can be done through the namada cli:

# Ensure $BASE_DIR is set to the base directory
# Ensure $ESTABLISHED_ACCOUNT_ADDRESS is set
# Ensure $TX_FILE_PATH is set
 
EMAIL="<your-email>"
DISCORD_HANDLE="<your-discord-handle>" # This is optional
AVATAR_URL="<your-avatar-url>" # This is optional, and expects a URL to an image the size of 128x128 pixels
WEBSITE="<your-website>" # This is optional
DESCRIPTION="<your-description>" # This is optional
SELF_BOND_AMOUNT=1000000 # Set this to the amount of NAM you want to self-bond. This must be less than or equal to the amount of NAM allocated to the pre-genesis keys in the `balances.toml` that was published by the network coordinator.
VALIDATOR_ALIAS="<your-validator-alias>"
IP_ADDRESS="<your-public-IP-address>"
namadac utils init-genesis-validator \
  --address $ESTABLISHED_ACCOUNT_ADDRESS \
  --alias $VALIDATOR_ALIAS \
  --net-address "$IP_ADDRESS:26656" \
  --commission-rate 0.05 \
  --max-commission-rate-change 0.01 \
  --self-bond-amount $SELF_BOND_AMOUNT \
  --email $EMAIL \
  --discord-handle $DISCORD_HANDLE \
  --avatar $AVATAR_URL \
  --website $WEBSITE \
  --description $DESCRIPTION \
  --path $TX_FILE_PATH

The SELF_BOND_AMOUNT must be less than or equal to the amount of NAM allocated to the pre-genesis keys in the balances.toml that was published by the network coordinator. It will correspond to the self-bonded stake of the validator account at genesis.

The --net-address specifies the network address of the validator node given by "IP:PORT". It is also possible to use DNS names instead of IP:PORT addresses.

The --alias flag is the moniker name of the validator account.

The --commission-rate and --max-commision-rate flags are the commission rate and the maximum permitted commission rate change of the validator account per epoch. See the validator docsfor more info.

The --email flag is the email address of the validator account. This is used for the validator account to receive notifications from the network coordinator and other participants.

The optional --discord-handle flag is the discord handle of the validator account. This is used for the validator account to receive notifications from the network coordinator and other participants.

The --address flag is the Namada address of the account.

The --path flag is the path to the transactions.toml file that will be appended to, and requires the established account to already be initialized under.

The above command will append the necessary transactions to the transactions.toml file. The transactions.toml file should look something like this:

Successful execution will output the new validator address:

Validator account address: tnam1q8lsztqqhpjxdwzw88mqqc2mun7dvpxvas3v2dxk

Bond to a pre-genesis validator account

If your public key has been allocated NAM (NAAN for the shielded expedition), you can bond to a genesis validator as a pre-genesis transaction.

This step is intended for pre-genesis participants who have been allocated NAM (NAAN for the shielded expedition) and want to bond to a genesis validator that is not their own. If you want to bond to your own genesis validator, please follow the steps in Generate a pre-genesis validator account and use the --self-bond arguments.

The bond can be achieved by running:

namadac utils genesis-bond \
    --validator "<your-validator-address>" \
    --amount "<amount-to-stake-in-bond>" \
    --source "<your-tpknam-in-balances.toml>" \
    --path "<filename-for-your-tx.toml>"

After this step is completed, it is required to sign the transaction.

Signing transactions

Once the transactions.toml file has been generated, the pre-genesis network participants must sign the transactions. This can be done through the namada cli:

namadac utils sign-genesis-txs \
    --path $TX_FILE_PATH \
    --output $BASE_DIR/pre-genesis/signed-transactions.toml \
    --alias $VALIDATOR_ALIAS # This is only necessary if a validator account was generated, otherwise leave out the flag entirely

The above command will output a signed-transactions.toml file that contains the signed transactions.

Submitting transactions

Once all pre-genesis transactions have been generated and signed, the pre-genesis network participants must submit their transactions to the network coordinator in due time. The deadline will be set by the network coordinator. This will involve simply submitting the signed-transactions.toml file to the network coordinator at the agreed upon location.

By convention, a directory for each pre-genesis network participant is created in the git repository. The signed-transactions.toml file is then submitted to the respective directory.