Skip to content

Commit

Permalink
build: use cometbft in v0.45 (cosmos#15089)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored and JeancarloBarrios committed Sep 28, 2024
1 parent ef74491 commit 4779ce8
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 36 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
go-version: 1.19
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- run: make build
Expand All @@ -32,7 +32,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 @@ -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 All @@ -76,7 +76,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
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 @@ -104,7 +104,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 @@ -123,7 +123,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
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
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.19
- name: Display go version
run: go version
- name: install tparse
Expand All @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
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 @@ -133,7 +133,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
Expand Down Expand Up @@ -525,7 +525,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.19
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
Expand Down Expand Up @@ -914,7 +914,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
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 @@ -40,6 +40,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 @@ -402,7 +402,7 @@ proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH)


TM_URL = https://raw.githubusercontent.com/agoric-labs/tendermint/v0.34.23-alpha.agoric.2/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.7.0
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
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

// The following is to test committingClient (allowing parallel queries during
// write transactions):
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 @@ -557,8 +561,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 @@ -16,7 +16,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 @@ -22,7 +22,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 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",
"980925390cc50f14998ecb1e87de719ca9dd7e72f5fefbe445397bf670f36c31",
"8ca5b957e36fa13e704c31494649b2a74305148d70d70f0f26dee066b615c1d0",
}},
}
for _, tc := range testcases {
Expand Down
2 changes: 1 addition & 1 deletion store/snapshots/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestManager_Take(t *testing.T) {
Height: 5,
Format: snapshotter.SnapshotFormat(),
Chunks: 1,
Hash: []uint8{0xc5, 0xf7, 0xfe, 0xea, 0xd3, 0x4d, 0x3e, 0x87, 0xff, 0x41, 0xa2, 0x27, 0xfa, 0xcb, 0x38, 0x17, 0xa, 0x5, 0xeb, 0x27, 0x4e, 0x16, 0x5e, 0xf3, 0xb2, 0x8b, 0x47, 0xd1, 0xe6, 0x94, 0x7e, 0x8b},
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

0 comments on commit 4779ce8

Please sign in to comment.