Go to file
Facundo Medica a8a52d0775
refactor: use mocks for x/auth testing + ante tests refactor (#12568)
## Description

Main changes:
#### `x/auth` and `x/auth/ante` stopped depending on simapp
Some usages are left but this PR grew too much, so we might want to do it in a separate.

#### Removed all usages of the `suite` in `ante`
This makes tests way more verbose but helps keep the test cases self-contained and easier to understand (before you would need to mentally track the state of the suite throughout the test cases to understand them).
Also, it's easier to test, given that all tests are converted to standard Go unit tests (`func TestSomething(t *testing.T){`) and at least VSCode recognizes them and lets you run a single one instead of the entire suite.
I think this can/should be replicated in other modules.

Closes: #12502



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2022-07-27 17:49:19 +00:00
.github feat: CI action / label that makes it easy to cherry-pick just a commit against cosmos SDK main (#12478) 2022-07-27 16:22:01 +00:00
api feat: Add x/authz SendAuthorization AllowList (#12648) 2022-07-27 10:17:47 +00:00
baseapp refactor: remove dependency on simapp from baseapp tests (#12543) 2022-07-13 00:17:00 +02:00
client chore: remove norace tag (#12738) 2022-07-27 14:44:23 +00:00
codec refactor: remove dependency on simapp from codec (#12530) 2022-07-11 21:41:50 +00:00
contrib ci: update test-rosetta timeout (#12678) 2022-07-21 17:33:54 +02:00
core feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
cosmovisor chore: update cosmovisor release notes (#12732) 2022-07-26 23:42:40 +02:00
crypto refactor(crypto): remove dependency on simapp from tests (#12614) 2022-07-18 14:45:09 +00:00
db feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
depinject refactor!: use injected encoding params in simapp (#12717) 2022-07-27 15:21:10 +02:00
docs refactor!: make simapp.MakeTestEncodingConfig private (#12747) 2022-07-27 17:23:56 +02:00
errors feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
fuzz test: re-enable FuzzStoreInternalProofsCreateNonmembershipProof (#12176) 2022-06-08 18:44:51 +00:00
internal chore: Db linting (#12141) 2022-06-08 19:02:01 +02:00
math feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
orm feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
proto feat: Add x/authz SendAuthorization AllowList (#12648) 2022-07-27 10:17:47 +00:00
pruning chore: sdk.Int to math.Int (#12132) 2022-06-03 12:17:02 +00:00
runtime refactor: rename depinject imports to cosmossdk.io/depinject (#12479) 2022-07-09 17:46:07 +02:00
scripts refactor: use mocks for x/auth testing + ante tests refactor (#12568) 2022-07-27 17:49:19 +00:00
server chore: remove norace tag (#12738) 2022-07-27 14:44:23 +00:00
simapp refactor!: make simapp.MakeTestEncodingConfig private (#12747) 2022-07-27 17:23:56 +02:00
snapshots chore: sdk.Int to math.Int (#12132) 2022-06-03 12:17:02 +00:00
std fix: register evidence regression (#10595) 2021-12-14 14:25:31 +00:00
store build(deps): Bump github.com/cosmos/cosmos-sdk in /store/tools/ics23 (#12735) 2022-07-26 19:10:49 +02:00
telemetry refactor!: Keyring migration (#9695) 2021-09-20 12:02:15 +00:00
tests chore: remove norace tag (#12738) 2022-07-27 14:44:23 +00:00
testutil chore: use math.Int instead of math.Int and apply linting (#12702) 2022-07-26 00:24:47 +02:00
third_party/proto feat: full api module building alongside gogo proto files with buf schema registry support (#10669) 2022-01-06 14:57:55 -05:00
tools chore: simplify and refactor linting (#12318) 2022-06-21 17:49:36 +00:00
tx feat(textual): bytes value renderer (#12734) 2022-07-27 15:55:42 +00:00
types chore: use math.Int instead of math.Int and apply linting (#12702) 2022-07-26 00:24:47 +02:00
version refactor: Implementing sigs.k8s.io YAML to remove .proto yaml annotations (#9780) 2021-09-24 14:37:34 +00:00
x refactor: use mocks for x/auth testing + ante tests refactor (#12568) 2022-07-27 17:49:19 +00:00
.build.sh fix library file path (#8301) 2021-01-12 10:08:42 +00:00
.clang-format chore: improve proto formatting (#12656) 2022-07-21 10:56:31 +00:00
.codecov.yml CI: Fix codecov flag project config (#7994) 2020-11-20 09:13:25 -05:00
.deepsource.toml chore: refactor code quality issues (#8932) 2021-03-22 09:30:27 +00: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 ci: fix gh docs action (#11547) 2022-04-05 15:04:15 +02:00
.golangci.yml chore: use math.Int instead of math.Int and apply linting (#12702) 2022-07-26 00:24:47 +02:00
.goreleaser.yml ci: automate release post tag push (#6230) 2020-05-25 20:02:08 +02:00
.markdownlint.json docs: Code blocks in SDK docs are broken (#11189) 2022-02-14 23:39:35 +01:00
.markdownlintignore docs: Improve markdownlint configuration (#11104) 2022-02-10 12:07:01 +00:00
.mergify.yml chore: master -> main (#11730) 2022-04-24 10:19:04 -04:00
buf.work.yaml feat: full api module building alongside gogo proto files with buf schema registry support (#10669) 2022-01-06 14:57:55 -05:00
CHANGELOG.md chore: fix #12674 changelog (#12746) 2022-07-27 16:11:11 +00:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#7381) 2020-09-28 11:28:30 +02:00
CODING_GUIDELINES.md docs: Improve markdownlint configuration (#11104) 2022-02-10 12:07:01 +00:00
CONTRIBUTING.md chore: fix #12674 changelog (#12746) 2022-07-27 16:11:11 +00:00
docker-compose.yml build: add remote debugging with delve (#10587) 2021-12-01 12:44:54 +00:00
Dockerfile fix: pin go version Dockerfiles (#11711) 2022-04-20 14:33:56 -04:00
go.mod feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
go.sum feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
go.work ci: fix submodule test by adding tx module to go.work (#12741) 2022-07-27 11:55:29 +02:00
go.work.sum feat: go workspaces (#12675) 2022-07-26 21:35:31 +02:00
LICENSE chore: update license copyright (#12542) 2022-07-13 10:19:10 +00:00
Makefile fix: make proto-all & update versions for main 2022-07-26 11:27:10 +02:00
README.md docs(readme): update link to Ignite CLI (#12351) 2022-06-24 22:00:07 +02:00
RELEASE_PROCESS.md docs: updates outdated docs (#12014) 2022-05-31 08:59:38 -04:00
SECURITY.md docs: updates outdated docs (#12014) 2022-05-31 08:59:38 -04:00
UPGRADING.md refactor!: make simapp.MakeTestEncodingConfig private (#12747) 2022-07-27 17:23:56 +02:00

Cosmos SDK

banner

The Cosmos SDK is a framework for building blockchain applications. Tendermint Core (BFT Consensus) and the Cosmos SDK are written in the Golang programming language. Cosmos SDK is used to build Gaia, the first implementation of the Cosmos Hub.

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

Note: Requires Go 1.18+

Quick Start

To learn how the Cosmos SDK works from a high-level perspective, see the Cosmos SDK High-Level Intro.

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

For more information, see the Cosmos SDK Documentation.

Contributing

See CONTRIBUTING.md for details how to contribute and participate in our dev calls. If you want to follow the updates or learn more about the latest design then join our Discord.

Tools and Frameworks

The Cosmos ecosystem is vast. We will only make a few notable mentions here.

  • Tools: notable frameworks and modules.
  • CosmJS: the Swiss Army knife to power JavaScript based client solutions.

Cosmos Hub Mainnet

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

Inter-Blockchain Communication (IBC)

The IBC module for the Cosmos SDK has moved to its own cosmos/ibc-go repository. Go there to build and integrate with the IBC module.

Ignite CLI

Ignite CLI is the all-in-one platform to build, launch, and maintain any crypto application on a sovereign and secured blockchain. If you are building a new app or a new module, use Ignite CLI to get started and speed up development.

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.