cosmos-sdk/simapp
Jeancarlo Barrios 754ca3169e
feat: add tx limit to mempool (#14014)
* feat: add bounding max tx to mempool

* add bounded condition

* sligh improvement on generator

* remove unbouded option

* add test

* added mempool options mechanism

* mising test

* seting mempool

* change function name

* change function name

* failing test

* Revert "failing test"

This reverts commit d527982b0d4ec826ff680afb8f43ac1d71809ccf.

* fix import block

* changelog entries

* add ability to do unbounded mempool

* remove unesesary variable

* small comments

* change 0 to mean unbounded

* t

* small test fix

* add the ability to be bounded unbounded and disabled

* t

* set default maxtx

* Update docs/docs/building-apps/02-app-mempool.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* example for opts

* remove superflues logs entry

* add mempool to configurations

* fix more understandable name

* remove table in favor of bulletpoints

* sender nonce to unbounded

* Update docs/docs/building-apps/02-app-mempool.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update types/mempool/sender_nonce.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update types/mempool/sender_nonce.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update docs/docs/building-apps/02-app-mempool.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update server/config/config.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* t

* add comment for options

* fix inport

* fix inport

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Emmanuel T Odeke <emmanuel@orijtech.com>
2022-12-02 00:39:55 +00:00
..
params refactor: remove simapp from x/staking module (#13101) 2022-08-31 14:50:22 +00:00
simd feat: add tx limit to mempool (#14014) 2022-12-02 00:39:55 +00:00
app_config.go docs: add docs about x/auth/tx (#14021) 2022-11-27 20:30:23 +00:00
app_test.go test: fix TestSimAppExportAndBlockedAddrs for simapp v1 (#14036) 2022-11-28 11:37:13 +00:00
app_v2.go docs: add docs about x/auth/tx (#14021) 2022-11-27 20:30:23 +00:00
app.go test: fix TestSimAppExportAndBlockedAddrs for simapp v1 (#14036) 2022-11-28 11:37:13 +00:00
export.go refactor: split ExportGenesis into two functions to maintain backwards compatibility (#13448) 2022-10-04 22:42:58 +00:00
genesis_account_test.go refactor: create go.mod for simapp (#13130) 2022-09-07 18:14:22 +00:00
genesis_account.go x/auth: remove alias.go usage (#6440) 2020-06-17 14:42:27 -04:00
genesis.go x/authz: audit updates (#9042) 2021-05-06 18:23:48 +00:00
go.mod build(deps): Bump github.com/cosmos/cosmos-proto from 1.0.0-alpha8 to 1.0.0-beta.1 (#14122) 2022-12-01 17:33:41 +00:00
go.sum build(deps): Bump github.com/cosmos/cosmos-proto from 1.0.0-alpha8 to 1.0.0-beta.1 (#14122) 2022-12-01 17:33:41 +00:00
README.md feat: migrate to docusaurus (#13471) 2022-10-10 14:01:53 +00:00
sim_bench_test.go refactor!: extract simulation helpers out of simapp (#13402) 2022-09-27 21:19:44 +02:00
sim_test.go fix: fix simulations failure (#13512) 2022-10-12 07:24:58 +00:00
sonar-project.properties ci: configure monorepo sonarcloud (#13944) 2022-11-23 10:47:18 +00:00
state.go refactor!: extract simulation helpers out of simapp (#13402) 2022-09-27 21:19:44 +02:00
test_helpers.go refactor: cleanup simapp (#13757) 2022-11-04 08:51:18 +01:00
testutil_network_test.go refactor: create go.mod for simapp (#13130) 2022-09-07 18:14:22 +00:00
upgrades.go feat!: consensus module (#12905) 2022-10-05 18:06:24 +00:00

sidebar_position
1

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.

  1. From the root directory of the Cosmos SDK repository, run $ make build. This will build the simd binary inside a new build directory. The following instructions are run from inside the build directory.

  2. If you've run simd before, you may need to reset your database before starting a new testnet. You can reset your database with the following command: $ ./simd tendermint unsafe-reset-all.

  3. $ ./simd init [moniker] --chain-id [chain-id]. This will initialize a new working directory at the default location ~/.simapp. You need to provide a "moniker" and a "chain id". These two names can be anything, but you will need to use the same "chain id" in the following steps.

  4. $ ./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.

  5. $ ./simd add-genesis-account [key_name] [amount], where key_name is the same key name as before; and amount is something like 10000000000000000000000000stake.

  6. $ ./simd gentx [key_name] [amount] --chain-id [chain-id]. This will create the genesis transaction for your new chain. Here amount should be at least 1000000000stake. If you provide too much or too little, you will encounter an error when starting your node.

  7. Now, one person needs to create the genesis file genesis.json using the genesis transactions from every participant, by gathering all the genesis transactions under config/gentx and then calling $ ./simd collect-gentxs. This will create a new genesis.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).

  8. Once you've received the super genesis file, overwrite your original genesis.json file with the new super genesis.json.

  9. 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. The output will be the hex-encoded validator_address. The default port is 26656.

  10. 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.