-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade to cosmos sdk v0.50 (#408)
Co-authored-by: John Letey <[email protected]>
- Loading branch information
Showing
301 changed files
with
7,320 additions
and
190,267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
*Oct 17, 2024* | ||
|
||
This is the Helium major release of Noble. It upgrades the Noble's core | ||
dependencies, namely CometBFT (f.k.a. Tendermint), Cosmos SDK, and IBC to their | ||
latest stable release [Eden]. In addition to this upgrade, it also replaces the | ||
legacy [ParamAuthority] module with an in-house build [Authority] module. This | ||
module allows the Noble Maintenance Multisig to enact governance gated actions | ||
like chain upgrades and IBC client substitutions. | ||
|
||
The following modules have specifically been upgraded to Cosmos SDK `v0.50.x` | ||
|
||
- [FiatTokenFactory] — Circle's USD Coin | ||
- [CCTP] — Circle's Cross Chain Transfer Protocol | ||
- [Aura] — Ondo's US Dollar Yield Token | ||
- [Halo] — Hashnote's US Yield Coin | ||
- [Florin] — Monerium's EUR emoney | ||
- [Forwarding] — Noble's Intents System | ||
|
||
[aura]: https://github.com/ondoprotocol/usdy-noble | ||
[authority]: https://github.com/noble-assets/authority | ||
[cctp]: https://github.com/circlefin/noble-cctp | ||
[eden]: https://medium.com/the-interchain-foundation/elevating-the-cosmos-sdk-eden-v0-50-20a554e16e43 | ||
[florin]: https://github.com/monerium/module-noble | ||
[forwarding]: https://github.com/noble-assets/forwarding | ||
[halo]: https://github.com/noble-assets/halo | ||
[fiattokenfactory]: https://github.com/circlefin/noble-fiattokenfactory | ||
[paramauthority]: https://github.com/strangelove-ventures/paramauthority |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ release/ | |
play_sh/ | ||
/heighliner* | ||
bin/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,151 +1,60 @@ | ||
#!/usr/bin/make -f | ||
|
||
BRANCH := $(shell git rev-parse --abbrev-ref HEAD) | ||
COMMIT := $(shell git log -1 --format='%H') | ||
DOCKER := $(shell which docker) | ||
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf | ||
|
||
# don't override user values | ||
ifeq (,$(VERSION)) | ||
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//') | ||
# if VERSION is empty, then populate it with branch's name and raw commit hash | ||
VERSION := $(shell git describe --exact-match 2>/dev/null) | ||
ifeq (,$(VERSION)) | ||
VERSION := $(BRANCH)-$(COMMIT) | ||
endif | ||
endif | ||
|
||
CHAIN_NAME = noble | ||
DAEMON_NAME = nobled | ||
|
||
LEDGER_ENABLED ?= true | ||
TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7" | ||
BUILDDIR ?= $(CURDIR)/build | ||
|
||
export GO111MODULE = on | ||
|
||
# process build tags | ||
|
||
build_tags = netgo | ||
ifeq ($(LEDGER_ENABLED),true) | ||
ifeq ($(OS),Windows_NT) | ||
GCCEXE = $(shell where gcc.exe 2> NUL) | ||
ifeq ($(GCCEXE),) | ||
$(error gcc.exe not installed for ledger support, please install or set LEDGER_ENABLED=false) | ||
else | ||
build_tags += ledger | ||
endif | ||
else | ||
UNAME_S = $(shell uname -s) | ||
ifeq ($(UNAME_S),OpenBSD) | ||
$(warning OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988)) | ||
ifeq ($(shell git status --porcelain),) | ||
VERSION := $(BRANCH) | ||
else | ||
GCC = $(shell command -v gcc 2> /dev/null) | ||
ifeq ($(GCC),) | ||
$(error gcc not installed for ledger support, please install or set LEDGER_ENABLED=false) | ||
else | ||
build_tags += ledger | ||
endif | ||
VERSION := $(BRANCH)-dirty | ||
endif | ||
endif | ||
endif | ||
|
||
build_tags += $(BUILD_TAGS) | ||
build_tags := $(strip $(build_tags)) | ||
|
||
whitespace := | ||
whitespace += $(whitespace) | ||
comma := , | ||
build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) | ||
|
||
# process linker flags | ||
|
||
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(CHAIN_NAME) \ | ||
-X github.com/cosmos/cosmos-sdk/version.AppName=$(DAEMON_NAME) \ | ||
-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=$(TM_VERSION) | ||
|
||
ldflags += $(LDFLAGS) | ||
ldflags := $(LDFLAGS) | ||
ldflags += -X github.com/cosmos/cosmos-sdk/version.Name=Noble \ | ||
-X github.com/cosmos/cosmos-sdk/version.AppName=nobled \ | ||
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ | ||
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) | ||
ldflags := $(strip $(ldflags)) | ||
|
||
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' | ||
BUILD_FLAGS := -ldflags '$(ldflags)' | ||
|
||
|
||
############################################################################### | ||
### Building / Install ### | ||
############################################################################### | ||
|
||
all: install | ||
|
||
install: go.sum | ||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/nobled | ||
@echo "🤖 Installing nobled..." | ||
@go install -mod=readonly $(BUILD_FLAGS) ./cmd/nobled | ||
@echo "✅ Completed install!" | ||
|
||
build: | ||
go build $(BUILD_FLAGS) -o bin/nobled ./cmd/nobled | ||
|
||
@echo "🤖 Building nobled..." | ||
@go build -mod=readonly $(BUILD_FLAGS) -o "$(PWD)/build/" ./... | ||
@echo "✅ Completed build!" | ||
|
||
############################################################################### | ||
### Linting ### | ||
### Testing ### | ||
############################################################################### | ||
|
||
lint: | ||
@echo "--> Running linter" | ||
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m | ||
|
||
|
||
|
||
############################################################################### | ||
### INTERCHAINTEST (ictest) ### | ||
############################################################################### | ||
|
||
test: | ||
go test -v -race ./... | ||
|
||
############################################################################### | ||
### Build Image ### | ||
############################################################################### | ||
get-heighliner: | ||
git clone https://github.com/strangelove-ventures/heighliner.git | ||
cd heighliner && go install | ||
|
||
local-image: | ||
ifeq (,$(shell which heighliner)) | ||
echo 'heighliner' binary not found. Consider running `make get-heighliner` | ||
echo 'heighliner' binary not found. Please install: https://github.com/strangelove-ventures/heighliner | ||
else | ||
heighliner build -c noble --local -f ./chains.yaml | ||
heighliner build -c noble --local | ||
endif | ||
|
||
.PHONY: all build-linux install lint test \ | ||
go-mod-cache build interchaintest get-heighliner local-image \ | ||
|
||
############################################################################### | ||
### Protobuf ### | ||
### Linting ### | ||
############################################################################### | ||
|
||
BUF_VERSION=1.40 | ||
|
||
proto-all: proto-format proto-lint proto-gen | ||
|
||
proto-format: | ||
@echo "🤖 Running protobuf formatter..." | ||
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ | ||
bufbuild/buf:$(BUF_VERSION) format --diff --write | ||
@echo "✅ Completed protobuf formatting!" | ||
|
||
proto-gen: | ||
@echo "🤖 Generating code from protobuf..." | ||
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ | ||
noble-proto sh ./proto/generate.sh | ||
@echo "✅ Completed code generation!" | ||
lint: | ||
@echo "--> Running linter" | ||
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m | ||
|
||
proto-lint: | ||
@echo "🤖 Running protobuf linter..." | ||
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ | ||
bufbuild/buf:$(BUF_VERSION) lint | ||
@echo "✅ Completed protobuf linting!" | ||
|
||
proto-setup: | ||
@echo "🤖 Setting up protobuf environment..." | ||
@docker build --rm --tag noble-proto:latest --file proto/Dockerfile . | ||
@echo "✅ Setup protobuf environment!" | ||
.PHONY: install build local-image lint |
Oops, something went wrong.