Skip to content

Commit

Permalink
Merge pull request #129 from b-harvest/v8/develop
Browse files Browse the repository at this point in the history
feat: Canto v8
  • Loading branch information
tkkwon1998 authored Aug 2, 2024
2 parents ac99f12 + 1856a00 commit 35694fa
Show file tree
Hide file tree
Showing 514 changed files with 126,556 additions and 46,840 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "^1.18"
go-version: "^1.21"
- uses: technote-space/[email protected]
id: git_diff
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- name: Display go version
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.21
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21
- name: display go version
run: go version
- name: test & coverage report creation
Expand Down
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!--
Guiding Principles:
Changelogs are for humans, not machines.
There should be an entry for every single version.
The same types of changes should be grouped.
Versions and sections should be linkable.
The latest version comes first.
The release date of each version is displayed.
Mention whether you follow Semantic Versioning.
Usage:
Change log entries are to be added to the Unreleased section under the
appropriate stanza (see below). Each entry should ideally include a tag and
the Github issue reference in the following format:
* (<tag>) \#<issue-number> message
The issue numbers will later be link-ified during the release process so you do
not have to worry about including a link manually, but you can if you wish.
Types of changes (Stanzas):
"Features" for new features.
"Improvements" for changes in existing functionality.
"Deprecated" for soon-to-be removed features.
"Bug Fixes" for any bug fixes.
"Client Breaking" for breaking CLI commands and REST routes used by end-users.
"API Breaking" for breaking exported APIs used by developers building on SDK.
"State Machine Breaking" for any changes that result in a different AppState given same genesisState and txList.
Ref: https://keepachangelog.com/en/1.0.0/
-->

# CHANGELOG

## Unreleased

### State Machine Breaking

- (deps) [#126](https://github.com/Canto-Network/Canto/pull/126) Bump Comsos-SDK to v0.50.6, CometBFT to v0.38.6, ibc-go to v8.2.1
<!-- add ethermint bump up info after release -->

### Improvements

- (ante) [#126](https://github.com/Canto-Network/Canto/pull/126) Remove NewValidatorCommissionDecorator because its logic is duplicated with the logic implemented in the staking module's msg server.
- (x/*) [#126](https://github.com/Canto-Network/Canto/pull/126) Apply Cosmos-SDK improvements.
- Remove `Type()` and `Route()` methods from all msgs
- Remove `GetSigner()` methods from all msgs, move their logic to protobuf and define a custom GetSigner func if needed.
- `authority` has been added to the required module to execute proposal msgs.

### Client Breaking

- (x/*) [#126](https://github.com/Canto-Network/Canto/pull/126) module-specific proposal and update params is moved to msg levelto to support msgs-based gov proposals.

<!-- Release links -->
81 changes: 22 additions & 59 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
DIFF_TAG=$(shell git rev-list --tags="v*" --max-count=1 --not $(shell git rev-list --tags="v*" "HEAD..origin"))
DEFAULT_TAG=$(shell git rev-list --tags="v*" --max-count=1)
VERSION ?= $(shell echo $(shell git describe --tags $(or $(DIFF_TAG), $(DEFAULT_TAG))) | sed 's/^v//')
TMVERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::')
TMVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true
GOPATH ?= $(shell $(GO) env GOPATH)
Expand Down Expand Up @@ -91,7 +91,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=canto \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TMVERSION)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TMVERSION)

# DB backend selection
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
Expand Down Expand Up @@ -478,74 +478,37 @@ format:
### Protobuf ###
###############################################################################

containerProtoVer=v0.2
containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer)
containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer)
containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer)
containerProtoFmt=cosmos-sdk-proto-fmt-$(containerProtoVer)
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-all: proto-format proto-gen proto-swagger-gen update-swagger-docs
# ------
# NOTE: If you are experiencing problems running these commands, try deleting
# the docker images and execute the desired command again.
#
proto-all: proto-format proto-lint proto-gen

proto-gen:
@echo "Generating Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protocgen.sh; fi
$(protoImage) sh ./scripts/protocgen.sh
proto-lint:
@echo "Linting Protobuf files"
@$(protoImage) buf lint --error-format=json

proto-check-breaking:
@echo "Checking Protobuf files for breaking changes"
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main

# TODO: Rethink API docs generation
proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protoc-swagger-gen.sh; fi
$(protoImage) sh ./scripts/protoc-swagger-gen.sh

proto-format:
@echo "Formatting Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \; ; fi

proto-lint:
@$(DOCKER_BUF) lint --error-format=json

.PHONY: proto-all proto-gen proto-swagger-gen proto-format


TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.15/proto/tendermint
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.45.1
ETHERMINT_URL = https://raw.githubusercontent.com/Canto-Network/ethermint-v2/v0.10.0
IBC_GO_URL = https://raw.githubusercontent.com/cosmos/ibc-go/v3.0.0-rc0
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master

TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto
TM_ABCI_TYPES = third_party/proto/tendermint/abci
TM_TYPES = third_party/proto/tendermint/types

GOGO_PROTO_TYPES = third_party/proto/gogoproto

COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto

proto-update-deps:
@mkdir -p $(GOGO_PROTO_TYPES)
@curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto

@mkdir -p $(COSMOS_PROTO_TYPES)
@curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto

## Importing of tendermint protobuf definitions currently requires the
## use of `sed` in order to build properly with cosmos-sdk's proto file layout
## (which is the standard Buf.build FILE_LAYOUT)
## Issue link: https://github.com/tendermint/tendermint/issues/5021
@mkdir -p $(TM_ABCI_TYPES)
@curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto

@mkdir -p $(TM_TYPES)
@curl -sSL $(TM_URL)/types/types.proto > $(TM_TYPES)/types.proto

@mkdir -p $(TM_CRYPTO_TYPES)
@curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto
@curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto


@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;

.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
.PHONY: proto-all proto-gen proto-lint proto-check-breaking proto-swagger-gen proto-format

###############################################################################
### Localnet ###
Expand Down
Loading

0 comments on commit 35694fa

Please sign in to comment.