Skip to content

Commit

Permalink
build: use cometbft in v0.45 (#15089)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Feb 24, 2023
1 parent 3a48354 commit 53db377
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 40 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- run: make build
Expand All @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- name: install tparse
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand All @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Improvements

* (deps) Set minimum version to Go 1.19. Go 1.18 is no longer supported by the Go team.
* (deps) Migrate to [CometBFT](https://github.com/cometbft/cometbft). Follow the instructions in the [release notes](./RELEASE_NOTES.md).
* (deps) [#15127](https://github.com/cosmos/cosmos-sdk/pull/15127) Bump btcd.
* (store) [#14410](https://github.com/cosmos/cosmos-sdk/pull/14410) `rootmulti.Store.loadVersion` has validation to check if all the module stores' height is correct, it will error if any module store has incorrect height.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=master


TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.22/proto/tendermint
TM_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.34.27-alpha.2/proto/tendermint
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The Cosmos SDK is a framework for building blockchain applications. [Tendermint
**WARNING**: The Cosmos SDK has mostly stabilized, but we are still making some
breaking changes.

**Note**: Requires [Go 1.18+](https://golang.org/dl/)
**Note**: Requires [Go 1.19+](https://golang.org/dl/)

## Quick Start

Expand Down
19 changes: 12 additions & 7 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Cosmos SDK v0.45.14 Release Notes
# Cosmos SDK v0.45.15 Release Notes

This release fixes a possible way to DoS a node.

**NOTE**: Add or update the following replace in the `go.mod` of your application:
This release includes the migration to CometBFT. This migration should be not breaking.
From `v0.45.15`+, the following replace is *mandatory* in the `go.mod` of your application:

```go
// use informal system fork of tendermint
replace github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26
// use cometbft
replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27
```

A more complete migration is happening in Cosmos SDK v0.47.

Additionally, the SDK sets its minimum version to Go 1.19.
This is not because the SDK uses new Go 1.19 functionalities, but because we recommend chains as well to upgrade to Go 1.19 because Go 1.18 is not supported anymore.
We recommend applications to perform a **coordinated upgrade** when migrating from Go 1.18 to Go 1.19.

Please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/release/v0.45.x/CHANGELOG.md) for an exhaustive list of changes.

**Full Commit History**: https://github.com/cosmos/cosmos-sdk/compare/v0.45.13...v0.45.14
**Full Commit History**: https://github.com/cosmos/cosmos-sdk/compare/v0.45.14...v0.45.15
2 changes: 1 addition & 1 deletion contrib/images/simd-dlv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine AS build
FROM golang:1.19-alpine AS build
RUN apk add build-base git linux-headers libc-dev
RUN go install github.com/go-delve/delve/cmd/dlv@latest
WORKDIR /work
Expand Down
2 changes: 1 addition & 1 deletion contrib/images/simd-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine AS build
FROM golang:1.19-alpine AS build
RUN apk add build-base git linux-headers
WORKDIR /work
COPY go.mod go.sum /work/
Expand Down
2 changes: 1 addition & 1 deletion contrib/rosetta/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as build
FROM golang:1.19-alpine as build

RUN apk add --no-cache tar

Expand Down
2 changes: 1 addition & 1 deletion contrib/rosetta/rosetta-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as build
FROM golang:1.19-alpine as build

RUN apk add git gcc libc-dev --no-cache

Expand Down
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cosmos/cosmos-sdk

go 1.18
go 1.19

require (
cosmossdk.io/core v0.5.1
Expand Down Expand Up @@ -41,7 +41,7 @@ require (
github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.1
github.com/tendermint/go-amino v0.16.0
github.com/tendermint/tendermint v0.34.26
github.com/tendermint/tendermint v0.34.27
github.com/tendermint/tm-db v0.6.6
github.com/tidwall/btree v1.5.0
golang.org/x/crypto v0.5.0
Expand All @@ -68,6 +68,7 @@ require (
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cometbft/cometbft-db v0.7.0 // indirect
github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.1 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
Expand Down Expand Up @@ -153,8 +154,9 @@ replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

github.com/jhump/protoreflect => github.com/jhump/protoreflect v1.9.0
// use informal system fork of tendermint
github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26

// use cometbft
github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27-alpha.2

// latest grpc doesn't work with with our modified proto compiler, so we need to enforce
// the following version across all dependencies.
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcju
github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI=
github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA=
github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M=
github.com/cometbft/cometbft v0.34.27-alpha.2 h1:ERW9qPlaHjshc6BuCAc5yfXcIWuDKAjGLCzJvQQ3YlM=
github.com/cometbft/cometbft v0.34.27-alpha.2/go.mod h1:6tEDwldPfO1ynAd9kx8j808atUVY0jUAJ18l3glfpuM=
github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo=
github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0=
github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4=
github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak=
github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ=
Expand Down Expand Up @@ -561,8 +565,6 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y
github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/informalsystems/tendermint v0.34.26 h1:89XvVexAy62geGWxmDmdmmJvfindx+Su2oTuwfSWMeU=
github.com/informalsystems/tendermint v0.34.26/go.mod h1:q3uAZ/t5+MblQhFuHSd4flqaLDx7iUtWpwWbwvHAFhs=
github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
Expand Down
2 changes: 1 addition & 1 deletion server/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server/types"
"github.com/spf13/cobra"
tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
tmcmd "github.com/tendermint/tendermint/cmd/cometbft/commands"
)

// NewRollbackCmd creates a command to rollback tendermint and multistore state by one height.
Expand Down
2 changes: 1 addition & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/spf13/cobra"
"github.com/tendermint/tendermint/abci/server"
tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
tcmd "github.com/tendermint/tendermint/cmd/cometbft/commands"
tmos "github.com/tendermint/tendermint/libs/os"
"github.com/tendermint/tendermint/node"
"github.com/tendermint/tendermint/p2p"
Expand Down
2 changes: 1 addition & 1 deletion server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
tmcmd "github.com/tendermint/tendermint/cmd/cometbft/commands"
tmcfg "github.com/tendermint/tendermint/config"
tmlog "github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"
Expand Down
2 changes: 1 addition & 1 deletion snapshots/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestManager_Take(t *testing.T) {
Height: 5,
Format: snapshotter.SnapshotFormat(),
Chunks: 1,
Hash: []uint8{0xcd, 0x17, 0x9e, 0x7f, 0x28, 0xb6, 0x82, 0x90, 0xc7, 0x25, 0xf3, 0x42, 0xac, 0x65, 0x73, 0x50, 0xaa, 0xa0, 0x10, 0x5c, 0x40, 0x8c, 0xd5, 0x1, 0xed, 0x82, 0xb5, 0xca, 0x8b, 0xe0, 0x83, 0xa2},
Hash: []uint8{0x14, 0x38, 0x97, 0x96, 0xba, 0xe4, 0x81, 0xaf, 0x6c, 0xac, 0xff, 0xa5, 0xb8, 0x7e, 0x63, 0x4b, 0xac, 0x69, 0x3f, 0x38, 0x90, 0x5c, 0x7d, 0x57, 0xb3, 0xf, 0x69, 0x73, 0xb3, 0xa0, 0xe0, 0xad},
Metadata: types.Metadata{
ChunkHashes: checksums(expectChunks),
},
Expand Down
2 changes: 1 addition & 1 deletion store/rootmulti/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestMultistoreSnapshot_Checksum(t *testing.T) {
"aa048b4ee0f484965d7b3b06822cf0772cdcaad02f3b1b9055e69f2cb365ef3c",
"7921eaa3ed4921341e504d9308a9877986a879fe216a099c86e8db66fcba4c63",
"a4a864e6c02c9fca5837ec80dc84f650b25276ed7e4820cf7516ced9f9901b86",
"ca2879ac6e7205d257440131ba7e72bef784cd61642e32b847729e543c1928b9",
"8ca5b957e36fa13e704c31494649b2a74305148d70d70f0f26dee066b615c1d0",
}},
}
for _, tc := range testcases {
Expand Down
2 changes: 1 addition & 1 deletion third_party/proto/tendermint/abci/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ message ResponseCheckTx {
string sender = 9;
int64 priority = 10;

// mempool_error is set by Tendermint.
// mempool_error is set by CometBFT.
// ABCI applictions creating a ResponseCheckTX should not set mempool_error.
string mempool_error = 11;
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/proto/tendermint/crypto/keys.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto";

import "gogoproto/gogo.proto";

// PublicKey defines the keys available for use with Tendermint Validators
// PublicKey defines the keys available for use with Validators
message PublicKey {
option (gogoproto.compare) = true;
option (gogoproto.equal) = true;
Expand Down
2 changes: 1 addition & 1 deletion third_party/proto/tendermint/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ message BlockID {

// --------------------------------

// Header defines the structure of a Tendermint block header.
// Header defines the structure of a block header.
message Header {
// basic block info
tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false];
Expand Down

0 comments on commit 53db377

Please sign in to comment.