Skip to content

Commit 727faf0

Browse files
authored
refactor: bring cometbft back to v0.38.x family (#25285)
1 parent a379400 commit 727faf0

File tree

446 files changed

+15270
-103136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+15270
-103136
lines changed

CHANGELOG.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4646
* `x/nft`
4747
* `x/circuit`
4848
* `x/crisis`
49-
* [#24837](https://github.com/cosmos/cosmos-sdk/pull/24837) Update to using CometBFT v2.
50-
* This update changes the import paths from `cometbft/cometbft` to `cometbft/cometbft/v2`. Users can use the [migration tool](./tools/migration/TODO) to automatically update their nodes.
49+
* (crypto) [#24414](https://github.com/cosmos/cosmos-sdk/pull/24414) Remove sr25519 support, since it was removed in CometBFT v1.x (see: CometBFT [#3646](https://github.com/cometbft/cometbft/pull/3646)).
5150

5251
### Features
5352

@@ -128,10 +127,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
128127
* (x/bank) [#24053](https://github.com/cosmos/cosmos-sdk/pull/24053) Resolve a foot-gun by swapping send restrictions check in `InputOutputCoins` before coin deduction.
129128
* (codec/types) [#24336](https://github.com/cosmos/cosmos-sdk/pull/24336) Most types definitions were moved to `github.com/cosmos/gogoproto/types/any` with aliases to these left in `codec/types` so that there should be no breakage to existing code. This allows protobuf generated code to optionally reference the SDK's custom `Any` type without a direct dependency on the SDK. This can be done by changing the `protoc` `M` parameter for `any.proto` to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any`.
130129

131-
### API Breaking Changes
132-
133-
* (crypto) [#24414](https://github.com/cosmos/cosmos-sdk/pull/24414) Remove sr25519 support, since it was removed in CometBFT v1.x (see: CometBFT [#3646](https://github.com/cometbft/cometbft/pull/3646)).
134-
135130
### Bug Fixes
136131

137132
* (server)[#24583](https://github.com/cosmos/cosmos-sdk/pull/24583) Fix height calculation in pruning manager and better restart handling.

Makefile

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ifeq ($(findstring -,$(VERSION)),) # No "-" means it's just a hash
1212
VERSION := 0.0.0-$(VERSION_RAW)
1313
endif
1414
export VERSION
15-
export CMTVERSION := $(shell go list -m github.com/cometbft/cometbft/v2 | sed 's:.* ::')
15+
export CMTVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
1616
export COMMIT := $(shell git log -1 --format='%H')
1717
LEDGER_ENABLED ?= true
1818
BINDIR ?= $(GOPATH)/bin
@@ -67,7 +67,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=sim \
6767
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
6868
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
6969
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
70-
-X github.com/cometbft/cometbft/v2/version.TMCoreSemVer=$(CMTVERSION)
70+
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(CMTVERSION)
7171

7272
# DB backend selection
7373
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
@@ -431,52 +431,44 @@ proto-lint:
431431
proto-check-breaking:
432432
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main
433433

434-
CMT_VERSION_DIR = v1.0.1
435-
CMT_PROTO = v1
436-
CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/$(CMT_VERSION_DIR)/proto/cometbft
437-
CMT_CRYPTO_TYPES = proto/cometbft/crypto/$(CMT_PROTO)
438-
CMT_ABCI_TYPES = proto/cometbft/abci/$(CMT_PROTO)
439-
CMT_TYPES = proto/cometbft/types/$(CMT_PROTO)
440-
CMT_VERSION = proto/cometbft/version/$(CMT_PROTO)
441-
CMT_LIBS = proto/cometbft/libs/bits/$(CMT_PROTO)
442-
CMT_P2P = proto/cometbft/p2p/$(CMT_PROTO)
434+
CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.38.0/proto/tendermint
443435

444-
proto-update-comet:
445-
@echo "Updating Protobuf dependency: downloading cometbft.$(CMT_PROTO) files from CometBFT $(CMT_VERSION_DIR)"
436+
CMT_CRYPTO_TYPES = proto/tendermint/crypto
437+
CMT_ABCI_TYPES = proto/tendermint/abci
438+
CMT_TYPES = proto/tendermint/types
439+
CMT_VERSION = proto/tendermint/version
440+
CMT_LIBS = proto/tendermint/libs/bits
441+
CMT_P2P = proto/tendermint/p2p
442+
443+
proto-update-deps:
444+
@echo "Updating Protobuf dependencies"
446445

447446
@mkdir -p $(CMT_ABCI_TYPES)
448-
@curl -fsSL $(CMT_URL)/abci/$(CMT_PROTO)/service.proto > $(CMT_ABCI_TYPES)/service.proto
449-
@curl -fsSL $(CMT_URL)/abci/$(CMT_PROTO)/types.proto > $(CMT_ABCI_TYPES)/types.proto
447+
@curl -sSL $(CMT_URL)/abci/types.proto > $(CMT_ABCI_TYPES)/types.proto
450448

451449
@mkdir -p $(CMT_VERSION)
452-
@curl -fsSL $(CMT_URL)/version/$(CMT_PROTO)/types.proto > $(CMT_VERSION)/types.proto
450+
@curl -sSL $(CMT_URL)/version/types.proto > $(CMT_VERSION)/types.proto
453451

454452
@mkdir -p $(CMT_TYPES)
455-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/block.proto > $(CMT_TYPES)/block.proto
456-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/canonical.proto > $(CMT_TYPES)/canonical.proto
457-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/events.proto > $(CMT_TYPES)/events.proto
458-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/evidence.proto > $(CMT_TYPES)/evidence.proto
459-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/params.proto > $(CMT_TYPES)/params.proto
460-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/types.proto > $(CMT_TYPES)/types.proto
461-
@curl -fsSL $(CMT_URL)/types/$(CMT_PROTO)/validator.proto > $(CMT_TYPES)/validator.proto
453+
@curl -sSL $(CMT_URL)/types/types.proto > $(CMT_TYPES)/types.proto
454+
@curl -sSL $(CMT_URL)/types/evidence.proto > $(CMT_TYPES)/evidence.proto
455+
@curl -sSL $(CMT_URL)/types/params.proto > $(CMT_TYPES)/params.proto
456+
@curl -sSL $(CMT_URL)/types/validator.proto > $(CMT_TYPES)/validator.proto
457+
@curl -sSL $(CMT_URL)/types/block.proto > $(CMT_TYPES)/block.proto
462458

463459
@mkdir -p $(CMT_CRYPTO_TYPES)
464-
@curl -fsSL $(CMT_URL)/crypto/$(CMT_PROTO)/keys.proto > $(CMT_CRYPTO_TYPES)/keys.proto
465-
@curl -fsSL $(CMT_URL)/crypto/$(CMT_PROTO)/proof.proto > $(CMT_CRYPTO_TYPES)/proof.proto
460+
@curl -sSL $(CMT_URL)/crypto/proof.proto > $(CMT_CRYPTO_TYPES)/proof.proto
461+
@curl -sSL $(CMT_URL)/crypto/keys.proto > $(CMT_CRYPTO_TYPES)/keys.proto
466462

467463
@mkdir -p $(CMT_LIBS)
468-
@curl -fsSL $(CMT_URL)/libs/bits/$(CMT_PROTO)/types.proto > $(CMT_LIBS)/types.proto
464+
@curl -sSL $(CMT_URL)/libs/bits/types.proto > $(CMT_LIBS)/types.proto
469465

470466
@mkdir -p $(CMT_P2P)
471-
@curl -fsSL $(CMT_URL)/p2p/$(CMT_PROTO)/conn.proto > $(CMT_P2P)/conn.proto
472-
@curl -fsSL $(CMT_URL)/p2p/$(CMT_PROTO)/pex.proto > $(CMT_P2P)/pex.proto
473-
@curl -fsSL $(CMT_URL)/p2p/$(CMT_PROTO)/types.proto > $(CMT_P2P)/types.proto
467+
@curl -sSL $(CMT_URL)/p2p/types.proto > $(CMT_P2P)/types.proto
474468

475-
proto-update-deps:
476-
@echo "Updating Protobuf dependencies: running 'buf dep update'"
477-
$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf dep update
469+
$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update
478470

479-
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps proto-update-comet
471+
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
480472

481473
###############################################################################
482474
### Localnet ###

0 commit comments

Comments
 (0)