c95de9c417
* WIP: Msg authorization module added * fixing errors * fixed errors * fixed module.go * Add msg_tests * fixes compile issues * fix test * fix test * Add msg types tests * Fix Getmsgs * fixed codec issue * Fix syntax issues * Fix keeper * fixed proto issues * Fix keeper tests * fixed router in keeper * Fix query proto * Fix cli txs * Add grpc query client implementation * Add grpc-keeper test * Add grpc query tests Add revoke and exec authorization cli commands * Fix linting issues * Fix cli query * fix lint errors * Add Genesis state * Fix query authorization * Review changes * Fix grant authorization handler * Add cli tests * Add cli tests * Fix genesis test * Fix issues * update module to use proto msg services * Add simultion tests * Fix lint * fix lint * WIP simulations * WIP simulations * add msg tests * Fix simulation * Fix errors * fix genesis import export * fix sim tests * fix sim * fix test * Register RegisterMsgServer * WIP * WIP * Update keeper test * change msg_authorization module name to authz * changed type conversion for serviceMsg * serviceMsg change to any * Fix issues * fix msg tests * fix errors * proto format * remove LegacyQuerierHandler * Use MsgServiceRouter * fix keeper-test * fix query authorizations * fix NewCmdSendAs * fix simtests * fix error * fix lint * fix lint * add tests for generic authorization * fix imports * format * Update error message * remove println * add query all grants * Add pagination for queries * format * fix lint * review changes * fix grpc tests * add pagination to cli query * review changes * replace panic with error * lint * fix errors * fix tests * remove gogoproto extensions * update function doc * review changes * fix errors * fix query flags * fix grpc query test * init service-msg * remove unsed field * add proto-codec for simulations * fix codec issue * update authz simulations * change msgauth to authz * add check for invalid msg-type * change expiration flag to Unix * doc * update module.go * fix sims * fix grant-authorization sims * fix error * fix error * add build flag * fix codec issue * rename * review changes * format * review changes * go.mod * refactor * proto-gen * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update x/authz/keeper/grpc_query_test.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Fix review comments * fix protogen * Follow Msg...Request style for msg requests * update comment * Fix error codes * fix review comment * improve msg validations * Handle error in casting msgs * rename actor => grantStoreKey * add godoc * add godoc * Fix simulations * Fix cli, cli_tests * Fix simulations * rename to GetOrRevokeAuthorization * Move events to keeper * Fix fmt * Update x/authz/client/cli/tx.go Co-authored-by: Amaury <amaury.martiny@protonmail.com> * rename actor * fix lint Co-authored-by: atheesh <atheesh@vitwit.com> Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com> Co-authored-by: MD Aleem <72057206+aleem1413@users.noreply.github.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> |
||
---|---|---|
.. | ||
helpers | ||
params | ||
simd | ||
README.md | ||
app.go | ||
app_test.go | ||
config.go | ||
encoding.go | ||
export.go | ||
genesis.go | ||
genesis_account.go | ||
genesis_account_test.go | ||
sim_bench_test.go | ||
sim_test.go | ||
state.go | ||
test_helpers.go | ||
types.go | ||
utils.go | ||
utils_test.go |
README.md
order |
---|
false |
simapp
simapp is an application built using the Cosmos SDK for testing and educational purposes.
Running testnets with simd
If you want to spin up a quick testnet with your friends, you can follow these steps. Unless otherwise noted, every step must be done by everyone who wants to participate in this testnet.
-
$ make build
. This will build thesimd
binary and install it in your Cosmos SDK repo, inside a newbuild
directory. The following instructions are run from inside that directory. -
If you've run
simd
before, you may need to reset your database before starting a new testnet:$ ./simd unsafe-reset-all
-
$ ./simd init [moniker]
. This will initialize a new working directory, by default at~/.simapp
. You need a provide a "moniker," but it doesn't matter what it is. -
$ ./simd keys add [key_name]
. This will create a new key, with a name of your choosing. Save the output of this command somewhere; you'll need the address generated here later. -
$ ./simd add-genesis-account $(simd keys show [key_name] -a) [amount]
, wherekey_name
is the same key name as before; andamount
is something like10000000000000000000000000stake
. -
$ ./simd gentx [key_name] [amount] --chain-id [chain-id]
. This will create the genesis transaction for your new chain. -
Now, one person needs to create the genesis file
genesis.json
using the genesis transactions from every participant, by gathering all the genesis transactions underconfig/gentx
and then calling./simd collect-gentxs
. This will create a newgenesis.json
file that includes data from all the validators (we sometimes call it the "super genesis file" to distinguish it from single-validator genesis files). -
Once you've received the super genesis file, overwrite your original
genesis.json
file with the new supergenesis.json
. -
Modify your
config/config.toml
(in the simapp working directory) to include the other participants as persistent peers:# Comma separated list of nodes to keep persistent connections to persistent_peers = "[validator address]@[ip address]:[port],[validator address]@[ip address]:[port]"
You can find
validator address
by running./simd tendermint show-node-id
. (It will be hex-encoded.) By default,port
is 26656. -
Now you can start your nodes:
$ ./simd start
.
Now you have a small testnet that you can use to try out changes to the Cosmos SDK or Tendermint!
NOTE: Sometimes creating the network through the collect-gentxs
will fail, and validators will start
in a funny state (and then panic). If this happens, you can try to create and start the network first
with a single validator and then add additional validators using a create-validator
transaction.