Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simapp: provide instructions for building an app with variable parameters like N validators, M accounts etc #9014

Closed
2 of 4 tasks
odeke-em opened this issue Mar 28, 2021 · 5 comments
Assignees

Comments

@odeke-em
Copy link
Collaborator

Am coming here from a task in which am supposed to complete benchmarking by creating a variable app that has N validators, M accounts and I have burnt XX hours just trying to get an app to work, with many cryptic errors and a very huge surface area of complexity.
I reached out on the cosmos-sdk Discord channel but no responses.

I am not entirely a beginner to the cosmos-sdk but it is taking me lots of time that would be used in bringing performance and security wins. At least though we now have the ability to benchmark all the changes and compare them against baselines and report results. I am kindly opening this issue so that we can make things much more simpler, because if I am struggling picture the next person who picks up the cosmos-sdk and tries to build a simulated app.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@tac0turtle
Copy link
Member

tac0turtle commented Apr 8, 2021

Hey following up on this issue. This is not using the simulator correct? You are trying to spin up multiple nodes and submit transactions?

did you try using the testnet command?

simd testnet -h
testnet will create "v" number of directories and populate each with
necessary files (private validator, genesis, config, etc.).

Note, strict routability for addresses is turned off in the config file.

Example:
	simd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2

@tac0turtle
Copy link
Member

In talking with @fedekunze he mentioned this is not possible with the current simulator. @fedekunze can you confirm?

@robert-zaremba
Copy link
Collaborator

I don't @kaustubhkapatral is working on something similar, but I'm not sure how configurable it will be.

@robert-zaremba
Copy link
Collaborator

I'm usually doing it through a script which prepares a genesis transaction and starts a chain:

DAEMON=simd

# create keys
$DAEMON init --chain-id $CHAINID $CHAINID --home $DAEMON_HOME
$DAEMON keys add w1 --keyring-backend test --home $DAEMON_HOME
$DAEMON keys add w2 --keyring-backend test --home $DAEMON_HOME
$DAEMON keys add w3 --keyring-backend test --home $DAEMON_HOME

# create accounts
$DAEMON add-genesis-account w1 --keyring-backend test 1000000000000$DENOM --home $DAEMON_HOME
$DAEMON add-genesis-account w2 --keyring-backend test 1000000000000$DENOM --home $DAEMON_HOME
$DAEMON add-genesis-account w3 --keyring-backend test 1000000000000$DENOM --home $DAEMON_HOME

# create validator with a self-delegation
$DAEMON gentx w1 90000000000$DENOM --chain-id $CHAINID  --keyring-backend test --home $DAEMON_HOME
$DAEMON gentx w2 50000000000$DENOM --chain-id $CHAINID  --keyring-backend test --home $DAEMON_HOME

# create the final genesis file:
$DAEMON collect-gentxs --home $DAEMON_HOME

Once the genesis is created you can start a chain:

$DAEMON start --home $DAEMON_HOME

Do you think we should add this somewhere (quick start?)

@odeke-em
Copy link
Collaborator Author

@elias-orijtech this issue perhaps will be closed by the simulator rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants