Skip to content

Commit

Permalink
feat: wip twilight upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed Aug 18, 2023
1 parent fcb702c commit 4a5f303
Show file tree
Hide file tree
Showing 438 changed files with 51,627 additions and 41,478 deletions.
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
vue/node_modules
vue/dist
release/
.idea/
.vscode/
.DS_Store
play_sh/
/heighliner*
bin/
.idea
build
76 changes: 38 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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"
TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') # grab everything after the space in "github.com/cometbft/cometbft v0.37.2"
BUILDDIR ?= $(CURDIR)/build

export GO111MODULE = on
Expand Down Expand Up @@ -64,36 +64,43 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(CHAIN_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)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION)

ldflags += $(LDFLAGS)
ldflags := $(strip $(ldflags))

BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'


###############################################################################
### Building / Install ###
### Build ###
###############################################################################

all: install

install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/nobled

build:
go build $(BUILD_FLAGS) -o bin/nobled ./cmd/nobled
@echo "🤖 Building nobled..."
@go build $(BUILD_FLAGS) -o "$(PWD)/build/" ./cmd/nobled && cd ..
@echo "✅ Completed build!"

install:
@echo "🤖 Installing nobled..."
@go install $(BUILD_FLAGS) ./cmd/nobled && cd ..
@echo "✅ Completed install!"

###############################################################################
### Linting ###
### Formatting & Linting ###
###############################################################################

lint:
@echo "--> Running linter"
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m
gofumpt_cmd=mvdan.cc/gofumpt
golangci_lint_cmd=github.com/golangci/golangci-lint/cmd/golangci-lint

format:
@echo "🤖 Running formatter..."
@go run $(gofumpt_cmd) -l -w .
@echo "✅ Completed formatting!"

lint:
@echo "🤖 Running linter..."
@go run $(golangci_lint_cmd) run --timeout=10m
@echo "✅ Completed linting!"

###############################################################################
### INTERCHAINTEST (ictest) ###
Expand Down Expand Up @@ -144,35 +151,28 @@ endif
go-mod-cache build interchaintest get-heighliner local-image \

###############################################################################
### Protobuf ###
### 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)

proto-all: proto-format proto-lint proto-gen
BUF_VERSION=1.26.1
BUILDER_VERSION=0.13.5

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
proto-all: proto-format proto-lint proto-gen

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
@echo "🤖 Running protobuf formatter..."
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \
bufbuild/buf:$(BUF_VERSION) format --diff --write
@echo "✅ Completed protobuf formatting!"

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
proto-gen:
@echo "🤖 Generating code from protobuf..."
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \
ghcr.io/cosmos/proto-builder:$(BUILDER_VERSION) sh ./proto/generate.sh
@echo "✅ Completed code generation!"

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

proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main

.PHONY: proto-all proto-gen proto-format proto-swagger-gen proto-lint proto-check-breaking
@echo "🤖 Running protobuf linter..."
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \
bufbuild/buf:$(BUF_VERSION) lint
@echo "✅ Completed protobuf linting!"
248 changes: 0 additions & 248 deletions app/ante.go

This file was deleted.

Loading

0 comments on commit 4a5f303

Please sign in to comment.