Rework the process of loading a genesis.json file to load a starting app state and set of initial transactions to process.
* New function to create genesis account from MsgCreateValidator
* Add arg to PrintUnsignedStdTx() to actually operate in offline mode
* New func processStdTxs()
* Remove gen-tx command
* Cleanup, return validators as they need to be written into genesis.json
* Modify gaiad init to allow auto-create of stdTx
* Remove server/testnet.go
* Don't load node_key.json, which might not be available
* Get the txs through DeliverTx
* Add app.slashingKeeper.AddValidators at the end of genesis
* On InitChain(), Signature's account number must be 0
* Add (tentative?) command to generate {node_key,priv_validator}.json files
* Reintroduce gaiad testnet
* Prompt user for passwords
* Update gaia to work with auth.StdTx
* Remove test_utils, NewTestGaiaAppGenState is now deprecated
* Combine --genesis-format and --generate-only
* Improve sign command's --offline flag documentation
* Moniker must be set
* Call app.slashingKeeper.AddValidators() even if len(txs) == 0
* Refactoring, introduce gaiad init --skip-genesis, code cleanup
* Drop unnecessary workaround to make lcd_tests pass
* Reintroduce gentx
* Simple name changes, GenesisState.Txs -> .GenTxs; OWK -> OverwriteKey; OverwriteKeys -> OverwriteKey
This removes privkeys and addresses from function signatures.
This comes with a 11% performance improvement to the simulator,
as we no longer keep recomputing the pubkeys.
Once we move the transient store clearing to endblock, we can
further raise the size of make test_sim_gaia_fast
concretely, `make test_sim_gaia_fast` went from 16.8 seconds to 13.5 seconds on my system.
This is to facillitate ease of implementing #1406. (Tags for messages
could then be added dynamically)
Ultimately once we make the router support hiearchical routing, (#770)
we can then remove the name field and just the parse info for tags from that.
Until then, we can parse the tag name as
`fmt.Sprintf("%s %s", msg.Type(), msg.Name())`
Now that we properly initialize governance, a ton of governance slashing
doesn't happen in the first few blocks. Because of this, we can run through
blocks in the range (0,200) quite rapidly. This PR acknowledges that and
increases many of the default block heights.
Add a simulate only flag '--dry-run' to both CLI tx commands
and RESTful endpoints to trigger the simulation of unsigned
transactions.
* Turning --dry-run on causes the --gas flag to be ignored.
The simulation will return the estimate of the gas required
to actually run the transaction.
* Adjustment is no longer required. It now defaults to 1.0.
* In some test cases accounts retrieved from the state do not
come with a PubKey. In such cases, a fake secp256k1 key is
generated and gas consumption calculated accordingly.
Closes: #2110
The intent of this is to allow for simulating things like slashing for not
voting on a governance proposal. To test this, you would queue all the validator votes
in future blocks, and keep track of which ones you didn't slash. Then you could add queue a
"check governance slashing operation" after the voting period is over.
* This demonstrates that the state machine is non-deterministic if there
are more than two txs in a block.
* fix non-deterministic map iteration
* (squash this) fix build errors
* (squash this) iterate using range
* Update to tendermint v0.22.6-rc0
This is comprised of updating the crypto imports / API
* (squash this) switch to v0.22.6
If this passes tests, I'll squash this commit and update the PR.
* WIP, ammend this later
* Add randomized testing suite
* Fix linting
* Auth invariant check, method to take in seed, way to run invariant check less frequently
* Fix merge conflicts
* Update bank
* Fix error on zero input by skipping it
* Add PeriodicInvariant Function
* Abstract verification / send functionality
* Fix liniting errors (PeriodicInvariant godoc)
* Update formatting and docs of randomization
* Minor refactor, update godocs
* Update godoc for mock
* Export TestAndRunTx
* fix cyclic dependencies
* Address PR most pr comments
* Fix merge conflict: Bring back codec.seal
* remove debug code, fix linting
* Fix merge conflicts