Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Sync upstream changes to testnet [DEV-1859] #53

Merged
merged 57 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2bbc921
build(deps): bump github.com/go-co-op/gocron from 1.15.1 to 1.16.1 (#…
dependabot[bot] Aug 1, 2022
2a3e297
chore: release v3.2.0
RiccardoM Aug 3, 2022
ad67aeb
build(deps): bump github.com/go-co-op/gocron from 1.16.1 to 1.16.2 (#…
dependabot[bot] Aug 5, 2022
413ffe6
build(deps): bump github.com/prometheus/client_golang from 1.12.2 to …
dependabot[bot] Aug 8, 2022
ea65fc9
fix: remove tombstone from `validator_status` (already exists in `val…
huichiaotsou Aug 8, 2022
d3574df
build(ci): replace DOCKERHUB_TOKEN with DOCKERHUB_PASSWORD
RiccardoM Aug 15, 2022
f6e0cfc
build: go v1.18 (#452)
huichiaotsou Aug 16, 2022
f2847a2
build(deps): bump github.com/go-co-op/gocron from 1.16.2 to 1.16.3 (#…
dependabot[bot] Aug 23, 2022
c01e1de
feat: updated staking pool values (#455)
MonikaCat Aug 24, 2022
9c9712a
build(deps): bump github.com/go-co-op/gocron from 1.16.3 to 1.17.0 (#…
dependabot[bot] Aug 25, 2022
c946ce2
feat: add daily refetch module (#454)
MonikaCat Aug 26, 2022
faa7f4d
build(deps): bump github.com/rs/zerolog from 1.27.0 to 1.28.0 (#460)
dependabot[bot] Aug 29, 2022
bc93e79
fix: parse gov genesis with `doc.InitialHeight` instead of height 1 (…
huichiaotsou Aug 29, 2022
a108238
build(deps): bump github.com/lib/pq from 1.10.6 to 1.10.7 (#463)
dependabot[bot] Sep 7, 2022
48f05f0
build(deps): bump forbole/juno to v3.4.0 (#462)
MonikaCat Sep 12, 2022
4dccf53
fix: get open proposal ids in deposit/voting period by block time ins…
huichiaotsou Sep 15, 2022
f48289c
build(deps): bump amannn/action-semantic-pull-request from 4.5.0 to 4…
dependabot[bot] Sep 28, 2022
696b0ff
build(deps): bump Dockerfile Go version to 1.18 (backport #466) (#474)
mergify[bot] Oct 1, 2022
739acc8
feat: store software upgrade plan and refresh data at upgrade height …
huichiaotsou Oct 4, 2022
80b8862
build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0 (#478)
dependabot[bot] Oct 13, 2022
4b866dc
build(deps): bump amannn/action-semantic-pull-request from 4.6.0 to 5…
dependabot[bot] Oct 13, 2022
f586bd1
build(deps): bump technote-space/get-diff-action from 6.1.0 to 6.1.1 …
dependabot[bot] Oct 17, 2022
f1dbcb5
build(deps): bump amannn/action-semantic-pull-request from 5.0.0 to 5…
dependabot[bot] Oct 17, 2022
3ffdef7
build(deps): Bump amannn/action-semantic-pull-request from 5.0.1 to 5…
dependabot[bot] Oct 18, 2022
26854db
build(deps): bump github.com/go-co-op/gocron from 1.17.0 to 1.17.1 (#…
dependabot[bot] Oct 18, 2022
2b8145e
fix: support building bdjuno image for chains with CosmWasm (#485)
maiquanghiep Oct 24, 2022
a739aa2
build(deps): bump golangci/golangci-lint-action from 3.2.0 to 3.3.0 (…
dependabot[bot] Oct 24, 2022
5d34331
build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1 (#487)
dependabot[bot] Oct 24, 2022
d284a99
build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0 (#478)
dependabot[bot] Oct 13, 2022
54628c8
fix: support building bdjuno image for chains with CosmWasm (#485)
maiquanghiep Oct 24, 2022
8c1cfc4
Update Dockerfile with upstream comments for CosmWasm
ankurdotb Oct 25, 2022
4380881
Squashed commit of the following:
ankurdotb Oct 25, 2022
a9849d5
Bump dependencies
ankurdotb Oct 25, 2022
10ba4fe
Update linter to go 1.18
ankurdotb Oct 25, 2022
4464017
Bump go version in Dockerfile
ankurdotb Oct 25, 2022
bd3d66c
Bump dependencies in go.mod
ankurdotb Oct 25, 2022
54eacda
Update cheqd-node dependency
ankurdotb Oct 25, 2022
4ce8579
Run gofumpt
ankurdotb Oct 25, 2022
8b4c9b6
Update .golangci.yaml
ankurdotb Oct 25, 2022
a754f0e
Update go.mod
ankurdotb Oct 25, 2022
2326166
Update lint.yml
ankurdotb Oct 25, 2022
9548cf0
Change gaia
ankurdotb Oct 25, 2022
35b7d8f
Revert "Run gofumpt"
ankurdotb Oct 25, 2022
d020682
fix: remove tombstone from `validator_status` (already exists in `val…
huichiaotsou Aug 8, 2022
8d5d212
feat: add daily refetch module (#454)
MonikaCat Aug 26, 2022
240d876
Merge branch 'cosmos/v0.44.x' into sync-testnet
ankurdotb Oct 25, 2022
412b2b1
Merge branch 'chains/cheqd/testnet' into sync-testnet
ankurdotb Oct 25, 2022
bad7152
Remove gofumpt
ankurdotb Oct 25, 2022
ad68fba
Merge branch 'sync-testnet' of https://github.com/cheqd/bdjuno into s…
ankurdotb Oct 25, 2022
d544d72
Change cheqd-node
ankurdotb Oct 25, 2022
c20155d
Temporarily turn off golang linter
ankurdotb Oct 26, 2022
1113bb4
Revert "Temporarily turn off golang linter"
ankurdotb Oct 26, 2022
3eb80d4
Bump cheqd-node
ankurdotb Oct 26, 2022
9ec6386
fix(deps): Version bump golangci-lint action
jay-dee7 Oct 27, 2022
6256a7c
fix: Linting errors
jay-dee7 Oct 27, 2022
38b784d
fix: Go vet fieldalignment
jay-dee7 Oct 27, 2022
3e3c6d4
Changing golangci
ankurdotb Oct 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- unused
- depguard
- dogsled
- gocritic
- gofmt
- goimports
- golint
- revive
- gosec
- gosimple
- govet
- ineffassign
- maligned
- misspell
- nakedret
- scopelint
- exportloopref
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
Expand All @@ -39,10 +37,10 @@ issues:
- gosec
- text: "comment on exported var"
linters:
- golint
- revive
- text: "don't use an underscore in package name"
linters:
- golint
- revive
- text: "ST1003:"
linters:
- stylecheck
Expand All @@ -57,11 +55,14 @@ issues:
linters-settings:
dogsled:
max-blank-identifiers: 3
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: false
require-specific: false
require-specific: false
misspell:
ignore-words:
- cheqd
govet:
enable:
- fieldalignment
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18

- uses: actions/checkout@v3
with:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod
cache: true

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v3.3.0
with:
version: v1.28
version: v1.50
args: --config .github/linters/.golangci.yaml

super-lint:
Expand All @@ -57,7 +62,4 @@ jobs:
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_JSONC: true
VALIDATE_OPENAPI: true
VALIDATE_PYTHON_PYLINT: true
VALIDATE_XML: true
VALIDATE_YAML: true
24 changes: 23 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,44 @@
### STAGE 1: Build BDJuno pre-requisites ###
###############################################################

FROM golang:1.17-alpine AS builder
FROM golang:1.18-alpine AS builder

RUN apk update && apk add --no-cache make git bash

WORKDIR /go/src/github.com/forbole/bdjuno
COPY . ./

######################################################
## Enabe the lines below if chain supports cosmwasm ##
## module to properly build docker image ##
######################################################
#RUN apk update && apk add --no-cache ca-certificates build-base git
#ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
#ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
#RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a
#RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32
## Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
#RUN cp /lib/libwasmvm_muslc.$(uname -m).a /lib/libwasmvm_muslc.a
RUN go mod download && make build

##################################################
## Enabe line below if chain supports cosmwasm ##
## module to properly build docker image ##
##################################################
#RUN LINK_STATICALLY=true BUILD_TAGS="muslc" make build


###############################################################
### STAGE 2: Copy chain-specific BDJuno config ###
###############################################################

FROM alpine:3.16 AS bdjuno

##################################################
## Enabe line below if chain supports cosmwasm ##
## module to properly build docker image ##
##################################################
#RUN apk update && apk add --no-cache ca-certificates build-base
RUN apk update && apk add --no-cache bash ca-certificates curl

# Copy BDJuno binary
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ LD_FLAGS = -X github.com/forbole/juno/v3/cmd.Version=$(VERSION) \
-X github.com/forbole/juno/v3/cmd.Commit=$(COMMIT)
BUILD_FLAGS := -ldflags '$(LD_FLAGS)'

ifeq ($(LINK_STATICALLY),true)
LD_FLAGS += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
endif

build_tags += $(BUILD_TAGS)
build_tags := $(strip $(build_tags))

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

###############################################################################
### Build ###
Expand Down
4 changes: 2 additions & 2 deletions cmd/migrate/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ type Token struct {

type TokenUnit struct {
Denom string `toml:"denom"`
Exponent int `toml:"exponent"`
Aliases []string `toml:"aliases"`
PriceID string `toml:"price_id"`
Aliases []string `toml:"aliases"`
Exponent int `toml:"exponent"`
}

type DistributionConfig struct {
Expand Down
11 changes: 4 additions & 7 deletions cmd/migrate/v3/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ package v3

import (
"fmt"
"io/ioutil"
"os"

"github.com/forbole/bdjuno/v3/modules/actions"

parsecmdtypes "github.com/forbole/juno/v3/cmd/parse/types"

"gopkg.in/yaml.v3"

junov3 "github.com/forbole/juno/v3/cmd/migrate/v3"
parsecmdtypes "github.com/forbole/juno/v3/cmd/parse/types"
"github.com/forbole/juno/v3/types/config"
"gopkg.in/yaml.v3"
)

// RunMigration runs the migrations from v2 to v3
Expand Down Expand Up @@ -39,7 +36,7 @@ func RunMigration(parseConfig *parsecmdtypes.Config) error {
return fmt.Errorf("error while serializing config: %s", err)
}

err = ioutil.WriteFile(config.GetConfigFilePath(), bz, 0o600)
err = os.WriteFile(config.GetConfigFilePath(), bz, 0o600)
if err != nil {
return fmt.Errorf("error while writing v3 config: %s", err)
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/migrate/v3/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v3

import (
"fmt"
"io/ioutil"
"os"
"path"

Expand All @@ -19,7 +18,7 @@ func GetConfig() (Config, error) {
return Config{}, fmt.Errorf("config file does not exist")
}

bz, err := ioutil.ReadFile(file)
bz, err := os.ReadFile(file)
if err != nil {
return Config{}, fmt.Errorf("error while reading config files: %s", err)
}
Expand Down
Loading