* chore(types): add sdk.Context.Codec and deprecate JSONCodec
* Use clientContext.Codec rather than JSONCodec everywhere
* update tests to use clientContext.Codec
* added a note that EncodingConfig.Marshaler will be renamed to Codec
* update changelog
* fix tests to use clientCtx.WithCodec instead of WithJSONCodec
* fix genutil build
* Update simapp/params/encoding.go
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
* enable secp256r1 in antehandlers
* Add sig verification benchamrk to find a sigverify fee
* adjust the gas fee
* enable secp256r1 in antehandlers
* Add sig verification benchamrk to find a sigverify fee
* adjust the gas fee
* Update the secp256r1 fee factor
* Update changelog
* regenerate docs
* Make gRPC requests go through tendermint Query
* Remove commented code
* Dry run in InitChain?
* Save type of first run
* Add metadata in repsonse
* Factorize some code
* Fix lint
* Update comments
* Fix md test
* Fix test expected
* Don't put RunGRPCQuery as clientCtx method
* Update baseapp/grpcserver.go
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
* Address review comments
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
* Add 1st version of migrate
* Put migration logic into Configurator
* add test to bank store migration
* add test for configurator
* Error if no migration found
* Remove RunMigrations from Configurator interface
* Update spec
* Rename folders
* copy-paste from keys.go
* Fix nil map
* rename function
* Update simapp/app.go
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
* Update simapp/app_test.go
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
* Adderss reviews
* Fix tests
* Update testutil/context.go
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
* Update docs for ConsensusVersion
* Rename to forVersion
* Fix tests
* Check error early
* Return 1 for intiial version
* Use MigrationKeeper
* Fix test
* Revert adding marshaler to Configurator
* Godoc updates
* Update docs
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Files returned by WriteToNewTempFile are cleaned up
automatically at the end of a test case execution.
WriteToNewTempFile now relies on the TB.TempDir()
function provided by the testing std package.
TempFile returns a temporary file that can be used
within a test case and is automatically removed
at the end of the test execution.
* Changelog update
* Rename codec.MarshalAny
* move codec.MarshalInterface to codec.Marshaler
* fix tests
* Update amino_codec for compliance with MarshalerInterface
* update tests and comments
* add tests
* change order of args in UnmarshalInterface to a canonical one
* uplift MarshalInterface to take ProtoMessage as an argument
* wip
* add nil check
* make tests working
* tests cleanup
* add support for *JSON methods
* Update changelog
* linter fixes
* fix test types
* update evidence genesis_test
* adding test
* review updates
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Update tooling around docker
* Run commands
* Remove swagger gen for now
* Update proto-gen-any
* Fix indentn
* Use CURDIR
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
* add more logs during the initialization process
* initializtion: move profiling to the top of the startProcess function
* x/bank InitGenesis: remove k.ValidateBalance
* debug: add logs and telemetry to x/bank and x/crisis
* make x/crisis AssertInvariants optional during InitGenesis
* Add module init flags mechanism
* update changelog
* remove debug fmt.Print
* fix testutil/network/
* fix log message
* update test NewApp calls
* review changes
Co-authored-by: Aaron Craelius <aaron@regen.network>
* testing: refactore Validation and Delegation handling of x/staking
This Changeset introduces set of improvements for writing tests.
The idea is to create a testing subpackage which will provide functions
to make tests more dev-friendly and wrap higher level use-cases.
Here is a show-up of of creating a service for staking module
for tests.
This PR also changes the `x/staking/types.MsgCreateValidator.Pubkey` from string
to types.Any. This change motivated the other change to show the pattern I'm describing here.
* add validator checks
* type change fixes
* use deprecated
* adding test slashing
* new network comment update
* working on tests
* Fix TestMsgPkDecode test
* Add UnpackInterfaces to MsgCreateValidator
* Fix tests
* Convert bech32 pubkey to proto
* Fix test
* fix v039/migrate_test/TestMigrate
* fix tests
* testslashing: rename Service to Helper
* file rename
* update TestMsgDecode
Co-authored-by: blushi <marie.gauthier63@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
* Add test for /block_results
* Fix test
* Use http RPC client
* Fix temporarily block_results
* Use init
* Add flag back
* Remove init
* Update TM master
* Address comments
* Fix build
* require refactor
* Add build flag back
* More timeout on test
* fix timeout-minutes
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Introduce 'norace' build tag that is used to
filter out test files containing test cases
or test suites that, if run with the -race
flag on would cause race conditions.
Supersede #7300.
* Add proto format option
* Add clang format options
* Fix proto format
* Fix fmt
* Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
* Add height in exported genesis
* +1
* Add test
* Refactor ctx in setupApp
* Use amino in export
* Use tmjson
* Add custom initialVersion (set to 0 for now)
* Add comment
* Add mount in initChainer
* app.LastBlockheight
* InitializeAndSeal in InitChain?
* Revert create store with initial version
* Update to latest iavl
* Check height in test
* Make it work
* Add more tests
* Rename interface
* Use struct isntead of 6 args
* Fix lint
* Remove stray fmt
* Revert go mod/sum
* Install iavl rc3
* Update comments
* Add fee in network
* Typo
* Fix logic in commit
* Fix tests
* Only set initial version on > 1
* Genesis block num = 1
* Fresh chain, genesis block = 0
* Add comments
* Revert Mutable/ImmutableTree
* Allow for zero height
* Fix restart
* Add comments
* Add comments, fix test
* Fix remaining one test
* Add panic test
* Update comment
* Add test for --height
* No cast
* Add check that genesis file exists
* Remove duplicate imports
* Fail early
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
* create base proto package, move ValAddresses to staking
* move tx, crypto, query proto packages into base; mark module level packages as beta
* new cosmos/base/abci.proto file, refactor some message names
* add comments to TxResponse
* refactor RegisterInterface calls to new proto package names
* fix bug in merge commit
* move missing module proto packages to beta, move cosmos.kv to cosmos.base.kv
* add tx.proto files, holding proto messages for module Msgs
* rm old generated pb.go files
* cosmos/base/base.proto -> cosmos/base/coin.proto
* mark genutil proto package as beta
* Fix conflicts
* Restructure proto files
* Re put signing
* Fix test
* Update slashing genesis
* Ignore confio proto files
* Fix interface register
* Make proto-gen
* Fix lint
* Put tx service into tx.v1beta1
* Use v1beta1 in interface registry
* Remove to cosmos.base.store
* Remove extra confio in buf
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>