cosmos-sdk/simapp
2024-09-11 09:18:13 +00:00
..
params chore!: remove deprecated code (#17985) 2023-10-06 10:40:34 +00:00
simd refactor(core): move amino registrar and drop legacy package (#21531) 2024-09-05 11:44:52 +00:00
v2 build(deps): Bump google.golang.org/grpc from 1.66.0 to 1.66.1 (#21622) 2024-09-10 13:33:05 +00:00
abci.go chore: use comet api pkg instead of comet alias (#20614) 2024-06-11 08:46:04 +00:00
ante.go refactor: remove consensus as a imported type in modules (#21480) 2024-09-10 15:36:33 +00:00
app_config.go feat(bank/v2): create module boilerplate (#21559) 2024-09-06 16:04:21 +00:00
app_di.go refactor: remove consensus as a imported type in modules (#21480) 2024-09-10 15:36:33 +00:00
app_test.go feat(bank/v2): create module boilerplate (#21559) 2024-09-06 16:04:21 +00:00
app.go refactor: remove consensus as a imported type in modules (#21480) 2024-09-10 15:36:33 +00:00
CHANGELOG.md feat: unify version modifier for v2 (#21508) 2024-09-06 15:56:29 +00:00
export.go refactor: decouple comet from modules (#21382) 2024-09-11 09:18:13 +00:00
genesis_account_test.go refactor: revert auth extraction (#21507) 2024-09-03 21:12:21 +00:00
genesis_account.go refactor: revert auth extraction (#21507) 2024-09-03 21:12:21 +00:00
genesis.go refactor!: kill basic manager (#19512) 2024-02-22 14:44:49 +00:00
go.mod build(deps): Bump google.golang.org/grpc from 1.66.0 to 1.66.1 (#21622) 2024-09-10 13:33:05 +00:00
go.sum build(deps): Bump google.golang.org/grpc from 1.66.0 to 1.66.1 (#21622) 2024-09-10 13:33:05 +00:00
gomod2nix.toml feat: replace the cosmos-db.DB interface with core/store interface (#21450) 2024-08-30 21:25:25 +00:00
mint_fn.go refactor: revert auth extraction (#21507) 2024-09-03 21:12:21 +00:00
README.md docs(simapp): refactored README readability and more usability (#21383) 2024-08-27 03:45:52 +00:00
sim_bench_test.go chore: cleanups after #21450 (#21573) 2024-09-06 10:47:43 +00:00
sim_test.go refactor(types,client,simapp): remove some address String() calls (#21455) 2024-09-02 10:28:12 +00:00
test_helpers.go refactor: revert auth extraction (#21507) 2024-09-03 21:12:21 +00:00
testutil_network_test.go refactor(tests): testutil.Network as an interface (#18389) 2023-11-08 18:38:57 +00:00
upgrades_test.go refactor: revert auth extraction (#21507) 2024-09-03 21:12:21 +00:00
upgrades.go feat(bank/v2): create module boilerplate (#21559) 2024-09-06 16:04:21 +00:00

sidebar_position
1

SimApp

SimApp is a CLI application built using the Cosmos SDK for testing and educational purposes.

Running testnets with simd

Except stated otherwise, all participants in the testnet must follow through with each step.

1. Download and Setup

Download the Cosmos SDK and unzip it. You can do this manually (via the GitHub UI) or with the git clone command.

git clone github.com/cosmos/cosmos-sdk.git

Next, run this command to build the simd binary in the build directory.

make build

Use the following command and skip all the next steps to configure your SimApp node:

make init-simapp

If youve run simd in the past, you may need to reset your database before starting up a new testnet. You can do that with this command:

# you need to provide the moniker and chain ID
$ ./simd init [moniker] --chain-id [chain-id]

The command should initialize a new working directory at the ~simapp location.

The moniker and chain-id can be anything but you need to use the same chain-id subsequently.

2. Create a New Key

Execute this command to create a new key.

 ./simd keys add [key_name]

The command will create a new key with your chosen name.

⚠️ Save the output somewhere safe; youll need the address later.

3. Add Genesis Account

Add a genesis account to your testnet blockchain.

$ ./simd genesis add-genesis-account [key_name] [amount]

Where key_name is the same key name as before, and the amount is something like 10000000000000000000000000stake.

4. Add the Genesis Transaction

This creates the genesis transaction for your testnet chain.

$ ./simd genesis gentx [key_name] [amount] --chain-id [chain-id]

The amount should be at least 1000000000stake. When you start your node, providing too much or too little may result in errors.

5. Create the Genesis File

A participant must create the genesis file genesis.json with every participant's transaction.

You can do this by gathering all the Genesis transactions under config/gentx and then executing this command.

$ ./simd genesis collect-gentxs

The command will create a new genesis.json file that includes data from all the validators. The command will create a new genesis.json file, including data from all the validators

Once you've received the super genesis file, overwrite your original genesis.json file with the new super genesis.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 executing:

$ ./simd comet show-node-id

The output will be the hex-encoded validator_address. The default port is 26656.

6. Start the Nodes

Finally, execute this command to start your nodes.

$ ./simd start

Now you have a small testnet that you can use to try out changes to the Cosmos SDK or CometBFT!

⚠️ NOTE: Sometimes, creating the network through the collect-gents 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.