diff --git a/network/obvious-1/POST_GENESIS.md b/network/obvious-1/POST_GENESIS.md new file mode 100644 index 0000000..86b90ed --- /dev/null +++ b/network/obvious-1/POST_GENESIS.md @@ -0,0 +1,28 @@ +# Post-Genesis + +### Become a validator +* Install the manifest binary +* manifestd init --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. \ No newline at end of file diff --git a/network/obvious-1/README.md b/network/obvious-1/README.md new file mode 100644 index 0000000..23b6ab7 --- /dev/null +++ b/network/obvious-1/README.md @@ -0,0 +1,127 @@ +# Testnet Genesis + +## Cosmos Multisig (testnet) + +```sh +CHAIN_ID='obvious-1' + +# Add keys for multisig +manifestd keys add alice-ledger --pubkey +manifestd keys add bob-ledger --pubkey + +# Create multisig with those keys and name it +manifestd keys add alice-bob-multisig --multisig reece-testnet,reece-other --multisig-threshold 1 + +# Generate a Tx +manifestd tx bank send $(manifestd keys show alice-bob-multisig -a) manifest12wfd44kmcetyg98e7mt7zlp0ul4wnmg9yuuv6l 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 alice-bob-multisig) tx.json --sign-mode amino-json --chain-id=$CHAIN_ID >> tx-signed-alice.json +# and for bob if required + +# combine into a single Tx +manifestd tx multisign --from alice-bob-multisig tx.json alice-bob-multisig tx-signed-alice.json tx-signed-bob.json --chain-id=$CHAIN_ID > tx_ms.json + +# Anyone can Broadcast tx +manifestd tx broadcast ms/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 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@domain.com" +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 +``` \ No newline at end of file diff --git a/network/obvious-1/from_scratch.sh b/network/obvious-1/from_scratch.sh new file mode 100644 index 0000000..0cdc8ab --- /dev/null +++ b/network/obvious-1/from_scratch.sh @@ -0,0 +1,91 @@ +# Takes a default genesis from manifestd and creates a new genesis file. + +CHAIN_ID=obvious-1 + +make install + +export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.manifest"}") + +rm -rf $HOME_DIR && echo "Removed $HOME_DIR" + +manifestd init moniker --chain-id=$CHAIN_ID --default-denom=umfx + +update_genesis () { + cat $HOME_DIR/config/genesis.json | jq "$1" > $HOME_DIR/config/tmp_genesis.json && mv $HOME_DIR/config/tmp_genesis.json $HOME_DIR/config/genesis.json +} + +update_genesis '.consensus["params"]["block"]["max_gas"]="-1"' +update_genesis '.consensus["params"]["abci"]["vote_extensions_enable_height"]="1"' + +# auth +update_genesis '.app_state["auth"]["params"]["max_memo_characters"]="512"' + +update_genesis '.app_state["bank"]["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" + } +]' + +update_genesis '.app_state["crisis"]["constant_fee"]={"denom": "umfx","amount": "100000000"}' + +update_genesis '.app_state["distribution"]["params"]["community_tax"]="0.000000000000000000"' + +update_genesis '.app_state["gov"]["params"]["min_deposit"]=[{"denom":"umfx","amount":"100000000"}]' +update_genesis '.app_state["gov"]["params"]["max_deposit_period"]="259200s"' +update_genesis '.app_state["gov"]["params"]["voting_period"]="259200s"' +update_genesis '.app_state["gov"]["params"]["expedited_min_deposit"]=[{"denom":"umfx","amount":"250000000"}]' +update_genesis '.app_state["gov"]["params"]["min_deposit_ratio"]="0.100000000000000000"' # 10% +# update_genesis '.app_state["gov"]["params"]["constitution"]=""' # ? + +# TODO: +# update_genesis '.app_state["manifest"]["params"]["stake_holders"]=[{"address":"manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct","percentage":100000000}]' # TODO: +update_genesis '.app_state["manifest"]["params"]["inflation"]["automatic_enabled"]=false' +update_genesis '.app_state["manifest"]["params"]["inflation"]["yearly_amount"]="365000000"' # in micro format (1MFX = 10**6) +update_genesis '.app_state["manifest"]["params"]["inflation"]["mint_denom"]="umfx"' + +# not used +update_genesis '.app_state["mint"]["minter"]["inflation"]="0.000000000000000000"' +update_genesis '.app_state["mint"]["minter"]["annual_provisions"]="0.000000000000000000"' +update_genesis '.app_state["mint"]["params"]["mint_denom"]="notused"' +update_genesis '.app_state["mint"]["params"]["inflation_rate_change"]="0.000000000000000000"' +update_genesis '.app_state["mint"]["params"]["inflation_max"]="0.000000000000000000"' +update_genesis '.app_state["mint"]["params"]["inflation_min"]="0.000000000000000000"' +update_genesis '.app_state["mint"]["params"]["blocks_per_year"]="6311520"' # default 6s blocks + +update_genesis '.app_state["slashing"]["params"]["signed_blocks_window"]="10000"' +update_genesis '.app_state["slashing"]["params"]["min_signed_per_window"]="0.050000000000000000"' +update_genesis '.app_state["slashing"]["params"]["downtime_jail_duration"]="60s"' +update_genesis '.app_state["slashing"]["params"]["slash_fraction_double_sign"]="1.000000000000000000"' +update_genesis '.app_state["slashing"]["params"]["slash_fraction_downtime"]="0.000000000000000000"' + +update_genesis '.app_state["staking"]["params"]["bond_denom"]="poastake"' + +update_genesis '.app_state["tokenfactory"]["params"]["denom_creation_fee"]=[]' +update_genesis '.app_state["tokenfactory"]["params"]["denom_creation_gas_consume"]="250000"' + +# TODO: chalabi / the multisig +# gov, reece-testnet +update_genesis '.app_state["poa"]["params"]["admins"]=["manifest10d07y265gmmuvt4z0w9aw880jnsr700jmq3jzm","manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf"]' + +# add genesis accounts +# TODO: +manifestd genesis add-genesis-account manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct 1umfx --append +manifestd genesis add-genesis-account manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf 5000000000000umfx --append # reece-testnet (5m UMFX). Is a validator + +cp ~/.manifest/config/genesis.json ./network/$CHAIN_ID/genesis.json \ No newline at end of file diff --git a/network/obvious-1/genesis.json b/network/obvious-1/genesis.json new file mode 100644 index 0000000..ac32360 --- /dev/null +++ b/network/obvious-1/genesis.json @@ -0,0 +1,356 @@ +{ + "app_name": "manifestd", + "app_version": "", + "genesis_time": "2024-03-04T02:21:24.688420437Z", + "chain_id": "obvious-1", + "initial_height": 1, + "app_hash": null, + "app_state": { + "07-tendermint": null, + "auth": { + "params": { + "max_memo_characters": "512", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [ + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct", + "pub_key": null, + "account_number": "0", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf", + "pub_key": null, + "account_number": "1", + "sequence": "0" + } + ] + }, + "authz": { + "authorization": [] + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [ + { + "address": "manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct", + "coins": [ + { + "denom": "umfx", + "amount": "1" + } + ] + }, + { + "address": "manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf", + "coins": [ + { + "denom": "umfx", + "amount": "5000000000000" + } + ] + } + ], + "supply": [ + { + "denom": "umfx", + "amount": "5000000000001" + } + ], + "denom_metadata": [ + { + "description": "Denom metadata for MFX (umfx)", + "denom_units": [ + { + "denom": "umfx", + "exponent": 0, + "aliases": [] + }, + { + "denom": "MFX", + "exponent": 6, + "aliases": [] + } + ], + "base": "umfx", + "display": "MFX", + "name": "MFX", + "symbol": "MFX", + "uri": "", + "uri_hash": "" + } + ], + "send_enabled": [] + }, + "capability": { + "index": "1", + "owners": [] + }, + "circuit": { + "account_permissions": [], + "disabled_type_urls": [] + }, + "consensus": null, + "crisis": { + "constant_fee": { + "denom": "umfx", + "amount": "100000000" + } + }, + "distribution": { + "params": { + "community_tax": "0.000000000000000000", + "base_proposer_reward": "0.000000000000000000", + "bonus_proposer_reward": "0.000000000000000000", + "withdraw_addr_enabled": true + }, + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "previous_proposer": "", + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] + }, + "evidence": { + "evidence": [] + }, + "feegrant": { + "allowances": [] + }, + "feeibc": { + "identified_fees": [], + "fee_enabled_channels": [], + "registered_payees": [], + "registered_counterparty_payees": [], + "forward_relayers": [] + }, + "genutil": { + "gen_txs": [] + }, + "gov": { + "starting_proposal_id": "1", + "deposits": [], + "votes": [], + "proposals": [], + "deposit_params": null, + "voting_params": null, + "tally_params": null, + "params": { + "min_deposit": [ + { + "denom": "umfx", + "amount": "100000000" + } + ], + "max_deposit_period": "259200s", + "voting_period": "259200s", + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000", + "min_initial_deposit_ratio": "0.000000000000000000", + "proposal_cancel_ratio": "0.500000000000000000", + "proposal_cancel_dest": "", + "expedited_voting_period": "86400s", + "expedited_threshold": "0.667000000000000000", + "expedited_min_deposit": [ + { + "denom": "umfx", + "amount": "250000000" + } + ], + "burn_vote_quorum": false, + "burn_proposal_deposit_prevote": false, + "burn_vote_veto": true, + "min_deposit_ratio": "0.100000000000000000" + }, + "constitution": "" + }, + "group": { + "group_seq": "0", + "groups": [], + "group_members": [], + "group_policy_seq": "0", + "group_policies": [], + "proposal_seq": "0", + "proposals": [], + "votes": [] + }, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint", + "09-localhost" + ] + }, + "create_localhost": false, + "next_client_sequence": "0" + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [], + "next_connection_sequence": "0", + "params": { + "max_expected_time_per_block": "30000000000" + } + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "receipts": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [], + "next_channel_sequence": "0" + } + }, + "interchainaccounts": { + "controller_genesis_state": { + "active_channels": [], + "interchain_accounts": [], + "ports": [], + "params": { + "controller_enabled": true + } + }, + "host_genesis_state": { + "active_channels": [], + "interchain_accounts": [], + "port": "icahost", + "params": { + "host_enabled": true, + "allow_messages": [ + "*" + ] + } + } + }, + "manifest": { + "params": { + "stake_holders": [], + "inflation": { + "automatic_enabled": false, + "yearly_amount": "365000000", + "mint_denom": "umfx" + } + } + }, + "mint": { + "minter": { + "inflation": "0.000000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "notused", + "inflation_rate_change": "0.000000000000000000", + "inflation_max": "0.000000000000000000", + "inflation_min": "0.000000000000000000", + "goal_bonded": "0.670000000000000000", + "blocks_per_year": "6311520" + } + }, + "nft": { + "classes": [], + "entries": [] + }, + "params": null, + "poa": { + "params": { + "admins": [ + "manifest10d07y265gmmuvt4z0w9aw880jnsr700jmq3jzm", + "manifest1aucdev30u9505dx9t6q5fkcm70sjg4rh7rn5nf" + ], + "allow_validator_self_exit": true + } + }, + "slashing": { + "params": { + "signed_blocks_window": "10000", + "min_signed_per_window": "0.050000000000000000", + "downtime_jail_duration": "60s", + "slash_fraction_double_sign": "1.000000000000000000", + "slash_fraction_downtime": "0.000000000000000000" + }, + "signing_infos": [], + "missed_blocks": [] + }, + "staking": { + "params": { + "unbonding_time": "1814400s", + "max_validators": 100, + "max_entries": 7, + "historical_entries": 10000, + "bond_denom": "poastake", + "min_commission_rate": "0.000000000000000000" + }, + "last_total_power": "0", + "last_validator_powers": [], + "validators": [], + "delegations": [], + "unbonding_delegations": [], + "redelegations": [], + "exported": false + }, + "tokenfactory": { + "params": { + "denom_creation_fee": [], + "denom_creation_gas_consume": "250000" + }, + "factory_denoms": [] + }, + "transfer": { + "port_id": "transfer", + "denom_traces": [], + "params": { + "send_enabled": true, + "receive_enabled": true + }, + "total_escrowed": [] + }, + "upgrade": {}, + "vesting": {} + }, + "consensus": { + "params": { + "block": { + "max_bytes": "22020096", + "max_gas": "-1" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800000000000", + "max_bytes": "1048576" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": { + "app": "0" + }, + "abci": { + "vote_extensions_enable_height": "1" + } + } + } +} \ No newline at end of file