Commit Graph

42 Commits

Author SHA1 Message Date
sashaodessa
6c5882bc40
fix: correct typos across codebase (#25335) 2025-09-10 19:36:08 +00:00
Alex | Interchain Labs
727faf0484
refactor: bring cometbft back to v0.38.x family (#25285) 2025-08-29 15:58:04 -04:00
Jammy Arkens
9e1a4a9bef
chore: fix grammatical errors and improve text clarity (#25171) 2025-08-14 15:09:13 +00:00
bigbear
ca0c177bca
docs: fix spelling issues (#25009) 2025-07-25 18:02:07 +00:00
Micke
c047bf741c
docs: correct spelling errors across multiple packages (#24988) 2025-07-24 21:17:14 +00:00
Zachary Becker
fd170b5140
feat: Update Cosmos SDK to CometBFT v2 (#24837)
Co-authored-by: aljo242 <alex@interchainlabs.io>
2025-06-04 17:34:20 +00:00
Fabiana Cecin
b71d0894f0
feat: Upgrade to CometBFT v1.x series (#24114)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Julián Toledano <JulianToledano@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
Co-authored-by: Zachary Becker <zachary@interchainlabs.io>
2025-05-13 12:57:22 +00:00
Alex | Interchain Labs
3c6deab626
chore: run modernize (#24356) 2025-04-03 10:42:20 -04:00
Đông Liều
2be528f04f
fix(server): allow align block header with skip check heaader in grpc server (#24068)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
2025-03-25 16:54:43 +00:00
Julien Robert
c452721442
style: add gci linter (#16758)
Co-authored-by: Jacob Gadikian <faddat@users.noreply.github.com>
2023-06-29 09:46:37 +00:00
Aleksandr Bezobchuk
6cee22df52
feat!: Comet v0.38 Integration (#15519)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-05-24 16:09:19 +00:00
Dev Ojha
38f27e3d1a
refactor: More cleanup of server/start.go (#16238) 2023-05-22 11:25:10 +00:00
yihuang
09ca393a19
feat: add Close method for resource cleanup in graceful shutdown (#16193)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2023-05-17 20:04:43 +00:00
yihuang
c1ceb3bdda
feat: add local snapshots management commands (#16067)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-05-11 10:11:31 +00:00
Marko
9e4fbb6db1
feat!: add node status endpoint (#15597)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2023-04-13 13:42:52 +00:00
Marko
a5ad307ae6
refactor: migrate consensus to collections (#15553) 2023-03-28 20:41:12 +00:00
Mark Rushakoff
e7097b1468
test: add cmdtest package (#15251)
## Description

This PR introduces the `cmdtest` package, offering a lightweight wrapper around cobra commands to simplify testing CLI utilities.

I backfilled tests for the `version` command, which was an example of a very simple test setup; and for the `export` command, which was more involved due to the server and client context requirements.

I did notice that there are some existing tests for some utilities, but the `cmdtest` package follows a simple pattern that has been easy to use successfully in [the relayer](https://github.com/cosmos/relayer/blob/main/internal/relayertest/system.go) and in other projects outside the Cosmos ecosystem.

While filling in these tests, I started removing uses of `cmd.Print`, as that is the root cause of issues like #8498, #7964, #15167, and possibly others. Internal to cobra, the print family of methods write to `cmd.OutOrStderr()` -- meaning that if the authors call `cmd.SetOutput()` before executing the command, the output will be written to stdout as expected; otherwise it will go to stderr. I don't understand why that would be the default behavior, but it is probably too late to change from cobra's side.

Instead of `cmd.Print`, we prefer to `fmt.Fprint(cmd.OutOrStdout())` or `fmt.Fprint(cmd.ErrOrStderr())` as appropriate, giving an unambiguous destination for output. And the new tests collect those outputs in plain `bytes.Buffer` values so that we can assert their content appropriately.

In the longer term, I would like to deprecate and eventually remove the `testutil` package's `ApplyMockIO` method and its `BufferWriter` and `BufferReader` types, as they are unnecessary indirection when a simpler solution exists. But that can wait until `cmdtest` has propagated through the codebase more.

---

### 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] 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~~
- [x] 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 all author checklist items have been addressed
- [ ] confirmed that this PR does not change production code
2023-03-06 19:40:24 +00:00
Aleksandr Bezobchuk
7f99ad5fe7
refactor: cleanup server logic (#15041) 2023-02-22 16:09:08 +00:00
Julien Robert
a7ac29e3f4
chore: rename log pkg and add zerolog (#14955) 2023-02-08 11:32:22 +00:00
Marko
281017ae90
refactor: use cosmos-sdk/log throughout (#14909)
## Description

removes the dependency of tendermint/utils/log from countless locations. This is in effort of reducing Tendermint's lib usage in the sdk 

this is nonbreaking as the interface is the same. To eliminate tm/utils/log in the sdk we need a few more things. Once we have fully removed the tendermint logger, I would propose we break the interface and define our own for our use case, when we pass the logger to tendermint in the node.New() function we can wrap our logger for its use case 

---

### 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/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)
2023-02-07 10:54:48 +00:00
Julien Robert
80dd55f79b
refactor: rename to CometBFT (#14914) 2023-02-06 18:11:14 +00:00
Julien Robert
41a3dfeced
refactor!: migrate Cosmos SDK to CometBFT (#14897) 2023-02-05 14:51:33 +01:00
Likhita Polavarapu
7559d9ecd3
refactor: create go.mod for store (#14746)
Co-authored-by: Marko <marbar3778@yahoo.com>
2023-01-25 13:31:56 +00:00
Noel Ukwa
c822836501
refactor: migrate calls from alias file to appropriate store/types (#14455)
Co-authored-by: Marko <marbar3778@yahoo.com>
Closes https://github.com/cosmos/cosmos-sdk/issues/14406
2023-01-10 15:31:06 +00:00
Jacob Gadikian
1bb0629846
chore: iavl-v0.20-alpha1 and cosmos-db (#14411)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2022-12-28 21:42:00 +01:00
Matt Kocubinski
61effe8260
feat: ABCI 1.0 baseapp integration (#13453) 2022-11-09 09:50:27 -06:00
Aleksandr Bezobchuk
c60c55616d
feat: gRPC query for operator and chain configuration (#13485) 2022-10-10 19:12:00 +00:00
Julien Robert
92394f2917
feat!: specify module to export (#13437) 2022-10-04 10:06:30 +00:00
Julien Robert
6d0ef15b0a
refactor: migrate to cosmos/gogoproto (#13070) 2022-09-08 17:27:48 +00:00
Marko
e09516f479
chore: bump tendermint version (#13148) 2022-09-05 07:39:12 +00:00
yihuang
51d2de582d
fix: rollback command don't actually delete multistore versions (#11361)
* rollback command don't actually delete multistore versions

Closes: #11333

- add unit tests
- use LoadVersionForOverwriting
- update tendermint dependency to 0.35.x release branch

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

flushMetadata after rollback

Update server/rollback.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

fix build

gofumpt

* fix unit test
2022-08-30 05:50:00 +00:00
Julien Robert
1dee068932
chore: downgrade to tendermint v0.34.x (#12958) 2022-08-20 02:33:07 +02:00
Aleksandr Bezobchuk
af8ad3d20d
chore: bump TM to v0.35.0 release candidate (#10210)
Integrate Tendermint v0.35.0, including changes to build and test
plumbing necessary to make everything build. This change does not
update any SDK APIs to make use of new features.

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: tycho garen <garen@tychoish.com>
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-11-16 11:24:38 -08:00
Marko
80918462a1
fix!: remove grpc query routing through tendermint (#10045)
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Revert routing queries through tendermint. 

The reason this change was made is because of this error:
```
fatal error: concurrent map read and map write
```

The person who identified this error submitted these steps to reproduce 
```
User sends a query with grpc
Tendermint Commit new blocks and tries to Commit IAVL (which causing IAVL versions map to change)
At the same time query tries to read from the same map (iavl.(*MutableTree).VersionExists) to check if requested version is exists
Node exits with fatal error: concurrent map read and map write
```

With the recent changes to IAVL submitted by terra (cc @YunSuk-Yeo) the reason for why we need to route through tendermint is no longer present. We should revert it when 0.17.1 of IAVL is cut, which will be later today. 

---

### 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/master/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/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
2021-09-30 08:17:33 +00:00
yihuang
d5674a5d3e
fix: start GRPCWebServer in goroutine (#9704)
so it don't block other code from executing.

Closes #9703

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### 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/master/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/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
2021-07-19 01:20:55 +00:00
Amaury
e306e5b6f5
Make gRPC requests go through tendermint Query (#8549)
* 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>
2021-02-15 10:01:44 +00:00
MD Aleem
c58a8923a0
gRPC-gateway routes as alternative to legacy tendermint REST endpoints (#7965)
* WIP

* WIP setup

* WIP setup testsuite

* add node_info

* add GetLatestBlock,GetBlockByHeight grpc endpoints

* add GetValidatorSetByHeight, GetLatestValidatorSet

* fix lint

* fix tests

* proto format

* Update Makefile

* review changes

* Makefile format

* handle nil pagination

* rename query.go to service.go

* format Makefile

* format Makefile

* review changes

* review changes

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-25 15:58:11 +00:00
Robert Zaremba
c201963e41
Update x/banking and x/crisis InitChain re slow Gaia startup (#7764)
* 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>
2020-11-02 19:10:14 +00:00
Amaury Martiny
1961935fc7
Add GetTx gRPC endpoint (#7688)
* Add empty TxByHash

* Fix search & replace

* Renname to GetTx

* Make getTx grpc work

* Hash as string

* Add todo comment

* /tx

* Make tests pass

* Put into function

* Add changelog

* Fix lint

* RegisterTxService in server

* Remove comment

* Update proto/cosmos/tx/v1beta1/service.proto

Co-authored-by: Cory <cjlevinson@gmail.com>

* Create new protoCdc

* Move tx service to x/auth

* Small tweaks

* Link gh issue

* Fix lint

* Update x/auth/tx/service.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-10-30 12:32:02 +00:00
Anil Kumar Kammari
ca7b31dd5d
Register swagger API (#7246)
* init

* Fix statik gen

* Fix swagger

* Change swagger url

* Fix swagger serve

* remove ibc swagger from legacy docs

* Add old routes config

* Move swagger api to app.go

* add godoc

* Fix inputs

* Fix swagger dir

* Fix statik

* refactor

* fmt

* fix doc

* Fix swagger config check
2020-09-19 00:34:56 +00:00
Amaury Martiny
3b9b58c931
Add height in exported genesis (#7089)
* 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>
2020-09-03 10:11:46 +00:00
Aaron Craelius
e9534b0935
Add gRPC server & reflection (#6463)
* Add gRPC proxy

* Make GRPC disabled by default

* WIP on integration tests

* WIP on integration tests

* Start setting up in process tests

* Start setting up in process tests

* Make it compile

* Add start server to network util

* Add Println

* Use go routine

* Fix scopelint

* Move to proxy_test

* Add response type cache

* Remove proxy

* Tweaks

* Use channel to handle error

* Use error chan

* Update server/start.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Use %w

* Add sdk.Context

* Add comments

* Fix lint

* Add header and tests

* Address comments

* Factorize some code

* Fix lint

* Add height and prove in req metadata

* Add reflection test

* Fix lint

* Put grpc test in server/grpc

* Update baseapp/grpcserver.go

* Update baseapp/grpcserver.go

* Remove proof header

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
2020-07-27 17:57:15 +00:00