* 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> |
||
|---|---|---|
| .. | ||
| params | ||
| simd | ||
| app_config.go | ||
| app_test.go | ||
| app_v2.go | ||
| app.go | ||
| export.go | ||
| genesis_account_test.go | ||
| genesis_account.go | ||
| genesis.go | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
| sim_bench_test.go | ||
| sim_test.go | ||
| sonar-project.properties | ||
| state.go | ||
| test_helpers.go | ||
| testutil_network_test.go | ||
| upgrades.go | ||
| 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.
-
From the root directory of the Cosmos SDK repository, run
$ make build. This will build thesimdbinary inside a newbuilddirectory. The following instructions are run from inside thebuilddirectory. -
If you've run
simdbefore, 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. -
$ ./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. -
$ ./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 [key_name] [amount], wherekey_nameis the same key name as before; andamountis something like10000000000000000000000000stake. -
$ ./simd gentx [key_name] [amount] --chain-id [chain-id]. This will create the genesis transaction for your new chain. Hereamountshould be at least1000000000stake. If you provide too much or too little, you will encounter an error when starting your node. -
Now, one person needs to create the genesis file
genesis.jsonusing the genesis transactions from every participant, by gathering all the genesis transactions underconfig/gentxand then calling$ ./simd collect-gentxs. This will create a newgenesis.jsonfile 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.jsonfile 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_addressby running$ ./simd tendermint show-node-id. The output will be the hex-encodedvalidator_address. The defaultportis 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.