├── .gitignore ├── CHECKLIST.md ├── README.md ├── coralnet ├── README.md ├── big-dipper-settings.json ├── cli_helper.ts ├── config │ ├── app.toml │ ├── genesis.json │ └── gentx │ │ └── gentx-hogfish.json └── defaults.env ├── demo-10 ├── README.md ├── cli_helper.ts ├── config │ └── genesis.json ├── defaults.env └── genesis.json ├── devops ├── README.md ├── big-dipper │ ├── README.md │ ├── big-dipper.service │ ├── docker-compose.yml │ ├── install.sh │ ├── nginx.sh │ ├── nginx │ │ └── big-dipper.conf │ └── services.sh ├── endpoints │ ├── README.md │ ├── nginx.sh │ ├── nginx │ │ ├── lcd.conf │ │ ├── proxy.conf │ │ └── rpc.conf │ ├── rest_server.sh │ └── wasm-rest.service ├── faucet │ ├── Dockerfile │ ├── README.md │ ├── faucet.service │ ├── faucet.sh │ ├── nginx.sh │ ├── nginx │ │ └── faucet.conf │ └── services.sh └── node │ ├── README.md │ ├── install.sh │ ├── node_id.sh │ ├── services.sh │ ├── show_validator.sh │ └── wasmd.service ├── gaia-flex ├── README.md ├── big-dipper-settings.json ├── cli_helper.ts ├── config │ ├── app.toml │ └── genesis.json └── defaults.env ├── heldernet ├── README.md ├── big-dipper-settings.json ├── cli_helper.ts ├── config │ ├── app.toml │ ├── config.toml │ └── genesis.json └── defaults.env └── musselnet ├── README.md ├── big-dipper-settings.json ├── cli_helper.ts ├── config ├── app.toml ├── config.toml ├── genesis.json └── gentx │ └── gentx-4b29be1f604658cd06f1ee51dfb55a717e2b8c96.json └── defaults.env /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /CHECKLIST.md: -------------------------------------------------------------------------------- 1 | # Testnet Launch Checklist and Instructions 2 | 3 | You can copy paste this section to new testnet folder to check you follow the steps correctly. 4 | 5 | All scripts rely heavily on environment variables to work correctly. 6 | You will want to `source ..//defaults.env` as a basis, then 7 | possibly declare a few more variables as desired. 8 | 9 | ## Genesis Configuration 10 | 11 | - [ ] Checkout to a new branch 12 | - [ ] Duplicate latest network directory and rename it to `newnet` 13 | - [ ] Clean genesis account and gentx in genesis file 14 | - [ ] Update chain-id 15 | - [ ] Update start time in genesis file 16 | - [ ] Update staking and fee token 17 | - [ ] Update bech32 addresses 18 | - [ ] Create a reserve address and add it to genesis, Make sure reserve has enough stake and fee tokens 19 | - [ ] Add gen tx for validator node, collect-gentx, save `config/node_key.json` and `config/priv_validator.json`, delete them on this folder. 20 | While setting up validator move these keys to the validator machine. 21 | - [ ] Merge the branch to master 22 | 23 | Infrastructure setup is at [devops folder](devops) 24 | 25 | ## Validator 26 | 27 | - [ ] Follow [node instructions](devops/node/README.md). 28 | - [ ] Copy output of `node_id.sh` this will give you the node id to use in sentry/seed set up. 29 | 30 | ## Seed 31 | 32 | - [ ] Follow [node instructions](devops/node/README.md). 33 | - [ ] Setup [Public Endpoints](devops/endpoints): ssl certs and nginx config to serve rpc and lcd endpoints over https. 34 | - [ ] RPC endpoint works. 35 | - [ ] Update `SEED_NODE` in newnet/defaults.env. 36 | - [ ] Merge the changes to the genesis to testnets repo. 37 | 38 | ## Sentry 39 | 40 | Sentry is optional, brings extra security. Not very important in a testnet env but good to have. 41 | 42 | - [ ] Follow [node instructions](devops/node/README.md). 43 | - [ ] Setup [Public Endpoints](devops/endpoints): ssl certs and nginx config to serve rpc and lcd endpoints over https. 44 | - [ ] RPC endpoint works. 45 | 46 | ### Faucet 47 | 48 | [Faucet](./faucet) - Also, you can optionally set up a faucet. However, you need to feed it with tokens 49 | so it has something to give out. 50 | 51 | ### Block Explorer 52 | 53 | [Block Explorer](./big-dipper) - You can optionally set up a block-explorer. 54 | [forbole/big-dipper](https://github.com/CosmWasm/big-dipper) 55 | z -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CosmWasm Testnets 2 | 3 | Information on all public CosmWasm testnets. Check 4 | [documentations](https://docs.cosmwasm.com/testnets/build-requirements.html) for detailed setup demonstrations. 5 | 6 | ### Running 7 | 8 | * [Gaia Flex](./gaia-flex) 9 | * [Heldernet](./heldernet) 10 | 11 | ### Upcoming 12 | 13 | * [Musselnet](./musselnet) 24 October 2020 14 | 15 | ### Past 16 | 17 | * [Demo-10](./demo-10) 18 | * [Coralnet](./coralnet) 19 | 20 | ## Checklist 21 | 22 | Testnet launch preparation is at [CHECKLIST.md](./CHECKLIST.md) 23 | 24 | ## DevOps 25 | 26 | [devops scripts](devops) are open for anyone to use and contribute. 27 | -------------------------------------------------------------------------------- /coralnet/README.md: -------------------------------------------------------------------------------- 1 | # Coralnet 2 | 3 | A permissionless testing network running 4 | 5 | - **go version**: `1.14+` 6 | - **wasmd version**: `v0.10.0` 7 | - **wasmd build command**: `make build-coral` 8 | - **CosmJS version**: `v0.22.1` 9 | - **start**: 11th August 2020 10 | - **end**: not yet finished 11 | 12 | ## Purpose 13 | 14 | This is long-term playground network where developers can test their contracts validators test their infrastructure. 15 | You can relate it to Ethereum's Rinkeby. 16 | 17 | ## Get Genesis Tokens 18 | 19 | Fork this repo and check it out, build the `coral` binary from 20 | [`wasmd`](https://github.com/CosmWasm/wasmd), and make a PR updating the 21 | genesis file: 22 | 23 | ```shell 24 | # go to app data directory 25 | cd testnets/coralnet 26 | 27 | coral keys add validator 28 | corald add-genesis-account --home . $(coral keys show -a validator) 100000000ushell,100000000ureef 29 | # please sort the genesis file, so the diff makes sense 30 | SORTED=$(jq -S . < ./config/genesis.json) && echo "$SORTED" > ./config/genesis.json 31 | ``` 32 | 33 | ## Connecting 34 | 35 | The configuration can be [downloaded here](./defaults.env). 36 | Please `source defaults.env` to get all variable you need. 37 | 38 | With those, you can follow the 39 | [official instructions](https://docs.cosmwasm.com/testnets/testnets.html) 40 | on how to connect to a testnet. 41 | Or just connect your command-line client. In order to build customized wasmd executables `corald` and `coral`, 42 | clone `wasmd` repo and run `make build-coral` on the root of the project. 43 | 44 | The [genesis file](./config/genesis.json) is also available here. 45 | 46 | ## Web endpoints 47 | 48 | Here we list all explorers, wallets, and apps you can access with a browser: 49 | 50 | * [RPC](https://rpc.coralnet.cosmwasm.com) - public RPC endpoint 51 | * [LCD](https://lcd.coralnet.cosmwasm.com) - public LCD endpoint 52 | * [FAUCET](https://faucet.coralnet.cosmwasm.com) - faucet 53 | * [Big Dipper/Block Explorer](https://bigdipper.coralnet.cosmwasm.com) 54 | * [Wasm Glass](https://coralnet.wasm.glass) - contract explorer 55 | * [Name App](https://cosmwasm.github.io/name-app/) - Sample dApp interface to use the 56 | -------------------------------------------------------------------------------- /coralnet/big-dipper-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "public":{ 3 | "chainName": "CosmWasm Coralnet", 4 | "chainId": "cosmwasm-coral", 5 | "gtm": "{Add your Google Tag Manager ID here}", 6 | "slashingWindow": 10000, 7 | "uptimeWindow": 250, 8 | "initialPageSize": 30, 9 | "bech32PrefixAccAddr": "coral", 10 | "bech32PrefixAccPub": "coralpub", 11 | "bech32PrefixValAddr": "coralvaloper", 12 | "bech32PrefixValPub": "coralvaloperpub", 13 | "bech32PrefixConsAddr": "coralvalcons", 14 | "bech32PrefixConsPub": "coralvalconspub", 15 | "bondDenom": "ureef", 16 | "powerReduction": 1000000, 17 | "coins": [ 18 | { 19 | "denom": "ushell", 20 | "displayName": "SHELL", 21 | "displayNamePlural": "SHELLS", 22 | "fraction": 1000000 23 | }, 24 | { 25 | "denom": "ureef", 26 | "displayName": "REEF", 27 | "displayNamePlural": "REEFS", 28 | "fraction": 1000000 29 | } 30 | ], 31 | "gasPrice": 0.025, 32 | "coingeckoId": "none" 33 | }, 34 | "genesisFile": "https://raw.githubusercontent.com/CosmWasm/testnets/master/coralnet/config/genesis.json", 35 | "remote":{ 36 | "rpc":"https://rpc.coralnet.cosmwasm.com", 37 | "lcd":"https://lcd.coralnet.cosmwasm.com" 38 | }, 39 | "debug": { 40 | "startTimer": true, 41 | "readGenesis": true 42 | }, 43 | "params":{ 44 | "startHeight": 0, 45 | "defaultBlockTime": 5000, 46 | "blockInterval": 15000, 47 | "consensusInterval": 1000, 48 | "statusInterval":7500, 49 | "signingInfoInterval": 1800000, 50 | "proposalInterval": 5000, 51 | "missedBlocksInterval": 60000, 52 | "delegationInterval": 900000 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /coralnet/cli_helper.ts: -------------------------------------------------------------------------------- 1 | interface Options { 2 | httpUrl: string 3 | networkId: string 4 | feeToken: string 5 | gasPrice: number 6 | bech32prefix: string 7 | } 8 | 9 | const defaultOptions: Options = { 10 | httpUrl: 'https://lcd.coralnet.cosmwasm.com', 11 | networkId: 'cosmwasm-coral', 12 | feeToken: 'ushell', 13 | gasPrice: 0.025, 14 | bech32prefix: 'coral', 15 | } 16 | 17 | const defaultFaucetUrl = 'https://faucet.coralnet.cosmwasm.com/credit' 18 | 19 | const buildFeeTable = (feeToken: string, gasPrice: number): FeeTable => { 20 | const stdFee = (gas: number, denom: string, price: number) => { 21 | const amount = Math.floor(gas * price) 22 | return { 23 | amount: [{ amount: amount.toString(), denom: denom }], 24 | gas: gas.toString(), 25 | } 26 | } 27 | 28 | return { 29 | upload: stdFee(1000000, feeToken, gasPrice), 30 | init: stdFee(500000, feeToken, gasPrice), 31 | migrate: stdFee(500000, feeToken, gasPrice), 32 | exec: stdFee(200000, feeToken, gasPrice), 33 | send: stdFee(80000, feeToken, gasPrice), 34 | changeAdmin: stdFee(80000, feeToken, gasPrice), 35 | } 36 | } 37 | 38 | const connect = async ( 39 | mnemonic: string, 40 | opts: Partial 41 | ): Promise<{ 42 | client: SigningCosmWasmClient 43 | address: string 44 | }> => { 45 | const options: Options = { ...defaultOptions, ...opts } 46 | const feeTable = buildFeeTable(options.feeToken, options.gasPrice) 47 | const wallet = await buildWallet(mnemonic) 48 | const [{ address }] = await wallet.getAccounts() 49 | 50 | const client = new SigningCosmWasmClient( 51 | options.httpUrl, 52 | address, 53 | wallet, 54 | feeTable 55 | ) 56 | return { client, address } 57 | } 58 | 59 | // loadOrCreateMnemonic will try to load a mnemonic from the file. 60 | // If missing, it will generate a random one and save to the file. 61 | // 62 | // This is not secure, but does allow simple developer access to persist a 63 | // mnemonic between sessions 64 | const loadOrCreateMnemonic = (filename: string): string => { 65 | try { 66 | const mnemonic = fs.readFileSync(filename, 'utf8') 67 | return mnemonic.trim() 68 | } catch (err) { 69 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 70 | fs.writeFileSync(filename, mnemonic, 'utf8') 71 | return mnemonic 72 | } 73 | } 74 | 75 | const hitFaucet = async ( 76 | faucetUrl: string, 77 | address: string, 78 | ticker: string 79 | ): Promise => { 80 | const r = await axios.post(defaultFaucetUrl, { ticker, address }) 81 | console.log(r.status) 82 | console.log(r.data) 83 | } 84 | 85 | const randomAddress = async (): Promise => { 86 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 87 | return mnemonicToAddress(mnemonic) 88 | } 89 | 90 | const mnemonicToAddress = async ( 91 | mnemonic: string 92 | ): Promise => { 93 | const wallet = await buildWallet(mnemonic); 94 | const [{ address }] = await wallet.getAccounts() 95 | return address 96 | } 97 | 98 | const buildWallet = (mnemonic: string): Promise => { 99 | return Secp256k1Wallet.fromMnemonic(mnemonic, makeCosmoshubPath(0), defaultOptions.bech32prefix); 100 | } 101 | 102 | const downloadWasm = async (url: string): Promise => { 103 | const r = await axios.get(url, { responseType: 'arraybuffer' }) 104 | if (r.status !== 200) { 105 | throw new Error(`Download error: ${r.status}`) 106 | } 107 | return r.data 108 | } 109 | 110 | const getAttibute = ( 111 | logs: readonly logs.Log[], 112 | key: string 113 | ): string | undefined => 114 | logs[0].events[0].attributes.find((x) => x.key == key)?.value 115 | -------------------------------------------------------------------------------- /coralnet/config/app.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML config file. 2 | # For more information, see https://github.com/toml-lang/toml 3 | 4 | ##### main base config options ##### 5 | 6 | # The minimum gas prices a validator is willing to accept for processing a 7 | # transaction. A transaction's fees must meet the minimum of any denomination 8 | # specified in this config (e.g. 0.25token1;0.0001token2). 9 | minimum-gas-prices = "0.025ushell" 10 | 11 | # default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals 12 | # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) 13 | # everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals 14 | # custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' 15 | pruning = "default" 16 | 17 | # These are applied if and only if the pruning strategy is custom. 18 | pruning-keep-recent = "0" 19 | pruning-keep-every = "0" 20 | pruning-interval = "0" 21 | 22 | # HaltHeight contains a non-zero block height at which a node will gracefully 23 | # halt and shutdown that can be used to assist upgrades and testing. 24 | # 25 | # Note: Commitment of state will be attempted on the corresponding block. 26 | halt-height = 0 27 | 28 | # HaltTime contains a non-zero minimum block time (in Unix seconds) at which 29 | # a node will gracefully halt and shutdown that can be used to assist upgrades 30 | # and testing. 31 | # 32 | # Note: Commitment of state will be attempted on the corresponding block. 33 | halt-time = 0 34 | 35 | # InterBlockCache enables inter-block caching. 36 | inter-block-cache = true 37 | -------------------------------------------------------------------------------- /coralnet/config/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_hash": "", 3 | "app_state": { 4 | "auth": { 5 | "accounts": [ 6 | { 7 | "type": "cosmos-sdk/Account", 8 | "value": { 9 | "account_number": "0", 10 | "address": "coral1e86v774dch5uwkks0cepw8mdz8a9flhhapvf6w", 11 | "coins": [ 12 | { 13 | "amount": "100000000", 14 | "denom": "ureef" 15 | }, 16 | { 17 | "amount": "100000000", 18 | "denom": "ushell" 19 | } 20 | ], 21 | "public_key": null, 22 | "sequence": "0" 23 | } 24 | }, 25 | { 26 | "type": "cosmos-sdk/Account", 27 | "value": { 28 | "account_number": "0", 29 | "address": "coral1qvrcashqpemlkhrqphzv9n5nutdxpafmdefgcl", 30 | "coins": [ 31 | { 32 | "amount": "100000000", 33 | "denom": "ureef" 34 | }, 35 | { 36 | "amount": "100000000", 37 | "denom": "ushell" 38 | } 39 | ], 40 | "public_key": null, 41 | "sequence": "0" 42 | } 43 | }, 44 | { 45 | "type": "cosmos-sdk/Account", 46 | "value": { 47 | "account_number": "0", 48 | "address": "coral1exta8hzrghyt5umd4jh55kfkmp0tv3hyg8krc5", 49 | "coins": [ 50 | { 51 | "amount": "100000000", 52 | "denom": "ureef" 53 | }, 54 | { 55 | "amount": "100000000", 56 | "denom": "ushell" 57 | } 58 | ], 59 | "public_key": null, 60 | "sequence": "0" 61 | } 62 | }, 63 | { 64 | "type": "cosmos-sdk/Account", 65 | "value": { 66 | "account_number": "0", 67 | "address": "coral1dyual04q9m3f0a7qsvfx4hvu8ceyrxw9yldp8w", 68 | "coins": [ 69 | { 70 | "amount": "5000000000", 71 | "denom": "ureef" 72 | }, 73 | { 74 | "amount": "5000000000", 75 | "denom": "ushell" 76 | } 77 | ], 78 | "public_key": null, 79 | "sequence": "0" 80 | } 81 | }, 82 | { 83 | "type": "cosmos-sdk/Account", 84 | "value": { 85 | "account_number": "0", 86 | "address": "coral1glcmc2c604mjy0g8ngvwn899ye2n4ehxm5mv66", 87 | "coins": [ 88 | { 89 | "amount": "100000000", 90 | "denom": "ureef" 91 | }, 92 | { 93 | "amount": "100000000", 94 | "denom": "ushell" 95 | } 96 | ], 97 | "public_key": null, 98 | "sequence": "0" 99 | } 100 | }, 101 | { 102 | "type": "cosmos-sdk/Account", 103 | "value": { 104 | "account_number": "0", 105 | "address": "coral13mcejut8e5tncs59zcs4yn4envcd98vx682frk", 106 | "coins": [ 107 | { 108 | "amount": "100000000", 109 | "denom": "ureef" 110 | }, 111 | { 112 | "amount": "100000000", 113 | "denom": "ushell" 114 | } 115 | ], 116 | "public_key": null, 117 | "sequence": "0" 118 | } 119 | }, 120 | { 121 | "type": "cosmos-sdk/Account", 122 | "value": { 123 | "account_number": "0", 124 | "address": "coral1vatt4vl6jmd4jh6wyu6k66yu2hmscjcuqlq0zt", 125 | "coins": [ 126 | { 127 | "amount": "100000000", 128 | "denom": "ureef" 129 | }, 130 | { 131 | "amount": "100000000", 132 | "denom": "ushell" 133 | } 134 | ], 135 | "public_key": null, 136 | "sequence": "0" 137 | } 138 | }, 139 | { 140 | "type": "cosmos-sdk/Account", 141 | "value": { 142 | "account_number": "0", 143 | "address": "coral10zn0d2eeust0495crtr3zqz7t688hg0s53afrh", 144 | "coins": [ 145 | { 146 | "amount": "100000000", 147 | "denom": "ureef" 148 | }, 149 | { 150 | "amount": "100000000", 151 | "denom": "ushell" 152 | } 153 | ], 154 | "public_key": null, 155 | "sequence": "0" 156 | } 157 | } 158 | ], 159 | "params": { 160 | "max_memo_characters": "256", 161 | "sig_verify_cost_ed25519": "590", 162 | "sig_verify_cost_secp256k1": "1000", 163 | "tx_sig_limit": "7", 164 | "tx_size_cost_per_byte": "10" 165 | } 166 | }, 167 | "bank": { 168 | "send_enabled": true 169 | }, 170 | "crisis": { 171 | "constant_fee": { 172 | "amount": "1000", 173 | "denom": "ureef" 174 | } 175 | }, 176 | "distribution": { 177 | "delegator_starting_infos": [], 178 | "delegator_withdraw_infos": [], 179 | "fee_pool": { 180 | "community_pool": [] 181 | }, 182 | "outstanding_rewards": [], 183 | "params": { 184 | "base_proposer_reward": "0.010000000000000000", 185 | "bonus_proposer_reward": "0.040000000000000000", 186 | "community_tax": "0.020000000000000000", 187 | "withdraw_addr_enabled": true 188 | }, 189 | "previous_proposer": "", 190 | "validator_accumulated_commissions": [], 191 | "validator_current_rewards": [], 192 | "validator_historical_rewards": [], 193 | "validator_slash_events": [] 194 | }, 195 | "evidence": { 196 | "evidence": [], 197 | "params": { 198 | "max_evidence_age": "120000000000" 199 | } 200 | }, 201 | "genutil": { 202 | "gentxs": [ 203 | { 204 | "type": "cosmos-sdk/StdTx", 205 | "value": { 206 | "fee": { 207 | "amount": [], 208 | "gas": "200000" 209 | }, 210 | "memo": "hogfish@192.168.178.75:26656", 211 | "msg": [ 212 | { 213 | "type": "cosmos-sdk/MsgCreateValidator", 214 | "value": { 215 | "commission": { 216 | "max_change_rate": "0.010000000000000000", 217 | "max_rate": "0.200000000000000000", 218 | "rate": "0.100000000000000000" 219 | }, 220 | "delegator_address": "coral10zn0d2eeust0495crtr3zqz7t688hg0s53afrh", 221 | "description": { 222 | "details": "", 223 | "identity": "", 224 | "moniker": "Hogfish", 225 | "security_contact": "", 226 | "website": "" 227 | }, 228 | "min_self_delegation": "1", 229 | "pubkey": "coralvalconspub1zcjduepqvxg72ccnl9r65fv0wn3amlk4sfzqfe2k36l073kjx2qyaf6sk23qw7j8wq", 230 | "validator_address": "coralvaloper10zn0d2eeust0495crtr3zqz7t688hg0sm7wr4f", 231 | "value": { 232 | "amount": "100000000", 233 | "denom": "ureef" 234 | } 235 | } 236 | } 237 | ], 238 | "signatures": [ 239 | { 240 | "pub_key": { 241 | "type": "tendermint/PubKeySecp256k1", 242 | "value": "ApgM7ifRF0rcTo/dha2JXBHNhXmkiKYRGESj/yexI5sw" 243 | }, 244 | "signature": "ODh7QXYMkf0ZzhWXJtKYfjXVAtoH4JCAi79ozYMKokgpt8N7XBOgq8m5rgwGKXTydW5iQYxq15KKwX0jI8tw6A==" 245 | } 246 | ] 247 | } 248 | } 249 | ] 250 | }, 251 | "gov": { 252 | "deposit_params": { 253 | "max_deposit_period": "172800000000000", 254 | "min_deposit": [ 255 | { 256 | "amount": "10000000", 257 | "denom": "ureef" 258 | } 259 | ] 260 | }, 261 | "deposits": null, 262 | "proposals": null, 263 | "starting_proposal_id": "1", 264 | "tally_params": { 265 | "quorum": "0.334000000000000000", 266 | "threshold": "0.500000000000000000", 267 | "veto": "0.334000000000000000" 268 | }, 269 | "votes": null, 270 | "voting_params": { 271 | "voting_period": "172800000000000" 272 | } 273 | }, 274 | "mint": { 275 | "minter": { 276 | "annual_provisions": "0.000000000000000000", 277 | "inflation": "0.130000000000000000" 278 | }, 279 | "params": { 280 | "blocks_per_year": "6311520", 281 | "goal_bonded": "0.670000000000000000", 282 | "inflation_max": "0.200000000000000000", 283 | "inflation_min": "0.070000000000000000", 284 | "inflation_rate_change": "0.130000000000000000", 285 | "mint_denom": "ureef" 286 | } 287 | }, 288 | "params": null, 289 | "slashing": { 290 | "missed_blocks": {}, 291 | "params": { 292 | "downtime_jail_duration": "600000000000", 293 | "min_signed_per_window": "0.050000000000000000", 294 | "signed_blocks_window": "10000", 295 | "slash_fraction_double_sign": "0.050000000000000000", 296 | "slash_fraction_downtime": "0.010000000000000000" 297 | }, 298 | "signing_infos": {} 299 | }, 300 | "staking": { 301 | "delegations": null, 302 | "exported": false, 303 | "last_total_power": "0", 304 | "last_validator_powers": null, 305 | "params": { 306 | "bond_denom": "ureef", 307 | "historical_entries": 0, 308 | "max_entries": 7, 309 | "max_validators": 100, 310 | "unbonding_time": "1814400000000000" 311 | }, 312 | "redelegations": null, 313 | "unbonding_delegations": null, 314 | "validators": null 315 | }, 316 | "supply": { 317 | "supply": [] 318 | }, 319 | "upgrade": {}, 320 | "wasm": { 321 | "params": { 322 | "code_upload_access": { 323 | "permission": "Everybody" 324 | }, 325 | "instantiate_default_permission": "Everybody" 326 | } 327 | } 328 | }, 329 | "chain_id": "cosmwasm-coral", 330 | "consensus_params": { 331 | "block": { 332 | "max_bytes": "22020096", 333 | "max_gas": "-1", 334 | "time_iota_ms": "1000" 335 | }, 336 | "evidence": { 337 | "max_age_duration": "172800000000000", 338 | "max_age_num_blocks": "100000" 339 | }, 340 | "validator": { 341 | "pub_key_types": [ 342 | "ed25519" 343 | ] 344 | } 345 | }, 346 | "genesis_time": "2020-08-10T12:00:00Z" 347 | } 348 | -------------------------------------------------------------------------------- /coralnet/config/gentx/gentx-hogfish.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "cosmos-sdk/StdTx", 3 | "value": { 4 | "msg": [ 5 | { 6 | "type": "cosmos-sdk/MsgCreateValidator", 7 | "value": { 8 | "description": { 9 | "moniker": "Hogfish", 10 | "identity": "", 11 | "website": "", 12 | "security_contact": "", 13 | "details": "" 14 | }, 15 | "commission": { 16 | "rate": "0.100000000000000000", 17 | "max_rate": "0.200000000000000000", 18 | "max_change_rate": "0.010000000000000000" 19 | }, 20 | "min_self_delegation": "1", 21 | "delegator_address": "coral10zn0d2eeust0495crtr3zqz7t688hg0s53afrh", 22 | "validator_address": "coralvaloper10zn0d2eeust0495crtr3zqz7t688hg0sm7wr4f", 23 | "pubkey": "coralvalconspub1zcjduepqvxg72ccnl9r65fv0wn3amlk4sfzqfe2k36l073kjx2qyaf6sk23qw7j8wq", 24 | "value": { 25 | "denom": "ureef", 26 | "amount": "100000000" 27 | } 28 | } 29 | } 30 | ], 31 | "fee": { 32 | "amount": [], 33 | "gas": "200000" 34 | }, 35 | "signatures": [ 36 | { 37 | "pub_key": { 38 | "type": "tendermint/PubKeySecp256k1", 39 | "value": "ApgM7ifRF0rcTo/dha2JXBHNhXmkiKYRGESj/yexI5sw" 40 | }, 41 | "signature": "ODh7QXYMkf0ZzhWXJtKYfjXVAtoH4JCAi79ozYMKokgpt8N7XBOgq8m5rgwGKXTydW5iQYxq15KKwX0jI8tw6A==" 42 | } 43 | ], 44 | "memo": "hogfish@192.168.178.75:26656" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /coralnet/defaults.env: -------------------------------------------------------------------------------- 1 | export CHAIN_ID="cosmwasm-coral" 2 | export TESTNET_NAME="coralnet" 3 | export WASMD_VERSION="v0.10.0" 4 | export CONFIG_DIR=".corald" 5 | export BINARY="corald" 6 | export CLI_BINARY="coral" 7 | 8 | export COSMJS_VERSION="v0.22.1" 9 | export GENESIS_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/coralnet/config/genesis.json" 10 | export APP_CONFIG_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/coralnet/config/app.toml" 11 | 12 | export RPC="https://rpc.coralnet.cosmwasm.com:443" 13 | export LCD="https://lcd.coralnet.cosmwasm.com" 14 | export FAUCET="https://faucet.coralnet.cosmwasm.com" 15 | export SEED_NODE="ec488c9215e1917e41bce5ef4b53d39ff6805166@195.201.88.9:26656" 16 | -------------------------------------------------------------------------------- /demo-10/README.md: -------------------------------------------------------------------------------- 1 | # Demo 10 2 | 3 | A centralized demo net running wasmd 0.10 4 | 5 | - **go version**: `1.14+` 6 | - **wasmd version**: `v0.10.0` 7 | - **wasmd build command**: `make build` 8 | - **CosmJS version**: `v0.22.1` 9 | - **start**: July 2020 10 | - **end**: not yet finished 11 | 12 | ## Purpose 13 | 14 | This network is a simple one node network 15 | 16 | ## Connecting 17 | 18 | The configuration can be [downloaded here](./config.env). 19 | Please `source config` to get all variable you need. 20 | 21 | With those, you can follow the 22 | [official instructions](https://docs.cosmwasm.com/testnets/testnets.html) 23 | on how to connect to a testnet. 24 | Or just connect your command-line client. 25 | 26 | The [genesis file](./genesis.json) is also available here. 27 | 28 | ## Web endpoints 29 | 30 | Here we list all explorers, wallets, and apps you can access with a browser: 31 | 32 | * [Wasm Glass](https://demonet.wasm.glass) - contract explorer 33 | * [Name App](https://cosmwasm.github.io/name-app/) - Sample dApp interface to use the 34 | [nameservice contract](https://github.com/CosmWasm/cosmwasm-examples/tree/nameservice-0.5.2/nameservice) -------------------------------------------------------------------------------- /demo-10/cli_helper.ts: -------------------------------------------------------------------------------- 1 | interface Options { 2 | httpUrl: string 3 | networkId: string 4 | feeToken: string 5 | gasPrice: number 6 | bech32prefix: string 7 | } 8 | 9 | const defaultOptions: Options = { 10 | httpUrl: 'https://lcd.demo-10.cosmwasm.com', 11 | networkId: 'testing', 12 | feeToken: 'ucosm', 13 | gasPrice: 0.025, 14 | bech32prefix: 'cosmos', 15 | } 16 | 17 | const defaultFaucetUrl = 'https://faucet.demo-10.cosmwasm.com/credit' 18 | 19 | const buildFeeTable = (feeToken: string, gasPrice: number): FeeTable => { 20 | const stdFee = (gas: number, denom: string, price: number) => { 21 | const amount = Math.floor(gas * price) 22 | return { 23 | amount: [{ amount: amount.toString(), denom: denom }], 24 | gas: gas.toString(), 25 | } 26 | } 27 | 28 | return { 29 | upload: stdFee(1000000, feeToken, gasPrice), 30 | init: stdFee(500000, feeToken, gasPrice), 31 | migrate: stdFee(500000, feeToken, gasPrice), 32 | exec: stdFee(200000, feeToken, gasPrice), 33 | send: stdFee(80000, feeToken, gasPrice), 34 | changeAdmin: stdFee(80000, feeToken, gasPrice), 35 | } 36 | } 37 | 38 | // TODO: hit faucet 39 | // if (config.faucetUrl) { 40 | // const acct = await client.getAccount(); 41 | // if (!acct?.balance?.length) { 42 | // await ky.post(config.faucetUrl, { json: { ticker: "COSM", address } }); 43 | // } 44 | // } 45 | 46 | const connect = async ( 47 | mnemonic: string, 48 | opts: Partial 49 | ): Promise<{ 50 | client: SigningCosmWasmClient 51 | address: string 52 | }> => { 53 | const options: Options = { ...defaultOptions, ...opts } 54 | const feeTable = buildFeeTable(options.feeToken, options.gasPrice) 55 | const wallet = await Secp256k1Wallet.fromMnemonic(mnemonic) 56 | const [{ address }] = await wallet.getAccounts() 57 | 58 | const client = new SigningCosmWasmClient( 59 | options.httpUrl, 60 | address, 61 | wallet, 62 | feeTable 63 | ) 64 | return { client, address } 65 | } 66 | 67 | // loadOrCreateMnemonic will try to load a mnemonic from the file. 68 | // If missing, it will generate a random one and save to the file. 69 | // 70 | // This is not secure, but does allow simple developer access to persist a 71 | // mnemonic between sessions 72 | const loadOrCreateMnemonic = (filename: string): string => { 73 | try { 74 | const mnemonic = fs.readFileSync(filename, 'utf8') 75 | return mnemonic.trim() 76 | } catch (err) { 77 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 78 | fs.writeFileSync(filename, mnemonic, 'utf8') 79 | return mnemonic 80 | } 81 | } 82 | 83 | const hitFaucet = async ( 84 | faucetUrl: string, 85 | address: string, 86 | ticker: string 87 | ): Promise => { 88 | const r = await axios.post(defaultFaucetUrl, { ticker, address }) 89 | console.log(r.status) 90 | console.log(r.data) 91 | } 92 | 93 | const randomAddress = async (prefix: string): Promise => { 94 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 95 | return mnemonicToAddress(prefix, mnemonic) 96 | } 97 | 98 | const mnemonicToAddress = async ( 99 | prefix: string, 100 | mnemonic: string 101 | ): Promise => { 102 | const wallet = await Secp256k1Wallet.fromMnemonic(mnemonic) 103 | const [{ address }] = await wallet.getAccounts() 104 | return address 105 | } 106 | 107 | const downloadWasm = async (url: string): Promise => { 108 | const r = await axios.get(url, { responseType: 'arraybuffer' }) 109 | if (r.status !== 200) { 110 | throw new Error(`Download error: ${r.status}`) 111 | } 112 | return r.data 113 | } 114 | 115 | const getAttibute = ( 116 | logs: readonly logs.Log[], 117 | key: string 118 | ): string | undefined => 119 | logs[0].events[0].attributes.find((x) => x.key == key)?.value 120 | -------------------------------------------------------------------------------- /demo-10/config/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "genesis_time": "2020-07-01T13:24:53.194871767Z", 3 | "chain_id": "testing", 4 | "consensus_params": { 5 | "block": { 6 | "max_bytes": "22020096", 7 | "max_gas": "-1", 8 | "time_iota_ms": "1000" 9 | }, 10 | "evidence": { 11 | "max_age_num_blocks": "100000", 12 | "max_age_duration": "172800000000000" 13 | }, 14 | "validator": { 15 | "pub_key_types": [ 16 | "ed25519" 17 | ] 18 | } 19 | }, 20 | "app_hash": "", 21 | "app_state": { 22 | "mint": { 23 | "minter": { 24 | "inflation": "0.130000000000000000", 25 | "annual_provisions": "0.000000000000000000" 26 | }, 27 | "params": { 28 | "mint_denom": "ustake", 29 | "inflation_rate_change": "0.130000000000000000", 30 | "inflation_max": "0.200000000000000000", 31 | "inflation_min": "0.070000000000000000", 32 | "goal_bonded": "0.670000000000000000", 33 | "blocks_per_year": "6311520" 34 | } 35 | }, 36 | "wasm": { 37 | "codes": null, 38 | "contracts": null, 39 | "sequences": null 40 | }, 41 | "params": null, 42 | "evidence": { 43 | "params": { 44 | "max_evidence_age": "120000000000" 45 | }, 46 | "evidence": [] 47 | }, 48 | "staking": { 49 | "params": { 50 | "unbonding_time": "1814400000000000", 51 | "max_validators": 100, 52 | "max_entries": 7, 53 | "historical_entries": 0, 54 | "bond_denom": "ustake" 55 | }, 56 | "last_total_power": "0", 57 | "last_validator_powers": null, 58 | "validators": null, 59 | "delegations": null, 60 | "unbonding_delegations": null, 61 | "redelegations": null, 62 | "exported": false 63 | }, 64 | "gov": { 65 | "starting_proposal_id": "1", 66 | "deposits": null, 67 | "votes": null, 68 | "proposals": null, 69 | "deposit_params": { 70 | "min_deposit": [ 71 | { 72 | "denom": "ustake", 73 | "amount": "10000000" 74 | } 75 | ], 76 | "max_deposit_period": "172800000000000" 77 | }, 78 | "voting_params": { 79 | "voting_period": "172800000000000" 80 | }, 81 | "tally_params": { 82 | "quorum": "0.334000000000000000", 83 | "threshold": "0.500000000000000000", 84 | "veto": "0.334000000000000000" 85 | } 86 | }, 87 | "slashing": { 88 | "params": { 89 | "signed_blocks_window": "100", 90 | "min_signed_per_window": "0.500000000000000000", 91 | "downtime_jail_duration": "600000000000", 92 | "slash_fraction_double_sign": "0.050000000000000000", 93 | "slash_fraction_downtime": "0.010000000000000000" 94 | }, 95 | "signing_infos": {}, 96 | "missed_blocks": {} 97 | }, 98 | "upgrade": {}, 99 | "crisis": { 100 | "constant_fee": { 101 | "denom": "ustake", 102 | "amount": "1000" 103 | } 104 | }, 105 | "bank": { 106 | "send_enabled": true 107 | }, 108 | "genutil": { 109 | "gentxs": [ 110 | { 111 | "type": "cosmos-sdk/StdTx", 112 | "value": { 113 | "msg": [ 114 | { 115 | "type": "cosmos-sdk/MsgCreateValidator", 116 | "value": { 117 | "description": { 118 | "moniker": "testing", 119 | "identity": "", 120 | "website": "", 121 | "security_contact": "", 122 | "details": "" 123 | }, 124 | "commission": { 125 | "rate": "0.100000000000000000", 126 | "max_rate": "0.200000000000000000", 127 | "max_change_rate": "0.010000000000000000" 128 | }, 129 | "min_self_delegation": "1", 130 | "delegator_address": "cosmos1ekcumnhu86xa5e6umpu959v3crtxzsl5rvsvqs", 131 | "validator_address": "cosmosvaloper1ekcumnhu86xa5e6umpu959v3crtxzsl5xcyevr", 132 | "pubkey": "cosmosvalconspub1zcjduepq2rqlyvue9z8heaeqfymgke7lzls2e6stc6sr34shrptvpua60f0qm5zypl", 133 | "value": { 134 | "denom": "ustake", 135 | "amount": "250000000" 136 | } 137 | } 138 | } 139 | ], 140 | "fee": { 141 | "amount": [], 142 | "gas": "200000" 143 | }, 144 | "signatures": [ 145 | { 146 | "pub_key": { 147 | "type": "tendermint/PubKeySecp256k1", 148 | "value": "ApRcsoLblT+/9e19N6UwLqI8vnTTpQfVGSR8y3HrQF6B" 149 | }, 150 | "signature": "lYmezGDQzecBLlco5jNKLSJ8bJ92yKEtq/WLRPVsV2xAUPdZ7IB0C5myRAyDqw/h1fotaHo33AI8M6E+fsVxfA==" 151 | } 152 | ], 153 | "memo": "26c9c79dc62b5ddc753bb9fcce022fcc98b5a8cf@172.17.0.2:26656" 154 | } 155 | } 156 | ] 157 | }, 158 | "supply": { 159 | "supply": [] 160 | }, 161 | "auth": { 162 | "params": { 163 | "max_memo_characters": "256", 164 | "tx_sig_limit": "7", 165 | "tx_size_cost_per_byte": "10", 166 | "sig_verify_cost_ed25519": "590", 167 | "sig_verify_cost_secp256k1": "1000" 168 | }, 169 | "accounts": [ 170 | { 171 | "type": "cosmos-sdk/Account", 172 | "value": { 173 | "address": "cosmos1ekcumnhu86xa5e6umpu959v3crtxzsl5rvsvqs", 174 | "coins": [ 175 | { 176 | "denom": "ucosm", 177 | "amount": "1000000000000" 178 | }, 179 | { 180 | "denom": "ustake", 181 | "amount": "1000000000000" 182 | } 183 | ], 184 | "public_key": "", 185 | "account_number": 0, 186 | "sequence": 0 187 | } 188 | }, 189 | { 190 | "type": "cosmos-sdk/Account", 191 | "value": { 192 | "address": "cosmos1kw62mwcjy74myqc0xxp2573fpm0kkfhdauh63d", 193 | "coins": [ 194 | { 195 | "denom": "ucosm", 196 | "amount": "1000000000000" 197 | }, 198 | { 199 | "denom": "ustake", 200 | "amount": "1000000000000" 201 | } 202 | ], 203 | "public_key": "", 204 | "account_number": 0, 205 | "sequence": 0 206 | } 207 | }, 208 | { 209 | "type": "cosmos-sdk/Account", 210 | "value": { 211 | "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada", 212 | "coins": [ 213 | { 214 | "denom": "ucosm", 215 | "amount": "1000000000000" 216 | }, 217 | { 218 | "denom": "ustake", 219 | "amount": "1000000000000" 220 | } 221 | ], 222 | "public_key": "", 223 | "account_number": 0, 224 | "sequence": 0 225 | } 226 | }, 227 | { 228 | "type": "cosmos-sdk/Account", 229 | "value": { 230 | "address": "cosmos1qxg0kr9kepnngrc2nelk2tz2vzzf462x8fhzfg", 231 | "coins": [ 232 | { 233 | "denom": "ucosm", 234 | "amount": "1000000000000" 235 | }, 236 | { 237 | "denom": "ustake", 238 | "amount": "1000000000000" 239 | } 240 | ], 241 | "public_key": "", 242 | "account_number": 0, 243 | "sequence": 0 244 | } 245 | } 246 | ] 247 | }, 248 | "distribution": { 249 | "params": { 250 | "community_tax": "0.020000000000000000", 251 | "base_proposer_reward": "0.010000000000000000", 252 | "bonus_proposer_reward": "0.040000000000000000", 253 | "withdraw_addr_enabled": true 254 | }, 255 | "fee_pool": { 256 | "community_pool": [] 257 | }, 258 | "delegator_withdraw_infos": [], 259 | "previous_proposer": "", 260 | "outstanding_rewards": [], 261 | "validator_accumulated_commissions": [], 262 | "validator_historical_rewards": [], 263 | "validator_current_rewards": [], 264 | "delegator_starting_infos": [], 265 | "validator_slash_events": [] 266 | } 267 | } 268 | } 269 | -------------------------------------------------------------------------------- /demo-10/defaults.env: -------------------------------------------------------------------------------- 1 | CHAIN_ID="testing" 2 | TESTNET_NAME="demo-10" 3 | WASMD_VERSION="v0.10.0-beta2" 4 | COSMJS_VERSION="v0.22.1" 5 | 6 | RPC="https://rpc.demo-10.cosmwasm.com" 7 | LCD="https://lcd.demo-10.cosmwasm.com" 8 | FAUCET="https://faucet.demo-10.cosmwasm.com" 9 | SEED_NODE="1445f84f409745c554c03557e826edc9757b941a@p2p.demo-10.cosmwasm.com:26656" -------------------------------------------------------------------------------- /demo-10/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "genesis_time": "2020-07-30T12:35:58.84263Z", 3 | "chain_id": "testing", 4 | "consensus_params": { 5 | "block": { 6 | "max_bytes": "22020096", 7 | "max_gas": "-1", 8 | "time_iota_ms": "1000" 9 | }, 10 | "evidence": { 11 | "max_age_num_blocks": "100000", 12 | "max_age_duration": "172800000000000" 13 | }, 14 | "validator": { 15 | "pub_key_types": [ 16 | "ed25519" 17 | ] 18 | } 19 | }, 20 | "app_hash": "", 21 | "app_state": { 22 | "supply": { 23 | "supply": [] 24 | }, 25 | "distribution": { 26 | "params": { 27 | "community_tax": "0.020000000000000000", 28 | "base_proposer_reward": "0.010000000000000000", 29 | "bonus_proposer_reward": "0.040000000000000000", 30 | "withdraw_addr_enabled": true 31 | }, 32 | "fee_pool": { 33 | "community_pool": [] 34 | }, 35 | "delegator_withdraw_infos": [], 36 | "previous_proposer": "", 37 | "outstanding_rewards": [], 38 | "validator_accumulated_commissions": [], 39 | "validator_historical_rewards": [], 40 | "validator_current_rewards": [], 41 | "delegator_starting_infos": [], 42 | "validator_slash_events": [] 43 | }, 44 | "genutil": { 45 | "gentxs": [ 46 | { 47 | "type": "cosmos-sdk/StdTx", 48 | "value": { 49 | "msg": [ 50 | { 51 | "type": "cosmos-sdk/MsgCreateValidator", 52 | "value": { 53 | "description": { 54 | "moniker": "node001", 55 | "identity": "", 56 | "website": "", 57 | "security_contact": "", 58 | "details": "" 59 | }, 60 | "commission": { 61 | "rate": "0.100000000000000000", 62 | "max_rate": "0.200000000000000000", 63 | "max_change_rate": "0.010000000000000000" 64 | }, 65 | "min_self_delegation": "1", 66 | "delegator_address": "cosmos14l73yrj53w43y2qskfz3umc0vj55eexu4h3vaw", 67 | "validator_address": "cosmosvaloper14l73yrj53w43y2qskfz3umc0vj55eexusr9e3a", 68 | "pubkey": "cosmosvalconspub1zcjduepqxrsfupsc8pweqjdawvud92kmvjyfn5y3zpdxlurrpysgyarp03qskmmz7c", 69 | "value": { 70 | "denom": "ustake", 71 | "amount": "250000000" 72 | } 73 | } 74 | } 75 | ], 76 | "fee": { 77 | "amount": [], 78 | "gas": "200000" 79 | }, 80 | "signatures": [ 81 | { 82 | "pub_key": { 83 | "type": "tendermint/PubKeySecp256k1", 84 | "value": "AjUvUu0UKSEihnIHwZ64hzx57p6qKmPUismMHd94fYiV" 85 | }, 86 | "signature": "FSSJUqo0+DcSLKtArNWq4Sc8wUW6G8RBV+lluPvvdgFj9KXh8ku1eL879pkk//DLT+QQzg3RWH+bETwMUUkGKA==" 87 | } 88 | ], 89 | "memo": "1445f84f409745c554c03557e826edc9757b941a@172.17.0.2:26656" 90 | } 91 | } 92 | ] 93 | }, 94 | "slashing": { 95 | "params": { 96 | "signed_blocks_window": "100", 97 | "min_signed_per_window": "0.500000000000000000", 98 | "downtime_jail_duration": "600000000000", 99 | "slash_fraction_double_sign": "0.050000000000000000", 100 | "slash_fraction_downtime": "0.010000000000000000" 101 | }, 102 | "signing_infos": {}, 103 | "missed_blocks": {} 104 | }, 105 | "mint": { 106 | "minter": { 107 | "inflation": "0.130000000000000000", 108 | "annual_provisions": "0.000000000000000000" 109 | }, 110 | "params": { 111 | "mint_denom": "ustake", 112 | "inflation_rate_change": "0.130000000000000000", 113 | "inflation_max": "0.200000000000000000", 114 | "inflation_min": "0.070000000000000000", 115 | "goal_bonded": "0.670000000000000000", 116 | "blocks_per_year": "6311520" 117 | } 118 | }, 119 | "evidence": { 120 | "params": { 121 | "max_evidence_age": "120000000000" 122 | }, 123 | "evidence": [] 124 | }, 125 | "upgrade": {}, 126 | "auth": { 127 | "params": { 128 | "max_memo_characters": "256", 129 | "tx_sig_limit": "7", 130 | "tx_size_cost_per_byte": "10", 131 | "sig_verify_cost_ed25519": "590", 132 | "sig_verify_cost_secp256k1": "1000" 133 | }, 134 | "accounts": [ 135 | { 136 | "type": "cosmos-sdk/Account", 137 | "value": { 138 | "address": "cosmos14l73yrj53w43y2qskfz3umc0vj55eexu4h3vaw", 139 | "coins": [ 140 | { 141 | "denom": "ucosm", 142 | "amount": "1000000000000" 143 | }, 144 | { 145 | "denom": "ustake", 146 | "amount": "1000000000000" 147 | } 148 | ], 149 | "public_key": null, 150 | "account_number": "0", 151 | "sequence": "0" 152 | } 153 | }, 154 | { 155 | "type": "cosmos-sdk/Account", 156 | "value": { 157 | "address": "cosmos1kw62mwcjy74myqc0xxp2573fpm0kkfhdauh63d", 158 | "coins": [ 159 | { 160 | "denom": "ucosm", 161 | "amount": "1000000000000" 162 | }, 163 | { 164 | "denom": "ustake", 165 | "amount": "1000000000000" 166 | } 167 | ], 168 | "public_key": null, 169 | "account_number": "0", 170 | "sequence": "0" 171 | } 172 | }, 173 | { 174 | "type": "cosmos-sdk/Account", 175 | "value": { 176 | "address": "cosmos14qemq0vw6y3gc3u3e0aty2e764u4gs5le3hada", 177 | "coins": [ 178 | { 179 | "denom": "ucosm", 180 | "amount": "1000000000000" 181 | }, 182 | { 183 | "denom": "ustake", 184 | "amount": "1000000000000" 185 | } 186 | ], 187 | "public_key": null, 188 | "account_number": "0", 189 | "sequence": "0" 190 | } 191 | }, 192 | { 193 | "type": "cosmos-sdk/Account", 194 | "value": { 195 | "address": "cosmos1qxg0kr9kepnngrc2nelk2tz2vzzf462x8fhzfg", 196 | "coins": [ 197 | { 198 | "denom": "ucosm", 199 | "amount": "1000000000000" 200 | }, 201 | { 202 | "denom": "ustake", 203 | "amount": "1000000000000" 204 | } 205 | ], 206 | "public_key": null, 207 | "account_number": "0", 208 | "sequence": "0" 209 | } 210 | } 211 | ] 212 | }, 213 | "crisis": { 214 | "constant_fee": { 215 | "denom": "ustake", 216 | "amount": "1000" 217 | } 218 | }, 219 | "params": null, 220 | "staking": { 221 | "params": { 222 | "unbonding_time": "1814400000000000", 223 | "max_validators": 100, 224 | "max_entries": 7, 225 | "historical_entries": 0, 226 | "bond_denom": "ustake" 227 | }, 228 | "last_total_power": "0", 229 | "last_validator_powers": null, 230 | "validators": null, 231 | "delegations": null, 232 | "unbonding_delegations": null, 233 | "redelegations": null, 234 | "exported": false 235 | }, 236 | "gov": { 237 | "starting_proposal_id": "1", 238 | "deposits": null, 239 | "votes": null, 240 | "proposals": null, 241 | "deposit_params": { 242 | "min_deposit": [ 243 | { 244 | "denom": "ustake", 245 | "amount": "10000000" 246 | } 247 | ], 248 | "max_deposit_period": "172800000000000" 249 | }, 250 | "voting_params": { 251 | "voting_period": "172800000000000" 252 | }, 253 | "tally_params": { 254 | "quorum": "0.334000000000000000", 255 | "threshold": "0.500000000000000000", 256 | "veto": "0.334000000000000000" 257 | } 258 | }, 259 | "bank": { 260 | "send_enabled": true 261 | }, 262 | "wasm": { 263 | "params": { 264 | "code_upload_access": { 265 | "permission": "Everybody" 266 | }, 267 | "instantiate_default_permission": "Everybody" 268 | } 269 | } 270 | } 271 | } 272 | -------------------------------------------------------------------------------- /devops/README.md: -------------------------------------------------------------------------------- 1 | # Dev Ops 2 | 3 | This contains some sample scripts that you can use to quickly pull up a node for a testnet. 4 | They are designed for ease of use and simplicity rather than complexity. This is just bash scripts, 5 | designed for Ubuntu, so they should be easy to port to any other system. 6 | 7 | Some changes you may wish to make if you deploy this on a value-bearing network: 8 | 9 | * Use native binaries rather than docker 10 | * Activate a firewall 11 | * Use hardware key signer 12 | * Further, tune the node's config.toml 13 | * Further OS-level security updates 14 | 15 | However, for early testnets this should be enough to get started. 16 | -------------------------------------------------------------------------------- /devops/big-dipper/README.md: -------------------------------------------------------------------------------- 1 | # Set up a Block explorer 2 | 3 | These instructions work for a machine running Ubuntu 20.04. 4 | **Make sure you setup an external volume named /mnt/db-volume to 5 | keep big-dipper data to preserve data in case of update** 6 | 7 | First, copy all files from this directory to the machine: 8 | 9 | `scp -r ./* root@1.2.3.4:/etc/big-dipper` 10 | 11 | Also, copy the proper settings for the testnet you choose: 12 | 13 | `scp ../../coralnet/big-dipper-settings.json root@1.2.3.4:/etc/big-dipper/settings.json` 14 | 15 | ## Installing 16 | 17 | The script must be run as root. If you are not logged in as root, try `sudo -E install.sh` 18 | 19 | Running this will set up all dependencies, block-explorer clone repo, build image. 20 | 21 | ## Nginx 22 | 23 | Before setting up nginx make sure you exported these variables 24 | 25 | - `EMAIL` - an email for a sysadmin, used with let's encrypt when registering ssl certificates 26 | - `DOMAIN` - the root domain we register under. We will try to set up ssl services for 27 | 28 | then `sudo -E ./nginx.sh` will do its magic. 29 | 30 | ## Systemd 31 | 32 | If you wish to run this under systemd, then run `services.sh` to set up a default config to auto-restart the node. 33 | This will install a service file with the binary name under eg `/etc/systemd/system/big-dipper.service`, 34 | enable it to start on reboot, and then start it running. 35 | 36 | You may also run this manually or use another supervisor and skip this step. 37 | 38 | ## Docker Compose environment variables 39 | 40 | Big dipper requires configuration json as environment variable passed to docker compose run command. 41 | `./install.sh` script creates an `.env` file in `/etc/big-dipper` that keeps the [docker-compose environment 42 | variables](https://docs.docker.com/compose/environment-variables/#the-env-file). `big-dipper.service` runs on working 43 | directory `/etc/big-dipper` and `docker-compose up` sources `.env`. Long story short: don't delete `.env` ;) 44 | -------------------------------------------------------------------------------- /devops/big-dipper/big-dipper.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=big-dipper 3 | Requires=docker.service network-online.target 4 | After=docker.service network-online.target 5 | 6 | [Service] 7 | TimeoutStartSec=5 8 | Restart=always 9 | User=root 10 | Group=root 11 | WorkingDirectory=/etc/big-dipper/ 12 | ExecStartPre=/usr/bin/docker-compose pull --quiet --ignore-pull-failures 13 | ExecStartPre=/usr/bin/docker-compose build --pull 14 | ExecStart=/usr/bin/docker-compose up --remove-orphans 15 | ExecStop=/usr/bin/docker-compose down --remove-orphans 16 | ExecReload=/usr/bin/docker-compose pull --quiet --ignore-pull-failures 17 | ExecReload=/usr/bin/docker-compose build --pull 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /devops/big-dipper/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | app: 5 | image: cosmwasm/big-dipper:latest 6 | ports: 7 | - '3080:3000' 8 | depends_on: 9 | - mongo 10 | environment: 11 | ROOT_URL: ${APP_ROOT_URL:-http://localhost} 12 | MONGO_URL: mongodb://mongo:27017/meteor 13 | PORT: 3000 14 | METEOR_SETTINGS: ${METEOR_SETTINGS} 15 | 16 | mongo: 17 | image: mongo:latest 18 | command: 19 | - --storageEngine=wiredTiger 20 | volumes: 21 | - data:/mnt/db-volume 22 | 23 | volumes: 24 | data: 25 | -------------------------------------------------------------------------------- /devops/big-dipper/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # install deps 5 | apt update 6 | apt install -y docker.io docker-compose jq 7 | 8 | docker-compose pull 9 | 10 | METEOR_SETTINGS=$(jq -c < ./settings.json) 11 | APP_ROOT_URL="https://bigdipper.${DOMAIN}" 12 | 13 | echo "METEOR_SETTINGS=${METEOR_SETTINGS}" > .env 14 | echo "APP_ROOT_URL=${APP_ROOT_URL}" >> .env 15 | -------------------------------------------------------------------------------- /devops/big-dipper/nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | apt install -y nginx certbot python3-certbot-nginx 5 | echo n | certbot register --agree-tos -m ${EMAIL} 6 | certbot certonly --nginx -n -d bigdipper.${DOMAIN} 7 | 8 | # process the variables in sites-enabled 9 | for FILE in nginx/*.conf; do 10 | sed -i s/DOMAIN/${DOMAIN}/g $FILE 11 | done 12 | 13 | # copy over nginx configs 14 | mv ./nginx/*.conf /etc/nginx/sites-enabled 15 | 16 | nginx -t 17 | systemctl restart nginx 18 | -------------------------------------------------------------------------------- /devops/big-dipper/nginx/big-dipper.conf: -------------------------------------------------------------------------------- 1 | server { # bigdipper 2 | listen 80; 3 | server_name bigdipper.DOMAIN; 4 | access_log /var/log/nginx/bigdipper_http.access.log; 5 | 6 | return 301 https://$host$request_uri; 7 | } 8 | 9 | server { # bigdipper 10 | listen 443 ssl; 11 | server_name bigdipper.DOMAIN; 12 | access_log /var/log/nginx/bigdipper.access.log; 13 | 14 | ssl_certificate /etc/letsencrypt/live/bigdipper.DOMAIN/fullchain.pem; # managed by Certbot 15 | ssl_certificate_key /etc/letsencrypt/live/bigdipper.DOMAIN/privkey.pem; # managed by Certbot 16 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 17 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 18 | 19 | location / { 20 | proxy_pass http://localhost:3080/; 21 | } 22 | } -------------------------------------------------------------------------------- /devops/big-dipper/services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | SERVICE=big-dipper 5 | TARGET="/etc/systemd/system/${SERVICE}.service" 6 | 7 | # copy service file and customize it 8 | mv ./big-dipper.service "${TARGET}" 9 | 10 | systemctl enable "${SERVICE}" 11 | systemctl start "${SERVICE}" -------------------------------------------------------------------------------- /devops/endpoints/README.md: -------------------------------------------------------------------------------- 1 | # Public Endpoints 2 | 3 | This will set up an rpc and an lcd server behind https, using nginx as a proxy. Also handling CORS issues. 4 | 5 | You need to first have access to an RPC endpoint, either on this machine, or another machine 6 | you own. Check out [setting up a full node](`../node`) to see how to run your own node and 7 | expose an RPC endpoint. 8 | 9 | First, copy all files from this directory to the machine: 10 | 11 | `scp -r ./* root@1.2.3.4:` 12 | 13 | Also, copy the proper env for the testnet you choose: 14 | 15 | `scp ../../coralnet/defaults.env root@1.2.3.4:` 16 | 17 | # Rest Server 18 | 19 | We will run a rest server locally, which connects to the rpc server above and presents a 20 | nicer API for Javascript clients. 21 | 22 | First, source all the defaults: `source defaults.env` 23 | 24 | Then you may want to set the following variables locally: 25 | 26 | * `RPC_URL` - this is the RPC URL we connect to for serving the data. It should be trusted (required) 27 | * `WASMD_HOME` - this is the directory where all the data is stored. Default `/root` 28 | 29 | Then run it like: `RPC_URL=http://localhost:26657 ./rest_server.sh` 30 | 31 | When this is up, `systemctl status coral-rest` or whatever testnet it is for, should show success. 32 | And `curl http://localhost:1317/node_info` should return good results. 33 | 34 | # Nginx 35 | 36 | You should already have the rest server running locally, and the `defaults.env` variables in your shell. 37 | 38 | Then you will want to set the following variables locally: 39 | 40 | * `EMAIL` - an email for a sysadmin, used with let's encrypt when registering ssl certificates 41 | * `DOMAIN` - the root domain we register under. We will try to set up ssl services for 42 | `rpc.$DOMAIN` and `lcd.$DOMAIN`. Both these DNS records must point to the current machine 43 | * `RPC_URL` - this is the RPC URL we connect to for serving the data. (same one the rest server uses) 44 | 45 | Run it like: 46 | 47 | ```bash 48 | export EMAIL=hello@my.com 49 | export DOMAIN=coral.my.com 50 | export RPC_URL=http://localhost:26657/ 51 | ./nginx.sh 52 | ``` 53 | 54 | After this is done, you should be able to query the https endpoints: 55 | 56 | ```bash 57 | curl https://rpc.DOMAIN/status 58 | curl https://lcd.DOMAIN/node_info 59 | ``` 60 | -------------------------------------------------------------------------------- /devops/endpoints/nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | apt install -y nginx certbot python3-certbot-nginx 5 | 6 | echo n | certbot register --agree-tos -m ${EMAIL} 7 | certbot certonly --nginx -n -d rpc.${DOMAIN} 8 | certbot certonly --nginx -n -d lcd.${DOMAIN} 9 | 10 | # process the variables in sites-enabled 11 | for file in $(ls nginx | grep -v proxy); do 12 | FILE="nginx/${file}" 13 | sed -i s/DOMAIN/${DOMAIN}/g $FILE 14 | sed -i s,RPC_URL,${RPC_URL},g $FILE 15 | done 16 | 17 | # copy over nginx configs 18 | mv ./nginx/proxy.conf /etc/nginx/conf.d 19 | mv ./nginx/*.conf /etc/nginx/sites-enabled 20 | 21 | nginx -t 22 | systemctl restart nginx 23 | -------------------------------------------------------------------------------- /devops/endpoints/nginx/lcd.conf: -------------------------------------------------------------------------------- 1 | server { # lcd 2 | listen 80; 3 | server_name lcd.DOMAIN; 4 | access_log /var/log/nginx/lcd_http.access.log; 5 | 6 | return 301 https://$host$request_uri; 7 | } 8 | 9 | server { # lcd 10 | listen 443 ssl; 11 | server_name lcd.DOMAIN; 12 | access_log /var/log/nginx/lcd.access.log; 13 | 14 | ssl_certificate /etc/letsencrypt/live/lcd.DOMAIN/fullchain.pem; # managed by Certbot 15 | ssl_certificate_key /etc/letsencrypt/live/lcd.DOMAIN/privkey.pem; # managed by Certbot 16 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 17 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 18 | 19 | add_header Access-Control-Allow-Origin * always; 20 | add_header Access-Control-Max-Age 3600; 21 | add_header Access-Control-Allow-Credentials true always; 22 | add_header Access-Control-Allow-Headers Content-Type; 23 | 24 | location / { 25 | if ($request_method = 'OPTIONS') { 26 | add_header 'Access-Control-Allow-Origin' '*'; 27 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; 28 | # 29 | # Custom headers and headers various browsers *should* be OK with but aren't 30 | # 31 | add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; 32 | # 33 | # Tell client that this pre-flight info is valid for 20 days 34 | # 35 | add_header 'Access-Control-Max-Age' 1728000; 36 | add_header 'Content-Type' 'text/plain; charset=utf-8'; 37 | add_header 'Content-Length' 0; 38 | return 204; 39 | } 40 | 41 | proxy_pass http://localhost:1317/; 42 | } 43 | } -------------------------------------------------------------------------------- /devops/endpoints/nginx/proxy.conf: -------------------------------------------------------------------------------- 1 | proxy_redirect off; 2 | proxy_set_header Host $host; 3 | proxy_set_header X-Real-IP $remote_addr; 4 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 5 | client_max_body_size 10m; 6 | client_body_buffer_size 128k; 7 | proxy_connect_timeout 90; 8 | proxy_send_timeout 90; 9 | proxy_read_timeout 90; 10 | proxy_buffers 32 4k; -------------------------------------------------------------------------------- /devops/endpoints/nginx/rpc.conf: -------------------------------------------------------------------------------- 1 | server { # rpc 2 | listen 80; 3 | server_name rpc.DOMAIN; 4 | access_log /var/log/nginx/rpc_http.access.log; 5 | 6 | return 301 https://$host$request_uri; 7 | } 8 | 9 | server { # rpc 10 | listen 443 ssl; 11 | server_name rpc.DOMAIN; 12 | access_log /var/log/nginx/rpc.access.log; 13 | 14 | ssl_certificate /etc/letsencrypt/live/rpc.DOMAIN/fullchain.pem; # managed by Certbot 15 | ssl_certificate_key /etc/letsencrypt/live/rpc.DOMAIN/privkey.pem; # managed by Certbot 16 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 17 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 18 | 19 | add_header Access-Control-Allow-Origin * always; 20 | add_header Access-Control-Max-Age 3600; 21 | add_header Access-Control-Allow-Credentials true always; 22 | add_header Access-Control-Allow-Headers Content-Type; 23 | 24 | location / { 25 | if ($request_method = 'OPTIONS') { 26 | add_header 'Access-Control-Allow-Origin' '*'; 27 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; 28 | # 29 | # Custom headers and headers various browsers *should* be OK with but aren't 30 | # 31 | add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; 32 | # 33 | # Tell client that this pre-flight info is valid for 20 days 34 | # 35 | add_header 'Access-Control-Max-Age' 1728000; 36 | add_header 'Content-Type' 'text/plain; charset=utf-8'; 37 | add_header 'Content-Length' 0; 38 | return 204; 39 | } 40 | 41 | proxy_pass RPC_URL; 42 | } 43 | } -------------------------------------------------------------------------------- /devops/endpoints/rest_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | ufw allow 22,80,443/tcp 5 | 6 | # set all variables 7 | REPOSITORY=${REPOSITORY:-cosmwasm/wasmd} 8 | DOCKER="$REPOSITORY:$WASMD_VERSION" 9 | WASMD_HOME="${WASMD_HOME:-/root}" 10 | 11 | if [ -z "$RPC_URL" ]; then 12 | echo "You must set RPC_URL to an RPC endpoint" 13 | exit 1 14 | fi 15 | 16 | echo "Connecting rest server to $RPC_URL" 17 | 18 | # install deps if needed 19 | apt install -y docker.io 20 | docker pull $DOCKER 21 | 22 | SERVICE="${CLI_BINARY}-rest" 23 | TARGET="/etc/systemd/system/${SERVICE}.service" 24 | 25 | # copy service file and customize it 26 | mv ./wasm-rest.service "${TARGET}" 27 | sed -i "s/BINARY/$CLI_BINARY/g" "${TARGET}" 28 | sed -i "s/SERVICE/$SERVICE/g" "${TARGET}" 29 | # use , as separator, as $DOCKER and $WASMD_HOME use / internally 30 | sed -i "s,DOCKER,$DOCKER,g" "${TARGET}" 31 | sed -i "s,WASMD_HOME,$WASMD_HOME,g" "${TARGET}" 32 | sed -i "s,RPC_URL,$RPC_URL,g" "${TARGET}" 33 | 34 | systemctl enable "${SERVICE}" 35 | systemctl start "${SERVICE}" 36 | 37 | -------------------------------------------------------------------------------- /devops/endpoints/wasm-rest.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=SERVICE 3 | Requires=network-online.target 4 | After=network-online.target 5 | Requires=docker.service 6 | After=docker.service 7 | 8 | [Service] 9 | TimeoutStartSec=5 10 | Restart=always 11 | User=root 12 | Group=root 13 | ExecStart=/usr/bin/docker run --rm --name SERVICE --mount type=bind,source=WASMD_HOME,target=/root --network=host -p 1317:1317 DOCKER BINARY rest-server --laddr tcp://127.0.0.1:1317 --trust-node --node RPC_URL 14 | ExecStop=/usr/bin/docker stop -t 2 SERVICE 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | 19 | -------------------------------------------------------------------------------- /devops/faucet/Dockerfile: -------------------------------------------------------------------------------- 1 | # The only officially supported distribution channel of the faucet binary is @cosmwasm/faucet on npmjs.com 2 | 3 | # Choose from https://hub.docker.com/_/node/ 4 | FROM node:12.14.1-alpine 5 | 6 | RUN yarn global add @cosmjs/faucet@0.22.2 7 | 8 | # Check it exists 9 | RUN /usr/local/bin/cosmwasm-faucet version 10 | 11 | EXPOSE 8000 12 | CMD ["/usr/local/bin/cosmwasm-faucet", "start", "http://localhost:1317"] -------------------------------------------------------------------------------- /devops/faucet/README.md: -------------------------------------------------------------------------------- 1 | # Setting up a Faucet 2 | 3 | You need some tokens in an account you control for this. 4 | 5 | ## Build faucet and make a mnemonic 6 | 7 | `./faucet.sh` will construct a docker image to run, and produce a unique mnemonic. 8 | 9 | You want to copy the `FAUCET_MNEMOMIC=...` line and export it in your local shell 10 | 11 | You also want to copy the `Created token holder` address and send some tokens there (like 100 SHELL): 12 | `coral tx send reserve token_holder_address 100000000ushell --fees 5000ushell` 13 | 14 | ## Setup the faucet service 15 | 16 | Make sure the FAUCET_MNEMONIC from the last part is `export`ed in your env and run: 17 | 18 | `./services.sh` 19 | 20 | Then check it: 21 | 22 | ``` 23 | systemctl status faucet 24 | curl http://localhost:8000/status 25 | ``` 26 | -------------------------------------------------------------------------------- /devops/faucet/faucet.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=faucet 3 | Requires=network-online.target 4 | After=network-online.target 5 | Requires=docker.service 6 | After=docker.service 7 | 8 | [Service] 9 | TimeoutStartSec=300 10 | Environment=FAUCET_CREDIT_AMOUNT_SHELL=1 11 | Environment="FAUCET_MNEMONIC=TOP_SECRET_MNEMONIC" 12 | Environment=FAUCET_ADDRESS_PREFIX=coral 13 | Environment="FAUCET_TOKENS=SHELL=10^6ushell,REEF=10^6ureef" 14 | Environment=FAUCET_FEE=2000ushell 15 | Restart=always 16 | User=root 17 | Group=root 18 | ExecStart=/usr/bin/docker run --rm --name faucet -e FAUCET_FEE -e FAUCET_CREDIT_AMOUNT_SHELL -e FAUCET_MNEMONIC -e FAUCET_ADDRESS_PREFIX -e FAUCET_TOKENS -e FAUCET_FEE --network=host -p 8000:8000 cosmwasm/faucet:manual 19 | ExecStop=/usr/bin/docker stop -t 2 faucet 20 | 21 | [Install] 22 | WantedBy=multi-user.target 23 | 24 | -------------------------------------------------------------------------------- /devops/faucet/faucet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # allow only ssh and http ports 5 | ufw allow 22,80,443/tcp 6 | 7 | # TODO: configure this better.. this is the bech32 prefix for the chain 8 | PREFIX=${PREFIX:-coral} 9 | 10 | # Note: this requires the ../endpoints scripts to have been run locally before 11 | # and the various deps (certbot, nginx, etc) already set up. 12 | # If you want to run this separately, there is some more setup needed 13 | 14 | docker build -t cosmwasm/faucet:manual . 15 | 16 | docker run --rm cosmwasm/faucet:manual cosmwasm-faucet version 17 | 18 | docker run -e FAUCET_ADDRESS_PREFIX=coral --rm cosmwasm/faucet:manual cosmwasm-faucet generate 19 | -------------------------------------------------------------------------------- /devops/faucet/nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # Assumes this has been done before 5 | # apt install -y nginx certbot python3-certbot-nginx 6 | # echo n | certbot register --agree-tos -m ${EMAIL} 7 | certbot certonly --nginx -n -d faucet.${DOMAIN} 8 | 9 | # process the variables in sites-enabled 10 | for FILE in nginx/*.conf; do 11 | sed -i s/DOMAIN/${DOMAIN}/g $FILE 12 | done 13 | 14 | # copy over nginx configs 15 | mv ./nginx/*.conf /etc/nginx/sites-enabled 16 | 17 | nginx -t 18 | systemctl restart nginx 19 | -------------------------------------------------------------------------------- /devops/faucet/nginx/faucet.conf: -------------------------------------------------------------------------------- 1 | server { # faucet 2 | listen 80; 3 | server_name faucet.DOMAIN; 4 | access_log /var/log/nginx/faucet_http.access.log; 5 | 6 | return 301 https://$host$request_uri; 7 | } 8 | 9 | server { # faucet 10 | listen 443 ssl; 11 | server_name faucet.DOMAIN; 12 | access_log /var/log/nginx/faucet.access.log; 13 | 14 | ssl_certificate /etc/letsencrypt/live/faucet.DOMAIN/fullchain.pem; # managed by Certbot 15 | ssl_certificate_key /etc/letsencrypt/live/faucet.DOMAIN/privkey.pem; # managed by Certbot 16 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 17 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 18 | 19 | location / { 20 | proxy_pass http://localhost:8000/; 21 | } 22 | } -------------------------------------------------------------------------------- /devops/faucet/services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | SERVICE=faucet 5 | TARGET="/etc/systemd/system/${SERVICE}.service" 6 | 7 | if [ -z "$FAUCET_MNEMONIC" ]; then 8 | echo "You must export FAUCET_MNEMONIC to properly set up the faucet" 9 | exit 1 10 | fi 11 | 12 | # copy service file and customize it 13 | # TODO: allow to customize the tokens you get 14 | mv ./faucet.service "${TARGET}" 15 | sed -i "s/TOP_SECRET_MNEMONIC/$FAUCET_MNEMONIC/g" "${TARGET}" 16 | 17 | systemctl enable "${SERVICE}" 18 | systemctl start "${SERVICE}" 19 | -------------------------------------------------------------------------------- /devops/node/README.md: -------------------------------------------------------------------------------- 1 | # Set up a Full Node 2 | 3 | These instructions work for a machine running Ubuntu 20.04. 4 | 5 | Optimal Requirements: 2 CPU, 4 GB RAM, 40 GB SSD. 6 | 7 | First, copy all files from this directory to the machine: 8 | 9 | `scp -r ./* root@1.2.3.4:` 10 | 11 | Also, copy the proper env for the testnet you choose: 12 | 13 | `scp ../../coralnet/defaults.env root@1.2.3.4:` 14 | 15 | ## Installing 16 | 17 | First, source all the defaults: `source defaults.sh` 18 | 19 | Then you may want to set the following variables locally: 20 | 21 | * `MONIKER` - this is the moniker you use for the node. it should be unique and descriptive (required) 22 | * `WASMD_HOME` - this is the directory where all the data is stored. Default `/root` 23 | * `REPOSITORY` - the docker image repository to use. Default `cosmwasm/wasmd` (maybe you have a fork?) 24 | 25 | Then run it like: `MONIKER=my-name-here ./install.sh` 26 | 27 | The script must be run as root. If you are not logged in as root, try `sudo -E install.sh` 28 | 29 | Running this will set up all dependencies and create a local wasmd config for the proper testnet. 30 | 31 | ## Configuring 32 | 33 | You will want to set up some nodes to connect to. The simplest (and restart safest) way to do so 34 | is to edit `config/config.toml` in your chain-specific config dir. 35 | 36 | You will want to set one or more of the following, all under `[p2p]`: 37 | 38 | * `seeds` - a seed node to connect to for other peers 39 | * `persistent_peers` - a peer to connect with everytime we restart 40 | * `private_peers` - node_ids from above nodes that we do not want to gossip 41 | 42 | You can use `$SEED_NODE` (from `defaults.env`) as either a seed (preferred) or a persistent peer 43 | in order to get attached. These all look like `${node_id}@${ip}:${port}`. Node_id is a hash of the 44 | public key, so you can recognize the same machine if it moves ips. 45 | 46 | To get the `node_id` of your current node, run `./node_id.sh` 47 | 48 | Remember to allow or disallow rpc endpoints for sentry and validators. 49 | 50 | ## Systemd 51 | 52 | If you wish to run this under systemd, then run `services.sh` to set up a default config to auto-restart the node. 53 | This will install a service file with the binary name under eg `/etc/systemd/system/wasmd.service`, 54 | enable it to start on reboot, and then start it running. 55 | 56 | You may also run this manually or use another supervisor and skip this step. 57 | 58 | ## Staking 59 | 60 | Once your node has caught up, if you want to become a validator, just delegate some funds to it. 61 | 62 | First, make sure you can connect to it and control an account with some funds. 63 | Example for coralnet, values taken from `defaults.env`, `validator` being your local name for a key with funds behind it: 64 | 65 | ```bash 66 | coral config chain-id cosmwasm-coral 67 | coral config node https://rpc.coralnet.cosmwasm.com:443 68 | 69 | coral query account $(coral keys show -a validator) 70 | ``` 71 | 72 | And get your pubkey from the validator machine: 73 | 74 | ``` 75 | root@validator$ ./show_validator.sh 76 | # copy this as VAL_PUBKEY in your local shell 77 | ``` 78 | 79 | Then see [testnet instructions](https://docs.cosmwasm.com/testnets/testnets.html) or just run a command like: 80 | 81 | ```bash 82 | coral tx staking create-validator \ 83 | --amount=100000000ureef \ 84 | --pubkey=${VAL_PUBKEY} \ 85 | --moniker=$MONIKER \ 86 | --chain-id=cosmwasm-coral \ 87 | --commission-rate="0.10" \ 88 | --commission-max-rate="0.20" \ 89 | --commission-max-change-rate="0.01" \ 90 | --min-self-delegation="1" \ 91 | --gas="400000" \ 92 | --fees="20000ushell" \ 93 | --from=validator 94 | ``` 95 | -------------------------------------------------------------------------------- /devops/node/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # set all variables 5 | REPOSITORY=${REPOSITORY:-cosmwasm/wasmd} 6 | DOCKER="$REPOSITORY:$WASMD_VERSION" 7 | WASMD_HOME="${WASMD_HOME:-/root}" 8 | 9 | if [ -z "$MONIKER" ]; then 10 | echo You must set MONIKER to a unique node description 11 | exit 1 12 | fi 13 | 14 | # install deps 15 | apt update 16 | apt install -y docker.io 17 | docker pull $DOCKER 18 | 19 | # set up the private data 20 | docker run --rm \ 21 | --mount type=bind,source="$WASMD_HOME",target=/root \ 22 | $DOCKER $BINARY init "$MONIKER" 23 | 24 | # and get the genesis file 25 | curl -sSL "$GENESIS_URL" > "${WASMD_HOME}/${CONFIG_DIR}/config/genesis.json" 26 | 27 | # get the app.toml config file 28 | curl -sSL "$APP_CONFIG_URL" > "${WASMD_HOME}/${CONFIG_DIR}/config/app.toml" 29 | 30 | # get the app.toml config file 31 | curl -sSL "$CONFIG_URL" > "${WASMD_HOME}/${CONFIG_DIR}/config/config.toml" 32 | 33 | # enable ssh, p2p 34 | # maybe add prometheus when needed 35 | ufw allow 22,26656,26657/tcp 36 | -------------------------------------------------------------------------------- /devops/node/node_id.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # set all variables 5 | REPOSITORY=${REPOSITORY:-cosmwasm/wasmd} 6 | DOCKER="$REPOSITORY:$WASMD_VERSION" 7 | WASMD_HOME="${WASMD_HOME:-/root}" 8 | 9 | docker run --rm \ 10 | --mount type=bind,source="$WASMD_HOME",target=/root \ 11 | $DOCKER $BINARY tendermint show-node-id 12 | -------------------------------------------------------------------------------- /devops/node/services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # set all variables 5 | REPOSITORY=${REPOSITORY:-cosmwasm/wasmd} 6 | DOCKER="$REPOSITORY:$WASMD_VERSION" 7 | WASMD_HOME="${WASMD_HOME:-/root}" 8 | 9 | TARGET="/etc/systemd/system/${BINARY}.service" 10 | 11 | # copy service file and customize it 12 | mv ./wasmd.service "${TARGET}" 13 | sed -i "s/BINARY/$BINARY/g" "${TARGET}" 14 | # use , as separator, as $DOCKER and $WASMD_HOME use / internally 15 | sed -i "s,DOCKER,$DOCKER,g" "${TARGET}" 16 | sed -i "s,WASMD_HOME,$WASMD_HOME,g" "${TARGET}" 17 | 18 | systemctl enable "${BINARY}" 19 | systemctl start "${BINARY}" -------------------------------------------------------------------------------- /devops/node/show_validator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | # set all variables 5 | REPOSITORY=${REPOSITORY:-cosmwasm/wasmd} 6 | DOCKER="$REPOSITORY:$WASMD_VERSION" 7 | WASMD_HOME="${WASMD_HOME:-/root}" 8 | 9 | docker run --rm \ 10 | --mount type=bind,source="$WASMD_HOME",target=/root \ 11 | $DOCKER $BINARY tendermint show-validator 12 | -------------------------------------------------------------------------------- /devops/node/wasmd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=BINARY 3 | Requires=network-online.target 4 | After=network-online.target 5 | Requires=docker.service 6 | After=docker.service 7 | 8 | [Service] 9 | TimeoutStartSec=5 10 | Restart=always 11 | User=root 12 | Group=root 13 | ExecStart=/usr/bin/docker run --rm --name BINARY --mount type=bind,source=WASMD_HOME,target=/root -p 26657:26657 -p 26656:26656 DOCKER BINARY start --rpc.laddr tcp://0.0.0.0:26657 14 | ExecStop=/usr/bin/docker stop -t 2 BINARY 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | 19 | -------------------------------------------------------------------------------- /gaia-flex/README.md: -------------------------------------------------------------------------------- 1 | # Gaia Flex (WIP) 2 | 3 | A permissionless network running on `wasd` 0.10 4 | 5 | - **go version**: `1.14+` 6 | - **wasmd version**: `v0.10.0` 7 | - **wasmd build command**: `make build-gaiaflex` 8 | - **CosmJS version**: `v0.22.1` 9 | - **start**: 18th August 2020 10 | - **end**: not yet finished 11 | 12 | ## Purpose 13 | 14 | This is network demonstrates a gaia updated to launchpad with the x/wasm modules added along with governance controls on the contract lifecycle (uploading, instantiating, migrating). 15 | 16 | ## Connecting 17 | 18 | The configuration can be [downloaded here](./defaults.env). 19 | Please `source config` to get all variable you need. 20 | 21 | With those, you can follow the 22 | [official instructions](https://docs.cosmwasm.com/testnets/testnets.html) 23 | on how to connect to a testnet. 24 | Or just connect your command-line client. 25 | 26 | The [genesis file](./config/genesis.json) is also available here. 27 | 28 | ## Web endpoints 29 | 30 | Here we list all explorers, wallets, and apps you can access with a browser: 31 | 32 | * [RPC](https://rpc.gaia-flex.cosmwasm.com) - public RPC endpoint 33 | * [LCD](https://lcd.gaia-flex.cosmwasm.com) - public LCD endpoint 34 | * [Big Dipper/Block Explorer](https://bigdipper.gaia-flex.cosmwasm.com) 35 | 36 | 37 | ## Claiming the Airdrop 38 | 39 | We do not have a faucet for `gaia-flex`, rather we did an airdrop to all cosmos addresses that 40 | voted on Proposal #25. If you did, you need to follow these instructions to claim your airdrop 41 | before you can start a validator or stake to an existing one. 42 | 43 | We know that most of the voting keys are under high security (validator operator, staking keys), often 44 | on ledger devices or multisigs, and we DO NOT want any access to those keys with gaiaflex. Thus, 45 | we worked out a process to claim the airdrop by only using these keys via `gaiacli` in offline mode. 46 | The general procedure is: 47 | 48 | 1. Verify that your cosmos hub account has a balance on `gaia-flex` (call this hub address) 49 | 2. Create a new key with `gaiaflex` cli for use on this chain (call this testnet address) 50 | 3. Use `gaiaflex` to create an *unsigned tx* moving `umuon` from your hub address to your testnet address. **USE gaiaflex NOT gaiacli** 51 | 4. Copy unsigned tx to the machine with your cosmos hub keys and sign it using `gaiacli` in offline mode 52 | 5. Copy signed tx back to your laptop (or wherever) and broadcast it to `gaia-flex` 53 | 54 | We assume `GAIA_KEYNAME` is set to the name of the key on your `gaiacli` keyring that you used for voting. 55 | And `GAIA_ADDRESS` is set to the `cosmos...` address that voted on Proposal #25. 56 | 57 | ```shell 58 | gaiaflex config node https://rpc.gaia-flex.cosmwasm.com:443 59 | gaiaflex config trust-node true 60 | ``` 61 | 62 | Check the account, and get the account_number for later: 63 | 64 | ```shell 65 | gaiaflex query account $GAIA_ADDRESS 66 | ACCOUNT_NUMBER=$(gaiaflex query account $GAIA_ADDRESS -o json | jq -r .value.account_number) 67 | echo $ACCOUNT_NUMBER 68 | ``` 69 | 70 | Create a new account and prepare a transaction: 71 | 72 | ```shell 73 | gaiaflex keys add validator 74 | gaiaflex tx send $GAIA_ADDRESS $(gaiaflex keys show -a validator) \ 75 | 9999000000umuon --fees 5000umuon --chain-id gaia-flex \ 76 | --generate-only > airdrop.json 77 | ``` 78 | 79 | Copy `airdrop.json` to your secure computer with your `gaiacli` keychain, and sign. 80 | Make sure you set `ACCOUNT_NUMBER` to the value above, and `GAIA_KEYNAME` to the proper name in the keyring: 81 | 82 | ```shell 83 | gaiacli tx sign -a $ACCOUNT_NUMBER -s 0 --offline --from $GAIA_KEYNAME \ 84 | --chain-id gaia-flex airdrop.json > airdrop_signed.json 85 | ``` 86 | 87 | Copy `airdrop_signed.json` back to the machine with the `gaiaflex` client, and submit it: 88 | 89 | ```shell 90 | gaiaflex tx broadcast airdrop_signed.json 91 | gaiaflex query account $(gaiaflex keys show -a validator) 92 | ``` 93 | 94 | You should have 9999 MUON now (`9999000000umuon`). Time to stake! 95 | 96 | ### Low security alternatives 97 | 98 | If you don't have much stake on your cosmos hub account and you want a quick solution, you have two 99 | choice, but you trust your cosmos hub private key to `gaiaflex` binary. 100 | 101 | 1. Use `gaiacli keys export (keyname) > (keyfile)` on your cosmos hub machine and later `gaiaflex keys import validator (keyfile)` 102 | 2. If you have your mnemonic `gaiaflex keys add -i validator` 103 | 104 | I do not recommend these if you care much about the security of your Cosmos Hub key, but in theory they are not too 105 | dangerous, more than moving the secret material around and trusting the `gaiaflex` binary. 106 | 107 | ## Staking your own validator 108 | 109 | Make sure you set up a full node that is synced. Then get the validator pubkey from it via 110 | `tendermint show-validator`. Set `VAL_PUBKEY` to this value (it starts with `cosmosvalconspub`). 111 | Set `MONIKER` to whatever validator name you wish, like `funky-monkey`. Then run, this command 112 | with your newly charged account: 113 | 114 | ```shell 115 | gaiaflex tx staking create-validator \ 116 | --amount=3000000000umuon \ 117 | --pubkey=${VAL_PUBKEY} \ 118 | --moniker=$MONIKER \ 119 | --chain-id=gaia-flex \ 120 | --commission-rate="0.10" \ 121 | --commission-max-rate="0.20" \ 122 | --commission-max-change-rate="0.01" \ 123 | --min-self-delegation="1" \ 124 | --gas="400000" \ 125 | --fees="20000umuon" \ 126 | --from=validator 127 | ``` 128 | 129 | It will stake about 30% of your tokens on the validator, so you can spend other tokens, or stake them 130 | on other validators (or yourself later). Shortly after this succeeds, you should see yourself 131 | with `gaiaflex query staking validators` or on https://bigdipper.gaia-flex.cosmwasm.com/validators 132 | -------------------------------------------------------------------------------- /gaia-flex/big-dipper-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "public":{ 3 | "chainName": "Gaia Flex", 4 | "chainId": "gaia-flex", 5 | "gtm": "{Add your Google Tag Manager ID here}", 6 | "slashingWindow": 10000, 7 | "uptimeWindow": 250, 8 | "initialPageSize": 30, 9 | "bech32PrefixAccAddr": "cosmos", 10 | "bech32PrefixAccPub": "cosmospub", 11 | "bech32PrefixValAddr": "cosmosvaloper", 12 | "bech32PrefixValPub": "cosmosvaloperpub", 13 | "bech32PrefixConsAddr": "cosmosvalcons", 14 | "bech32PrefixConsPub": "cosmosvalconspub", 15 | "bondDenom": "umuon", 16 | "powerReduction": 1000000, 17 | "coins": [ 18 | { 19 | "denom": "umuon", 20 | "displayName": "MUON", 21 | "displayNamePlural": "MUONS", 22 | "fraction": 1000000 23 | } 24 | ], 25 | "gasPrice": 0.025, 26 | "coingeckoId": "none" 27 | }, 28 | "genesisFile": "https://raw.githubusercontent.com/CosmWasm/testnets/master/gaia-flex/config/genesis.json", 29 | "remote":{ 30 | "rpc":"https://rpc.gaia-flex.cosmwasm.com", 31 | "lcd":"https://lcd.gaia-flex.cosmwasm.com" 32 | }, 33 | "debug": { 34 | "startTimer": true, 35 | "readGenesis": true 36 | }, 37 | "params":{ 38 | "startHeight": 0, 39 | "defaultBlockTime": 5000, 40 | "blockInterval": 15000, 41 | "consensusInterval": 1000, 42 | "statusInterval":7500, 43 | "signingInfoInterval": 1800000, 44 | "proposalInterval": 5000, 45 | "missedBlocksInterval": 60000, 46 | "delegationInterval": 900000 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /gaia-flex/cli_helper.ts: -------------------------------------------------------------------------------- 1 | interface Options { 2 | httpUrl: string 3 | networkId: string 4 | feeToken: string 5 | gasPrice: number 6 | bech32prefix: string 7 | } 8 | 9 | const defaultOptions: Options = { 10 | httpUrl: 'https://lcd.gaia-flex.cosmwasm.com', 11 | networkId: 'gaia-flex', 12 | feeToken: 'umuon', 13 | gasPrice: 0.025, 14 | bech32prefix: 'cosmos', 15 | } 16 | 17 | const defaultFaucetUrl = 'https://faucet.gaia-flex.cosmwasm.com/credit' 18 | 19 | const buildFeeTable = (feeToken: string, gasPrice: number): FeeTable => { 20 | const stdFee = (gas: number, denom: string, price: number) => { 21 | const amount = Math.floor(gas * price) 22 | return { 23 | amount: [{ amount: amount.toString(), denom: denom }], 24 | gas: gas.toString(), 25 | } 26 | } 27 | 28 | return { 29 | upload: stdFee(1000000, feeToken, gasPrice), 30 | init: stdFee(500000, feeToken, gasPrice), 31 | migrate: stdFee(500000, feeToken, gasPrice), 32 | exec: stdFee(200000, feeToken, gasPrice), 33 | send: stdFee(80000, feeToken, gasPrice), 34 | changeAdmin: stdFee(80000, feeToken, gasPrice), 35 | } 36 | } 37 | 38 | // TODO: hit faucet 39 | // if (config.faucetUrl) { 40 | // const acct = await client.getAccount(); 41 | // if (!acct?.balance?.length) { 42 | // await ky.post(config.faucetUrl, { json: { ticker: "COSM", address } }); 43 | // } 44 | // } 45 | 46 | const connect = async ( 47 | mnemonic: string, 48 | opts: Partial 49 | ): Promise<{ 50 | client: SigningCosmWasmClient 51 | address: string 52 | }> => { 53 | const options: Options = { ...defaultOptions, ...opts } 54 | const feeTable = buildFeeTable(options.feeToken, options.gasPrice) 55 | const wallet = await Secp256k1Wallet.fromMnemonic(mnemonic) 56 | const [{ address }] = await wallet.getAccounts() 57 | 58 | const client = new SigningCosmWasmClient( 59 | options.httpUrl, 60 | address, 61 | wallet, 62 | feeTable 63 | ) 64 | return { client, address } 65 | } 66 | 67 | // loadOrCreateMnemonic will try to load a mnemonic from the file. 68 | // If missing, it will generate a random one and save to the file. 69 | // 70 | // This is not secure, but does allow simple developer access to persist a 71 | // mnemonic between sessions 72 | const loadOrCreateMnemonic = (filename: string): string => { 73 | try { 74 | const mnemonic = fs.readFileSync(filename, 'utf8') 75 | return mnemonic.trim() 76 | } catch (err) { 77 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 78 | fs.writeFileSync(filename, mnemonic, 'utf8') 79 | return mnemonic 80 | } 81 | } 82 | 83 | const hitFaucet = async ( 84 | faucetUrl: string, 85 | address: string, 86 | ticker: string 87 | ): Promise => { 88 | const r = await axios.post(defaultFaucetUrl, { ticker, address }) 89 | console.log(r.status) 90 | console.log(r.data) 91 | } 92 | 93 | const randomAddress = async (prefix: string): Promise => { 94 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 95 | return mnemonicToAddress(prefix, mnemonic) 96 | } 97 | 98 | const mnemonicToAddress = async ( 99 | prefix: string, 100 | mnemonic: string 101 | ): Promise => { 102 | const wallet = await Secp256k1Wallet.fromMnemonic(mnemonic) 103 | const [{ address }] = await wallet.getAccounts() 104 | return address 105 | } 106 | 107 | const downloadWasm = async (url: string): Promise => { 108 | const r = await axios.get(url, { responseType: 'arraybuffer' }) 109 | if (r.status !== 200) { 110 | throw new Error(`Download error: ${r.status}`) 111 | } 112 | return r.data 113 | } 114 | 115 | const getAttibute = ( 116 | logs: readonly logs.Log[], 117 | key: string 118 | ): string | undefined => 119 | logs[0].events[0].attributes.find((x) => x.key == key)?.value 120 | -------------------------------------------------------------------------------- /gaia-flex/config/app.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML config file. 2 | # For more information, see https://github.com/toml-lang/toml 3 | 4 | ##### main base config options ##### 5 | 6 | # The minimum gas prices a validator is willing to accept for processing a 7 | # transaction. A transaction's fees must meet the minimum of any denomination 8 | # specified in this config (e.g. 0.25token1;0.0001token2). 9 | minimum-gas-prices = "0.025umuon" 10 | 11 | # default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals 12 | # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) 13 | # everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals 14 | # custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' 15 | pruning = "default" 16 | 17 | # These are applied if and only if the pruning strategy is custom. 18 | pruning-keep-recent = "0" 19 | pruning-keep-every = "0" 20 | pruning-interval = "0" 21 | 22 | # HaltHeight contains a non-zero block height at which a node will gracefully 23 | # halt and shutdown that can be used to assist upgrades and testing. 24 | # 25 | # Note: Commitment of state will be attempted on the corresponding block. 26 | halt-height = 0 27 | 28 | # HaltTime contains a non-zero minimum block time (in Unix seconds) at which 29 | # a node will gracefully halt and shutdown that can be used to assist upgrades 30 | # and testing. 31 | # 32 | # Note: Commitment of state will be attempted on the corresponding block. 33 | halt-time = 0 34 | 35 | # InterBlockCache enables inter-block caching. 36 | inter-block-cache = true 37 | -------------------------------------------------------------------------------- /gaia-flex/defaults.env: -------------------------------------------------------------------------------- 1 | export CHAIN_ID="gaia-flex" 2 | export TESTNET_NAME="gaia-flex" 3 | export WASMD_VERSION="v0.10.0" 4 | export COSMJS_VERSION="v0.22.1" 5 | export CONFIG_DIR=".gaiaflexd" 6 | 7 | export BINARY="gaiaflexd" 8 | export CLI_BINARY="gaiaflex" 9 | 10 | export GENESIS_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/gaia-flex/config/genesis.json" 11 | export APP_CONFIG_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/gaia-flex/config/app.toml" 12 | 13 | export RPC="https://rpc.gaia-flex.cosmwasm.com" 14 | export LCD="https://lcd.gaia-flex.cosmwasm.com" 15 | export FAUCET="https://faucet.gaia-flex.cosmwasm.com" 16 | export SEED_NODE="5577df9fc114ead3cbc2b9a3bfab670510004f39@168.119.56.205:26656" 17 | -------------------------------------------------------------------------------- /heldernet/README.md: -------------------------------------------------------------------------------- 1 | # Heldernet(HackAtom CosmWasm network) 2 | 3 | A permissionless testing 4 | 5 | - **go version**: `1.14+` 6 | - **wasmd version**: `v0.11.1` 7 | - **wasmd build command**: `make build` 8 | - **CosmJS version**: `v0.23.0` 9 | - **start**: 14th October 2020 10 | - **end**: not yet finished 11 | 12 | ## Purpose 13 | 14 | Short living network that will last until cosmwasm v0.12.0 is released. 15 | You can relate it to Ethereum's Rinkeby. 16 | 17 | The [genesis file](./config/genesis.json) is also available here. 18 | 19 | ## Web endpoints 20 | 21 | Here we list all explorers, wallets, and apps you can access with a browser: 22 | 23 | * [RPC](https://rpc.heldernet.cosmwasm.com) - public RPC endpoint 24 | * [LCD](https://lcd.heldernet.cosmwasm.com) - public LCD endpoint 25 | * [FAUCET](https://faucet.heldernet.cosmwasm.com) - faucet 26 | * [Big Dipper/Block Explorer](https://bigdipper.heldernet.cosmwasm.com) 27 | -------------------------------------------------------------------------------- /heldernet/big-dipper-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "public":{ 3 | "chainName": "CosmWasm Heldernet(HackAtom V)", 4 | "chainId": "hackatom-wasm", 5 | "gtm": "{Add your Google Tag Manager ID here}", 6 | "slashingWindow": 10000, 7 | "uptimeWindow": 250, 8 | "initialPageSize": 30, 9 | "bech32PrefixAccAddr": "cosmos", 10 | "bech32PrefixAccPub": "cosmospub", 11 | "bech32PrefixValAddr": "cosmosvaloper", 12 | "bech32PrefixValPub": "cosmosvaloperpub", 13 | "bech32PrefixConsAddr": "cosmosvalcons", 14 | "bech32PrefixConsPub": "cosmosvalconspub", 15 | "bondDenom": "stake", 16 | "powerReduction": 1000000, 17 | "coins": [ 18 | { 19 | "denom": "stake", 20 | "displayName": "STAKE", 21 | "displayNamePlural": "STAKES", 22 | "fraction": 1000000 23 | }, 24 | { 25 | "denom": "ucosm", 26 | "displayName": "COSM", 27 | "displayNamePlural": "COSMS", 28 | "fraction": 1000000 29 | } 30 | ], 31 | "gasPrice": 0.01, 32 | "coingeckoId": "none" 33 | }, 34 | "genesisFile": "https://raw.githubusercontent.com/CosmWasm/testnets/master/cosmosnet/config/genesis.json", 35 | "remote":{ 36 | "rpc":"https://rpc.heldernet.cosmwasm.com", 37 | "lcd":"https://lcd.heldernet.cosmwasm.com" 38 | }, 39 | "debug": { 40 | "startTimer": true, 41 | "readGenesis": true 42 | }, 43 | "params":{ 44 | "startHeight": 0, 45 | "defaultBlockTime": 5000, 46 | "blockInterval": 15000, 47 | "consensusInterval": 1000, 48 | "statusInterval":7500, 49 | "signingInfoInterval": 1800000, 50 | "proposalInterval": 5000, 51 | "missedBlocksInterval": 60000, 52 | "delegationInterval": 900000 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /heldernet/cli_helper.ts: -------------------------------------------------------------------------------- 1 | interface Options { 2 | httpUrl: string 3 | networkId: string 4 | feeToken: string 5 | gasPrice: number 6 | bech32prefix: string 7 | } 8 | 9 | const defaultOptions: Options = { 10 | httpUrl: 'https://lcd.heldernet.cosmwasm.com', 11 | networkId: 'hackatom-wasm', 12 | feeToken: 'ucosm', 13 | gasPrice: 0.01, 14 | bech32prefix: 'cosmos', 15 | } 16 | 17 | const defaultFaucetUrl = 'https://faucet.heldernet.cosmwasm.com/credit' 18 | 19 | const buildFeeTable = (feeToken: string, gasPrice: number): FeeTable => { 20 | const stdFee = (gas: number, denom: string, price: number) => { 21 | const amount = Math.floor(gas * price) 22 | return { 23 | amount: [{ amount: amount.toString(), denom: denom }], 24 | gas: gas.toString(), 25 | } 26 | } 27 | 28 | return { 29 | upload: stdFee(1000000, feeToken, gasPrice), 30 | init: stdFee(500000, feeToken, gasPrice), 31 | migrate: stdFee(500000, feeToken, gasPrice), 32 | exec: stdFee(200000, feeToken, gasPrice), 33 | send: stdFee(80000, feeToken, gasPrice), 34 | changeAdmin: stdFee(80000, feeToken, gasPrice), 35 | } 36 | } 37 | 38 | const connect = async ( 39 | mnemonic: string, 40 | opts: Partial 41 | ): Promise<{ 42 | client: SigningCosmWasmClient 43 | address: string 44 | }> => { 45 | const options: Options = { ...defaultOptions, ...opts } 46 | const feeTable = buildFeeTable(options.feeToken, options.gasPrice) 47 | const wallet = await buildWallet(mnemonic) 48 | const [{ address }] = await wallet.getAccounts() 49 | 50 | const client = new SigningCosmWasmClient( 51 | options.httpUrl, 52 | address, 53 | wallet, 54 | feeTable 55 | ) 56 | return { client, address } 57 | } 58 | 59 | // loadOrCreateMnemonic will try to load a mnemonic from the file. 60 | // If missing, it will generate a random one and save to the file. 61 | // 62 | // This is not secure, but does allow simple developer access to persist a 63 | // mnemonic between sessions 64 | const loadOrCreateMnemonic = (filename: string): string => { 65 | try { 66 | const mnemonic = fs.readFileSync(filename, 'utf8') 67 | return mnemonic.trim() 68 | } catch (err) { 69 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 70 | fs.writeFileSync(filename, mnemonic, 'utf8') 71 | return mnemonic 72 | } 73 | } 74 | 75 | const hitFaucet = async ( 76 | faucetUrl: string, 77 | address: string, 78 | ticker: string 79 | ): Promise => { 80 | const r = await axios.post(defaultFaucetUrl, { ticker, address }) 81 | console.log(r.status) 82 | console.log(r.data) 83 | } 84 | 85 | const randomAddress = async (): Promise => { 86 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 87 | return mnemonicToAddress(mnemonic) 88 | } 89 | 90 | const mnemonicToAddress = async ( 91 | mnemonic: string 92 | ): Promise => { 93 | const wallet = await buildWallet(mnemonic); 94 | const [{ address }] = await wallet.getAccounts() 95 | return address 96 | } 97 | 98 | const buildWallet = (mnemonic: string): Promise => { 99 | return Secp256k1Wallet.fromMnemonic(mnemonic, makeCosmoshubPath(0), defaultOptions.bech32prefix); 100 | } 101 | 102 | const downloadWasm = async (url: string): Promise => { 103 | const r = await axios.get(url, { responseType: 'arraybuffer' }) 104 | if (r.status !== 200) { 105 | throw new Error(`Download error: ${r.status}`) 106 | } 107 | return r.data 108 | } 109 | 110 | const getAttibute = ( 111 | logs: readonly logs.Log[], 112 | key: string 113 | ): string | undefined => 114 | logs[0].events[0].attributes.find((x) => x.key == key)?.value 115 | -------------------------------------------------------------------------------- /heldernet/config/app.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML config file. 2 | # For more information, see https://github.com/toml-lang/toml 3 | 4 | ##### main base config options ##### 5 | 6 | # The minimum gas prices a validator is willing to accept for processing a 7 | # transaction. A transaction's fees must meet the minimum of any denomination 8 | # specified in this config (e.g. 0.25token1;0.0001token2). 9 | minimum-gas-prices = "0.01ucosm" 10 | 11 | # default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals 12 | # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) 13 | # everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals 14 | # custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' 15 | pruning = "default" 16 | 17 | # These are applied if and only if the pruning strategy is custom. 18 | pruning-keep-recent = "0" 19 | pruning-keep-every = "0" 20 | pruning-interval = "0" 21 | 22 | # HaltHeight contains a non-zero block height at which a node will gracefully 23 | # halt and shutdown that can be used to assist upgrades and testing. 24 | # 25 | # Note: Commitment of state will be attempted on the corresponding block. 26 | halt-height = 0 27 | 28 | # HaltTime contains a non-zero minimum block time (in Unix seconds) at which 29 | # a node will gracefully halt and shutdown that can be used to assist upgrades 30 | # and testing. 31 | # 32 | # Note: Commitment of state will be attempted on the corresponding block. 33 | halt-time = 0 34 | 35 | # InterBlockCache enables inter-block caching. 36 | inter-block-cache = true 37 | -------------------------------------------------------------------------------- /heldernet/config/config.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML config file. 2 | # For more information, see https://github.com/toml-lang/toml 3 | 4 | # NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or 5 | # relative to the home directory (e.g. "data"). The home directory is 6 | # "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable 7 | # or --home cmd flag. 8 | 9 | ##### main base config options ##### 10 | 11 | # TCP or UNIX socket address of the ABCI application, 12 | # or the name of an ABCI application compiled in with the Tendermint binary 13 | proxy_app = "tcp://127.0.0.1:26658" 14 | 15 | # A custom human readable name for this node 16 | moniker = "local" 17 | 18 | # If this node is many blocks behind the tip of the chain, FastSync 19 | # allows them to catchup quickly by downloading blocks in parallel 20 | # and verifying their commits 21 | fast_sync = true 22 | 23 | # Database backend: goleveldb | cleveldb | boltdb | rocksdb 24 | # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) 25 | # - pure go 26 | # - stable 27 | # * cleveldb (uses levigo wrapper) 28 | # - fast 29 | # - requires gcc 30 | # - use cleveldb build tag (go build -tags cleveldb) 31 | # * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) 32 | # - EXPERIMENTAL 33 | # - may be faster is some use-cases (random reads - indexer) 34 | # - use boltdb build tag (go build -tags boltdb) 35 | # * rocksdb (uses github.com/tecbot/gorocksdb) 36 | # - EXPERIMENTAL 37 | # - requires gcc 38 | # - use rocksdb build tag (go build -tags rocksdb) 39 | db_backend = "goleveldb" 40 | 41 | # Database directory 42 | db_dir = "data" 43 | 44 | # Output level for logging, including package level options 45 | log_level = "main:info,state:info,*:error" 46 | 47 | # Output format: 'plain' (colored text) or 'json' 48 | log_format = "plain" 49 | 50 | ##### additional base config options ##### 51 | 52 | # Path to the JSON file containing the initial validator set and other meta data 53 | genesis_file = "config/genesis.json" 54 | 55 | # Path to the JSON file containing the private key to use as a validator in the consensus protocol 56 | priv_validator_key_file = "config/priv_validator_key.json" 57 | 58 | # Path to the JSON file containing the last sign state of a validator 59 | priv_validator_state_file = "data/priv_validator_state.json" 60 | 61 | # TCP or UNIX socket address for Tendermint to listen on for 62 | # connections from an external PrivValidator process 63 | priv_validator_laddr = "" 64 | 65 | # Path to the JSON file containing the private key to use for node authentication in the p2p protocol 66 | node_key_file = "config/node_key.json" 67 | 68 | # Mechanism to connect to the ABCI application: socket | grpc 69 | abci = "socket" 70 | 71 | # TCP or UNIX socket address for the profiling server to listen on 72 | prof_laddr = "localhost:6060" 73 | 74 | # If true, query the ABCI app on connecting to a new peer 75 | # so the app can decide if we should keep the connection or not 76 | filter_peers = false 77 | 78 | ##### advanced configuration options ##### 79 | 80 | ##### rpc server configuration options ##### 81 | [rpc] 82 | 83 | # TCP or UNIX socket address for the RPC server to listen on 84 | laddr = "tcp://127.0.0.1:26657" 85 | 86 | # A list of origins a cross-domain request can be executed from 87 | # Default value '[]' disables cors support 88 | # Use '["*"]' to allow any origin 89 | cors_allowed_origins = [] 90 | 91 | # A list of methods the client is allowed to use with cross-domain requests 92 | cors_allowed_methods = ["HEAD", "GET", "POST", ] 93 | 94 | # A list of non simple headers the client is allowed to use with cross-domain requests 95 | cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] 96 | 97 | # TCP or UNIX socket address for the gRPC server to listen on 98 | # NOTE: This server only supports /broadcast_tx_commit 99 | grpc_laddr = "" 100 | 101 | # Maximum number of simultaneous connections. 102 | # Does not include RPC (HTTP&WebSocket) connections. See max_open_connections 103 | # If you want to accept a larger number than the default, make sure 104 | # you increase your OS limits. 105 | # 0 - unlimited. 106 | # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} 107 | # 1024 - 40 - 10 - 50 = 924 = ~900 108 | grpc_max_open_connections = 900 109 | 110 | # Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool 111 | unsafe = false 112 | 113 | # Maximum number of simultaneous connections (including WebSocket). 114 | # Does not include gRPC connections. See grpc_max_open_connections 115 | # If you want to accept a larger number than the default, make sure 116 | # you increase your OS limits. 117 | # 0 - unlimited. 118 | # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} 119 | # 1024 - 40 - 10 - 50 = 924 = ~900 120 | max_open_connections = 900 121 | 122 | # Maximum number of unique clientIDs that can /subscribe 123 | # If you're using /broadcast_tx_commit, set to the estimated maximum number 124 | # of broadcast_tx_commit calls per block. 125 | max_subscription_clients = 100 126 | 127 | # Maximum number of unique queries a given client can /subscribe to 128 | # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to 129 | # the estimated # maximum number of broadcast_tx_commit calls per block. 130 | max_subscriptions_per_client = 5 131 | 132 | # How long to wait for a tx to be committed during /broadcast_tx_commit. 133 | # WARNING: Using a value larger than 10s will result in increasing the 134 | # global HTTP write timeout, which applies to all connections and endpoints. 135 | # See https://github.com/tendermint/tendermint/issues/3435 136 | timeout_broadcast_tx_commit = "10s" 137 | 138 | # Maximum size of request body, in bytes 139 | max_body_bytes = 1000000 140 | 141 | # Maximum size of request header, in bytes 142 | max_header_bytes = 1048576 143 | 144 | # The path to a file containing certificate that is used to create the HTTPS server. 145 | # Migth be either absolute path or path related to tendermint's config directory. 146 | # If the certificate is signed by a certificate authority, 147 | # the certFile should be the concatenation of the server's certificate, any intermediates, 148 | # and the CA's certificate. 149 | # NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. 150 | # Otherwise, HTTP server is run. 151 | tls_cert_file = "" 152 | 153 | # The path to a file containing matching private key that is used to create the HTTPS server. 154 | # Migth be either absolute path or path related to tendermint's config directory. 155 | # NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. 156 | # Otherwise, HTTP server is run. 157 | tls_key_file = "" 158 | 159 | ##### peer to peer configuration options ##### 160 | [p2p] 161 | 162 | # Address to listen for incoming connections 163 | laddr = "tcp://0.0.0.0:26656" 164 | 165 | # Address to advertise to peers for them to dial 166 | # If empty, will use the same port as the laddr, 167 | # and will introspect on the listener or use UPnP 168 | # to figure out the address. 169 | external_address = "" 170 | 171 | # Comma separated list of seed nodes to connect to 172 | seeds = "25cfdfec822cc3e5c6715a26cc62ca3b4ac969ae@3.210.214.84:26656,be60704078fcfd39381704920afadeae80bf28b5@54.157.170.255:26656,f370d17af0c89bcc705f2ba9db941927a80eb60e@52.6.160.38:26657" 173 | 174 | # Comma separated list of nodes to keep persistent connections to 175 | persistent_peers = "" 176 | 177 | # UPNP port forwarding 178 | upnp = false 179 | 180 | # Path to address book 181 | addr_book_file = "config/addrbook.json" 182 | 183 | # Set true for strict address routability rules 184 | # Set false for private or local networks 185 | addr_book_strict = true 186 | 187 | # Maximum number of inbound peers 188 | max_num_inbound_peers = 40 189 | 190 | # Maximum number of outbound peers to connect to, excluding persistent peers 191 | max_num_outbound_peers = 10 192 | 193 | # List of node IDs, to which a connection will be (re)established ignoring any existing limits 194 | unconditional_peer_ids = "" 195 | 196 | # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) 197 | persistent_peers_max_dial_period = "0s" 198 | 199 | # Time to wait before flushing messages out on the connection 200 | flush_throttle_timeout = "100ms" 201 | 202 | # Maximum size of a message packet payload, in bytes 203 | max_packet_msg_payload_size = 1024 204 | 205 | # Rate at which packets can be sent, in bytes/second 206 | send_rate = 5120000 207 | 208 | # Rate at which packets can be received, in bytes/second 209 | recv_rate = 5120000 210 | 211 | # Set true to enable the peer-exchange reactor 212 | pex = true 213 | 214 | # Seed mode, in which node constantly crawls the network and looks for 215 | # peers. If another node asks it for addresses, it responds and disconnects. 216 | # 217 | # Does not work if the peer-exchange reactor is disabled. 218 | seed_mode = false 219 | 220 | # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) 221 | private_peer_ids = "" 222 | 223 | # Toggle to disable guard against peers connecting from the same ip. 224 | allow_duplicate_ip = false 225 | 226 | # Peer connection configuration. 227 | handshake_timeout = "20s" 228 | dial_timeout = "3s" 229 | 230 | ##### mempool configuration options ##### 231 | [mempool] 232 | 233 | recheck = true 234 | broadcast = true 235 | wal_dir = "" 236 | 237 | # Maximum number of transactions in the mempool 238 | size = 5000 239 | 240 | # Limit the total size of all txs in the mempool. 241 | # This only accounts for raw transactions (e.g. given 1MB transactions and 242 | # max_txs_bytes=5MB, mempool will only accept 5 transactions). 243 | max_txs_bytes = 1073741824 244 | 245 | # Size of the cache (used to filter transactions we saw earlier) in transactions 246 | cache_size = 10000 247 | 248 | # Maximum size of a single transaction. 249 | # NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}. 250 | max_tx_bytes = 1048576 251 | 252 | ##### fast sync configuration options ##### 253 | [fastsync] 254 | 255 | # Fast Sync version to use: 256 | # 1) "v0" (default) - the legacy fast sync implementation 257 | # 2) "v1" - refactor of v0 version for better testability 258 | # 3) "v2" - refactor of v1 version for better usability 259 | version = "v0" 260 | 261 | ##### consensus configuration options ##### 262 | [consensus] 263 | 264 | wal_file = "data/cs.wal/wal" 265 | 266 | timeout_propose = "3s" 267 | timeout_propose_delta = "500ms" 268 | timeout_prevote = "1s" 269 | timeout_prevote_delta = "500ms" 270 | timeout_precommit = "1s" 271 | timeout_precommit_delta = "500ms" 272 | timeout_commit = "5s" 273 | 274 | # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) 275 | skip_timeout_commit = false 276 | 277 | # EmptyBlocks mode and possible interval between empty blocks 278 | create_empty_blocks = true 279 | create_empty_blocks_interval = "0s" 280 | 281 | # Reactor sleep duration parameters 282 | peer_gossip_sleep_duration = "100ms" 283 | peer_query_maj23_sleep_duration = "2s" 284 | 285 | ##### transactions indexer configuration options ##### 286 | [tx_index] 287 | 288 | # What indexer to use for transactions 289 | # 290 | # Options: 291 | # 1) "null" 292 | # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). 293 | indexer = "kv" 294 | 295 | # Comma-separated list of compositeKeys to index (by default the only key is "tx.hash") 296 | # Remember that Event has the following structure: type.key 297 | # type: [ 298 | # key: value, 299 | # ... 300 | # ] 301 | # 302 | # You can also index transactions by height by adding "tx.height" key here. 303 | # 304 | # It's recommended to index only a subset of keys due to possible memory 305 | # bloat. This is, of course, depends on the indexer's DB and the volume of 306 | # transactions. 307 | index_keys = "" 308 | 309 | # When set to true, tells indexer to index all compositeKeys (predefined keys: 310 | # "tx.hash", "tx.height" and all keys from DeliverTx responses). 311 | # 312 | # Note this may be not desirable (see the comment above). IndexKeys has a 313 | # precedence over IndexAllKeys (i.e. when given both, IndexKeys will be 314 | # indexed). 315 | index_all_keys = true 316 | 317 | ##### instrumentation configuration options ##### 318 | [instrumentation] 319 | 320 | # When true, Prometheus metrics are served under /metrics on 321 | # PrometheusListenAddr. 322 | # Check out the documentation for the list of available metrics. 323 | prometheus = false 324 | 325 | # Address to listen for Prometheus collector(s) connections 326 | prometheus_listen_addr = ":26660" 327 | 328 | # Maximum number of simultaneous connections. 329 | # If you want to accept a larger number than the default, make sure 330 | # you increase your OS limits. 331 | # 0 - unlimited. 332 | max_open_connections = 3 333 | 334 | # Instrumentation namespace 335 | namespace = "tendermint" 336 | -------------------------------------------------------------------------------- /heldernet/config/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "genesis_time": "2020-10-16T01:54:54.177331089Z", 3 | "chain_id": "hackatom-wasm", 4 | "consensus_params": { 5 | "block": { 6 | "max_bytes": "22020096", 7 | "max_gas": "-1", 8 | "time_iota_ms": "1000" 9 | }, 10 | "evidence": { 11 | "max_age_num_blocks": "100000", 12 | "max_age_duration": "172800000000000" 13 | }, 14 | "validator": { 15 | "pub_key_types": [ 16 | "ed25519" 17 | ] 18 | } 19 | }, 20 | "app_hash": "", 21 | "app_state": { 22 | "params": null, 23 | "wasm": { 24 | "params": { 25 | "code_upload_access": { 26 | "permission": "Everybody" 27 | }, 28 | "instantiate_default_permission": "Everybody" 29 | } 30 | }, 31 | "distribution": { 32 | "params": { 33 | "community_tax": "0.020000000000000000", 34 | "base_proposer_reward": "0.010000000000000000", 35 | "bonus_proposer_reward": "0.040000000000000000", 36 | "withdraw_addr_enabled": true 37 | }, 38 | "fee_pool": { 39 | "community_pool": [] 40 | }, 41 | "delegator_withdraw_infos": [], 42 | "previous_proposer": "", 43 | "outstanding_rewards": [], 44 | "validator_accumulated_commissions": [], 45 | "validator_historical_rewards": [], 46 | "validator_current_rewards": [], 47 | "delegator_starting_infos": [], 48 | "validator_slash_events": [] 49 | }, 50 | "gov": { 51 | "starting_proposal_id": "1", 52 | "deposits": null, 53 | "votes": null, 54 | "proposals": null, 55 | "deposit_params": { 56 | "min_deposit": [ 57 | { 58 | "denom": "stake", 59 | "amount": "10000000" 60 | } 61 | ], 62 | "max_deposit_period": "172800000000000" 63 | }, 64 | "voting_params": { 65 | "voting_period": "172800000000000" 66 | }, 67 | "tally_params": { 68 | "quorum": "0.334000000000000000", 69 | "threshold": "0.500000000000000000", 70 | "veto": "0.334000000000000000" 71 | } 72 | }, 73 | "auth": { 74 | "params": { 75 | "max_memo_characters": "256", 76 | "tx_sig_limit": "7", 77 | "tx_size_cost_per_byte": "10", 78 | "sig_verify_cost_ed25519": "590", 79 | "sig_verify_cost_secp256k1": "1000" 80 | }, 81 | "accounts": [ 82 | { 83 | "type": "cosmos-sdk/Account", 84 | "value": { 85 | "address": "cosmos18nqyckzeq0ykcnefld7fmkdsx9upesu235hl4f", 86 | "coins": [ 87 | { 88 | "denom": "stake", 89 | "amount": "100000000000000000000" 90 | }, 91 | { 92 | "denom": "ucosm", 93 | "amount": "100000000000000000000" 94 | } 95 | ], 96 | "public_key": null, 97 | "account_number": "0", 98 | "sequence": "0" 99 | } 100 | }, 101 | { 102 | "type": "cosmos-sdk/Account", 103 | "value": { 104 | "address": "cosmos16h4tqljdgfzl9se4m2vsezaa609mwrvasku0px", 105 | "coins": [ 106 | { 107 | "denom": "stake", 108 | "amount": "100000000000000000000" 109 | }, 110 | { 111 | "denom": "ucosm", 112 | "amount": "100000000000000000000" 113 | } 114 | ], 115 | "public_key": null, 116 | "account_number": "0", 117 | "sequence": "0" 118 | } 119 | }, 120 | { 121 | "type": "cosmos-sdk/Account", 122 | "value": { 123 | "address": "cosmos1nz237hkdlsnfwvsjxh86nkz763dxugm6mqtljh", 124 | "coins": [ 125 | { 126 | "denom": "stake", 127 | "amount": "100000000000000000000" 128 | }, 129 | { 130 | "denom": "ucosm", 131 | "amount": "100000000000000000000" 132 | } 133 | ], 134 | "public_key": null, 135 | "account_number": "0", 136 | "sequence": "0" 137 | } 138 | }, 139 | { 140 | "type": "cosmos-sdk/Account", 141 | "value": { 142 | "address": "cosmos1yyexafhav04sznj8spj9m7zpzjar9k99upzqya", 143 | "coins": [ 144 | { 145 | "denom": "ucosm", 146 | "amount": "100000000000000000000" 147 | } 148 | ], 149 | "public_key": null, 150 | "account_number": "0", 151 | "sequence": "0" 152 | } 153 | } 154 | ] 155 | }, 156 | "genutil": { 157 | "gentxs": [ 158 | { 159 | "type": "cosmos-sdk/StdTx", 160 | "value": { 161 | "msg": [ 162 | { 163 | "type": "cosmos-sdk/MsgCreateValidator", 164 | "value": { 165 | "description": { 166 | "moniker": "cosmwasm-validator-2", 167 | "identity": "", 168 | "website": "", 169 | "security_contact": "", 170 | "details": "" 171 | }, 172 | "commission": { 173 | "rate": "0.100000000000000000", 174 | "max_rate": "0.200000000000000000", 175 | "max_change_rate": "0.010000000000000000" 176 | }, 177 | "min_self_delegation": "1", 178 | "delegator_address": "cosmos1nz237hkdlsnfwvsjxh86nkz763dxugm6mqtljh", 179 | "validator_address": "cosmosvaloper1nz237hkdlsnfwvsjxh86nkz763dxugm675l27y", 180 | "pubkey": "cosmosvalconspub1zcjduepqhsul8dz85660539se7qgsghu7528xff9fc8mlwmu7lnkvv3cy3gs79j7pq", 181 | "value": { 182 | "denom": "stake", 183 | "amount": "100000000" 184 | } 185 | } 186 | } 187 | ], 188 | "fee": { 189 | "amount": [], 190 | "gas": "200000" 191 | }, 192 | "signatures": [ 193 | { 194 | "pub_key": { 195 | "type": "tendermint/PubKeySecp256k1", 196 | "value": "Asmb0hriArCB5HXFkHLp69+b3CV8Wj5dCk03vjq+GOOz" 197 | }, 198 | "signature": "tylvm169GXsmfZ9nsWsWpHmturiOiorCNB4r4RtjeWxUUOS9afFa985e2TN0IIOfQw4xQIeEkQ7VejZYQuIWyA==" 199 | } 200 | ], 201 | "memo": "38edcd006e5237f356e73dcdd325a8db43dfa28c@10.0.2.74:26656" 202 | } 203 | }, 204 | { 205 | "type": "cosmos-sdk/StdTx", 206 | "value": { 207 | "msg": [ 208 | { 209 | "type": "cosmos-sdk/MsgCreateValidator", 210 | "value": { 211 | "description": { 212 | "moniker": "cosmwasm-validator-1", 213 | "identity": "", 214 | "website": "", 215 | "security_contact": "", 216 | "details": "" 217 | }, 218 | "commission": { 219 | "rate": "0.100000000000000000", 220 | "max_rate": "0.200000000000000000", 221 | "max_change_rate": "0.010000000000000000" 222 | }, 223 | "min_self_delegation": "1", 224 | "delegator_address": "cosmos16h4tqljdgfzl9se4m2vsezaa609mwrvasku0px", 225 | "validator_address": "cosmosvaloper16h4tqljdgfzl9se4m2vsezaa609mwrva4zg6d4", 226 | "pubkey": "cosmosvalconspub1zcjduepqkzu99g93u6y7jsefp0cq8aevg4s7gyh0r64hmfwujll9vs9p78xsylpd5a", 227 | "value": { 228 | "denom": "stake", 229 | "amount": "100000000" 230 | } 231 | } 232 | } 233 | ], 234 | "fee": { 235 | "amount": [], 236 | "gas": "200000" 237 | }, 238 | "signatures": [ 239 | { 240 | "pub_key": { 241 | "type": "tendermint/PubKeySecp256k1", 242 | "value": "A9/0KoBpcEW/RwX1tLMqwpM26ZyMKXnB/2Bayo8/lupc" 243 | }, 244 | "signature": "5kjgY7P6RXJ6jkq7bUyroZt6nkOFmRWKeVZC5hHSu9V/1HUoAGKN7KZvLQJzWc6zMrXplzdRHyItFE229SbQPw==" 245 | } 246 | ], 247 | "memo": "464d6483d7938a863febb489c743c3315665f4b1@10.0.1.28:26656" 248 | } 249 | }, 250 | { 251 | "type": "cosmos-sdk/StdTx", 252 | "value": { 253 | "msg": [ 254 | { 255 | "type": "cosmos-sdk/MsgCreateValidator", 256 | "value": { 257 | "description": { 258 | "moniker": "cosmwasm-validator-0", 259 | "identity": "", 260 | "website": "", 261 | "security_contact": "", 262 | "details": "" 263 | }, 264 | "commission": { 265 | "rate": "0.100000000000000000", 266 | "max_rate": "0.200000000000000000", 267 | "max_change_rate": "0.010000000000000000" 268 | }, 269 | "min_self_delegation": "1", 270 | "delegator_address": "cosmos18nqyckzeq0ykcnefld7fmkdsx9upesu235hl4f", 271 | "validator_address": "cosmosvaloper18nqyckzeq0ykcnefld7fmkdsx9upesu25qr2e6", 272 | "pubkey": "cosmosvalconspub1zcjduepq4pypplwg5wvn040axz7fwn84r4q4q3sdqh5qtsa6mg82qvvww8uslecr2l", 273 | "value": { 274 | "denom": "stake", 275 | "amount": "100000000" 276 | } 277 | } 278 | } 279 | ], 280 | "fee": { 281 | "amount": [], 282 | "gas": "200000" 283 | }, 284 | "signatures": [ 285 | { 286 | "pub_key": { 287 | "type": "tendermint/PubKeySecp256k1", 288 | "value": "Aqgteiz/lUM57am0sUVyxfvMfRguvenmyO95bqTxzbpE" 289 | }, 290 | "signature": "9hKuuIML7nW8RkuUlYN4sk1F+FAEyd3vg28U0nRi40xxmc9hJ+FXatGsmxju1PSmPrWSqvG+FrUyOJK4Rsb0PA==" 291 | } 292 | ], 293 | "memo": "dc0413eda8ef5868dc53e3ac8820b471f3b8957a@10.0.0.118:26656" 294 | } 295 | } 296 | ] 297 | }, 298 | "mint": { 299 | "minter": { 300 | "inflation": "0.130000000000000000", 301 | "annual_provisions": "0.000000000000000000" 302 | }, 303 | "params": { 304 | "mint_denom": "stake", 305 | "inflation_rate_change": "0.130000000000000000", 306 | "inflation_max": "0.200000000000000000", 307 | "inflation_min": "0.070000000000000000", 308 | "goal_bonded": "0.670000000000000000", 309 | "blocks_per_year": "6311520" 310 | } 311 | }, 312 | "bank": { 313 | "send_enabled": true 314 | }, 315 | "staking": { 316 | "params": { 317 | "unbonding_time": "1814400000000000", 318 | "max_validators": 100, 319 | "max_entries": 7, 320 | "historical_entries": 0, 321 | "bond_denom": "stake" 322 | }, 323 | "last_total_power": "0", 324 | "last_validator_powers": null, 325 | "validators": null, 326 | "delegations": null, 327 | "unbonding_delegations": null, 328 | "redelegations": null, 329 | "exported": false 330 | }, 331 | "evidence": { 332 | "params": { 333 | "max_evidence_age": "120000000000" 334 | }, 335 | "evidence": [] 336 | }, 337 | "supply": { 338 | "supply": [] 339 | }, 340 | "crisis": { 341 | "constant_fee": { 342 | "denom": "stake", 343 | "amount": "1000" 344 | } 345 | }, 346 | "upgrade": {}, 347 | "slashing": { 348 | "params": { 349 | "signed_blocks_window": "100", 350 | "min_signed_per_window": "0.500000000000000000", 351 | "downtime_jail_duration": "600000000000", 352 | "slash_fraction_double_sign": "0.050000000000000000", 353 | "slash_fraction_downtime": "0.010000000000000000" 354 | }, 355 | "signing_infos": {}, 356 | "missed_blocks": {} 357 | } 358 | } 359 | } -------------------------------------------------------------------------------- /heldernet/defaults.env: -------------------------------------------------------------------------------- 1 | export CHAIN_ID="hackatom-wasm" 2 | export TESTNET_NAME="heldernet" 3 | export WASMD_VERSION="v0.11.1" 4 | export CONFIG_DIR=".wasmd" 5 | export BINARY="wasmd" 6 | export CLI_BINARY="wasmcli" 7 | 8 | export COSMJS_VERSION="v0.23.0" 9 | export GENESIS_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/heldernet/config/genesis.json" 10 | export APP_CONFIG_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/heldernet/config/app.toml" 11 | export CONFIG_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/heldernet/config/config.toml" 12 | 13 | export RPC="https://rpc.heldernet.cosmwasm.com:443" 14 | export LCD="https://lcd.heldernet.cosmwasm.com" 15 | export FAUCET="https://faucet.heldernet.cosmwasm.com" 16 | export SEED_NODE="ec488c9215e1917e41bce5ef4b53d39ff6805166@195.201.88.9:26656" 17 | -------------------------------------------------------------------------------- /musselnet/README.md: -------------------------------------------------------------------------------- 1 | # Musselnet 2 | 3 | Successor of Coralnet. Stargate including out of the box IBC functionality 4 | 5 | - **go version**: `1.15+` 6 | - **wasmd version**: `v0.12.0` 7 | - **wasmd build command**: `make build` 8 | - **CosmJS version**: `v0.24.0` 9 | - **start**: 24th November 2020 10 | 11 | The [genesis file](./config/genesis.json) is here. 12 | 13 | - **Fee token:** `umayo` 14 | - **Staking token:** `ufrites` 15 | ## Web endpoints 16 | 17 | Here we list all explorers, wallets, and apps you can access with a browser: 18 | 19 | * [RPC](https://rpc.musselnet.cosmwasm.com) - public RPC endpoint 20 | * [LCD](https://lcd.musselnet.cosmwasm.com) - public LCD endpoint 21 | * [FAUCET](https://faucet.musselnet.cosmwasm.com) - faucet 22 | * [Big Dipper/Block Explorer](https://bigdipper.musselnet.cosmwasm.com) 23 | -------------------------------------------------------------------------------- /musselnet/big-dipper-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "public":{ 3 | "chainName": "CosmWasm Musselnet", 4 | "chainId": "musselnet", 5 | "gtm": "{Add your Google Tag Manager ID here}", 6 | "slashingWindow": 10000, 7 | "uptimeWindow": 250, 8 | "initialPageSize": 30, 9 | "bech32PrefixAccAddr": "wasm", 10 | "bech32PrefixAccPub": "wasmpub", 11 | "bech32PrefixValAddr": "wasmvaloper", 12 | "bech32PrefixValPub": "wasmvaloperpub", 13 | "bech32PrefixConsAddr": "wasmvalcons", 14 | "bech32PrefixConsPub": "wasmvalconspub", 15 | "bondDenom": "ufrites", 16 | "powerReduction": 1000000, 17 | "coins": [ 18 | { 19 | "denom": "ufrites", 20 | "displayName": "FRITES", 21 | "displayNamePlural": "FRITES", 22 | "fraction": 1000000 23 | }, 24 | { 25 | "denom": "umayo", 26 | "displayName": "MAYO", 27 | "displayNamePlural": "MAYO", 28 | "fraction": 1000000 29 | } 30 | ], 31 | "gasPrice": 0.01, 32 | "coingeckoId": "none" 33 | }, 34 | "genesisFile": "https://raw.githubusercontent.com/CosmWasm/testnets/master/musselnet/config/genesis.json", 35 | "remote":{ 36 | "rpc":"https://rpc.musselnet.cosmwasm.com", 37 | "lcd":"https://lcd.musselnet.cosmwasm.com" 38 | }, 39 | "debug": { 40 | "startTimer": true, 41 | "readGenesis": true 42 | }, 43 | "params":{ 44 | "startHeight": 0, 45 | "defaultBlockTime": 5000, 46 | "blockInterval": 15000, 47 | "consensusInterval": 1000, 48 | "statusInterval":7500, 49 | "signingInfoInterval": 1800000, 50 | "proposalInterval": 5000, 51 | "missedBlocksInterval": 60000, 52 | "delegationInterval": 900000 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /musselnet/cli_helper.ts: -------------------------------------------------------------------------------- 1 | interface Options { 2 | httpUrl: string 3 | networkId: string 4 | feeToken: string 5 | gasPrice: number 6 | bech32prefix: string 7 | } 8 | 9 | const defaultOptions: Options = { 10 | httpUrl: 'https://rpc.musselnet.cosmwasm.com', 11 | networkId: 'musselnet', 12 | feeToken: 'umayo', 13 | gasPrice: 0.01, 14 | bech32prefix: 'wasm', 15 | } 16 | 17 | const defaultFaucetUrl = 'https://faucet.musselnet.cosmwasm.com/credit' 18 | 19 | const buildFeeTable = (feeToken: string, gasPrice: number): FeeTable => { 20 | const stdFee = (gas: number, denom: string, price: number) => { 21 | const amount = Math.floor(gas * price) 22 | return { 23 | amount: [{ amount: amount.toString(), denom: denom }], 24 | gas: gas.toString(), 25 | } 26 | } 27 | 28 | return { 29 | upload: stdFee(1000000, feeToken, gasPrice), 30 | init: stdFee(500000, feeToken, gasPrice), 31 | migrate: stdFee(500000, feeToken, gasPrice), 32 | exec: stdFee(200000, feeToken, gasPrice), 33 | send: stdFee(80000, feeToken, gasPrice), 34 | changeAdmin: stdFee(80000, feeToken, gasPrice), 35 | } 36 | } 37 | 38 | const connect = async ( 39 | mnemonic: string, 40 | opts: Partial 41 | ): Promise<{ 42 | client: SigningCosmWasmClient 43 | address: string 44 | }> => { 45 | const options: Options = { ...defaultOptions, ...opts } 46 | const feeTable = buildFeeTable(options.feeToken, options.gasPrice) 47 | const wallet = await buildWallet(mnemonic) 48 | const [{ address }] = await wallet.getAccounts() 49 | 50 | const client = new SigningCosmWasmClient( 51 | options.httpUrl, 52 | address, 53 | wallet, 54 | feeTable 55 | ) 56 | return { client, address } 57 | } 58 | 59 | // loadOrCreateMnemonic will try to load a mnemonic from the file. 60 | // If missing, it will generate a random one and save to the file. 61 | // 62 | // This is not secure, but does allow simple developer access to persist a 63 | // mnemonic between sessions 64 | const loadOrCreateMnemonic = (filename: string): string => { 65 | try { 66 | const mnemonic = fs.readFileSync(filename, 'utf8') 67 | return mnemonic.trim() 68 | } catch (err) { 69 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 70 | fs.writeFileSync(filename, mnemonic, 'utf8') 71 | return mnemonic 72 | } 73 | } 74 | 75 | const hitFaucet = async ( 76 | faucetUrl: string, 77 | address: string, 78 | ticker: string 79 | ): Promise => { 80 | const r = await axios.post(defaultFaucetUrl, { ticker, address }) 81 | console.log(r.status) 82 | console.log(r.data) 83 | } 84 | 85 | const randomAddress = async (): Promise => { 86 | const mnemonic = Bip39.encode(Random.getBytes(16)).toString() 87 | return mnemonicToAddress(mnemonic) 88 | } 89 | 90 | const mnemonicToAddress = async ( 91 | mnemonic: string 92 | ): Promise => { 93 | const wallet = await buildWallet(mnemonic); 94 | const [{ address }] = await wallet.getAccounts() 95 | return address 96 | } 97 | 98 | const buildWallet = (mnemonic: string): Promise => { 99 | return Secp256k1Wallet.fromMnemonic(mnemonic, makeCosmoshubPath(0), defaultOptions.bech32prefix); 100 | } 101 | 102 | const downloadWasm = async (url: string): Promise => { 103 | const r = await axios.get(url, { responseType: 'arraybuffer' }) 104 | if (r.status !== 200) { 105 | throw new Error(`Download error: ${r.status}`) 106 | } 107 | return r.data 108 | } 109 | 110 | const getAttibute = ( 111 | logs: readonly logs.Log[], 112 | key: string 113 | ): string | undefined => 114 | logs[0].events[0].attributes.find((x) => x.key == key)?.value 115 | -------------------------------------------------------------------------------- /musselnet/config/app.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML config file. 2 | # For more information, see https://github.com/toml-lang/toml 3 | 4 | ############################################################################### 5 | ### Base Configuration ### 6 | ############################################################################### 7 | 8 | # The minimum gas prices a validator is willing to accept for processing a 9 | # transaction. A transaction's fees must meet the minimum of any denomination 10 | # specified in this config (e.g. 0.25token1;0.0001token2). 11 | minimum-gas-prices = "0.01umayo" 12 | 13 | # default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals 14 | # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) 15 | # everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals 16 | # custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' 17 | pruning = "default" 18 | 19 | # These are applied if and only if the pruning strategy is custom. 20 | pruning-keep-recent = "0" 21 | pruning-keep-every = "0" 22 | pruning-interval = "0" 23 | 24 | # HaltHeight contains a non-zero block height at which a node will gracefully 25 | # halt and shutdown that can be used to assist upgrades and testing. 26 | # 27 | # Note: Commitment of state will be attempted on the corresponding block. 28 | halt-height = 0 29 | 30 | # HaltTime contains a non-zero minimum block time (in Unix seconds) at which 31 | # a node will gracefully halt and shutdown that can be used to assist upgrades 32 | # and testing. 33 | # 34 | # Note: Commitment of state will be attempted on the corresponding block. 35 | halt-time = 0 36 | 37 | # MinRetainBlocks defines the minimum block height offset from the current 38 | # block being committed, such that all blocks past this offset are pruned 39 | # from Tendermint. It is used as part of the process of determining the 40 | # ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates 41 | # that no blocks should be pruned. 42 | # 43 | # This configuration value is only responsible for pruning Tendermint blocks. 44 | # It has no bearing on application state pruning which is determined by the 45 | # "pruning-*" configurations. 46 | # 47 | # Note: Tendermint block pruning is dependant on this parameter in conunction 48 | # with the unbonding (safety threshold) period, state pruning and state sync 49 | # snapshot parameters to determine the correct minimum value of 50 | # ResponseCommit.RetainHeight. 51 | min-retain-blocks = 0 52 | 53 | # InterBlockCache enables inter-block caching. 54 | inter-block-cache = true 55 | 56 | # IndexEvents defines the set of events in the form {eventType}.{attributeKey}, 57 | # which informs Tendermint what to index. If empty, all events will be indexed. 58 | # 59 | # Example: 60 | # ["message.sender", "message.recipient"] 61 | index-events = [] 62 | 63 | ############################################################################### 64 | ### Telemetry Configuration ### 65 | ############################################################################### 66 | 67 | [telemetry] 68 | 69 | # Prefixed with keys to separate services. 70 | service-name = "" 71 | 72 | # Enabled enables the application telemetry functionality. When enabled, 73 | # an in-memory sink is also enabled by default. Operators may also enabled 74 | # other sinks such as Prometheus. 75 | enabled = false 76 | 77 | # Enable prefixing gauge values with hostname. 78 | enable-hostname = false 79 | 80 | # Enable adding hostname to labels. 81 | enable-hostname-label = false 82 | 83 | # Enable adding service to labels. 84 | enable-service-label = false 85 | 86 | # PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. 87 | prometheus-retention-time = 0 88 | 89 | # GlobalLabels defines a global set of name/value label tuples applied to all 90 | # metrics emitted using the wrapper functions defined in telemetry package. 91 | # 92 | # Example: 93 | # [["chain_id", "cosmoshub-1"]] 94 | global-labels = [ 95 | ] 96 | 97 | ############################################################################### 98 | ### API Configuration ### 99 | ############################################################################### 100 | 101 | [api] 102 | 103 | # Enable defines if the API server should be enabled. 104 | enable = false 105 | 106 | # Swagger defines if swagger documentation should automatically be registered. 107 | swagger = false 108 | 109 | # Address defines the API server to listen on. 110 | address = "tcp://0.0.0.0:1317" 111 | 112 | # MaxOpenConnections defines the number of maximum open connections. 113 | max-open-connections = 1000 114 | 115 | # RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). 116 | rpc-read-timeout = 10 117 | 118 | # RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). 119 | rpc-write-timeout = 0 120 | 121 | # RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). 122 | rpc-max-body-bytes = 1000000 123 | 124 | # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). 125 | enabled-unsafe-cors = false 126 | 127 | ############################################################################### 128 | ### gRPC Configuration ### 129 | ############################################################################### 130 | 131 | [grpc] 132 | 133 | # Enable defines if the gRPC server should be enabled. 134 | enable = true 135 | 136 | # Address defines the gRPC server address to bind to. 137 | address = "0.0.0.0:9090" 138 | 139 | ############################################################################### 140 | ### State Sync Configuration ### 141 | ############################################################################### 142 | 143 | # State sync snapshots allow other nodes to rapidly join the network without replaying historical 144 | # blocks, instead downloading and applying a snapshot of the application state at a given height. 145 | [state-sync] 146 | 147 | # snapshot-interval specifies the block interval at which local state sync snapshots are 148 | # taken (0 to disable). Must be a multiple of pruning-keep-every. 149 | snapshot-interval = 0 150 | 151 | # snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). 152 | snapshot-keep-recent = 2 153 | -------------------------------------------------------------------------------- /musselnet/config/config.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML config file. 2 | # For more information, see https://github.com/toml-lang/toml 3 | 4 | # NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or 5 | # relative to the home directory (e.g. "data"). The home directory is 6 | # "$HOME/.tendermint" by default, but could be changed via $TMHOME env variable 7 | # or --home cmd flag. 8 | 9 | ####################################################################### 10 | ### Main Base Config Options ### 11 | ####################################################################### 12 | 13 | # TCP or UNIX socket address of the ABCI application, 14 | # or the name of an ABCI application compiled in with the Tendermint binary 15 | proxy_app = "tcp://127.0.0.1:26658" 16 | 17 | # A custom human readable name for this node 18 | moniker = "moniker" 19 | 20 | # If this node is many blocks behind the tip of the chain, FastSync 21 | # allows them to catchup quickly by downloading blocks in parallel 22 | # and verifying their commits 23 | fast_sync = true 24 | 25 | # Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb 26 | # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) 27 | # - pure go 28 | # - stable 29 | # * cleveldb (uses levigo wrapper) 30 | # - fast 31 | # - requires gcc 32 | # - use cleveldb build tag (go build -tags cleveldb) 33 | # * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) 34 | # - EXPERIMENTAL 35 | # - may be faster is some use-cases (random reads - indexer) 36 | # - use boltdb build tag (go build -tags boltdb) 37 | # * rocksdb (uses github.com/tecbot/gorocksdb) 38 | # - EXPERIMENTAL 39 | # - requires gcc 40 | # - use rocksdb build tag (go build -tags rocksdb) 41 | # * badgerdb (uses github.com/dgraph-io/badger) 42 | # - EXPERIMENTAL 43 | # - use badgerdb build tag (go build -tags badgerdb) 44 | db_backend = "goleveldb" 45 | 46 | # Database directory 47 | db_dir = "data" 48 | 49 | # Output level for logging, including package level options 50 | log_level = "main:info,state:info,statesync:info,*:error" 51 | 52 | # Output format: 'plain' (colored text) or 'json' 53 | log_format = "plain" 54 | 55 | ##### additional base config options ##### 56 | 57 | # Path to the JSON file containing the initial validator set and other meta data 58 | genesis_file = "config/genesis.json" 59 | 60 | # Path to the JSON file containing the private key to use as a validator in the consensus protocol 61 | priv_validator_key_file = "config/priv_validator_key.json" 62 | 63 | # Path to the JSON file containing the last sign state of a validator 64 | priv_validator_state_file = "data/priv_validator_state.json" 65 | 66 | # TCP or UNIX socket address for Tendermint to listen on for 67 | # connections from an external PrivValidator process 68 | priv_validator_laddr = "" 69 | 70 | # Path to the JSON file containing the private key to use for node authentication in the p2p protocol 71 | node_key_file = "config/node_key.json" 72 | 73 | # Mechanism to connect to the ABCI application: socket | grpc 74 | abci = "socket" 75 | 76 | # If true, query the ABCI app on connecting to a new peer 77 | # so the app can decide if we should keep the connection or not 78 | filter_peers = false 79 | 80 | 81 | ####################################################################### 82 | ### Advanced Configuration Options ### 83 | ####################################################################### 84 | 85 | ####################################################### 86 | ### RPC Server Configuration Options ### 87 | ####################################################### 88 | [rpc] 89 | 90 | # TCP or UNIX socket address for the RPC server to listen on 91 | laddr = "tcp://127.0.0.1:26657" 92 | 93 | # A list of origins a cross-domain request can be executed from 94 | # Default value '[]' disables cors support 95 | # Use '["*"]' to allow any origin 96 | cors_allowed_origins = [] 97 | 98 | # A list of methods the client is allowed to use with cross-domain requests 99 | cors_allowed_methods = ["HEAD", "GET", "POST", ] 100 | 101 | # A list of non simple headers the client is allowed to use with cross-domain requests 102 | cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] 103 | 104 | # TCP or UNIX socket address for the gRPC server to listen on 105 | # NOTE: This server only supports /broadcast_tx_commit 106 | grpc_laddr = "" 107 | 108 | # Maximum number of simultaneous connections. 109 | # Does not include RPC (HTTP&WebSocket) connections. See max_open_connections 110 | # If you want to accept a larger number than the default, make sure 111 | # you increase your OS limits. 112 | # 0 - unlimited. 113 | # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} 114 | # 1024 - 40 - 10 - 50 = 924 = ~900 115 | grpc_max_open_connections = 900 116 | 117 | # Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool 118 | unsafe = false 119 | 120 | # Maximum number of simultaneous connections (including WebSocket). 121 | # Does not include gRPC connections. See grpc_max_open_connections 122 | # If you want to accept a larger number than the default, make sure 123 | # you increase your OS limits. 124 | # 0 - unlimited. 125 | # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} 126 | # 1024 - 40 - 10 - 50 = 924 = ~900 127 | max_open_connections = 900 128 | 129 | # Maximum number of unique clientIDs that can /subscribe 130 | # If you're using /broadcast_tx_commit, set to the estimated maximum number 131 | # of broadcast_tx_commit calls per block. 132 | max_subscription_clients = 100 133 | 134 | # Maximum number of unique queries a given client can /subscribe to 135 | # If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to 136 | # the estimated # maximum number of broadcast_tx_commit calls per block. 137 | max_subscriptions_per_client = 5 138 | 139 | # How long to wait for a tx to be committed during /broadcast_tx_commit. 140 | # WARNING: Using a value larger than 10s will result in increasing the 141 | # global HTTP write timeout, which applies to all connections and endpoints. 142 | # See https://github.com/tendermint/tendermint/issues/3435 143 | timeout_broadcast_tx_commit = "1m0s" 144 | 145 | # Maximum size of request body, in bytes 146 | max_body_bytes = 1000000 147 | 148 | # Maximum size of request header, in bytes 149 | max_header_bytes = 1048576 150 | 151 | # The path to a file containing certificate that is used to create the HTTPS server. 152 | # Migth be either absolute path or path related to tendermint's config directory. 153 | # If the certificate is signed by a certificate authority, 154 | # the certFile should be the concatenation of the server's certificate, any intermediates, 155 | # and the CA's certificate. 156 | # NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. 157 | # Otherwise, HTTP server is run. 158 | tls_cert_file = "" 159 | 160 | # The path to a file containing matching private key that is used to create the HTTPS server. 161 | # Migth be either absolute path or path related to tendermint's config directory. 162 | # NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. 163 | # Otherwise, HTTP server is run. 164 | tls_key_file = "" 165 | 166 | # pprof listen address (https://golang.org/pkg/net/http/pprof) 167 | pprof_laddr = "localhost:6060" 168 | 169 | ####################################################### 170 | ### P2P Configuration Options ### 171 | ####################################################### 172 | [p2p] 173 | 174 | # Address to listen for incoming connections 175 | laddr = "tcp://0.0.0.0:26656" 176 | 177 | # Address to advertise to peers for them to dial 178 | # If empty, will use the same port as the laddr, 179 | # and will introspect on the listener or use UPnP 180 | # to figure out the address. 181 | external_address = "" 182 | 183 | # Comma separated list of seed nodes to connect to 184 | seeds = "" 185 | 186 | # Comma separated list of nodes to keep persistent connections to 187 | persistent_peers = "" 188 | 189 | # UPNP port forwarding 190 | upnp = false 191 | 192 | # Path to address book 193 | addr_book_file = "config/addrbook.json" 194 | 195 | # Set true for strict address routability rules 196 | # Set false for private or local networks 197 | addr_book_strict = true 198 | 199 | # Maximum number of inbound peers 200 | max_num_inbound_peers = 40 201 | 202 | # Maximum number of outbound peers to connect to, excluding persistent peers 203 | max_num_outbound_peers = 10 204 | 205 | # List of node IDs, to which a connection will be (re)established ignoring any existing limits 206 | unconditional_peer_ids = "" 207 | 208 | # Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) 209 | persistent_peers_max_dial_period = "0s" 210 | 211 | # Time to wait before flushing messages out on the connection 212 | flush_throttle_timeout = "100ms" 213 | 214 | # Maximum size of a message packet payload, in bytes 215 | max_packet_msg_payload_size = 1024 216 | 217 | # Rate at which packets can be sent, in bytes/second 218 | send_rate = 5120000 219 | 220 | # Rate at which packets can be received, in bytes/second 221 | recv_rate = 5120000 222 | 223 | # Set true to enable the peer-exchange reactor 224 | pex = true 225 | 226 | # Seed mode, in which node constantly crawls the network and looks for 227 | # peers. If another node asks it for addresses, it responds and disconnects. 228 | # 229 | # Does not work if the peer-exchange reactor is disabled. 230 | seed_mode = false 231 | 232 | # Comma separated list of peer IDs to keep private (will not be gossiped to other peers) 233 | private_peer_ids = "" 234 | 235 | # Toggle to disable guard against peers connecting from the same ip. 236 | allow_duplicate_ip = false 237 | 238 | # Peer connection configuration. 239 | handshake_timeout = "20s" 240 | dial_timeout = "3s" 241 | 242 | ####################################################### 243 | ### Mempool Configurattion Option ### 244 | ####################################################### 245 | [mempool] 246 | 247 | recheck = true 248 | broadcast = true 249 | wal_dir = "" 250 | 251 | # Maximum number of transactions in the mempool 252 | size = 5000 253 | 254 | # Limit the total size of all txs in the mempool. 255 | # This only accounts for raw transactions (e.g. given 1MB transactions and 256 | # max_txs_bytes=5MB, mempool will only accept 5 transactions). 257 | max_txs_bytes = 1073741824 258 | 259 | # Size of the cache (used to filter transactions we saw earlier) in transactions 260 | cache_size = 10000 261 | 262 | # Maximum size of a single transaction. 263 | # NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. 264 | max_tx_bytes = 1048576 265 | 266 | # Maximum size of a batch of transactions to send to a peer 267 | # Including space needed by encoding (one varint per transaction). 268 | max_batch_bytes = 10485760 269 | 270 | ####################################################### 271 | ### State Sync Configuration Options ### 272 | ####################################################### 273 | [statesync] 274 | # State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine 275 | # snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in 276 | # the network to take and serve state machine snapshots. State sync is not attempted if the node 277 | # has any local state (LastBlockHeight > 0). The node will have a truncated block history, 278 | # starting from the height of the snapshot. 279 | enable = false 280 | 281 | # RPC servers (comma-separated) for light client verification of the synced state machine and 282 | # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding 283 | # header hash obtained from a trusted source, and a period during which validators can be trusted. 284 | # 285 | # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 286 | # weeks) during which they can be financially punished (slashed) for misbehavior. 287 | rpc_servers = "" 288 | trust_height = 0 289 | trust_hash = "" 290 | trust_period = "168h0m0s" 291 | 292 | # Time to spend discovering snapshots before initiating a restore. 293 | discovery_time = "15s" 294 | 295 | # Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). 296 | # Will create a new, randomly named directory within, and remove it when done. 297 | temp_dir = "" 298 | 299 | ####################################################### 300 | ### Fast Sync Configuration Connections ### 301 | ####################################################### 302 | [fastsync] 303 | 304 | # Fast Sync version to use: 305 | # 1) "v0" (default) - the legacy fast sync implementation 306 | # 2) "v1" - refactor of v0 version for better testability 307 | # 2) "v2" - complete redesign of v0, optimized for testability & readability 308 | version = "v0" 309 | 310 | ####################################################### 311 | ### Consensus Configuration Options ### 312 | ####################################################### 313 | [consensus] 314 | 315 | wal_file = "data/cs.wal/wal" 316 | 317 | # How long we wait for a proposal block before prevoting nil 318 | timeout_propose = "3s" 319 | # How much timeout_propose increases with each round 320 | timeout_propose_delta = "500ms" 321 | # How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) 322 | timeout_prevote = "1s" 323 | # How much the timeout_prevote increases with each round 324 | timeout_prevote_delta = "500ms" 325 | # How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) 326 | timeout_precommit = "1s" 327 | # How much the timeout_precommit increases with each round 328 | timeout_precommit_delta = "500ms" 329 | # How long we wait after committing a block, before starting on the new 330 | # height (this gives us a chance to receive some more precommits, even 331 | # though we already have +2/3). 332 | timeout_commit = "5s" 333 | 334 | # How many blocks to look back to check existence of the node's consensus votes before joining consensus 335 | # When non-zero, the node will panic upon restart 336 | # if the same consensus key was used to sign {double_sign_check_height} last blocks. 337 | # So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. 338 | double_sign_check_height = 0 339 | 340 | # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) 341 | skip_timeout_commit = false 342 | 343 | # EmptyBlocks mode and possible interval between empty blocks 344 | create_empty_blocks = true 345 | create_empty_blocks_interval = "0s" 346 | 347 | # Reactor sleep duration parameters 348 | peer_gossip_sleep_duration = "100ms" 349 | peer_query_maj23_sleep_duration = "2s" 350 | 351 | ####################################################### 352 | ### Transaction Indexer Configuration Options ### 353 | ####################################################### 354 | [tx_index] 355 | 356 | # What indexer to use for transactions 357 | # 358 | # The application will set which txs to index. In some cases a node operator will be able 359 | # to decide which txs to index based on configuration set in the application. 360 | # 361 | # Options: 362 | # 1) "null" 363 | # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). 364 | # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. 365 | indexer = "kv" 366 | 367 | ####################################################### 368 | ### Instrumentation Configuration Options ### 369 | ####################################################### 370 | [instrumentation] 371 | 372 | # When true, Prometheus metrics are served under /metrics on 373 | # PrometheusListenAddr. 374 | # Check out the documentation for the list of available metrics. 375 | prometheus = false 376 | 377 | # Address to listen for Prometheus collector(s) connections 378 | prometheus_listen_addr = ":26660" 379 | 380 | # Maximum number of simultaneous connections. 381 | # If you want to accept a larger number than the default, make sure 382 | # you increase your OS limits. 383 | # 0 - unlimited. 384 | max_open_connections = 3 385 | 386 | # Instrumentation namespace 387 | namespace = "tendermint" 388 | -------------------------------------------------------------------------------- /musselnet/config/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_hash": "", 3 | "app_state": { 4 | "auth": { 5 | "accounts": [ 6 | { 7 | "@type": "/cosmos.auth.v1beta1.BaseAccount", 8 | "account_number": "0", 9 | "address": "wasm1dncllujyss2rrxy4dqd7xj5jf2n7eg7jtrmp5t", 10 | "pub_key": null, 11 | "sequence": "0" 12 | } 13 | ], 14 | "params": { 15 | "max_memo_characters": "256", 16 | "sig_verify_cost_ed25519": "590", 17 | "sig_verify_cost_secp256k1": "1000", 18 | "tx_sig_limit": "7", 19 | "tx_size_cost_per_byte": "10" 20 | } 21 | }, 22 | "bank": { 23 | "balances": [ 24 | { 25 | "address": "wasm1dncllujyss2rrxy4dqd7xj5jf2n7eg7jtrmp5t", 26 | "coins": [ 27 | { 28 | "amount": "10000000000000000000", 29 | "denom": "ufrites" 30 | }, 31 | { 32 | "amount": "10000000000000000000", 33 | "denom": "umayo" 34 | } 35 | ] 36 | } 37 | ], 38 | "denom_metadata": [], 39 | "params": { 40 | "default_send_enabled": true, 41 | "send_enabled": [] 42 | }, 43 | "supply": [] 44 | }, 45 | "capability": { 46 | "index": "1", 47 | "owners": [] 48 | }, 49 | "crisis": { 50 | "constant_fee": { 51 | "amount": "1000", 52 | "denom": "ufrites" 53 | } 54 | }, 55 | "distribution": { 56 | "delegator_starting_infos": [], 57 | "delegator_withdraw_infos": [], 58 | "fee_pool": { 59 | "community_pool": [] 60 | }, 61 | "outstanding_rewards": [], 62 | "params": { 63 | "base_proposer_reward": "0.010000000000000000", 64 | "bonus_proposer_reward": "0.040000000000000000", 65 | "community_tax": "0.020000000000000000", 66 | "withdraw_addr_enabled": true 67 | }, 68 | "previous_proposer": "", 69 | "validator_accumulated_commissions": [], 70 | "validator_current_rewards": [], 71 | "validator_historical_rewards": [], 72 | "validator_slash_events": [] 73 | }, 74 | "evidence": { 75 | "evidence": [] 76 | }, 77 | "genutil": { 78 | "gen_txs": [ 79 | { 80 | "auth_info": { 81 | "fee": { 82 | "amount": [], 83 | "gas_limit": "200000", 84 | "granter": "", 85 | "payer": "" 86 | }, 87 | "signer_infos": [ 88 | { 89 | "mode_info": { 90 | "single": { 91 | "mode": "SIGN_MODE_DIRECT" 92 | } 93 | }, 94 | "public_key": { 95 | "@type": "/cosmos.crypto.secp256k1.PubKey", 96 | "key": "ArrXBiPT6KmvKGAEr/Bb9GX37oD7fh0zhfPTl7gbFnkE" 97 | }, 98 | "sequence": "0" 99 | } 100 | ] 101 | }, 102 | "body": { 103 | "extension_options": [], 104 | "memo": "4b29be1f604658cd06f1ee51dfb55a717e2b8c96@10.76.173.146:26656", 105 | "messages": [ 106 | { 107 | "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", 108 | "commission": { 109 | "max_change_rate": "0.010000000000000000", 110 | "max_rate": "0.200000000000000000", 111 | "rate": "0.100000000000000000" 112 | }, 113 | "delegator_address": "wasm1dncllujyss2rrxy4dqd7xj5jf2n7eg7jtrmp5t", 114 | "description": { 115 | "details": "", 116 | "identity": "", 117 | "moniker": "confio", 118 | "security_contact": "", 119 | "website": "" 120 | }, 121 | "min_self_delegation": "1", 122 | "pubkey": { 123 | "@type": "/cosmos.crypto.ed25519.PubKey", 124 | "key": "uekLdtP6ofaGyLK3Z1Bc6GTWt2UDfU1PF+JGnJyeKnU=" 125 | }, 126 | "validator_address": "wasmvaloper1dncllujyss2rrxy4dqd7xj5jf2n7eg7j7lwa63", 127 | "value": { 128 | "amount": "2110099000", 129 | "denom": "ufrites" 130 | } 131 | } 132 | ], 133 | "non_critical_extension_options": [], 134 | "timeout_height": "0" 135 | }, 136 | "signatures": [ 137 | "X0t+ZvNTMEXhIV8hvnemp+WPvZc/3gf7f6wat63IL49QsF4FZla/roNVBAIagvweR6g+icHdY5hXgvaLaOkrOA==" 138 | ] 139 | } 140 | ] 141 | }, 142 | "gov": { 143 | "deposit_params": { 144 | "max_deposit_period": "172800s", 145 | "min_deposit": [ 146 | { 147 | "amount": "10000000", 148 | "denom": "ufrites" 149 | } 150 | ] 151 | }, 152 | "deposits": [], 153 | "proposals": [], 154 | "starting_proposal_id": "1", 155 | "tally_params": { 156 | "quorum": "0.334000000000000000", 157 | "threshold": "0.500000000000000000", 158 | "veto_threshold": "0.334000000000000000" 159 | }, 160 | "votes": [], 161 | "voting_params": { 162 | "voting_period": "172800s" 163 | } 164 | }, 165 | "ibc": { 166 | "channel_genesis": { 167 | "ack_sequences": [], 168 | "acknowledgements": [], 169 | "channels": [], 170 | "commitments": [], 171 | "receipts": [], 172 | "recv_sequences": [], 173 | "send_sequences": [] 174 | }, 175 | "client_genesis": { 176 | "clients": [], 177 | "clients_consensus": [], 178 | "create_localhost": false 179 | }, 180 | "connection_genesis": { 181 | "client_connection_paths": [], 182 | "connections": [] 183 | } 184 | }, 185 | "mint": { 186 | "minter": { 187 | "annual_provisions": "0.000000000000000000", 188 | "inflation": "0.130000000000000000" 189 | }, 190 | "params": { 191 | "blocks_per_year": "6311520", 192 | "goal_bonded": "0.670000000000000000", 193 | "inflation_max": "0.200000000000000000", 194 | "inflation_min": "0.070000000000000000", 195 | "inflation_rate_change": "0.130000000000000000", 196 | "mint_denom": "stake" 197 | } 198 | }, 199 | "params": null, 200 | "slashing": { 201 | "missed_blocks": [], 202 | "params": { 203 | "downtime_jail_duration": "600s", 204 | "min_signed_per_window": "0.500000000000000000", 205 | "signed_blocks_window": "100", 206 | "slash_fraction_double_sign": "0.050000000000000000", 207 | "slash_fraction_downtime": "0.010000000000000000" 208 | }, 209 | "signing_infos": [] 210 | }, 211 | "staking": { 212 | "delegations": [], 213 | "exported": false, 214 | "last_total_power": "0", 215 | "last_validator_powers": [], 216 | "params": { 217 | "bond_denom": "ufrites", 218 | "historical_entries": 100, 219 | "max_entries": 7, 220 | "max_validators": 100, 221 | "unbonding_time": "1814400s" 222 | }, 223 | "redelegations": [], 224 | "unbonding_delegations": [], 225 | "validators": [] 226 | }, 227 | "transfer": { 228 | "denom_traces": [], 229 | "params": { 230 | "receive_enabled": true, 231 | "send_enabled": true 232 | }, 233 | "port_id": "transfer" 234 | }, 235 | "upgrade": {}, 236 | "vesting": {}, 237 | "wasm": { 238 | "codes": [], 239 | "contracts": [], 240 | "params": { 241 | "code_upload_access": { 242 | "address": "", 243 | "permission": "Everybody" 244 | }, 245 | "instantiate_default_permission": "Everybody", 246 | "max_wasm_code_size": "716800" 247 | }, 248 | "sequences": [] 249 | } 250 | }, 251 | "chain_id": "musselnet", 252 | "consensus_params": { 253 | "block": { 254 | "max_bytes": "22020096", 255 | "max_gas": "-1", 256 | "time_iota_ms": "1000" 257 | }, 258 | "evidence": { 259 | "max_age_duration": "172800000000000", 260 | "max_age_num_blocks": "100000", 261 | "max_bytes": "1048576" 262 | }, 263 | "validator": { 264 | "pub_key_types": [ 265 | "ed25519" 266 | ] 267 | }, 268 | "version": {} 269 | }, 270 | "genesis_time": "2020-11-24T12:00:00Z", 271 | "initial_height": "1" 272 | } 273 | -------------------------------------------------------------------------------- /musselnet/config/gentx/gentx-4b29be1f604658cd06f1ee51dfb55a717e2b8c96.json: -------------------------------------------------------------------------------- 1 | {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"confio","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"wasm1dncllujyss2rrxy4dqd7xj5jf2n7eg7jtrmp5t","validator_address":"wasmvaloper1dncllujyss2rrxy4dqd7xj5jf2n7eg7j7lwa63","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"uekLdtP6ofaGyLK3Z1Bc6GTWt2UDfU1PF+JGnJyeKnU="},"value":{"denom":"ufrites","amount":"2110099000"}}],"memo":"4b29be1f604658cd06f1ee51dfb55a717e2b8c96@10.76.173.146:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"ArrXBiPT6KmvKGAEr/Bb9GX37oD7fh0zhfPTl7gbFnkE"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["X0t+ZvNTMEXhIV8hvnemp+WPvZc/3gf7f6wat63IL49QsF4FZla/roNVBAIagvweR6g+icHdY5hXgvaLaOkrOA=="]} 2 | -------------------------------------------------------------------------------- /musselnet/defaults.env: -------------------------------------------------------------------------------- 1 | export CHAIN_ID="musselnet" 2 | export TESTNET_NAME="musselnet" 3 | export WASMD_VERSION="v0.12.1" 4 | export CONFIG_DIR=".wasmd" 5 | export BINARY="wasmd" 6 | 7 | export COSMJS_VERSION="v0.24.0" 8 | export GENESIS_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/musselnet/config/genesis.json" 9 | export APP_CONFIG_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/musselnet/config/app.toml" 10 | export CONFIG_URL="https://raw.githubusercontent.com/CosmWasm/testnets/master/musselnet/config/config.toml" 11 | 12 | export RPC="https://rpc.musselnet.cosmwasm.com:443" 13 | export LCD="https://lcd.musselnet.cosmwasm.com" 14 | export FAUCET="https://faucet.musselnet.cosmwasm.com" 15 | export SEED_NODE="41f1b8a8188b071609d11f22914f279c93771c4d@78.47.158.178:26656" 16 | --------------------------------------------------------------------------------