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

bump deps #78

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build-darwin-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.5"
go-version: "1.22"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Version specification should align with README requirements

The Go version is set to "1.22" which could potentially use an older patch version than the 1.22.7+ requirement mentioned in the README. This might lead to build inconsistencies.

Apply this change to ensure consistency with project requirements:

-          go-version: "1.22"
+          go-version: "1.22.7"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go-version: "1.22"
go-version: "1.22.7"


- name: Set environment variables
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-darwin-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.5"
go-version: "1.22"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Go version specification needs alignment across workflows

The verification reveals inconsistent Go version specifications across the project:

  • Build workflows (darwin-arm64, darwin-amd64, linux-amd64) use "1.22"
  • Lint workflow uses 1.23
  • Test workflow uses 1.22
  • README.md requires Go v1.22.7+
  • go.mod specifies go 1.22.7

Recommendations:

  • Align build and test workflows to use "1.22.7" to match go.mod's minimum version
  • Document why lint workflow uses Go 1.23 or align it with other workflows
  • Consider using exact versions for better build reproducibility
🔗 Analysis chain

Verify Go version consistency across the project.

The Go version specification "1.22" differs from versions specified in other files:

  • README.md requires Go v1.22.7+
  • go.mod specifies Go 1.22.7
  • Some workflows use Go 1.23

While using "1.22" in workflows allows for automatic patch updates, we should ensure this aligns with the project's minimum version requirements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Go version specifications across the project
# Expected: Consistent version requirements or documented differences

# Check Go version in workflow files
echo "Go versions in workflow files:"
rg -A 1 "go-version:" .github/workflows/

# Check Go version in README
echo -e "\nGo version in README:"
rg "Go v\d+\.\d+\.?\d*" README.md

# Check Go version in go.mod
echo -e "\nGo version in go.mod:"
rg "^go \d+\.\d+\.?\d*" go.mod

Length of output: 1041

- name: Set environment variables
run: |
MINIWASM_NETWORK_NAME="miniwasm-1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22.5"
go-version: "1.22"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Go version mismatch across project files needs to be addressed

The verification confirms version inconsistencies:

  • All workflow files use "1.22" which is too permissive
  • go.mod specifies 1.22.7
  • README.md requires 1.22.7+

To ensure reproducible builds, update all workflow files:

  • .github/workflows/build-darwin-arm64.yml: Change to "1.22.7"
  • .github/workflows/build-linux-amd64.yml: Change to "1.22.7"
  • .github/workflows/build-darwin-amd64.yml: Change to "1.22.7"
🔗 Analysis chain

Ensure consistent Go version across the project.

The Go version "1.22" specified here may lead to inconsistent builds as it will use the latest patch version in the 1.22.x series. This conflicts with:

  • go.mod which specifies version 1.22.7
  • README.md which requires 1.22.7+
  1. Apply this change for reproducible builds:
-          go-version: "1.22"
+          go-version: "1.22.7"
  1. Let's verify Go versions across all workflow files:
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Go versions across workflow files
echo "Checking Go versions in workflow files..."
rg -A 1 "setup-go@v4" .github/workflows/

Length of output: 527


Script:

#!/bin/bash
# Description: Check Go versions in all workflow files
echo "Go versions in workflow files:"
rg -A 2 "setup-go@v4" .github/workflows/

# Check go.mod version
echo -e "\nGo version in go.mod:"
rg "^go " go.mod

# Check README for Go version requirement
echo -e "\nGo version in README:"
rg -i "go.*[0-9]+\.[0-9]+\.[0-9]+" README.md

Length of output: 922


- name: Set environment variables
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ concurrency:
jobs:
golangci:
env:
GOLANGCI_LINT_VERSION: v1.59.1
GOLANGCI_LINT_VERSION: v1.61.0
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Go version 1.23 is incorrect and inconsistent with go.mod

The go.mod file specifies Go 1.22.7, which conflicts with the Go 1.23 version specified in the workflow. Please update both occurrences in the lint.yml workflow to match the go.mod version:

-          go-version: 1.23
+          go-version: 1.22.7
🔗 Analysis chain

Critical: Incorrect and inconsistent Go version specification

There are several issues with the Go version changes:

  1. Go 1.23 is not yet released and shouldn't be used in production workflows
  2. This creates inconsistency with other workflow files that use Go 1.22
  3. The go.mod file specifies Go 1.22.7, which conflicts with this version

Please update both occurrences to match the go.mod version:

-          go-version: 1.23
+          go-version: 1.22.7

Let's verify the Go versions across the repository:

Also applies to: 75-75

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Go version specifications across the repository
# Expected: Consistent Go version specifications

echo "Checking Go versions in workflow files:"
rg -A 1 "setup-go@v5" .github/workflows/

echo -e "\nChecking Go version in go.mod:"
rg "^go \d+\.\d+(\.\d+)?" go.mod

Length of output: 458

check-latest: true
- uses: technote-space/[email protected]
id: git_diff
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23
check-latest: true
- run: |
go mod tidy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MiniWasm is an optimistic rollup consumer chain powered by WasmVM, designed to s

## Prerequisites

- Go v1.22.5+
- Go v1.22.7+

## Getting Started

Expand Down
24 changes: 20 additions & 4 deletions app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@ import (

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/types/module"

opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
)

const upgradeName = "0.6.0"
const upgradeName = "0.6.2"

// RegisterUpgradeHandlers returns upgrade handlers
func (app *MinitiaApp) RegisterUpgradeHandlers(cfg module.Configurator) {
app.UpgradeKeeper.SetUpgradeHandler(upgradeName,
func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return fromVM, nil
app.UpgradeKeeper.SetUpgradeHandler(
upgradeName,
func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
params, err := app.OPChildKeeper.GetParams(ctx)
if err != nil {
return nil, err
}

// set non-zero default values for new params
params.HookMaxGas = opchildtypes.DefaultHookMaxGas

err = app.OPChildKeeper.SetParams(ctx, params)
if err != nil {
return nil, err
}

return vm, nil
},
)
}
46 changes: 24 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/initia-labs/miniwasm

go 1.22.5
go 1.22.7

toolchain go1.23.0

require (
cosmossdk.io/api v0.7.5
Expand Down Expand Up @@ -33,16 +35,16 @@ require (
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/hashicorp/go-metrics v0.5.3
github.com/initia-labs/OPinit v0.5.5
github.com/initia-labs/initia v0.6.0
github.com/initia-labs/OPinit v0.5.7
github.com/initia-labs/initia v0.6.1
github.com/initia-labs/kvindexer v0.1.9
github.com/initia-labs/kvindexer/submodules/block v0.1.0
github.com/initia-labs/kvindexer/submodules/tx v0.1.0
github.com/initia-labs/kvindexer/submodules/wasm-nft v0.1.5
github.com/initia-labs/kvindexer/submodules/wasm-pair v0.1.0
github.com/noble-assets/forwarding/v2 v2.0.0-20240521090705-86712c4c9e43
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.20.4
github.com/prometheus/client_golang v1.20.5
github.com/rakyll/statik v0.1.7
github.com/skip-mev/block-sdk/v2 v2.1.2
github.com/skip-mev/connect/v2 v2.0.1
Expand All @@ -51,8 +53,8 @@ require (
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
)

require (
Expand Down Expand Up @@ -93,7 +95,7 @@ require (
github.com/cockroachdb/pebble v1.1.2 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
github.com/cometbft/cometbft-db v0.14.1 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
Expand All @@ -109,7 +111,7 @@ require (
github.com/creachadair/tomledit v0.0.24 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v4 v4.2.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
Expand All @@ -134,10 +136,10 @@ require (
github.com/gofrs/flock v0.12.1 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang/glog v1.2.1 // indirect
github.com/golang/glog v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/flatbuffers v2.0.8+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v43 v43.0.0 // indirect
Expand Down Expand Up @@ -171,7 +173,7 @@ require (
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/initia-labs/OPinit/api v0.5.1 // indirect
github.com/initia-labs/OPinit/api v0.5.7 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/jsternberg/zap-logfmt v1.3.0 // indirect
Expand All @@ -185,7 +187,7 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/minio/highwayhash v1.0.3 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand All @@ -197,10 +199,10 @@ require (
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand All @@ -209,7 +211,7 @@ require (
github.com/rs/zerolog v1.33.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/sasha-s/go-deadlock v0.3.5 // indirect
github.com/shamaton/msgpack/v2 v2.2.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
Expand All @@ -236,14 +238,14 @@ require (
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.6.0 // indirect
google.golang.org/api v0.189.0 // indirect
google.golang.org/genproto v0.0.0-20240722135656-d784300faade // indirect
Expand Down Expand Up @@ -281,7 +283,7 @@ replace (

// initia custom
replace (
github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20240925132752-ff8ff0126261
github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20241104064728-ef8cadf1bed8
github.com/cosmos/ibc-go/v8 => github.com/initia-labs/ibc-go/v8 v8.0.0-20240802003717-19c0b4ad450d

// use custom version until this PR is merged
Expand Down
Loading
Loading