Skip to content

Commit

Permalink
added post genesis validator guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Mar 2, 2024
1 parent 743863c commit 5851fea
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 4 deletions.
28 changes: 28 additions & 0 deletions network/manifest-1/POST_GENESIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Post-Genesis

### Become a validator
* Install the manifest binary
* manifestd init <moniker> --chain-id manifest-1 --default-denom poastake
* Replace your genesis with the public one found in this repo
* Find peers and seeds here.
* Update your minimum-gas-prices in the app.toml
* Start the node and sync up
* Once completed, `manifestd tx poa create-validator path/to/validator.json --from keyname`. This command shows the JSON needed.
```json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="},
"amount": "1poastake", # ignored
"moniker": "myvalidator",
"identity": "keybase-identity",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1" # ignored
}
```

Following these instructions, your validator will be put into a queue for the chain admins to accept or reject. Once accepted, you will be a validator on the network.
The chain admin's will set your amount if they accept.
104 changes: 104 additions & 0 deletions network/manifest-1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Mainnet Genesis

TODO:
- Update PoA Admin(s) from manifest10d07y265gmmuvt4z0w9aw880jnsr700jmq3jzm
- Remove manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct once others are given genesis allocations

# Post Genesis Validators
If you are a validator joining the network after the initial genesis launch, follow the [post genesis document here](./POST_GENESIS.md).

## Hardware Requirements
**Minimal**
* 4 GB RAM
* 100 GB SSD
* 3.2 x4 GHz CPU

**Recommended**
* 8 GB RAM
* 100 GB NVME SSD
* 4.2 GHz x6 CPU

**Operating System**
* Linux (x86_64) or Linux (amd64) Recommended Arch Linux

### Dependencies
>Prerequisite: go1.21+, git, gcc, make, jq
**Arch Linux:**
```
pacman -S go git gcc make
```

**Ubuntu Linux:**
```
sudo snap install go --classic
sudo apt-get install git gcc make jq
```

## manifestd Installation Steps

```bash
# Clone git repository
git clone https://github.com/liftedinit/manifest-ledger.git
cd manifest-ledger
git checkout VERSION

make install # go install ./...
# For ledger support `go install -tags ledger ./...`

manifestd config set client chain-id manifest-1
```

### Generate keys
* `manifestd keys add [key_name]`
* `manifestd keys add [key_name] --recover` to regenerate keys with your BIP39 mnemonic to add ledger key
* `manifestd keys add [key_name] --ledger` to add a ledger key

# Validator setup instructions
## Genesis Tx:
```bash
# Validator variables
KEYNAME='validator' # your keyname
MONIKER='pbcups'
SECURITY_CONTACT="[email protected]"
WEBSITE="https://domain.com"
MAX_RATE='0.20' # 20%
COMMISSION_RATE='0.00' # 0%
MAX_CHANGE='0.01' # 1%
CHAIN_ID='manifest-1'
PROJECT_HOME="${HOME}/.manifest"
KEYNAME_ADDR=$(manifestd keys show $KEYNAME -a)

# Remove old files if they exist
manifestd tendermint unsafe-reset-all
rm $HOME/.manifest/config/genesis.json
rm $HOME/.manifest/config/gentx/*.json

# Give yourself 1POASTAKE for the genesis Tx signed
manifestd init "$MONIKER" --chain-id $CHAIN_ID --staking-bond-denom poastake
manifestd add-genesis-account $KEYNAME_ADDR 1000000poastake

# genesis transaction using all above variables
manifestd gentx $KEYNAME 1000000poastake \
--home=$PROJECT_HOME \
--chain-id=$CHAIN_ID \
--moniker="$MONIKER" \
--commission-max-change-rate=$MAX_CHANGE \
--commission-max-rate=$MAX_RATE \
--commission-rate=$COMMISSION_RATE \
--security-contact=$SECURITY_CONTACT \
--website=$WEBSITE \
--details=""

# Get that gentx data easily -> your home directory
cat ${PROJECT_HOME}/config/gentx/gentx-*.json

# get your peer
echo $(manifestd tendermint show-node-id)@$(curl -s ifconfig.me):26656`
```

> Update minimum gas prices
```bash
# nano ${HOME}/.manifest/config/app.toml # minimum-gas-prices -> "0umfx"
sed -i 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "0umfx"/g' ${HOME}/.manifest/config/app.toml
```
51 changes: 47 additions & 4 deletions network/manifest-1/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
"sig_verify_cost_ed25519": "590",
"sig_verify_cost_secp256k1": "1000"
},
"accounts": []
"accounts": [
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct",
"pub_key": null,
"account_number": "0",
"sequence": "0"
}
]
},
"authz": {
"authorization": []
Expand All @@ -25,9 +33,44 @@
"send_enabled": [],
"default_send_enabled": true
},
"balances": [],
"supply": [],
"denom_metadata": [],
"balances": [
{
"address": "manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct",
"coins": [
{
"denom": "umfx",
"amount": "1"
}
]
}
],
"supply": [
{
"denom": "umfx",
"amount": "1"
}
],
"denom_metadata": [
{
"base": "umfx",
"denom_units": [
{
"aliases": [],
"denom": "umfx",
"exponent": 0
},
{
"aliases": [],
"denom": "MFX",
"exponent": 6
}
],
"description": "Denom metadata for MFX (umfx)",
"display": "MFX",
"name": "MFX",
"symbol": "MFX"
}
],
"send_enabled": []
},
"capability": {
Expand Down

0 comments on commit 5851fea

Please sign in to comment.