Go to file
Robert Zaremba 8eaf2ececc
Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526)
* 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>
2020-10-19 13:04:55 +00:00
.circleci fix docs build failure (#6633) 2020-07-07 19:56:01 +02:00
.github build(deps): bump codecov/codecov-action from v1.0.13 to v1.0.14 (#7591) 2020-10-19 04:37:14 -03:00
baseapp msg_service_router: reduce code complexity (#7570) 2020-10-16 09:43:28 +00:00
client client: add GetAccount and GetAccountWithHeight to AccountRetriever (#7558) 2020-10-15 14:19:57 +00:00
codec Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
contrib Remove reproducible builder image (#7484) 2020-10-08 15:00:34 +01:00
cosmovisor feat: allow "any" to specify a "binary" with no arch/os deps (#7230) 2020-09-14 21:32:10 +00:00
crypto LGTM alerts audit (#7440) 2020-10-02 15:13:58 +02:00
docs docs: Revert SPEC-SPEC and update x/{auth,bank,evidence,slashing} (#7407) 2020-10-16 12:42:48 +00:00
proto Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
scripts Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
server fix: Rework InterceptConfigsPreRunHandler to make sure configuration … (#7501) 2020-10-16 13:56:10 +00:00
simapp Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
snapshots test: fix data race in snapshots.ChunkReader test (#7299) 2020-09-14 14:00:08 +01:00
std Add ADR 031 BaseApp and codec infrastructure (#7519) 2020-10-15 13:07:59 +00:00
store Merge PR #7415: Return empty store tree on non-existing version 2020-10-13 08:39:33 -04:00
telemetry Minor Code Cleanup - gRPC queries (#6862) 2020-07-28 12:53:35 +00:00
tests Refactor RegisterQueryServices -> RegisterServices (#7518) 2020-10-12 16:31:51 +00:00
testutil Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
third_party/proto Add back option go_package to third_party confio proofs.proto (#7565) 2020-10-15 13:35:28 +00:00
types Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
version testutil: add ApplyMockIODiscardOutErr, simplify existing functions (#6665) 2020-07-10 08:55:48 +02:00
x Refactor x/staking Validation and Delegation tests based on MsgCreateValidator.Pubkey type change. (#7526) 2020-10-19 13:04:55 +00:00
.clang-format Add proto formatting tool (#7266) 2020-09-08 22:06:54 +00:00
.codecov.yml test delay for codecov (#7134) 2020-08-21 15:38:40 +01:00
.dockerignore Add basic Dockerfile to build all binaries and export gaiad 2018-04-10 12:39:47 +02:00
.gitattributes Merge PR #6426: Migrate API Server 2020-06-15 13:39:09 -04:00
.gitignore Adding a rule for private files in gitignore (#7535) 2020-10-14 15:27:43 +00:00
.golangci.yml linter: enable nolintlint (#6162) 2020-05-08 08:46:12 +00:00
.goreleaser.yml ci: automate release post tag push (#6230) 2020-05-25 20:02:08 +02:00
.mergify.yml Tweak mergify config 2020-03-01 16:18:22 +00:00
buf.yaml Refactor x/bank according to ADR 031 (#7520) 2020-10-13 09:05:46 +00:00
build.sh Remove reproducible builder image (#7484) 2020-10-08 15:00:34 +01:00
CHANGELOG.md Refactor x/evidence to ADR-031 (#7538) 2020-10-16 16:05:25 +00:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#7381) 2020-09-28 11:28:30 +02:00
CONTRIBUTING.md Stable Releases: Definition and Process (#6394) 2020-07-14 10:28:53 +02:00
docker-compose.yml buildsystem: simplify Makefile and ci automation (#7189) 2020-08-31 15:39:05 +02:00
Dockerfile Makefile: simplify and clean-up (#7453) 2020-10-05 10:22:18 +02:00
go.mod build(deps): bump github.com/spf13/cobra from 1.1.0 to 1.1.1 (#7592) 2020-10-19 09:02:42 +00:00
go.sum build(deps): bump github.com/spf13/cobra from 1.1.0 to 1.1.1 (#7592) 2020-10-19 09:02:42 +00:00
LICENSE Add README.md to Basecoin; Update licenses 2018-01-28 18:17:19 -08:00
Makefile Makefile: fix db-specific ldflags (#7554) 2020-10-17 12:09:06 +01:00
package-lock.json Proportional slashing ADR Update (#6368) 2020-10-05 09:30:50 +02:00
README.md replace testutil.NewTestCaseDir() with Go1.15's T.TempDir() (#7014) 2020-09-18 12:08:24 +01:00
SECURITY.md update SECURITY.md (#6263) 2020-05-21 11:12:51 +02:00
STABLE_RELEASES.md Stable Releases: Definition and Process (#6394) 2020-07-14 10:28:53 +02:00

Cosmos SDK

banner

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.15+

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.