Go to file
Likhita Polavarapu 2bb114acec
fix: Evidence API does not decode the hash properly (#13740)
## Description

Closes: #13444 

This PR fixes the x/evidence api query which is not decoding the evidence hash properly because of its type ([]byte). We fix it with the following steps:
1. Adds a new proto field `hash` of type `string`
2. Make the old `evidence_hash` field deprecated
3. Updates query handler 

---

### 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...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] 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`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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-11-04 10:08:44 +00:00
.github docs: add documentation on documentation deployment (#13739) 2022-11-03 17:23:52 +01:00
.vscode chore: small improvements (#13672) 2022-10-26 22:47:28 +00:00
api fix: Evidence API does not decode the hash properly (#13740) 2022-11-04 10:08:44 +00:00
baseapp feat: nonce (sequence number) based mempool (#13645) 2022-10-26 09:04:34 -05:00
client feat: add autocli app wiring + remote info support (#13281) 2022-11-01 21:34:59 +00:00
codec fix: add gRPC nil/zero check in query (#13352) 2022-09-29 01:20:03 +00:00
contrib refactor: clean-up SDK tools (#13603) 2022-10-21 15:15:20 +00:00
core build(deps): Bump cosmossdk.io/api from 0.2.3 to 0.2.4 (#13713) 2022-10-31 15:59:30 -04:00
crypto chore(crypto): update btcec to v2 (#13513) 2022-10-17 16:33:43 +02:00
depinject build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tools/cosmovisor (#13637) 2022-10-24 20:33:20 +02:00
docs docs: add documentation on documentation deployment (#13739) 2022-11-03 17:23:52 +01:00
errors build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tools/cosmovisor (#13637) 2022-10-24 20:33:20 +02:00
fuzz refactor: clean-up SDK tools (#13603) 2022-10-21 15:15:20 +00:00
internal refactor: add sdk.LogDeferred to report errors in defers (#13619) 2022-10-26 15:42:19 +00:00
math build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tools/cosmovisor (#13637) 2022-10-24 20:33:20 +02:00
orm build(deps): Bump cosmossdk.io/api from 0.2.3 to 0.2.4 (#13713) 2022-10-31 15:59:30 -04:00
proto fix: Evidence API does not decode the hash properly (#13740) 2022-11-04 10:08:44 +00:00
runtime refactor: remove unused code (#13725) 2022-11-02 11:50:47 +01:00
scripts fix: nil pointer when quitting simd start (#13743) 2022-11-03 12:00:00 +00:00
server chore: use gateway fork (#13754) 2022-11-03 21:14:59 +00:00
simapp refactor: cleanup simapp (#13757) 2022-11-04 08:51:18 +01:00
snapshots fix: double close (#13400) 2022-09-27 18:16:13 +00:00
std fix: register evidence regression (#10595) 2021-12-14 14:25:31 +00:00
store refactor: remove unused code (#13725) 2022-11-02 11:50:47 +01:00
telemetry fix: all: fix resource leaks found by staticmajor (#13394) 2022-10-06 20:11:40 +00:00
tests chore: add TestSendCoins_Invalid_SendLockedCoins to tests/integration (#13752) 2022-11-03 21:50:21 +00:00
testutil refactor: cleanup simapp (#13757) 2022-11-04 08:51:18 +01:00
third_party/proto chore: proto format (#13685) 2022-10-28 17:40:48 +02:00
tools/cosmovisor build(deps): Bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1 (#13735) 2022-11-02 20:53:47 +00:00
tx quick lint while doing other prs (#13726) 2022-11-02 11:12:36 +00:00
types fix(bank): fix unhandled error for vesting (#13690) 2022-11-03 18:22:13 +00:00
version chore: fix linting issues exposed by fixing golangci-lint (#12895) 2022-08-11 22:00:24 +02:00
x fix: Evidence API does not decode the hash properly (#13740) 2022-11-04 10:08:44 +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 refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +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 build: add go.work in gitignore (#13100) 2022-08-30 21:08:04 +00:00
.gitpod.yml Create .gitpod.yml (#12662) 2022-08-15 15:18:30 +02:00
.golangci.yml build(deps): Bump github.com/golangci/golangci-lint from 1.48.0 to 1.49.0 (#13013) 2022-08-24 23:13:11 +02:00
.goreleaser.yml ci: fix release notes not populated by goreleaser 2022-08-13 20:41:27 +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 refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
CHANGELOG.md fix: Evidence API does not decode the hash properly (#13740) 2022-11-04 10:08:44 +00:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#7381) 2020-09-28 11:28:30 +02:00
CODING_GUIDELINES.md feat: migrate to docusaurus (#13471) 2022-10-10 14:01:53 +00:00
CONTRIBUTING.md chore: small improvements (#13672) 2022-10-26 22:47:28 +00:00
docker-compose.yml build: add remote debugging with delve (#10587) 2021-12-01 12:44:54 +00:00
Dockerfile build(deps): bump go minimum version to go 1.19 (#13397) 2022-09-27 21:02:02 +02:00
go.mod refactor: cleanup simapp (#13757) 2022-11-04 08:51:18 +01:00
go.sum refactor: cleanup simapp (#13757) 2022-11-04 08:51:18 +01:00
go.work.example refactor: clean-up SDK tools (#13603) 2022-10-21 15:15:20 +00:00
LICENSE chore: update license copyright (#12542) 2022-07-13 10:19:10 +00:00
Makefile chore: proto format (#13685) 2022-10-28 17:40:48 +02:00
README.md fix: remove broken lines of code badge (#13741) 2022-11-03 09:49:44 +01:00
RELEASE_PROCESS.md docs: add documentation on documentation deployment (#13739) 2022-11-03 17:23:52 +01:00
SECURITY.md docs: updates outdated docs (#12014) 2022-05-31 08:59:38 -04:00
UPGRADING.md refactor: automate EventTypeMessage inclusion in every message execution (#13532) 2022-10-16 19:00:34 -04: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 Go programming language. Cosmos SDK is used to build Gaia, the implementation of the Cosmos Hub.

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

Note: Requires Go 1.19+

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 on 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. Awesome Cosmos is a community-curated list of notable frameworks, modules and tools.

Cosmos Hub Mainnet

The Cosmos Hub application, gaia, has 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 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.