Skip to content

Commit

Permalink
Provide enough stake to accounts for depositing on a proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Jul 27, 2021
1 parent a264c25 commit ba9facf
Show file tree
Hide file tree
Showing 27 changed files with 114 additions and 95 deletions.
2 changes: 1 addition & 1 deletion packages/stargate/src/testutils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const unused = {
address: "cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u",
accountNumber: 16,
sequence: 0,
balanceStaking: "10000000", // 10 STAKE
balanceStaking: "2000000000", // 2000 STAKE
balanceFee: "1000000000", // 1000 COSM
};

Expand Down
1 change: 1 addition & 0 deletions scripts/simapp/generate_template_slow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# Create template for slow simapp
(
cd "$SCRIPT_DIR"
rm -rf template_slow
cp -R template template_slow
chmod +x "$SCRIPT_DIR/template_slow/setup.sh"
chmod +x "$SCRIPT_DIR/template_slow/run_simd.sh"
Expand Down
4 changes: 2 additions & 2 deletions scripts/simapp/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ MONIKER=${MONIKER:-simd-moniker}
STAKE=${STAKE_TOKEN:-ustake}
FEE=${FEE_TOKEN:-ucosm}

# 10 STAKE and 1000 COSM
START_BALANCE="10000000$STAKE,1000000000$FEE"
# 2000 STAKE and 1000 COSM
START_BALANCE="2000000000$STAKE,1000000000$FEE"

echo "Creating genesis ..."
simd init --chain-id "$CHAIN_ID" "$MONIKER"
Expand Down
8 changes: 4 additions & 4 deletions scripts/simapp/template/.simapp/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ max_body_bytes = 1000000
max_header_bytes = 1048576

# The path to a file containing certificate that is used to create the HTTPS server.
# Migth be either absolute path or path related to tendermint's config directory.
# Might be either absolute path or path related to Tendermint's config directory.
# If the certificate is signed by a certificate authority,
# the certFile should be the concatenation of the server's certificate, any intermediates,
# and the CA's certificate.
Expand All @@ -158,8 +158,8 @@ max_header_bytes = 1048576
tls_cert_file = ""

# The path to a file containing matching private key that is used to create the HTTPS server.
# Migth be either absolute path or path related to tendermint's config directory.
# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server.
# Might be either absolute path or path related to Tendermint's config directory.
# NOTE: both tls-cert-file and tls-key-file must be present for Tendermint to create HTTPS server.
# Otherwise, HTTP server is run.
tls_key_file = ""

Expand Down Expand Up @@ -240,7 +240,7 @@ handshake_timeout = "20s"
dial_timeout = "3s"

#######################################################
### Mempool Configurattion Option ###
### Mempool Configuration Option ###
#######################################################
[mempool]

Expand Down
71 changes: 40 additions & 31 deletions scripts/simapp/template/.simapp/config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"account_number": "0",
"address": "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq",
"address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679",
"pub_key": null,
"sequence": "0"
},
Expand Down Expand Up @@ -169,7 +169,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -182,7 +182,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -195,7 +195,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -208,7 +208,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -221,7 +221,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -234,7 +234,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -247,7 +247,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -260,7 +260,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -273,7 +273,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -286,7 +286,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -299,7 +299,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -312,7 +312,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -325,7 +325,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -338,7 +338,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -351,7 +351,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -364,7 +364,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -377,20 +377,20 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
},
{
"address": "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq",
"address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679",
"coins": [
{
"amount": "1000000000",
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -403,7 +403,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -416,7 +416,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -429,7 +429,7 @@
"denom": "ucosm"
},
{
"amount": "10000000",
"amount": "2000000000",
"denom": "ustake"
}
]
Expand All @@ -440,7 +440,16 @@
"default_send_enabled": true,
"send_enabled": []
},
"supply": []
"supply": [
{
"amount": "21000000000",
"denom": "ucosm"
},
{
"amount": "42000000000",
"denom": "ustake"
}
]
},
"capability": {
"index": "1",
Expand Down Expand Up @@ -493,15 +502,15 @@
},
"public_key": {
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "Ap1EN+TjP611NX0PicqFJXknbLmxBbhgoCgGtRF7SLQk"
"key": "AtDcuH4cX1eaxZrJ5shheLG3tXPAoV4awoIZmNQtQxmf"
},
"sequence": "0"
}
]
},
"body": {
"extension_options": [],
"memo": "e81f12503951dfcf1d6419b8b7e5ac90f466c250@172.17.0.2:26656",
"memo": "ad7cdbcfe545eaaaea99378bc70bf22eef3401a4@172.17.0.2:26656",
"messages": [
{
"@type": "/cosmos.staking.v1beta1.MsgCreateValidator",
Expand All @@ -510,7 +519,7 @@
"max_rate": "0.200000000000000000",
"rate": "0.100000000000000000"
},
"delegator_address": "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq",
"delegator_address": "cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679",
"description": {
"details": "",
"identity": "",
Expand All @@ -521,9 +530,9 @@
"min_self_delegation": "1",
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "L6f41DzvG/B+jUIc+avA3d0+BOhqgKB0pfiYSaug+2I="
"key": "cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU="
},
"validator_address": "cosmosvaloper1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5knwegn",
"validator_address": "cosmosvaloper1urk9gy7cfws0ak9x5nu7lx4un9n6gqkrp230jk",
"value": {
"amount": "3000000",
"denom": "ustake"
Expand All @@ -534,7 +543,7 @@
"timeout_height": "0"
},
"signatures": [
"GP2C29mfQ414xKeup0qxOqLEJK7mMoIghXJEqA/8bNxrtuvpzoF78aARH/ywm40bxYj95xPkBPVYAdxII8aUtg=="
"XCvdrkjv/gl819FCH0rnfDiBm6xIc3Kj1EiN3c3tI/MSekAEEBqNT4FuFFtjVOgs5WT6RZTY75h1JxvHmMfm4g=="
]
}
]
Expand Down Expand Up @@ -911,6 +920,6 @@
},
"version": {}
},
"genesis_time": "2021-01-11T12:11:46.0887675Z",
"genesis_time": "2021-07-27T15:14:14.2361126Z",
"initial_height": "1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"simd-moniker","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos1urk9gy7cfws0ak9x5nu7lx4un9n6gqkry79679","validator_address":"cosmosvaloper1urk9gy7cfws0ak9x5nu7lx4un9n6gqkrp230jk","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU="},"value":{"denom":"ustake","amount":"3000000"}}],"memo":"[email protected]:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtDcuH4cX1eaxZrJ5shheLG3tXPAoV4awoIZmNQtQxmf"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["XCvdrkjv/gl819FCH0rnfDiBm6xIc3Kj1EiN3c3tI/MSekAEEBqNT4FuFFtjVOgs5WT6RZTY75h1JxvHmMfm4g=="]}

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/simapp/template/.simapp/config/node_key.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"4alYqE54aHwoOT0qMzKBav6G4Ld9/Y8/5/Cmd8G5+Qe4kxI6HzYxlwFEfxWgBwTRVcXPHCVn2LF9wVNHZQaDVw=="}}
{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"VJWbZaD0jAkAh4VBLS9I2FDFwAKhbCYjs/ycVEDRNW6teVZgaxLnZ+mW3sMhvdIKY99DaD55h9L1MXkx8WsQ+g=="}}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"address": "E359FA31E749FFDC571AA4E5F629F70CD53D328A",
"address": "30AF3420A11D7357C54EB716B209D4C3707D1BF3",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "L6f41DzvG/B+jUIc+avA3d0+BOhqgKB0pfiYSaug+2I="
"value": "cUJRDwHyty8ZMO3ctSqPvezcOP2SYp1SDCHd1/SpAuU="
},
"priv_key": {
"type": "tendermint/PrivKeyEd25519",
"value": "6K2L2FmV0/ncDTWffaWEVahCg6kJb9hW0rXVlVweqYwvp/jUPO8b8H6NQhz5q8Dd3T4E6GqAoHSl+JhJq6D7Yg=="
"value": "H/y/XQLnbLKzR3Ey6VCCw0tu87VbA3GO4goA+PPz7VRxQlEPAfK3Lxkw7dy1Ko+97Nw4/ZJinVIMId3X9KkC5Q=="
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"height": "0",
"round": 0,
"step": 0
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wNy0yNyAxNToxNDoxNC42ODc0MDc3ICswMDAwIFVUQyBtPSswLjIyNTIwMDMwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IjgtN0l6TXhWUmhrMGlBM2kifQ.9c48lG_ZZDrQ5esu0Tw45oacS4V22SLEIChtqW14z17rJtZuS7XYuw.aVNkJGer3Dv--lIR.ulhj65STVqG5ciBObgXc-oyYndKuOzvp03PH9wnh3WTg77SSjwxpEkIMwd9DpkcfBSL0qBvN7aXLAFEG59ydL5GamUTOU94xFISet6dKjxSWbkBmq4_zWmUbe0Qas4eVvPsb6U5w0PIyVTkZwAHDeMtdaEXthBU1JE4biOoi0uICCJkFyqO01q5nrbN7d45EE8vijdPusxfn-abtvSvXLUTcr50nt_w5_YbxsSZnG52Ty2TiV_fjn_Wq.Aj72rrWgBh9fHj1CIoJ7lA

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/simapp/template/.simapp/keyhash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$2a$10$dx8lAQW4iIe..rmPZVdx1.6ZvJGlXxPp8mzaAd2WPwTJtGfUIrWuu
$2a$10$PUzdQ9WON1SgvDtewSKIUerA9LxW51qGoHj2EGZ5TT6oKfHXU7hcK
2 changes: 1 addition & 1 deletion scripts/simapp/template/.simapp/validator.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wMS0xMSAxMjoxMTo0Ni4zODY3MDU0ICswMDAwIFVUQyBtPSswLjE3MDE0NDYwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IktrOUhzdlZ3aTBOaDNwZG0ifQ.bVmLNX-QD16lHCNk1wNIPlQagaPwdSqD8Ci8-WwusRlWmkpNizpawA.WespKvIzDRC1AIqU.y8pUplHhRRZNHqtTG1HPvi-RZiSHZM1ari0eFCN9ik42cEeczmNqLsUOluQcjIxS2-JUaxWvUhRLKyf3354l5Vegl8_Lq7WufRgZaV6nreGjfprXgT8b9k25y78MS1Iv-Yq067uHJUsz0vn0EHyeWW0YpVZ3AdG_c90F5QElt-foFRBn_bQlQc3i2A6Us2Gw2YqaQyosa6AX1jKInsneVKoMjrc3PWSvjQxMXeYKkytaqU83_QECZzVZP2bvcD5tApWOjWhzlWPTiS02m1GEzuXAHm3SucH_0gGwd31plQ3WQRlKxYulUTZJiuzvM9yoB5oXEolOlBcRgGMFiu1ENmqPS1LB-KDIZdVNZFO5kFM1ubGh.zDGJMk5YwODgn5v6nZ9FtQ
eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wNy0yNyAxNToxNDoxNC42Njk0MzQ3ICswMDAwIFVUQyBtPSswLjIwNzI1MDUwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IjB4YU1QYjR4RVVHS29JeW4ifQ.jLK0jNefYAdHELJr3MPhajfSFJfTAre0yBzqnvS1rhzxou2ZMyMJ3w.4h0CQ8NAekW0lshZ.Cusi2aIkUmPlVKdkzjK7SpgrN8xrFcm_L3mf1zTNFfS1GEKHIjMd7a-c7XVOM06hXF_MuIvdCrlHRsWAzX9HgSPQ_T4aQDx8dzdj6iRxv0rwAKjSVLMpuqT3ASSENuPkP21niOuPCnKohVYACq0hpsrYoEt0wMSqnUF7Smz7-hbYmp4EleCEcvwas4qs2LM_hZWvAEFnNdDGFWeyGrNTXXbwXBpCFnWXH-F9FHVtexlwo0OCTJscWFazn8LVGOepO4mQRnsQQ4XMG6WL18Yclz7TmPi3WKkOHOdyhydu7KX_tAISy-jVpMX41kb5OLABuxXYSM6Q1wnyY4SUHvExJ1b41lSER11tIopHbh_Au6ifRRtD.kbUtqwd5x8QH52nHddfwcA
4 changes: 2 additions & 2 deletions scripts/simapp/template/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ MONIKER=${MONIKER:-simd-moniker}
STAKE=${STAKE_TOKEN:-ustake}
FEE=${FEE_TOKEN:-ucosm}

# 10 STAKE and 1000 COSM
START_BALANCE="10000000$STAKE,1000000000$FEE"
# 2000 STAKE and 1000 COSM
START_BALANCE="2000000000$STAKE,1000000000$FEE"

echo "Creating genesis ..."
simd init --chain-id "$CHAIN_ID" "$MONIKER"
Expand Down
Loading

0 comments on commit ba9facf

Please sign in to comment.