Skip to content

Commit

Permalink
Merge branch 'release/v0.46.x-celestia' into rp/error-for-incorrect-l…
Browse files Browse the repository at this point in the history
…edger
  • Loading branch information
rootulp committed Mar 11, 2024
2 parents c1789f8 + 2a2347c commit 171ad32
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: go.mod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.49.0
version: v1.56.2
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- run: make build
Expand All @@ -32,9 +32,10 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -50,9 +51,9 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- uses: actions/cache@v3
Expand All @@ -69,9 +70,9 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- uses: actions/cache@v3
Expand All @@ -88,9 +89,9 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- uses: actions/cache@v3
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/test-race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
install-tparse:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- name: install tparse
Expand All @@ -38,9 +39,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -55,9 +56,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Create a file with all core Cosmos SDK pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
Expand Down Expand Up @@ -89,9 +90,9 @@ jobs:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
go-arch: ["amd64", "arm", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -44,9 +44,9 @@ jobs:
container: tendermintdev/docker-tm-db-testing
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -67,9 +67,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Create a file with all core Cosmos SDK pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
Expand Down Expand Up @@ -101,9 +101,9 @@ jobs:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand Down Expand Up @@ -180,9 +180,9 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- uses: technote-space/[email protected]
id: git_diff
with:
Expand All @@ -203,9 +203,10 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -220,9 +221,9 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Display go version
run: go version
- uses: technote-space/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ run:
linters:
disable-all: true
enable:
- depguard
- dogsled
- exportloopref
- goconst
Expand Down Expand Up @@ -58,4 +57,4 @@ linters-settings:
nolintlint:
allow-unused: false
require-explanation: false
require-specific: false
require-specific: false
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys add foo
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys list
# TODO: demo connecting rest-server (or is this in server now?)
FROM golang:1.19-alpine AS build-env
FROM golang:1.22.1-alpine AS build-env

# Install minimum necessary dependencies
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ benchmark:
###############################################################################

golangci_lint_cmd=golangci-lint
golangci_version=v1.49.0
golangci_version=v1.56.2

lint:
@echo "--> Running linter"
Expand Down
2 changes: 1 addition & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
}

if app.initChainer == nil {
return
return res
}

// add block gas meter for any genesis transactions (allow infinite gas)
Expand Down
14 changes: 7 additions & 7 deletions contrib/devtools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM bufbuild/buf:1.1.0 as BUILDER

FROM golang:1.19-alpine
FROM golang:1.22.1-alpine

RUN apk add --no-cache \
nodejs \
Expand All @@ -20,19 +20,19 @@ ENV GOLANG_PROTOBUF_VERSION=1.28.0 \
RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION}
RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION}
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION}

# install all gogo protobuf binaries
RUN git clone https://github.com/regen-network/protobuf.git; \
cd protobuf; \
go mod download; \
make install
cd protobuf; \
go mod download; \
make install

# we need to use git clone because we use 'replace' directive in go.mod
# protoc-gen-gocosmos was moved to to in cosmos/gogoproto but pending a migration there.
RUN git clone https://github.com/regen-network/cosmos-proto.git; \
cd cosmos-proto/protoc-gen-gocosmos; \
go install .
cd cosmos-proto/protoc-gen-gocosmos; \
go install .

RUN npm install -g swagger-combine

Expand Down
2 changes: 1 addition & 1 deletion contrib/images/simd-dlv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS build
FROM golang:1.22.1-alpine AS build

RUN apk add build-base git linux-headers libc-dev
RUN go install github.com/go-delve/delve/cmd/dlv@latest
Expand Down
2 changes: 1 addition & 1 deletion contrib/images/simd-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS build
FROM golang:1.22.1-alpine AS build

RUN apk add build-base git linux-headers

Expand Down
2 changes: 1 addition & 1 deletion contrib/rosetta/rosetta-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine as build
FROM golang:1.22.1-alpine as build

RUN apk add --no-cache tar git

Expand Down
2 changes: 1 addition & 1 deletion contrib/rosetta/rosetta-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine as build
FROM golang:1.22.1-alpine as build

RUN apk add git gcc libc-dev --no-cache

Expand Down
2 changes: 1 addition & 1 deletion crypto/keyring/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) {
continue
}

if err := os.WriteFile(dir+"/keyhash", passwordHash, 0o555); err != nil {
if err := os.WriteFile(dir+"/keyhash", passwordHash, 0o600); err != nil {
return "", err
}

Expand Down
2 changes: 1 addition & 1 deletion x/auth/client/cli/tx_multisign.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) {
}
parsedTx, err := authclient.ReadTxFromFile(clientCtx, args[0])
if err != nil {
return
return err
}

txFactory := tx.NewFactoryCLI(clientCtx, cmd.Flags())
Expand Down
2 changes: 1 addition & 1 deletion x/distribution/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (k Keeper) CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.Val

if startingInfo.Height == uint64(ctx.BlockHeight()) {
// started this height, no rewards yet
return
return rewards
}

startingPeriod := startingInfo.PreviousPeriod
Expand Down
1 change: 1 addition & 0 deletions x/group/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ func (k Keeper) PruneProposals(ctx sdk.Context) error {
return nil
}
for _, proposal := range proposals {
proposal := proposal
err := k.pruneProposal(ctx, proposal.Id)
if err != nil {
return err
Expand Down
2 changes: 0 additions & 2 deletions x/group/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,6 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper,
}

_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)

if err != nil {
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-policy was modified"), nil, nil
Expand Down Expand Up @@ -1046,7 +1045,6 @@ func SimulateMsgVote(ak group.AccountKeeper,
}

_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)

if err != nil {
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
return simtypes.NoOpMsg(group.ModuleName, msg.Type(), "no-op:group/group-policy was modified"), nil, nil
Expand Down
Loading

0 comments on commit 171ad32

Please sign in to comment.