From f1fd83fd41a55902a22684a0186e4b54ef0e37b0 Mon Sep 17 00:00:00 2001 From: Jorge Hernandez <3452489+jhernandezb@users.noreply.github.com> Date: Mon, 5 Dec 2022 13:44:58 -0600 Subject: [PATCH] Prepare v8 (#721) * update dependency, change docker release * fix snapshotter * bump to go 1.19 * update tag --- .drone.yml | 16 ++++++++-------- Makefile | 4 ++-- docker/Dockerfile.go-devtools | 4 ++-- go.mod | 4 ++-- go.sum | 4 ++-- internal/statesync/snapshotter.go | 3 +-- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.drone.yml b/.drone.yml index 62f659099..192eab95b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,7 +31,7 @@ steps: - '/go/pkg/mod' - name: test - image: publicawesome/golang:1.18.7-devtooling + image: publicawesome/golang:1.19.3-devtooling volumes: - name: cache path: /go @@ -40,7 +40,7 @@ steps: environment: GOPROXY: http://goproxy - name: build - image: golang:1.18.7-alpine3.15 + image: golang:1.19.3-alpine3.15 volumes: - name: cache path: /go @@ -75,12 +75,12 @@ steps: password: from_secret: docker_password tags: - - v8-alpha + - 8.0.0-rc.1 when: event: - push branch: - - feature/min-deposit-ante-handler + - prepare-v8 - name: docker_release image: plugins/docker:18 settings: @@ -187,7 +187,7 @@ steps: environment: GOPROXY: http://goproxy - name: stargaze - image: publicawesome/golang:1.18.7-devtooling + image: publicawesome/golang:1.19.3-devtooling volumes: - name: cache path: /go @@ -273,7 +273,7 @@ steps: mount: - '/go/pkg/mod' - name: build-wrapper - image: publicawesome/golang:1.18.7-devtooling + image: publicawesome/golang:1.19.3-devtooling volumes: - name: cache path: /go @@ -343,7 +343,7 @@ steps: - ./scripts/ci/upgrade/proposal.sh - name: stargaze-upgraded pull: true - image: publicawesome/stargaze:v8-alpha + image: publicawesome/stargaze:8.0.0-rc.1 commands: - ./scripts/ci/upgrade/run-upgrade.sh environment: @@ -399,6 +399,6 @@ depends_on: - ibc-integration-test --- kind: signature -hmac: f581eeab2aa3d320a680ba43dda39edd4654a52fee12f3d3133da7e926d44953 +hmac: 375f9134b8a4ebe29a1e1680b5a6bebc1444a551ff6843d8fa794c3bdcd8c5da ... diff --git a/Makefile b/Makefile index ab312e4a1..63a1c5e83 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,8 @@ endif check_version: @echo "Go version: $(GO_MAJOR_VERSION).$(GO_MINOR_VERSION)" -ifneq ($(GO_MINOR_VERSION),18) - @echo "ERROR: Go version 1.18 is recommended for this version Stargaze" +ifneq ($(GO_MINOR_VERSION),19) + @echo "ERROR: Go version 1.19 is required for this version of Stargaze" exit 1 endif diff --git a/docker/Dockerfile.go-devtools b/docker/Dockerfile.go-devtools index 7030169db..2c3ba17d2 100644 --- a/docker/Dockerfile.go-devtools +++ b/docker/Dockerfile.go-devtools @@ -1,5 +1,5 @@ -# docker build . -t publicawesome/golang:1.18.7-devtooling -f docker/Dockerfile.go-devtools -FROM golang:1.18.7 +# docker build . -t publicawesome/golang:1.19.3-devtooling -f docker/Dockerfile.go-devtools +FROM golang:1.19.3 RUN apt-get update && \ apt-get install -y cmake && \ apt-get -y clean && \ diff --git a/go.mod b/go.mod index dece60d3a..11560233f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/public-awesome/stargaze/v8 -go 1.18 +go 1.19 require ( github.com/CosmWasm/wasmd v0.29.2 @@ -131,7 +131,7 @@ replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/tendermint/spm => github.com/public-awesome/spm v0.1.9-stargaze.0.20221015160454-019146ae3b56 + github.com/tendermint/spm => github.com/public-awesome/spm v0.1.9-stargaze.0.20221205165118-9c238a00d636 google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 76fefe76c..406ad260d 100644 --- a/go.sum +++ b/go.sum @@ -670,8 +670,8 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/public-awesome/spm v0.1.9-stargaze.0.20221015160454-019146ae3b56 h1:CIR8MNLCFwoddwjp8EMKJKKulqx7hY1U0XDVrzqKlRg= -github.com/public-awesome/spm v0.1.9-stargaze.0.20221015160454-019146ae3b56/go.mod h1:eaa4hVTZiTtHd92w75Yx8ZWXkBleDDdyGCLoBRFEz3A= +github.com/public-awesome/spm v0.1.9-stargaze.0.20221205165118-9c238a00d636 h1:b5rwkxpHVyxKTwCBkyBxnvR4Uofm4ICXOTWzp+k5ayk= +github.com/public-awesome/spm v0.1.9-stargaze.0.20221205165118-9c238a00d636/go.mod h1:g1hAZZpsd4VrSFrzn7/ooUcQHrxrn5WqpB6nQNCfVDk= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= diff --git a/internal/statesync/snapshotter.go b/internal/statesync/snapshotter.go index d2c7a9772..67394cad6 100644 --- a/internal/statesync/snapshotter.go +++ b/internal/statesync/snapshotter.go @@ -55,7 +55,7 @@ func (vs *VersionSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer params := vs.consensusParamGetter.GetConsensusParams(ctx) // default to 1 for stargaze appVersion := uint64(1) - if params != nil && params.Version != nil && params.Version.GetAppVersion() > 0 { + if params != nil && params.Version != nil { appVersion = params.Version.GetAppVersion() } bz := sdk.Uint64ToBigEndian(appVersion) @@ -76,7 +76,6 @@ func (vs *VersionSnapshotter) Restore(height uint64, format uint32, protoReader } payload := item.GetExtensionPayload() if payload == nil { - vs.versionSetter.SetProtocolVersion(0) break } appVersion := sdk.BigEndianToUint64(payload.Payload)