From 908571f0200e1f953927a4cabf08e3ac636892f9 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Thu, 22 Jun 2023 07:03:38 -0400 Subject: [PATCH 01/16] fix(oracle): ignore abstain votes when calculating std dev (#1441) * fix(oracle): ignore abstain votes when calculating std dev * Update CHANGELOG.md --- CHANGELOG.md | 1 + x/oracle/types/ballot.go | 11 ++++++++--- x/oracle/types/ballot_test.go | 7 +++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a22d66ff..6f843a4e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -175,6 +175,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1397](https://github.com/NibiruChain/nibiru/pull/1397) - fix: ensure margin is high enough when removing it * [#1417](https://github.com/NibiruChain/nibiru/pull/1417) - fix: run end blocker on block end for perp v2 * [#1425](https://github.com/NibiruChain/nibiru/pull/1425) - fix: remove positions from state when closed with reverse position +* [#1441](https://github.com/NibiruChain/nibiru/pull/1441) - fix(oracle): ignore abstain votes in std dev calculation ## [v0.19.2](https://github.com/NibiruChain/nibiru/releases/tag/v0.19.2) - 2023-02-24 diff --git a/x/oracle/types/ballot.go b/x/oracle/types/ballot.go index b54ec5974..f4ed8b953 100644 --- a/x/oracle/types/ballot.go +++ b/x/oracle/types/ballot.go @@ -136,12 +136,17 @@ func (pb ExchangeRateBallots) StandardDeviation(median sdk.Dec) (standardDeviati }() sum := sdk.ZeroDec() + n := 0 for _, v := range pb { - deviation := v.ExchangeRate.Sub(median) - sum = sum.Add(deviation.Mul(deviation)) + // ignore abstain votes in std dev calculation + if v.ExchangeRate.IsPositive() { + deviation := v.ExchangeRate.Sub(median) + sum = sum.Add(deviation.Mul(deviation)) + n += 1 + } } - variance := sum.QuoInt64(int64(len(pb))) + variance := sum.QuoInt64(int64(n)) floatNum, _ := strconv.ParseFloat(variance.String(), 64) floatNum = math.Sqrt(floatNum) diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index 2654fb555..296e10676 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -267,6 +267,13 @@ func TestPBStandardDeviation(t *testing.T) { []bool{true, true, true, true}, sdk.NewDecWithPrec(0, 0), }, + { + // Abstain votes are ignored + []float64{1.0, 2.0, 10.0, 100000.0, -99999999999.0, 0}, + []int64{1, 1, 100, 1, 1, 1}, + []bool{true, true, true, true, true, true}, + sdk.NewDecWithPrec(4999500036300, types.OracleDecPrecision), + }, } base := math.Pow10(types.OracleDecPrecision) From ff578fe97e1e859cceb7049c3d8b230ae9d0d5cd Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Thu, 22 Jun 2023 07:10:26 -0400 Subject: [PATCH 02/16] refactor: cleanup unused code (#1439) * chore: remove v0.10.0 upgrade handler * chore: remove MarketUpdatedEvent in AfterEpoch --------- Co-authored-by: Matthias <97468149+matthiasmatt@users.noreply.github.com> --- app/app.go | 6 ------ x/perp/v2/keeper/hooks.go | 4 ---- 2 files changed, 10 deletions(-) diff --git a/app/app.go b/app/app.go index 90499d86e..589eb2c02 100644 --- a/app/app.go +++ b/app/app.go @@ -70,7 +70,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" @@ -360,11 +359,6 @@ func NewNibiruApp( // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. - app.upgradeKeeper.SetUpgradeHandler("v0.10.0", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // no-op - return fromVM, nil - }) - // add test gRPC service for testing gRPC queries in isolation testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{}) diff --git a/x/perp/v2/keeper/hooks.go b/x/perp/v2/keeper/hooks.go index db73f8579..a33c29c07 100644 --- a/x/perp/v2/keeper/hooks.go +++ b/x/perp/v2/keeper/hooks.go @@ -56,10 +56,6 @@ func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ uint64) PremiumFraction: premiumFraction, CumulativePremiumFraction: market.LatestCumulativePremiumFraction, }) - - _ = ctx.EventManager().EmitTypedEvent(&types.MarketUpdatedEvent{ - FinalMarket: market, - }) } } From 327381cdcd50deccffafd0e0613d66933b344ee2 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Thu, 22 Jun 2023 10:29:56 -0400 Subject: [PATCH 03/16] ci: fix docker and goreleaser (#1442) * revert: goreleaser and docker workflows * feat: use goreleaser for docker images * fix: arch name comparison * chore: use verbose tar * revert: goreleaser docker plugin * chore(build): remove duplicate libs dir * fix linux amd64 builds * ci: build docker image on goreleaser workflow * chore(release): remove unnecessary flags from release makefile * fix: docker login before push * fix: add missing permission to goreleaser workflow --------- Co-authored-by: Helder M --- ...docker-chaosnet.yml => docker-publish.yml} | 2 +- .github/workflows/goreleaser.yml | 31 ++++++++++++++++--- .goreleaser.yml | 30 +++--------------- Dockerfile | 31 ++++++++++++++++--- contrib/docker/goreleaser.Dockerfile | 20 ++++++++++++ contrib/make/build.mk | 12 +++---- contrib/make/release.mk | 4 --- 7 files changed, 83 insertions(+), 47 deletions(-) rename .github/workflows/{docker-chaosnet.yml => docker-publish.yml} (91%) create mode 100644 contrib/docker/goreleaser.Dockerfile diff --git a/.github/workflows/docker-chaosnet.yml b/.github/workflows/docker-publish.yml similarity index 91% rename from .github/workflows/docker-chaosnet.yml rename to .github/workflows/docker-publish.yml index b798dac10..7b984a1c2 100644 --- a/.github/workflows/docker-chaosnet.yml +++ b/.github/workflows/docker-publish.yml @@ -39,4 +39,4 @@ jobs: context: . push: true platforms: linux/amd64,linux/arm64 - tags: ghcr.io/nibiruchain/chaosnet + tags: ghcr.io/nibiruchain/chaosnet:${{ steps.get_version.outputs.version }} \ No newline at end of file diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 952cfe6a1..e5df022b6 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -7,21 +7,44 @@ on: permissions: contents: write + packages: write jobs: goreleaser: runs-on: ubuntu-latest steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - run: git fetch --force --tags - - uses: actions/setup-go@v4 - with: - go-version: ">=1.19.3" - - run: make release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get version + id: get_version + uses: battila7/get-version-action@v2 + + - name: Login to GHCR container register + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push versioned image + uses: docker/build-push-action@v4 + with: + file: contrib/docker/goreleaser.Dockerfile + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ghcr.io/nibiruchain/nibiru:${{ steps.get_version.outputs.version-without-v }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 20afb8dd5..fb32345ce 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -54,11 +54,11 @@ builds: - wget https://github.com/CosmWasm/wasmvm/releases/download/v1.2.4/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a - wget https://github.com/CosmWasm/wasmvm/releases/download/v1.2.4/libwasmvm_muslc.aarch64.a -O /usr/lib/aarch64-linux-gnu/libwasmvm_muslc.a - wget https://github.com/NibiruChain/gorocksdb/releases/download/v8.1.1/include.8.1.1.tar.gz -O /root/include.8.1.1.tar.gz - - tar -xf /root/include.8.1.1.tar.gz -C /usr/include/ + - tar -xvf /root/include.8.1.1.tar.gz -C /usr/include/ - wget https://github.com/NibiruChain/gorocksdb/releases/download/v8.1.1/librocksdb_8.1.1_linux_amd64.tar.gz -O /root/librocksdb_8.1.1_linux_amd64.tar.gz - - tar -xf /root/librocksdb_8.1.1_linux_amd64.tar.gz -C /usr/lib/x86_64-linux-gnu/ + - tar -xvf /root/librocksdb_8.1.1_linux_amd64.tar.gz -C /usr/lib/x86_64-linux-gnu/ - wget https://github.com/NibiruChain/gorocksdb/releases/download/v8.1.1/librocksdb_8.1.1_linux_arm64.tar.gz -O /root/librocksdb_8.1.1_linux_arm64.tar.gz - - tar -xf /root/librocksdb_8.1.1_linux_arm64.tar.gz -C /usr/lib/aarch64-linux-gnu/ + - tar -xvf /root/librocksdb_8.1.1_linux_arm64.tar.gz -C /usr/lib/aarch64-linux-gnu/ goos: - linux goarch: @@ -93,26 +93,4 @@ builds: - CC=aarch64-linux-gnu-gcc universal_binaries: - - id: darwin - -dockers: - - image_templates: - - "ghcr.io/nibiruchain/nibiru:{{ .Version }}-amd64" - use: docker - dockerfile: Dockerfile - build_flag_templates: - - "--platform=linux/amd64" - - - image_templates: - - "ghcr.io/nibiruchain/nibiru:{{ .Version }}-arm64" - use: docker - goarch: arm64 - dockerfile: Dockerfile - build_flag_templates: - - "--platform=linux/arm64" - -docker_manifests: - - name_template: "ghcr.io/nibiruchain/nibiru:{{ .Version }}" - image_templates: - - "ghcr.io/nibiruchain/nibiru:{{ .Version }}-amd64" - - "ghcr.io/nibiruchain/nibiru:{{ .Version }}-arm64" \ No newline at end of file + - id: darwin \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 4a5243117..03afeba75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,27 @@ -FROM alpine +FROM golang:1.19 AS builder + +WORKDIR /nibiru + +COPY go.sum go.mod ./ +RUN go mod download +COPY . . + +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=/go/pkg \ + --mount=type=cache,target=/nibiru/temp \ + make build + +FROM alpine:latest + WORKDIR /root -RUN apk --no-cache add ca-certificates -COPY nibid /usr/bin/nibid -ENTRYPOINT ["/usr/bin/nibid"] -CMD [ "start" ] \ No newline at end of file + +RUN apk --no-cache add \ + ca-certificates \ + build-base \ + curl \ + jq + +COPY --from=builder /nibiru/build/nibid /usr/local/bin/nibid + +ENTRYPOINT ["nibid"] +CMD [ "start" ] diff --git a/contrib/docker/goreleaser.Dockerfile b/contrib/docker/goreleaser.Dockerfile new file mode 100644 index 000000000..2b1e9b7d1 --- /dev/null +++ b/contrib/docker/goreleaser.Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.19 AS builder + +WORKDIR /root +COPY dist/ /root/ + +ARG TARGETARCH +RUN if [ "${TARGETARCH}" = "arm64" ]; then \ + cp linux_linux_arm64/nibid /root/nibid; \ + else \ + cp linux_linux_amd64_v1/nibid /root/nibid; \ + fi + +FROM alpine + +WORKDIR /root +RUN apk --no-cache add ca-certificates +COPY --from=builder /root/nibid /usr/local/bin/nibid + +ENTRYPOINT ["nibid"] +CMD [ "start" ] \ No newline at end of file diff --git a/contrib/make/build.mk b/contrib/make/build.mk index 3798a8ee5..cb488b554 100644 --- a/contrib/make/build.mk +++ b/contrib/make/build.mk @@ -34,7 +34,7 @@ TEMPDIR ?= $(CURDIR)/temp export GO111MODULE = on # process build tags -build_tags = netgo osusergo rocksdb grocksdb_no_link static static_wasm muslc +build_tags = netgo osusergo rocksdb grocksdb_no_link static_wasm muslc build_tags += $(BUILD_TAGS) build_tags := $(strip $(build_tags)) @@ -59,13 +59,11 @@ ldflags := $(strip $(ldflags)) BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' CGO_CFLAGS := -I$(TEMPDIR)/include -CGO_LDFLAGS := -L$(TEMPDIR)/lib -ifeq ($(OS_NAME),linux) - CGO_LDFLAGS += -static -endif -CGO_LDFLAGS += -L$(TEMPDIR)/lib -lrocksdb -lstdc++ -lm -ldl +CGO_LDFLAGS := -L$(TEMPDIR)/lib -lrocksdb -lstdc++ -lm -ldl ifeq ($(OS_NAME),darwin) CGO_LDFLAGS += -lz -lbz2 +else + CGO_LDFLAGS += -static -lwasmvm_muslc endif ############################################################################### @@ -92,7 +90,7 @@ wasmvmlib: $(TEMPDIR)/ ifeq ($(OS_NAME),darwin) wget https://github.com/CosmWasm/wasmvm/releases/download/v$(WASMVM_VERSION)/libwasmvmstatic_darwin.a -O $(TEMPDIR)/lib/libwasmvmstatic_darwin.a else - ifeq ($(ARCH_NAME),x86_64) + ifeq ($(ARCH_NAME),amd64) wget https://github.com/CosmWasm/wasmvm/releases/download/v$(WASMVM_VERSION)/libwasmvm_muslc.x86_64.a -O $(TEMPDIR)/lib/libwasmvm_muslc.a else wget https://github.com/CosmWasm/wasmvm/releases/download/v$(WASMVM_VERSION)/libwasmvm_muslc.aarch64.a -O $(TEMPDIR)/lib/libwasmvm_muslc.a diff --git a/contrib/make/release.mk b/contrib/make/release.mk index 6b6200cf4..626a4d5cb 100644 --- a/contrib/make/release.mk +++ b/contrib/make/release.mk @@ -8,8 +8,6 @@ GOLANG_CROSS_VERSION ?= v1.19.4 release: docker run \ --rm \ - --privileged \ - -v /var/run/docker.sock:/var/run/docker.sock \ --platform linux/amd64 \ -v "$(CURDIR)":/go/src/$(PACKAGE_NAME) \ -w /go/src/$(PACKAGE_NAME) \ @@ -21,8 +19,6 @@ release: release-snapshot: docker run \ --rm \ - --privileged \ - -v /var/run/docker.sock:/var/run/docker.sock \ --platform linux/amd64 \ -v "$(CURDIR)":/go/src/$(PACKAGE_NAME) \ -w /go/src/$(PACKAGE_NAME) \ From 1487396bdc02066bd609de7b622246ac73f41aa6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:51:46 +0000 Subject: [PATCH 04/16] chore(deps): Bump google.golang.org/grpc from 1.55.0 to 1.56.0 (#1437) * chore(deps): Bump google.golang.org/grpc from 1.55.0 to 1.56.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.55.0...v1.56.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Updated changelog - dependabot --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine --- CHANGELOG.md | 2 +- go.mod | 6 +++--- go.sum | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f843a4e4..ac9ae51d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `github.com/spf13/cast` from 1.5.0 to 1.5.1 (#1358) - Bump `github.com/stretchr/testify` from 1.8.2 to 1.8.4 (#1384, #1435) - Bump `cosmossdk.io/math` from 1.0.0-beta.6 to 1.0.1 (#1394) -- Bump `google.golang.org/grpc` from 1.53.0 to 1.55.0 (#1395) +- Bump `google.golang.org/grpc` from 1.53.0 to 1.56.0 (#1395, #1437) - Bump `github.com/gin-gonic/gin` from 1.8.1 to 1.9.1 (#1409) ### Breaking diff --git a/go.mod b/go.mod index e62722bdc..18ad6324a 100644 --- a/go.mod +++ b/go.mod @@ -31,14 +31,14 @@ require ( github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 + google.golang.org/grpc v1.56.0 google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v2 v2.4.0 ) require ( cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.0 // indirect + cloud.google.com/go/compute v1.19.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.13.0 // indirect cloud.google.com/go/storage v1.29.0 // indirect @@ -157,7 +157,7 @@ require ( golang.org/x/crypto v0.9.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect diff --git a/go.sum b/go.sum index 2ade83eb6..0db9c3bbf 100644 --- a/go.sum +++ b/go.sum @@ -73,8 +73,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= +cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -1352,8 +1352,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1795,8 +1795,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE= +google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= From 6ae0086c8861802e3500abd2b4c3982a91ee854a Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Thu, 22 Jun 2023 23:25:56 -0400 Subject: [PATCH 05/16] ci(proto): create ts protogen buf config file (#1444) --- .github/workflows/proto-lint.yml | 24 +++++++++++++----------- proto/buf.gen.ts.yaml | 8 ++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 proto/buf.gen.ts.yaml diff --git a/.github/workflows/proto-lint.yml b/.github/workflows/proto-lint.yml index 10a45f1f2..47e783cc6 100644 --- a/.github/workflows/proto-lint.yml +++ b/.github/workflows/proto-lint.yml @@ -1,4 +1,4 @@ -name: Protobuf Lint and Check Breakage +name: Protobuf # Protobuf runs buf (https://buf.build/) lint and check-breakage # This workflow is only run when a .proto file has been changed on: @@ -10,15 +10,17 @@ permissions: contents: read jobs: - lint: - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.21.0 - - uses: bufbuild/buf-lint-action@v1 - with: - input: "proto" + # # Commented out since the default linter settings are too strict. + # # We should figure out how to configure this linting action. + # lint: + # runs-on: ubuntu-latest + # timeout-minutes: 5 + # steps: + # - uses: actions/checkout@v3 + # - uses: bufbuild/buf-setup-action@v1.21.0 + # - uses: bufbuild/buf-lint-action@v1 + # with: + # input: "proto" break-check: runs-on: ubuntu-latest @@ -28,4 +30,4 @@ jobs: - uses: bufbuild/buf-breaking-action@v1 with: input: "proto" - against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto" \ No newline at end of file + against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto" diff --git a/proto/buf.gen.ts.yaml b/proto/buf.gen.ts.yaml new file mode 100644 index 000000000..5d4a78940 --- /dev/null +++ b/proto/buf.gen.ts.yaml @@ -0,0 +1,8 @@ +# buf.gen.yaml +version: v1 +managed: + enabled: true +plugins: + - plugin: buf.build/bufbuild/es:v1.2.1 + opt: target=ts + out: . \ No newline at end of file From 949f63b5c13d64da137ac5732699ce18f2310558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 03:35:02 +0000 Subject: [PATCH 06/16] chore(deps): Bump google.golang.org/grpc from 1.56.0 to 1.56.1 (#1443) * chore(deps): Bump google.golang.org/grpc from 1.56.0 to 1.56.1 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.0 to 1.56.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.56.0...v1.56.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Updated changelog - dependabot --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique-Divine --- CHANGELOG.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac9ae51d9..715b9c7d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `github.com/spf13/cast` from 1.5.0 to 1.5.1 (#1358) - Bump `github.com/stretchr/testify` from 1.8.2 to 1.8.4 (#1384, #1435) - Bump `cosmossdk.io/math` from 1.0.0-beta.6 to 1.0.1 (#1394) -- Bump `google.golang.org/grpc` from 1.53.0 to 1.56.0 (#1395, #1437) +- Bump `google.golang.org/grpc` from 1.53.0 to 1.56.1 (#1395, #1437, #1443) - Bump `github.com/gin-gonic/gin` from 1.8.1 to 1.9.1 (#1409) ### Breaking diff --git a/go.mod b/go.mod index 18ad6324a..16be34ba1 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.56.0 + google.golang.org/grpc v1.56.1 google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 0db9c3bbf..77c980685 100644 --- a/go.sum +++ b/go.sum @@ -1795,8 +1795,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE= -google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= From 10ea2783c2cf8a0a5413ec0d9759bf7481ac2f33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 00:35:42 -0500 Subject: [PATCH 07/16] chore(deps): Bump actions/setup-go from 3 to 4 (#1429) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonathan Gimeno Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 53eff21cd..af0bb4369 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: 1.19 From 1d95d45679d3cc000c9aacab68a47bbbb0efd2d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 01:00:15 -0500 Subject: [PATCH 08/16] chore(deps): Bump github.com/spf13/viper from 1.15.0 to 1.16.0 (#1436) * chore(deps): Bump github.com/spf13/viper from 1.15.0 to 1.16.0 Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.15.0 to 1.16.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.15.0...v1.16.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Updated changelog - dependabot --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine --- CHANGELOG.md | 1 + go.mod | 9 +++++---- go.sum | 24 +++++++++++++++--------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 715b9c7d3..94f8f257e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `cosmossdk.io/math` from 1.0.0-beta.6 to 1.0.1 (#1394) - Bump `google.golang.org/grpc` from 1.53.0 to 1.56.1 (#1395, #1437, #1443) - Bump `github.com/gin-gonic/gin` from 1.8.1 to 1.9.1 (#1409) +- Bump `github.com/spf13/viper` from 1.15.0 to 1.16.0 (#1436) ### Breaking diff --git a/go.mod b/go.mod index 16be34ba1..9552561ea 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.15.0 + github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/grpc v1.56.1 @@ -95,9 +95,10 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/s2a-go v0.1.3 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.1 // indirect + github.com/googleapis/gax-go/v2 v2.8.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -143,7 +144,7 @@ require ( github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.29.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -162,7 +163,7 @@ require ( golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.114.0 // indirect + google.golang.org/api v0.122.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 77c980685..b26cbbe70 100644 --- a/go.sum +++ b/go.sum @@ -652,6 +652,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= +github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -672,8 +674,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= +github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -1072,8 +1074,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= @@ -1089,8 +1091,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1213,7 +1215,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1313,6 +1316,7 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1368,6 +1372,7 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1493,6 +1498,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -1630,8 +1636,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= +google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= From 5fd5ac2e51cb58ab15c025ada6f69f6ce8c251b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 06:20:37 +0000 Subject: [PATCH 09/16] chore(deps): Bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0 (#1431) * chore(deps): Bump github.com/prometheus/client_golang Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Updated changelog - dependabot * ci: try inspecting the author rather than just reading labels in the dependabot labeling workflow --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique-Divine Co-authored-by: Unique-Divine --- .github/workflows/changelog-deps.yml | 4 +++- CHANGELOG.md | 1 + go.mod | 4 ++-- go.sum | 10 +++++----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/changelog-deps.yml b/.github/workflows/changelog-deps.yml index 6477cb6d9..5472060d6 100644 --- a/.github/workflows/changelog-deps.yml +++ b/.github/workflows/changelog-deps.yml @@ -6,7 +6,9 @@ on: jobs: changelog-update: runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'dependabot') + if: | + contains(github.event.pull_request.labels.*.name, 'dependabot') || + ${{ any(contains(commit.author.username, 'dependabot') for commit in github.event.commits) }} steps: - uses: actions/checkout@v3 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f8f257e..19e6e7553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `google.golang.org/grpc` from 1.53.0 to 1.56.1 (#1395, #1437, #1443) - Bump `github.com/gin-gonic/gin` from 1.8.1 to 1.9.1 (#1409) - Bump `github.com/spf13/viper` from 1.15.0 to 1.16.0 (#1436) +- Bump `github.com/prometheus/client_golang` from 1.15.1 to 1.16.0 (#1431) ### Breaking diff --git a/go.mod b/go.mod index 9552561ea..e598f72ef 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/holiman/uint256 v1.2.2 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.15.1 + github.com/prometheus/client_golang v1.16.0 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.7.0 @@ -139,7 +139,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.29.1 // indirect diff --git a/go.sum b/go.sum index b26cbbe70..47968f94c 100644 --- a/go.sum +++ b/go.sum @@ -998,8 +998,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1024,8 +1024,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= @@ -1372,7 +1372,7 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= From d5703bf251dca67cd8f815631512c8553dda717f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 06:31:12 +0000 Subject: [PATCH 10/16] chore(deps): Bump github.com/cosmos/ibc-go/v7 from 7.1.0 to 7.2.0 (#1445) * chore(deps): Bump github.com/cosmos/ibc-go/v7 from 7.1.0 to 7.2.0 Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.1.0 to 7.2.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v7.2.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v7.1.0...v7.2.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v7 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Updated changelog - dependabot --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique-Divine --- CHANGELOG.md | 3 ++- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19e6e7553..c2d84b889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `github.com/gin-gonic/gin` from 1.8.1 to 1.9.1 (#1409) - Bump `github.com/spf13/viper` from 1.15.0 to 1.16.0 (#1436) - Bump `github.com/prometheus/client_golang` from 1.15.1 to 1.16.0 (#1431) +- Bump `github.com/cosmos/ibc-go/v7` from 7.1.0 to 7.2.0 (#1445) ### Breaking @@ -583,4 +584,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Testing * [#695](https://github.com/NibiruChain/nibiru/pull/695) Add `OpenPosition` integration tests. -* [#692](https://github.com/NibiruChain/nibiru/pull/692) Add test coverage for Perp MsgServer methods. \ No newline at end of file +* [#692](https://github.com/NibiruChain/nibiru/pull/692) Add test coverage for Perp MsgServer methods. diff --git a/go.mod b/go.mod index e598f72ef..c7849ff04 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.47.3 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.1.0 + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 diff --git a/go.sum b/go.sum index 47968f94c..2b271c59d 100644 --- a/go.sum +++ b/go.sum @@ -401,8 +401,8 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.1.0 h1:SCLgs7tqVnzdIDO5MRLgovAnc696vTTKl+8qsTu8IMM= -github.com/cosmos/ibc-go/v7 v7.1.0/go.mod h1:7MptlWeIyqmDiuJeRAFqBvXKY8Hybd+rF8vMSmGd2zg= +github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= +github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= From 3740c71808ade5e0fc897ca9888dfd1eeb6d9e00 Mon Sep 17 00:00:00 2001 From: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Date: Fri, 23 Jun 2023 13:20:05 -0500 Subject: [PATCH 11/16] fix(root.go): add custom InitCmd that sets the desired Tendermint consensus parameters (#1446) * fix(root.go): add custom InitCmd that sets the desired Tendermint consensus parameters * change log * run golangci-lint --fix --- CHANGELOG.md | 1 + cmd/nibid/cmd/init.go | 207 ++++++++++++++++++++++++++++++++++++++++-- cmd/nibid/cmd/root.go | 2 +- 3 files changed, 200 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2d84b889..b8a18520e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -179,6 +179,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1417](https://github.com/NibiruChain/nibiru/pull/1417) - fix: run end blocker on block end for perp v2 * [#1425](https://github.com/NibiruChain/nibiru/pull/1425) - fix: remove positions from state when closed with reverse position * [#1441](https://github.com/NibiruChain/nibiru/pull/1441) - fix(oracle): ignore abstain votes in std dev calculation +* [#1446](https://github.com/NibiruChain/nibiru/pull/1446) - fix(cmd): Add custom InitCmd to set set desired Tendermint consensus params for each node. ## [v0.19.2](https://github.com/NibiruChain/nibiru/releases/tag/v0.19.2) - 2023-02-24 diff --git a/cmd/nibid/cmd/init.go b/cmd/nibid/cmd/init.go index 9b9de8388..8d52a3a3c 100644 --- a/cmd/nibid/cmd/init.go +++ b/cmd/nibid/cmd/init.go @@ -5,6 +5,27 @@ import ( db "github.com/cometbft/cometbft-db" tmcfg "github.com/cometbft/cometbft/config" + + "bufio" + "encoding/json" + "fmt" + "os" + "path/filepath" + + tmcli "github.com/cometbft/cometbft/libs/cli" + tmrand "github.com/cometbft/cometbft/libs/rand" + tmtypes "github.com/cometbft/cometbft/types" + "github.com/cosmos/go-bip39" + "github.com/pkg/errors" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + sdkflags "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/input" + "github.com/cosmos/cosmos-sdk/server" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/genutil" ) const ( @@ -13,24 +34,192 @@ const ( // FlagSeed defines a flag to initialize the private validator key from a specific seed. FlagRecover = "recover" + + // FlagDefaultBondDenom defines the default denom to use in the genesis file. + FlagDefaultBondDenom = "default-denom" ) func customTendermintConfig() *tmcfg.Config { cfg := tmcfg.DefaultConfig() + // Overwrite consensus config ms := func(n time.Duration) time.Duration { return n * time.Millisecond } - consensus := cfg.Consensus - consensus.TimeoutPropose = ms(3_000) - consensus.TimeoutProposeDelta = ms(500) - consensus.TimeoutPrevote = ms(1_000) - consensus.TimeoutPrevoteDelta = ms(500) - consensus.TimeoutPrecommit = ms(1_000) - consensus.TimeoutPrecommitDelta = ms(500) - consensus.TimeoutCommit = ms(1_000) + cfg.Consensus.TimeoutPropose = ms(3_000) + cfg.Consensus.TimeoutProposeDelta = ms(500) + cfg.Consensus.TimeoutPrevote = ms(1_000) + cfg.Consensus.TimeoutPrevoteDelta = ms(500) + cfg.Consensus.TimeoutPrecommit = ms(1_000) + cfg.Consensus.TimeoutPrecommitDelta = ms(500) + cfg.Consensus.TimeoutCommit = ms(1_000) cfg.DBBackend = string(db.RocksDBBackend) - return cfg } + +/* +InitCmd is a stand-in replacement for genutilcli.InitCmd that overwrites the +consensus configutation in the `config.toml` prior to writing it to the disk. +This helps keep consistency on between nodes without requiring extra work as +much manual work for node operators. + +InitCmd returns a command that initializes all files needed for Tendermint +and the respective application. + +Intended usage: + + ```go + import genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + import "github.com/spf13/cobra" + + func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { + a := appCreator{encodingConfig} + rootCmd.AddCommand( + InitCmd(app.ModuleBasics, app.DefaultNodeHome), + ) + } + ``` +*/ +func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { + cmd := &cobra.Command{ + Use: "init [moniker]", + Short: "Initialize private validator, p2p, genesis, and application configuration files", + Long: `Initialize validators's and node's configuration files.`, + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + cdc := clientCtx.Codec + + serverCtx := server.GetServerContextFromCmd(cmd) + config := serverCtx.Config + config.SetRoot(clientCtx.HomeDir) + + chainID, _ := cmd.Flags().GetString(sdkflags.FlagChainID) + switch { + case chainID != "": + case clientCtx.ChainID != "": + chainID = clientCtx.ChainID + default: + chainID = fmt.Sprintf("test-chain-%v", tmrand.Str(6)) + } + + // Get bip39 mnemonic + var mnemonic string + recover, _ := cmd.Flags().GetBool(FlagRecover) + if recover { + inBuf := bufio.NewReader(cmd.InOrStdin()) + value, err := input.GetString("Enter your bip39 mnemonic", inBuf) + if err != nil { + return err + } + + mnemonic = value + if !bip39.IsMnemonicValid(mnemonic) { + return errors.New("invalid mnemonic") + } + } + + // Get initial height + initHeight, _ := cmd.Flags().GetInt64(sdkflags.FlagInitHeight) + if initHeight < 1 { + initHeight = 1 + } + + nodeID, _, err := genutil.InitializeNodeValidatorFilesFromMnemonic(config, mnemonic) + if err != nil { + return err + } + + config.Moniker = args[0] + + genFile := config.GenesisFile() + overwrite, _ := cmd.Flags().GetBool(FlagOverwrite) + defaultDenom, _ := cmd.Flags().GetString(FlagDefaultBondDenom) + + // use os.Stat to check if the file exists + _, err = os.Stat(genFile) + if !overwrite && !os.IsNotExist(err) { + return fmt.Errorf("genesis.json file already exists: %v", genFile) + } + + // Overwrites the SDK default denom for side-effects + if defaultDenom != "" { + sdk.DefaultBondDenom = defaultDenom + } + appGenState := mbm.DefaultGenesis(cdc) + + appState, err := json.MarshalIndent(appGenState, "", " ") + if err != nil { + return errors.Wrap(err, "Failed to marshal default genesis state") + } + + genDoc := &tmtypes.GenesisDoc{} + if _, err := os.Stat(genFile); err != nil { + if !os.IsNotExist(err) { + return err + } + } else { + genDoc, err = tmtypes.GenesisDocFromFile(genFile) + if err != nil { + return errors.Wrap(err, "Failed to read genesis doc from file") + } + } + + genDoc.ChainID = chainID + genDoc.Validators = nil + genDoc.AppState = appState + genDoc.InitialHeight = initHeight + + if err = genutil.ExportGenesisFile(genDoc, genFile); err != nil { + return errors.Wrap(err, "Failed to export genesis file") + } + + toPrint := newPrintInfo(config.Moniker, chainID, nodeID, "", appState) + + customCfg := customTendermintConfig() + config.Consensus = customCfg.Consensus + config.DBBackend = customCfg.DBBackend + tmcfg.WriteConfigFile(filepath.Join(config.RootDir, "config", "config.toml"), config) + return displayInfo(toPrint) + }, + } + + cmd.Flags().String(tmcli.HomeFlag, defaultNodeHome, "node's home directory") + cmd.Flags().BoolP(FlagOverwrite, "o", false, "overwrite the genesis.json file") + cmd.Flags().Bool(FlagRecover, false, "provide seed phrase to recover existing key instead of creating") + cmd.Flags().String(sdkflags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") + cmd.Flags().String(FlagDefaultBondDenom, "", "genesis file default denomination, if left blank default value is 'stake'") + cmd.Flags().Int64(sdkflags.FlagInitHeight, 1, "specify the initial block height at genesis") + + return cmd +} + +type printInfo struct { + Moniker string `json:"moniker" yaml:"moniker"` + ChainID string `json:"chain_id" yaml:"chain_id"` + NodeID string `json:"node_id" yaml:"node_id"` + GenTxsDir string `json:"gentxs_dir" yaml:"gentxs_dir"` + AppMessage json.RawMessage `json:"app_message" yaml:"app_message"` +} + +func newPrintInfo(moniker, chainID, nodeID, genTxsDir string, appMessage json.RawMessage) printInfo { + return printInfo{ + Moniker: moniker, + ChainID: chainID, + NodeID: nodeID, + GenTxsDir: genTxsDir, + AppMessage: appMessage, + } +} + +func displayInfo(info printInfo) error { + out, err := json.MarshalIndent(info, "", " ") + if err != nil { + return err + } + + _, err = fmt.Fprintf(os.Stderr, "%s\n", sdk.MustSortJSON(out)) + + return err +} diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index b470ccabb..a4823fd3b 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -134,7 +134,7 @@ Args: func initRootCmd(rootCmd *cobra.Command, encodingConfig app.EncodingConfig) { a := appCreator{encodingConfig} rootCmd.AddCommand( - genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), + InitCmd(app.ModuleBasics, app.DefaultNodeHome), AddGenesisAccountCmd(app.DefaultNodeHome), perpv2cli.AddMarketGenesisCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), From 192bf29329770d99dcef94c3db4a9339c0e3af42 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Fri, 23 Jun 2023 14:39:36 -0400 Subject: [PATCH 12/16] Fix/localnet (#1447) * fix: localnet sudoer * fix: typo * fix: broadcast mode --- contrib/scripts/localnet.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/scripts/localnet.sh b/contrib/scripts/localnet.sh index 496cb74a6..51145aa0d 100755 --- a/contrib/scripts/localnet.sh +++ b/contrib/scripts/localnet.sh @@ -100,7 +100,7 @@ fi # Configure broadcast mode echo_info "Configuring broadcast mode..." -if $BINARY config broadcast-mode block; then +if $BINARY config broadcast-mode sync; then echo_success "Successfully configured broadcast-mode" else echo_error "Failed to configure broadcast mode" @@ -230,6 +230,9 @@ else exit 1 fi +# set validator as sudoer +add_genesis_param '.app_state.sudo.sudoers.root = "nibi1zaavvzxez0elundtn32qnk9lkm8kmcsz44g7xl"' + # hack for localnet since we don't have a pricefeeder yet add_genesis_param '.app_state.oracle.exchange_rates[0].pair = "ubtc:unusd"' add_genesis_param '.app_state.oracle.exchange_rates[0].exchange_rate = "20000"' @@ -238,4 +241,4 @@ add_genesis_param '.app_state.oracle.exchange_rates[1].exchange_rate = "2000"' # Start the network echo_info "Starting $CHAIN_ID in $CHAIN_DIR..." -$BINARY start --db_backend goleveldb --home "$CHAIN_DIR" --pruning nothing +$BINARY start --home "$CHAIN_DIR" --pruning nothing From 0b2818e5792560a52b7fed9f056fb40a89c019b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:58:30 -0500 Subject: [PATCH 13/16] chore(deps): Bump bufbuild/buf-setup-action from 1.21.0 to 1.22.0 (#1449) * chore(deps): Bump bufbuild/buf-setup-action from 1.21.0 to 1.22.0 Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.21.0 to 1.22.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.21.0...v1.22.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * ci: fix auto-dependabot workflow * Updated changelog - dependabot --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique-Divine Co-authored-by: Unique-Divine --- .github/workflows/changelog-deps.yml | 6 +++--- .github/workflows/proto-lint.yml | 4 ++-- CHANGELOG.md | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changelog-deps.yml b/.github/workflows/changelog-deps.yml index 5472060d6..9cce12d2e 100644 --- a/.github/workflows/changelog-deps.yml +++ b/.github/workflows/changelog-deps.yml @@ -6,9 +6,9 @@ on: jobs: changelog-update: runs-on: ubuntu-latest - if: | - contains(github.event.pull_request.labels.*.name, 'dependabot') || - ${{ any(contains(commit.author.username, 'dependabot') for commit in github.event.commits) }} + if: contains(github.event.pull_request.labels.*.name, 'dependabot') + # TODO: feat: try to use author of the commit(s) to see if it's dependabot + # ${{ any(contains(commit.author.username, 'dependabot') for commit in github.event.commits) }} steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/proto-lint.yml b/.github/workflows/proto-lint.yml index 47e783cc6..09ce639c9 100644 --- a/.github/workflows/proto-lint.yml +++ b/.github/workflows/proto-lint.yml @@ -17,7 +17,7 @@ jobs: # timeout-minutes: 5 # steps: # - uses: actions/checkout@v3 - # - uses: bufbuild/buf-setup-action@v1.21.0 + # - uses: bufbuild/buf-setup-action@v1.22.0 # - uses: bufbuild/buf-lint-action@v1 # with: # input: "proto" @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.21.0 + - uses: bufbuild/buf-setup-action@v1.22.0 - uses: bufbuild/buf-breaking-action@v1 with: input: "proto" diff --git a/CHANGELOG.md b/CHANGELOG.md index b8a18520e..d1f46156a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `github.com/spf13/viper` from 1.15.0 to 1.16.0 (#1436) - Bump `github.com/prometheus/client_golang` from 1.15.1 to 1.16.0 (#1431) - Bump `github.com/cosmos/ibc-go/v7` from 7.1.0 to 7.2.0 (#1445) +- Bump `bufbuild/buf-setup-action` from 1.21.0 to 1.22.0 (#1449) ### Breaking @@ -585,4 +586,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Testing * [#695](https://github.com/NibiruChain/nibiru/pull/695) Add `OpenPosition` integration tests. -* [#692](https://github.com/NibiruChain/nibiru/pull/692) Add test coverage for Perp MsgServer methods. +* [#692](https://github.com/NibiruChain/nibiru/pull/692) Add test coverage for Perp MsgServer methods. \ No newline at end of file From d47861fd7d107c09c5bde401124e15dc1bce1b13 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:43:44 -0400 Subject: [PATCH 14/16] fix(perp): decrease position with zero size (#1451) * fix(perp): decrease position properly deletes position * refactor(perp): clean `closePositionEntirely` * Update CHANGELOG.md --- CHANGELOG.md | 1 + x/perp/v2/keeper/clearing_house.go | 60 ++++++++++++++++-------------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f46156a..9642fdb31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -181,6 +181,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1425](https://github.com/NibiruChain/nibiru/pull/1425) - fix: remove positions from state when closed with reverse position * [#1441](https://github.com/NibiruChain/nibiru/pull/1441) - fix(oracle): ignore abstain votes in std dev calculation * [#1446](https://github.com/NibiruChain/nibiru/pull/1446) - fix(cmd): Add custom InitCmd to set set desired Tendermint consensus params for each node. +* [#1451](https://github.com/NibiruChain/nibiru/pull/1451) - fix(perp): decrease position with zero size ## [v0.19.2](https://github.com/NibiruChain/nibiru/releases/tag/v0.19.2) - 2023-02-24 diff --git a/x/perp/v2/keeper/clearing_house.go b/x/perp/v2/keeper/clearing_house.go index c5db43152..ba51af092 100644 --- a/x/perp/v2/keeper/clearing_house.go +++ b/x/perp/v2/keeper/clearing_house.go @@ -280,6 +280,11 @@ func (k Keeper) decreasePosition( return nil, nil, fmt.Errorf("current position size is zero, nothing to decrease") } + trader, err := sdk.AccAddressFromBech32(currentPosition.TraderAddress) + if err != nil { + return nil, nil, err + } + var dir types.Direction if currentPosition.Size_.IsPositive() { dir = types.Direction_SHORT @@ -354,6 +359,13 @@ func (k Keeper) decreasePosition( LastUpdatedBlockNumber: ctx.BlockHeight(), } + if positionResp.Position.Size_.IsZero() { + err := k.Positions.Delete(ctx, collections.Join(currentPosition.Pair, trader)) + if err != nil { + return nil, nil, err + } + } + return updatedAMM, positionResp, nil } @@ -757,56 +769,50 @@ func (k Keeper) closePositionEntirely( amm types.AMM, currentPosition types.Position, quoteAssetAmountLimit sdk.Dec, -) (updatedAMM *types.AMM, positionResp *types.PositionResp, err error) { +) (updatedAMM *types.AMM, resp *types.PositionResp, err error) { if currentPosition.Size_.IsZero() { return nil, nil, fmt.Errorf("zero position size") } + positionNotional, err := PositionNotionalSpot(amm, currentPosition) + if err != nil { + return nil, nil, err + } trader, err := sdk.AccAddressFromBech32(currentPosition.TraderAddress) if err != nil { return nil, nil, err } - positionResp = &types.PositionResp{ - UnrealizedPnlAfter: sdk.ZeroDec(), + resp = &types.PositionResp{ ExchangedPositionSize: currentPosition.Size_.Neg(), PositionNotional: sdk.ZeroDec(), + FundingPayment: FundingPayment(currentPosition, market.LatestCumulativePremiumFraction), + RealizedPnl: UnrealizedPnl(currentPosition, positionNotional), + UnrealizedPnlAfter: sdk.ZeroDec(), } - // calculate unrealized PnL - positionNotional, err := PositionNotionalSpot(amm, currentPosition) - if err != nil { - return nil, nil, err - } - unrealizedPnl := UnrealizedPnl(currentPosition, positionNotional) - - positionResp.RealizedPnl = unrealizedPnl - // calculate remaining margin with funding payment - fundingPayment := FundingPayment(currentPosition, market.LatestCumulativePremiumFraction) - remainingMargin := currentPosition.Margin.Add(unrealizedPnl).Sub(fundingPayment) + remainingMargin := currentPosition.Margin.Add(resp.RealizedPnl).Sub(resp.FundingPayment) if remainingMargin.IsPositive() { - positionResp.BadDebt = sdk.ZeroDec() - positionResp.MarginToVault = remainingMargin.Neg() + resp.BadDebt = sdk.ZeroDec() + resp.MarginToVault = remainingMargin.Neg() } else { - positionResp.BadDebt = remainingMargin.Abs() - positionResp.MarginToVault = sdk.ZeroDec() + resp.BadDebt = remainingMargin.Abs() + resp.MarginToVault = sdk.ZeroDec() } - positionResp.FundingPayment = fundingPayment - - var sideToTake types.Direction + var dir types.Direction // flipped since we are going against the current position if currentPosition.Size_.IsPositive() { - sideToTake = types.Direction_SHORT + dir = types.Direction_SHORT } else { - sideToTake = types.Direction_LONG + dir = types.Direction_LONG } updatedAMM, exchangedNotionalValue, err := k.SwapBaseAsset( ctx, market, amm, - sideToTake, + dir, currentPosition.Size_.Abs(), quoteAssetAmountLimit, ) @@ -814,8 +820,8 @@ func (k Keeper) closePositionEntirely( return nil, nil, err } - positionResp.ExchangedNotionalValue = exchangedNotionalValue - positionResp.Position = types.Position{ + resp.ExchangedNotionalValue = exchangedNotionalValue + resp.Position = types.Position{ TraderAddress: currentPosition.TraderAddress, Pair: currentPosition.Pair, Size_: sdk.ZeroDec(), @@ -830,5 +836,5 @@ func (k Keeper) closePositionEntirely( return nil, nil, err } - return updatedAMM, positionResp, nil + return updatedAMM, resp, nil } From 85859f2b78491b2929ac080fce8c30cd535de5fc Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:51:32 -0400 Subject: [PATCH 15/16] fix(oracle): continue with abci hook during error (#1452) * fix(oracle): continue with abci hook during error * Update CHANGELOG.md --- CHANGELOG.md | 1 + x/inflation/keeper/hooks.go | 1 + x/oracle/keeper/reward.go | 1 + x/oracle/keeper/slash.go | 1 + 4 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9642fdb31..2467bc403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -181,6 +181,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1425](https://github.com/NibiruChain/nibiru/pull/1425) - fix: remove positions from state when closed with reverse position * [#1441](https://github.com/NibiruChain/nibiru/pull/1441) - fix(oracle): ignore abstain votes in std dev calculation * [#1446](https://github.com/NibiruChain/nibiru/pull/1446) - fix(cmd): Add custom InitCmd to set set desired Tendermint consensus params for each node. +* [#1452](https://github.com/NibiruChain/nibiru/pull/1452) - fix(oracle): continue with abci hook during error * [#1451](https://github.com/NibiruChain/nibiru/pull/1451) - fix(perp): decrease position with zero size ## [v0.19.2](https://github.com/NibiruChain/nibiru/releases/tag/v0.19.2) - 2023-02-24 diff --git a/x/inflation/keeper/hooks.go b/x/inflation/keeper/hooks.go index f86fc3aad..dde2cbec1 100644 --- a/x/inflation/keeper/hooks.go +++ b/x/inflation/keeper/hooks.go @@ -65,6 +65,7 @@ func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumb "SKIPPING INFLATION: failed to mint and allocate inflation", "error", err, ) + return } // If period is passed, update the period. A period is diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index 63b53af4d..89a9f65dd 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -67,6 +67,7 @@ func (k Keeper) GatherRewardsForVotePeriod(ctx sdk.Context) sdk.Coins { pairReward, err := k.Rewards.Get(ctx, rewardId) if err != nil { k.Logger(ctx).Error("Failed to get reward", "err", err) + continue } coins = coins.Add(pairReward.Coins...) diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go index c49ab7df0..a006fb8e6 100644 --- a/x/oracle/keeper/slash.go +++ b/x/oracle/keeper/slash.go @@ -36,6 +36,7 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { consAddr, err := validator.GetConsAddr() if err != nil { k.Logger(ctx).Error("fail to get consensus address", "validator", validator.GetOperator().String()) + continue } k.StakingKeeper.Slash( From 9d4388ef6d9f4fa0c1f7d74d3c5e4217e8dc6128 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 23:31:32 -0500 Subject: [PATCH 16/16] chore(deps): Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#1450) --- CHANGELOG.md | 1 + go.mod | 4 ++-- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2467bc403..efa892f46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `github.com/prometheus/client_golang` from 1.15.1 to 1.16.0 (#1431) - Bump `github.com/cosmos/ibc-go/v7` from 7.1.0 to 7.2.0 (#1445) - Bump `bufbuild/buf-setup-action` from 1.21.0 to 1.22.0 (#1449) +- Bump `google.golang.org/protobuf` from 1.30.0 to 1.31.0 (#1450) ### Breaking diff --git a/go.mod b/go.mod index c7849ff04..2d775986e 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.47.3 + github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.2.0 github.com/gogo/protobuf v1.3.3 @@ -32,7 +33,7 @@ require ( github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/grpc v1.56.1 - google.golang.org/protobuf v1.30.0 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -64,7 +65,6 @@ require ( github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v0.21.0-beta.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect diff --git a/go.sum b/go.sum index 2b271c59d..6140c9c33 100644 --- a/go.sum +++ b/go.sum @@ -1819,8 +1819,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=