-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DNM] Test network launch #15
Draft
Reecepbcups
wants to merge
14
commits into
main
Choose a base branch
from
reece/test-network-launch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
86adcdc
main network add todo for poa params
Reecepbcups 178edf7
add auto cp of genesis file for mainnet
Reecepbcups a50e4ec
`obvious-1` testnet genesis structure init
Reecepbcups dee4df7
obvious-1 testnet chainid
Reecepbcups 14da244
create multisig (chandra+pbcups)
Reecepbcups 31681e7
--append
Reecepbcups 8fe9a95
add pbcups gentx + peer
Reecepbcups c966247
add chandra gentx
chalabi2 8feef51
fmt
Reecepbcups d9c1905
add bash command to get amounts
Reecepbcups e3dfe0c
genesis
Reecepbcups bd75ab2
curl cmd
Reecepbcups 6137acb
fixes namespace
Reecepbcups d95effe
github.com/cosmos/ibc-go/v8 v8.0.0
Reecepbcups File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 obvious-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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
# Testnet Genesis | ||
|
||
## Cosmos Multisig (testnet) | ||
|
||
```sh | ||
CHAIN_ID='obvious-1' | ||
|
||
# Add keys for multisig | ||
manifestd keys add chandrastation --pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A9hZjm7++QBixsH4QTQadXPrnhVBDk+MPLE74U0/GoJp"}' # manifest1wxjfftrc0emj5f7ldcvtpj05lxtz3t2npghwsf | ||
manifestd keys add reece-testnet --pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A57Cxv5vgwE6pAJ9oYtnOdU4ehKixMj6gufF8jBRq4IC"}' # manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf | ||
|
||
# Create multisig with those keys and name it | ||
manifestd keys add obvious-1-multisig --multisig reece-testnet,chandrastation --multisig-threshold 1 | ||
|
||
# - address: manifest1nzpct7tq52rckgnvr55e2m0kmyr0asdrgayq9p | ||
# name: obvious-1-multisig | ||
# pubkey: '{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":1,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A9hZjm7++QBixsH4QTQadXPrnhVBDk+MPLE74U0/GoJp"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A57Cxv5vgwE6pAJ9oYtnOdU4ehKixMj6gufF8jBRq4IC"}]}' | ||
# type: multi | ||
|
||
# Generate a Tx | ||
manifestd tx bank send $(manifestd keys show obvious-1-multisig -a) manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf 10000000umfx --generate-only --chain-id=$CHAIN_ID | jq . > tx.json | ||
|
||
# both sign | ||
manifestd tx sign --from $(manifestd keys show -a reece-testnet) --multisig $(manifestd keys show -a obvious-1-multisig) tx.json --sign-mode amino-json --chain-id=$CHAIN_ID >> tx-signed-reece.json | ||
# and for chandra station | ||
|
||
# combine into a single Tx | ||
manifestd tx multisign --from obvious-1-multisig tx.json obvious-1-multisig tx-signed-reece.json tx-signed-chandra.json --chain-id=$CHAIN_ID > tx_ms.json | ||
|
||
# Anyone can Broadcast tx | ||
manifestd tx broadcast tx_ms.json --chain-id=$CHAIN_ID | ||
``` | ||
|
||
|
||
# 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 v0.0.1-alpha.1 | ||
|
||
make install # go install ./... | ||
# For ledger support `go install -tags ledger ./...` | ||
|
||
manifestd config set client chain-id obvious-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='obvious-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 --default-denom poastake | ||
manifestd genesis add-genesis-account $KEYNAME_ADDR 1000000poastake --append | ||
|
||
# genesis transaction using all above variables | ||
manifestd genesis 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 | ||
``` | ||
|
||
|
||
maintainer only: | ||
```bash | ||
|
||
cd networks/obvious-1 | ||
|
||
cp genesis.json $HOME/.manifest/config | ||
|
||
# iterate through the gentx directory, print the files | ||
# https://github.com/strangelove-ventures/bech32cli | ||
for filename in gentx/*.json; do | ||
addr=`cat $filename | jq -r .body.messages[0].validator_address | xargs -I {} bech32 transform {} manifest` | ||
raw_coin=`cat $filename | jq -r .body.messages[0].value` # { "denom": "poastake", "amount": "1000000" } | ||
coin=$(echo $raw_coin | jq -r '.amount + .denom') # make coin = 1000000poastake | ||
manifestd genesis add-genesis-account $addr $coin --append | ||
done | ||
|
||
manifestd genesis collect-gentxs --gentx-dir gentx --home $HOME/.manifest | ||
|
||
cp $HOME/.manifest/config/genesis.json live_genesis.json | ||
|
||
# curl https://raw.githubusercontent.com/liftedinit/manifest-ledger/reece/test-network-launch/network/obvious-1/live_genesis.json > $HOME/.manifest/config/genesis.json | ||
|
||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: