There will be a decentralized pre-genesis process in preparation for mainnet. The purpose of this process will be to generate a genesis state for the chain, including the initial validator set and initial stake distribution. At the end of the process, a set of genesis files will be proposed. Should genesis validators comprising > 2/3 of voting power go ahead with launching the chain from the proposed genesis files, it will signal social consensus of approval of the initial state.
balances.toml
containing genesis account balances published by the Anoma Foundationtransactions.toml
file. (This defines the initial validator set/stake distribution).v0.43.0
binaries (link). Important: when running your node, make sure you have upgraded your CometBFT version to v0.37.9
instead of the v0.37.2
which was used with earlier Namada versions.balances.toml
file from here. You will need this to see your genesis token allocation, so that you know how much you have available to bond. Note: the final version of the balances.toml file was published Sept 9, 2024. To make merging your PR as smooth as possible, please check that you're using the latest version.Collecting pre-genesis transactions happens in two stages: Stage 1 (initialize-validator) and Stage 2 (bond).
Find the scenario below that describes your situation:
My address is in balances.toml. I don't intend to create a pre-genesis validator or a pre-genesis bond
No further action required. Once the chain has launched, you can import your key into your wallet from the mnemonic or private key and access your funds.
My address is in balances.toml. I don't intend to create a pre-genesis validator, but do want to make a pre-genesis bond
Summary:
My address is in balances.toml and I will use it to initialize a validator
Summary:
I want to initialize a validator from a new address
This is the same as Scenario 3, except you will be creating a new keypair to initialize your validator from instead of using an existing one.
Before generating your pre-genesis transaction(s), you'll need to have your keys loaded into your wallet. You can either import existing keys (e.g. your shielded-expedition keys) or create a new pair.
Your pre-genesis wallet is located in ~/.local/share/namada/pre-genesis/wallet.toml
by default.
To import an existing keypair:
# load from mnemonic
namadaw --pre-genesis derive --alias $ALIAS
# load from private key
namadaw --pre-genesis add --alias $ALIAS --value $RAW_PRIVATE_KEY
Or, to create a new keypair:
(Remember to save the mnemonic!)
namadaw --pre-genesis gen --alias $ALIAS
You can use this command to display your public key/address:
namadaw --pre-genesis find --alias $ALIAS
Add the keys you will use to initialize your validator to your wallet as described above. You can either import existing keys (e.g. your shielded-expedition keys) or create a new pair.
Next, generate an established account toml file, providing the alias of your keys:
namadac utils init-genesis-established-account \
--path ~/.local/share/namada/pre-genesis/transactions.toml \
--aliases $ALIAS
You will see a message similar to:
Derived established account address: tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z
You will have generated a file ~/.local/share/namada/pre-genesis/transactions.toml
. Its contents should look similar to this:
# ~/.local/share/namada/pre-genesis/transactions.toml
[[established_account]]
vp = "vp_user"
threshold = 1
public_keys = ["tpknam1qp87s56pfekaukvs0ernayr7plt4a673sj9pfc7wuj26nsrw567jjfwcx2c"]
--path
should point to the transactions.toml
created in the previous step. The --address
should be the established account address generated in the previous step (starts with tnam
). The --self-bond-amount
should be 1
(the value given here doesn't matter since we'll be removing it in the next step).# discord-handle, avatar, website, description and name are all optional
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 0.1 \
--email $EMAIL \
--discord-handle $DISCORD_HANDLE \
--avatar $AVATAR_URL \
--website $WEBSITE \
--description $DESCRIPTION \
--name $ONCHAIN_MONIKER \
--path $TX_FILE_PATH
A couple notes on the above:
email
is mandatory but discord-handle
, avatar
, website
, description
and name
are optionalalias
refers to the alias in your local wallet, not your validator's name on-chain (that's set by name
)net-address
is a mandatory argument for the command, but if you don't know your IP address yet you can use a placeholder like 1.2.3.4:26656
self-bond-amount
are mandatoryAfterwards, you will see a message similar to:
The validator's keys were stored in the wallet at ~/.local/share/namada/pre-genesis/$ALIAS/validator-wallet.toml
Validator account address: tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z
Wrote genesis tx to: ~/.local/share/namada/pre-genesis/validator-transactions.toml
This will append the validator data to your transaction file ~/.local/share/namada/pre-genesis/transactions.toml
. Its contents should now look similar to the following:
# ~/.local/share/namada/pre-genesis/transactions.toml
[[established_account]]
vp = "vp_user"
threshold = 1
public_keys = ["tpknam1qp87s56pfekaukvs0ernayr7plt4a673sj9pfc7wuj26nsrw567jjfwcx2c"]
[[validator_account]]
address = "tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z"
vp = "vp_user"
commission_rate = "0.05"
max_commission_rate_change = "0.01"
net_address = "192.168.0.1:26656"
consensus_key = "tpknam1qrfm0ref54e605l8zjt8dqe6nqzczzc4hnkjf5ujvxkar7f6ff7lvhc7y9y"
protocol_key = "tpknam1qz0dput2lcy8gwdggz5plfkyfyhhpp59vzac289myqnxqu26h4r6xwxz9vu"
tendermint_node_key = "tpknam1qzuyfa3t6nw2f0df7evj9kjpmng4a2uvzu8lqmr8vefl9g28j5zyz8ktw4k"
eth_hot_key = "tpknam1qyp3mc4f9nf75j66fg6e02a093salvj6e85n8wcatepf7rqsm6zdv0c9f026z"
eth_cold_key = "tpknam1qypcfn4tnm8qxpewg3cckv8r6xl6smacj92lm775tnsaf06yle7qjdct8ccys"
[validator_account.metadata]
email = "test@gmail.com"
[[bond]]
source = "tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z"
validator = "tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z"
amount = "1"
transactions.toml
file and remove this section:[[bond]]
source = "tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z"
validator = "tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z"
amount = "1"
and then save the file.
namadac utils sign-genesis-txs \
--path ~/.local/share/namada/pre-genesis/transactions.toml \
--output ~/.local/share/namada/pre-genesis/transactions-signed.toml \
--alias $VALIDATOR_ALIAS
This will generate a (final) signed toml file named transactions-signed.toml
. This is the file we will be submitting.
{your github username}-validator.toml
and follow the steps in the section Submit a PR with your toml files below when submitting your toml file(s).Notes:
transactions-signed.toml
you generated for your validator, if using the same filenames. Make a backup copy before proceeding.To create a bond, your address must have a genesis balance allocated to it in the balances.toml
file.
Load your existing keys with genesis balance into your pre-genesis wallet from the mnemonic or private key.
Generate a bond transaction. The --amount
must be less than your allocation in balances.toml
(and save at least a few NAM unbonded for gas costs).
namadac utils genesis-bond \
--validator $TARGET_VALIDATOR \
--amount $AMOUNT \
--source $YOUR_PUB_KEY \
--path ~/.local/share/namada/pre-genesis/transactions.toml
This will generate a transactions.toml
file with contents similar to the following:
[[bond]]
source = "tpknam1qp87s56pfekaukvs0ernayr7plt4a673sj9pfc7wuj26nsrw567jjfwcx2c"
validator = "tnam1qyjjdxmdgnr6r68d6zsacevv27cxy3np8qv8zm2z"
amount = "1000"
namadac utils sign-genesis-txs \
--path ~/.local/share/namada/pre-genesis/transactions.toml \
--output ~/.local/share/namada/pre-genesis/transactions-signed.toml
This will generate a (final) signed toml file named transactions-signed.toml
. This is the file we will be submitting.
Please adhere to the following conventions when submitting your toml file(s). The CI scripts which check the validity of submissions expects them to be in a specific format; otherwise your PR may be rejected.
{your github username}-validator.toml
.{your github username}-bond.toml
./transactions
directory.Add {your github username} pre-genesis transactions
.As PRs for pre-genesis init-validator and bond txs are merged, the CI scripts will update the chart in the genesis repo with the current stake distribution. This can be helpful when deciding who to stake your tokens with.
You can sign your init-validator
and bond
transactions using a Ledger.
Important
The app on the official Ledger app store is not current and will not work. You must sideload the in-development version 0.0.27
or newer. You need a Ledger Nano or Nano S device.
For instructions on how to sideload the app, and how to use it to sign your pre-genesis transactions, see: