Go to file
Alexander Bezobchuk e3580896ab
Migrate Keeper staking tests to use simapp (#5683)
* use simapp into keeper

* refactor TestHistoricalInfo to use simapp

* refactor historical info test

* temporal commit on querier test, it passes

* commit end of day refactoring

* rename and temp commit

* fix test query validators

* make TestQueryDelegations pass with simapp :D

* rename function

* make TestQueryRedelegations pass with simapp

* finish keeper refactor for querier in staking using simapp

* refactor delegation test TestUnbondDelegation to use simapp

* make all test pass temporary

* avoid usage of historicals

* refactor creation of the simapp

* refactor creation of simapp

* comment before creating new way to generate accounts

* make TestDelegation pass with generated accounts

* refactor to use accounts

* refactor test unbondingdelegationsmax entries

* refactor TestUndelegateSelfDelegationBelowMinSelfDelegation to use simapp

* update TestUndelegate from unbonding validator and fix bug

* refactor TestUndelegateFromUnbondedValidator to use simapp

* TestUnbondingAllDelegationFromValidator to use simapp

* refactor TestGetRedelegationsFromSrcValidator to use simapp

* refactor TestRedelegation to use simapp

* refactor TestRedelegateToSameValidator to use simapp

* refacotr TestRedelegationMaxEntries to use simapp

* refactor delegation test

* refactor TestRedelegateFromUnbondingValidator to use simapp

* finish refactor delegation test

* refactor and remove unused code

* migrate revocation of old slash test

* fix TestSlashUnbondingDelegation test to use simapp

* refactor TestSlashRedelegation to use simapp

* refactor TestSlashAtFutureHeight test

* test TestSlashAtNegativeHeight migrated to simapp

* migrated two tests from slash_test to use simapp

* refactor TestSlashWithRedelegation

* end refactoring slash_test

* refactor first test validation to simapp

* refacor TestUpdateValidatorByPowerIndex to use simapp

* refactor TestUpdateBondedValidatorsDecreaseCliff to simapp

* refactor TestSlashToZeroPowerRemoved

* TestValidatorBasics

* refactro TestGetValidatorSortingUnmixed to simapp

* refactor TestGetValidatorSortingMixed test to simap

* refctor TestGetValidatorsEdgeCases to use simapp

* make test TestValidatorBondHeight pass

* refactor TestFullValidatorSetPowerChange test

* end refactoring validator_test

* clean code

* move methods

* rename

* rename commont test

* git remove unused vars

* refactor ordering functions

* refactor old genesis_test to use simapp

* refactor TestValidatorByPowerIndex

* refactor TestDuplicatesMsgCreateValidator

* refactor TestInvalidPubKeyTypeMsgCreateValidator

* temporary commit

* refactor TestLegacyValidatorDelegations to use simapp

* refactor TestIncrementsMsgDelegate

* refactor next

* refactor TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond

* refactor TestIncrementsMsgUnbond

* refator TestMultipleMsgCreateValidator

* refactor TestMultipleMsgDelegate

* refactor TestJailValidator

* refactor TestUnbondingPeriod and TestValidatorQueue

* refactor TestUnbondingFromUnbondingValidator and TestRedelegationPeriod

* refactor TestTransitiveRedelegation and TestMultipleRedelegationAtSameTime

* refactor TestMultipleRedelegationAtUniqueTimes and TestMultipleUnbondingDelegationAtSameTime

* refactor TestMultipleUnbondingDelegationAtUniqueTimes and TestUnbondingWhenExcessValidators

* end refactor handler_test

* remove test_common

* remove create test public keys

* fix based on PR comments

* use prealloc array for ConvertAddrsToValAddrs

* fix lint errors

* fix lint errors 2

* remove duplicated func

* rename function names

* Update simapp/test_helpers.go

* Update x/staking/keeper/keeper.go

* Update simapp/test_helpers.go

* Update simapp/test_helpers.go

* add last touches to the PR

* edit text

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
2020-02-28 12:45:24 -08:00
.circleci Build with go1.14 (#5719) 2020-02-28 12:26:11 +00:00
.github Update CODEOWNERS as per @jaekwon's directives (#5728) 2020-02-28 18:27:42 +00:00
baseapp Merge PR #5718: Return Empty GasInfo on Failed Msg Validation 2020-02-28 09:51:00 -08:00
client Exclude proto files from format (#5706) 2020-02-27 07:53:22 -03:00
codec Exclude proto files from format (#5706) 2020-02-27 07:53:22 -03:00
contrib Merge PR #5610: proto: migrate x/distr to use hybrid codec 2020-02-11 09:58:37 -05:00
crypto Merge PR #5613: update to golangci-lint v1.23.3 2020-02-05 11:32:45 -08:00
docs Merge PR #5708: fix type for the event documentation 2020-02-27 02:37:16 -05:00
scripts Merge PR #5491: Protobuf Introduction + Types 2020-01-24 10:32:00 -05:00
server Merge PR #5696: Fix x/auth proto json tags 2020-02-25 15:22:28 -05:00
simapp edit text 2020-02-28 19:07:10 +01:00
store Merge PR #5500: Regen network/multistore upgrades 2020-02-27 22:26:04 -08:00
tests Merge PR #5527: Bump Tendermint Version to v0.33.0 2020-01-16 13:46:51 -08:00
third_party/proto Merge PR #5669: proto: update tendermint proto files 2020-02-20 11:38:07 +01:00
types Exclude proto files from format (#5706) 2020-02-27 07:53:22 -03:00
version Increase code coverage of version up to 100% (#5726) 2020-02-28 18:14:01 +00:00
x Update x/staking/keeper/keeper.go 2020-02-28 09:59:06 -08:00
.codecov.yml Merge PR #5681: proto: migrate bank to hybridcodec 2020-02-20 15:24:26 +01:00
.dockerignore Add basic Dockerfile to build all binaries and export gaiad 2018-04-10 12:39:47 +02:00
.gitattributes Merge PR #3192: This is not a js repo :) 2018-12-26 20:16:25 +01:00
.gitignore Merge PR #4787: Updated docs build process 2019-08-26 09:09:18 -04:00
.golangci.yml Merge PR #5600: Migrate x/staking to Protobuf 2020-02-06 14:21:02 -05:00
.mergify.yml Merge PR #5723: fix config file 2020-02-28 09:36:26 -08:00
buf.yaml Merge PR #5591: Ignore testdata 2020-01-30 11:26:16 -05:00
CHANGELOG.md Merge PR #5718: Return Empty GasInfo on Failed Msg Validation 2020-02-28 09:51:00 -08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-01-29 12:38:50 +01:00
CONTRIBUTING.md Merge PR #5392: Fix typos in the CONTRIBUTING.md 2019-12-12 10:46:14 -05:00
go.mod Build with go1.14 (#5719) 2020-02-28 12:26:11 +00:00
go.sum Run go mod tidy (#5721) 2020-02-28 13:19:00 +00:00
LICENSE Add README.md to Basecoin; Update licenses 2018-01-28 18:17:19 -08:00
Makefile Exclude proto files from format (#5706) 2020-02-27 07:53:22 -03:00
README.md Build with go1.14 (#5719) 2020-02-28 12:26:11 +00:00
SECURITY.md update SECURITY.md (#5377) 2019-12-16 16:24:37 -03:00
snapcraft.yaml replace dep with go mod (#3907) 2019-03-18 13:45:25 +01:00
snapcraft.yaml.in Autobuild snap (#3455) 2019-01-31 09:59:19 -08:00
Vagrantfile Fix Makefile's all target (#3085) 2018-12-20 10:03:59 -08:00

Cosmos SDK

banner

version CircleCI codecov Go Report Card license LoC API Reference riot.im

The Cosmos-SDK is a framework for building blockchain applications in Golang. It is being used to build Gaia, the first implementation of the Cosmos Hub.

WARNING: The SDK has mostly stabilized, but we are still making some breaking changes.

Note: Requires Go 1.14+

Quick Start

To learn how the SDK works from a high-level perspective, go to the SDK Intro.

If you want to get started quickly and learn how to build on top of the SDK, please follow the SDK Application Tutorial. You can also fork the tutorial's repository to get started building your own Cosmos SDK application.

For more, please go to the Cosmos SDK Docs.

Cosmos Hub Mainnet

The Cosmos Hub application, gaia, has moved to its own repository. Go there to join the Cosmos Hub mainnet and more.

Scaffolding

If you are starting a new app or a new module we provide a scaffolding tool to help you get started and speed up development. If you have any questions or find a bug, feel free to open an issue in the repo.

Disambiguation

This Cosmos-SDK project is not related to the React-Cosmos project (yet). Many thanks to Evan Coury and Ovidiu (@skidding) for this Github organization name. As per our agreement, this disambiguation notice will stay here.