Robert Zaremba
6bc8ff2dfe
Use any as validator pubkey ( #7597 )
...
* protobuf pubkey type update
* wip2
* wip3
* solving types.NewValidator issues
* remove bech32 from validator type assignment
* update Validator interface
* Changelog update
* wip4
* update genutil
* fix simapp & x/ibc/testing tests
* update staking
* changelog update
* fix import cycle in tests
* fix amino panic on TestValidatorMarshalUnmarshalJSON
* fix TestValidatorMarshalUnmarshalJSON consensus_pubkey check
* Add UnpackInterfaces to HistoricalInfo
* fix TestHistoricalInfo
* update todos
* fix: Expecting ed25519.PubKey to implement proto.Message
* fix linter issues
* Fix migrate test
* Update CHANGELOG.md
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
* review comments
* cosmetic changes
* add UnpackInterfaces got GenesisRandomized test
* Validator.Equal reuses Validator.MinEqual
* fix test
* use Validator.Equal in tests
* Fix staking simulation TestRandomizedGenState
* Remove TODO
* use HistoricalInfo.Equal
* use proto.Equal
* rename Validator.GetConsPubKey to TmConsPubKey
* prefer require.Equal over reflect.DeepEqual
* SetHistoricalInfo using a pointer
* Fix TestQueryDelegation test
* Fix TestQueryValidators test
* Fix TestSimulateMsgUnjail test
* experiement with LegacyAmino instances
* Register codecs in all simapp tests
* Fix cli_test compilation problems
* fix typo sdk -> std
* fix typo
* fix TestPlanStringer
* Rename to MakeEncodingConfig
* Remove RegisterCodecsTests
* Use gRPC in GetCmdQueryValidators
* Empty status
* fix info log check
* linter fixes
* rename simapparams to simappparams
* Update simapp/test_helpers.go
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
* comments updates
* use valAddr1 instead of sdk.ValAddress(pk1.Address().Bytes())
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2020-10-23 12:07:52 +00:00
Marie
7f59723d88
Make JSONMarshaler methods require proto.Message ( #7054 )
...
* Make JSONMarshaler require proto.Message
* Use &msg with MarshalJSON
* Use *LegacyAmino in queriers instead of JSONMarshaler
* Revert ABCIMessageLogs String() and coins tests
* Use LegacyAmino in client/debug and fix subspace tests
* Use LegacyAmino in all legacy queriers and adapt simulation
* Make AminoCodec implement Marshaler and some godoc fixes
* Test fixes
* Remove unrelevant comment
* Use TxConfig.TxJSONEncoder
* Use encoding/json in genutil cli migrate/validate genesis cmds
* Address simulation related comments
* Use JSONMarshaler in cli tests
* Use proto.Message as respType in cli tests
* Use tmjson for tm GenesisDoc
* Update types/module/simulation.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update types/module/module_test.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Add godoc comments
* Remove unused InsertKeyJSON
* Fix tests
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-26 09:39:38 +00:00
Marko
8de96d16f9
tendermint: update to rc3 ( #6892 )
...
* modify light imports
* change abci.header to tmproto.header
* use rc
* rc
* fix import
* Merge PR #6893 : fix key imports
* fix rc2
* tendermint: update 3 (#6899 )
* tendermint: update 4 (#6919 )
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* tendermint: update 5 (#6923 )
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* bump to latest master
* tendermint: update (#6972 )
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
* Update x/ibc/07-tendermint/types/test_utils.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* address comment
* go mod
* bring back things
* fix test
* update tm proto files
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-14 13:58:53 -04:00
Aaron Craelius
816c5a37bd
Enable proto JSON generally and remove HybridCodec ( #6859 )
...
* Remove HybridCodec
* WIP on fixing proto JSON issues
* WIP on fixing proto JSON issues
* WIP on fixing proto JSON issues
* WIP on fixing proto JSON issues
* WIP on fixing proto JSON issues
* Test fixes
* Delete hybrid_codec.go
* Fixes
* Fixes
* Fixes
* Test fixes
* Test fixes
* Test fixes
* Lint
* Sim fixes
* Sim fixes
* Revert
* Remove vesting account JSON tests
* Update CHANGELOG.md
* Lint
* Sim fixes
* Sim fixes
* Docs
* Migrate more amino usages
* Remove custom VoteOption String() and json marshaling
* Fix tests
* Add comments, update CHANGELOG.md
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-08-13 13:20:02 +00:00
Aaron Craelius
70767c87c4
Update x/gov to use Any ( #6147 )
...
* Update x/gov to use Any
* Fixes
* Remove MsgSubmitProposalLegacy
* Update CHANGELOG.md
* Add RegisterInterfaces for x/distribution, x/params, & x/upgrade
* Fix query JSON issue
* Fix gov tests
* Revert custom Any Equals
* Re-remove types
* Rename receivers
* Fix imports in gov
* Sort imports
* Make amino JSON signing work with Any
* Run proto-gen
* Create full amino wrapper
* Fix errors
* Fixes
* Fix tests
* Test fixes
* Fix tests
* Linting
* Update ADR 019 and CHANGELOG
* Updated ADR 019
* Extract Marshal/UnmarshalProposal
* fix error
* lint
* linting
* linting
* Update client/keys/parse.go
Co-authored-by: Marko <marbar3778@yahoo.com>
* linting
* Update docs/architecture/adr-019-protobuf-state-encoding.md
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* Update docs/architecture/adr-019-protobuf-state-encoding.md
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* Address review feedback
* Add godocs
* Fix errors
* fix errors
* revert file
* Address review feedback
* Address review feedback
* Stacktrace debug flag
* Fix tests
* Address review feedback
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +00:00
Marko
218ec99508
various linter fixes ( #6106 )
...
x/staking: Fix all linter warnings.
Fixed warnings across base packages.
New linters:
- unparam
- nolintlint
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-05-02 21:26:59 +02:00
Jonathan Gimeno
550c3e9ef0
Jonathan/5988 sim params consensus 2 ( #6051 )
...
* temporal commit
* add random consensus params
* make format
* make random pass
* remove comment
* revert change
* update ub key types
* extract Evidence params from state
* extract the random parameters from state
* clean the code
* update imports!
* mispelled back
* mispelled back
* add misspelled command
* update changelog
* remove useless linter to avoid misspell
* remove function
* use tendermint constants
* update import test
* remove debug comment
* Update baseapp/baseapp.go
Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 18:24:13 +00:00
Alexander Bezobchuk
37c92c5f39
Revert "Add consensus params into Simulation ( #6002 )" ( #6046 )
...
This reverts commit 65048683b5
.
2020-04-21 21:46:34 +00:00
Jonathan Gimeno
65048683b5
Add consensus params into Simulation ( #6002 )
...
* temporal commit
* add random consensus params
* make format
* make random pass
* remove comment
* revert change
* update ub key types
* extract Evidence params from state
* extract the random parameters from state
* clean the code
* update imports!
* mispelled back
* mispelled back
* add misspelled command
* update changelog
* remove useless linter to avoid misspell
* remove function
* use tendermint constants
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-04-21 18:28:43 +00:00
Jonathan Gimeno
49102b1d98
Remove dependency of types/module package on x/simulation ( #5835 )
...
Closes : #5724
2020-03-23 12:55:44 +01:00
Alexander Bezobchuk
9f03b57fe3
Merge PR #5359 : Params Validation
2019-12-10 11:48:57 -05:00
Federico Kunze
722a633f54
Sim refactor 3: move weighted operations to modules ( #4869 )
...
* move GenesisState generators to modules
* minor change on slashing genState generator
* move simulation params back to modules (#4839 )
move simulation params back to modules (#4839 )
* cleanup params
* various fixes
* move store decoders to modules
* fix
* module pattern
* split generators for param change
* param changes
* revert util pkg
* banksim
* compile
* update Decoders params
* fix
* address @colin-axner comments
* move weighted operations to modules
* cleanup
* cleanup
* Update cmd_test.go
* simulation manager
* mino fixes
* cleanup
* add GenerateGenesisState to simulation manager
* Apply suggestions from code review
Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>
* address @rigelrozanski comments
* changelog
* Apply suggestions from code review
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* restructure modules simulation pkgs
* remove cycle deps
* rename funcs and add missing params
* modularize simulator param changes
* build
* fix params keys
* make format
* various fixes
* fix tests
* minor updates to sim_test
* cleanup
* more cleanup
* modularize genesis generators
* minor cleanup
* remove cdc from generators
* remove cdc
* add get or generate
* fix non-determinism in simulation
* changelog and x/simulation godoc
* cleanup operations
* update operations to use baseapp
* updates and cleanup operations
* update operations
* restructure sim ops params
* rename sim /operations/msg.go to /operations.go
* move GenTx to a helper pkg to avoid circle deps
* rm msg.ValidateBasic
* changelog
* random fees; delete auth's DeductFees sim operation
* add chain-id for sig verification
* Update x/simulation/account.go
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* fix bank, gov and distr errors
* fix staking and slashing errors; increase prob for send enabled
* increase gas x10
* make format
* fix some distr and staking edge cases
* fix all edge cases
* golang ci
* rename acc vars; default no fees to 0stake
* cleanup; check for exchange rate and skip invalid ops
* fixes
* check for max entries
* add pubkey to genaccounts
* fix gov bug
* update staking sim ops
* fix small redelegation error
* fix small self delegation on unjail
* rm inf loop on random val/accs
* copy array
* add ok boolean to RandomValidator return values
* format
* build
* add WeightedOperations to AppModuleSimulation
* define each module proposals content as part of the module pattern
* Update x/bank/simulation/operations.go
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* Update simapp/helpers/test_helpers.go
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* address @colin-axner comments
* add genaccount pubkey validation
* fix test
* update operations and move RandomFees to x/simulation
* update gov ops
* address @alexanderbez comments
* avoid modifications to config
* reorder params
* modularized sim operations working
* changelog
* Update types/module/simulation.go
Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>
* Update x/simulation/params.go
Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>
* Update x/simulation/params.go
Co-Authored-By: frog power 4000 <rigel.rozanski@gmail.com>
* update /types/module
* Update x/distribution/simulation/genesis.go
Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* remove named return values
* ensure all operations are simulated
* golangci
* add nolint
* disable whitespace and funlen linter
* disable godox
* add TODO on unjail
* update ops weights
* remove dup
* update godoc
* remove unused func
* build fixes
* move weights to the same file
* scopelint
* changelog
* address @AdityaSripal comments
* address @alexanderbez comments
2019-12-05 10:29:54 +01:00
Federico Kunze
8344c0aef8
update simulation operations to use BaseApp ( #4946 )
...
* update operations to use baseapp
* updates and cleanup operations
* update operations
* restructure sim ops params
* rename sim /operations/msg.go to /operations.go
* move GenTx to a helper pkg to avoid circle deps
* rm msg.ValidateBasic
* changelog
* random fees; delete auth's DeductFees sim operation
* add chain-id for sig verification
* Update x/simulation/account.go
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* fix bank, gov and distr errors
* fix staking and slashing errors; increase prob for send enabled
* increase gas x10
* make format
* fix some distr and staking edge cases
* fix all edge cases
* golang ci
* rename acc vars; default no fees to 0stake
* cleanup; check for exchange rate and skip invalid ops
* fixes
* check for max entries
* add pubkey to genaccounts
* fix gov bug
* update staking sim ops
* fix small redelegation error
* fix small self delegation on unjail
* rm inf loop on random val/accs
* copy array
* add ok boolean to RandomValidator return values
* format
* Update x/bank/simulation/operations.go
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* Update simapp/helpers/test_helpers.go
Co-Authored-By: colin axner <colinaxner@berkeley.edu>
* address @colin-axner comments
* add genaccount pubkey validation
* fix test
* update operations and move RandomFees to x/simulation
* update gov ops
* address @alexanderbez comments
* avoid modifications to config
* reorder params
* changelog
* Update x/distribution/simulation/genesis.go
Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* remove named return values
* ensure all operations are simulated
* golangci
* add nolint
* disable whitespace and funlen linter
* disable godox
* add TODO on unjail
* update ops weights
* remove dup
* update godoc
* x/slashing/simulation/operations.go linting
* x/staking/simulation/operations.go linting
* update operations format
* x/bank/simulation/operations.go linting
* x/distribution/simulation/operations.go linting
* x/staking/simulation/operations.go linting
* start changes: make bank simulate send multiple coins, code cleanup
* fix nondeterminism bug
* fix txsiglimit err
* fix multisend bug
* simplify simulation, cleanup opt privkey args
* make slashing test invalid unjail msgs
* Update simapp/state.go
* golangCI changes
2019-10-23 11:14:45 +02:00
Federico Kunze
45b25ceaae
Merge PR #4838 : Sim refactor 2 - Move GenesisState generators to modules
2019-08-28 10:58:25 -04:00
Federico Kunze
352678438c
Merge PR #4255 : Supply Module
2019-06-28 16:11:27 -04:00
Alexander Bezobchuk
6606007297
Merge PR #4435 : Simulation: Params from File
...
* Move distr params to simulation param generator
* Cleanup sim params output
* Print params when possible instead of entire genesis struct
* Update module param simulator keys
* Rename module params simulator keys
* Add/fix missing module params and implement SimParams
* UPdate sim test to accept params file
* Allow weights to be provided from file
* Create doc.go
* Remove TODO
* Implement MustMarshalJSONIndent
* Use mustMarshalJSONIndent for non-codec
* Remove TODO
* Fix doc.go
* Update points
* Update simapp/doc.go
Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>
* Update simapp/doc.go
Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>
* Cleanup appStateFn
* Use constants for simulation parameter keys
* Update msgs.go
* minor formatting
2019-06-08 16:55:47 -04:00
Joon
91e75cb74a
Merge PR #4403 : Paramchange proposal skips omitempty fields
2019-05-27 20:47:12 -04:00
frog power 4000
38f49e4114
Merge PR #4389 : stake invariance bug
...
* add trouble seed
* currentStakeRoundUp is now always atleast currentStake + smallest-decimal-precision
* remove unused code
* remove debugs
* @alexanderbez comment
* compile fix
* better comment, increase tolerance to 3 smallest decimal points
2019-05-24 21:23:53 -04:00
Nicolas Pinto
f0b690ba6e
Merge PR #4366 : Random Fuzzer fix: avoids VotingPeriod=0
2019-05-17 19:46:43 -04:00
frog power 4000
cef788042b
Merge PR #4365 : Simulator bugfix for multisim 7601778
2019-05-17 19:45:36 -04:00
Nicolas Pinto
fd9f322b8c
Merge PR #4363 : invalid 0stake deposit amount in sim
...
This fixes the "panic: Governance deposit amount must be a valid sdk.Coins amount, is 0stake" that can happen in the simulator if `DepositParams/MinDeposit` samples the integer `0`.
2019-05-17 16:51:55 -04:00
Alexander Bezobchuk
29ed730aff
Merge PR #4244 : Param Proposal Simulation Messages; Minting Params Fix
2019-05-02 16:50:01 -04:00
Alexander Bezobchuk
df6f2d6e25
Merge PR #4140 : Fix Failed Simulation Seeds
2019-04-22 10:57:58 -04:00
frog power 4000
f0d1efa43c
Merge PR #3819 : Simulation Refactor
2019-03-14 19:13:15 +01:00