Skip to content

Commit

Permalink
Merge pull request #1089 from CosmosContracts/cosmos-sdk-v050
Browse files Browse the repository at this point in the history
v28: Cosmos SDK 0.50, Wasm 2.0, Refactors, Cleanup
  • Loading branch information
vexxvakan authored Feb 20, 2025
2 parents b4966bd + 3dea5fd commit 985d259
Show file tree
Hide file tree
Showing 569 changed files with 132,124 additions and 67,965 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build/
bin/
.github/
interchaintest/
*.md
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

* @JakeHartnell @dimiandre @niilptr
* @JakeHartnell @dimiandre @niilptr @vexxvakan
4 changes: 4 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths:
- "."
paths-ignore:
- "api/**"
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
interval: weekly
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
interval: weekly
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.22.0
GO_VERSION: 1.23.4

jobs:
build:
Expand All @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: go build ./...
Expand All @@ -31,7 +31,7 @@ jobs:
name: test
steps:
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
Expand All @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build without push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.22.0
GO_VERSION: 1.23.4

jobs:
analyze:
Expand All @@ -32,15 +32,17 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: "go"
queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality
config-file: ./.github/codeql/codeql-config.yml
queries: +security-and-quality,github/codeql/go/ql/src/experimental/InconsistentCode/DeferInLoop.ql@main,github/codeql/go/ql/src/experimental/Unsafe/WrongUsageOfUnsafe.ql@main,github/codeql/go/ql/src/experimental/CWE-369/DivideByZero.ql@main
packs: +crypto-com/cosmos-sdk-codeql
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
Expand All @@ -64,4 +66,4 @@ jobs:
run: make build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
11 changes: 5 additions & 6 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.22.0
GO_VERSION: 1.23.4

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4

- name: golangci-lint-junod
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2
version: v1.63.4
args: --timeout 10m
10 changes: 4 additions & 6 deletions .github/workflows/interchaintest-E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
packages: write

env:
GO_VERSION: 1.22.0
GO_VERSION: 1.23.4
TAR_PATH: /tmp/juno-docker-image.tar
IMAGE_NAME: juno-docker-image

Expand All @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum
Expand All @@ -39,7 +39,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and export
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
tags: juno:local
Expand Down Expand Up @@ -68,8 +68,6 @@ jobs:
- "ictest-upgrade"
- "ictest-ibc"
- "ictest-unity-deploy"
- "ictest-unity-gov"
- "ictest-pob"
- "ictest-drip"
- "ictest-feepay"
- "ictest-burn"
Expand All @@ -79,7 +77,7 @@ jobs:

steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/push-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
juno-images:
runs-on: ubuntu-latest
steps:
-
-
name: Check out the repo
uses: actions/checkout@v4
-
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -59,10 +59,10 @@ jobs:
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_ENV
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_ENV
-
name: Build and push
-
name: Build and push
id: build_push_image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
file: Dockerfile
context: .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: sha256sum ./junod > ./junod_sha256.txt

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ github.token }}
files: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
19 changes: 2 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
vue/node_modules
vue/dist
secret.yml
cosmoshub3.json
exchanges.json
juno_out.json
bin
.vscode
.ash_history
tmp-swagger-gen

.DS_Store
heighliner*

**/data/**/*

# emacs editor config
\#*\#
.\#*

.DS_Store
!scripts/heighliner
7 changes: 0 additions & 7 deletions .gitpod.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# macOS/Linux with curl (recommended):
# curl https://mise.run | sh
#
# Using Homebrew on macOS:
# brew install mise
#
# For Bash (~/.bashrc):
# eval "$(mise activate bash)"
#
# For Zsh (~/.zshrc):
# eval "$(mise activate zsh)"
#
# For Fish (~/.config/fish/config.fish):
# mise activate fish | source
#
# Verify Installation:
# mise --version
#
# Troubleshooting:
# - Ensure PATH includes: $HOME/.local/bin
# - Run: mise doctor
# - For permissions issues: chmod +x $(which mise)
#
# Usage:
# mise install # Install all tools defined in .mise.toml
# mise ls # List installed tools

[tools]
go = "1.23.4"
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
# - pre-commit run --all-files

repos:
- repo: local
hooks:
- id: go-mod-tidy
name: "go mod tidy"
files: go.*
entry: ./scripts/git/tidy.sh
language: "script"
- repo: local
hooks:
- id: go-mod-tidy
name: "go mod tidy"
files: go.*
entry: ./scripts/git/tidy.sh
language: "script"

- id: golangci-lint
name: "lint"
files: .*go
entry: ./scripts/git/linter.sh
require_serial: true
language: "script"
- id: golangci-lint
name: "lint"
files: .*go
entry: ./scripts/git/linter.sh
require_serial: true
language: "script"
23 changes: 13 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t cosmoscontracts/juno:latest
# docker run --rm -it cosmoscontracts/juno:latest /bin/sh
FROM golang:1.22-alpine AS go-builder
FROM golang:1.23-alpine AS go-builder

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
Expand All @@ -17,13 +17,15 @@ WORKDIR /code

# Download dependencies and CosmWasm libwasmvm if found.
ADD go.mod go.sum ./
RUN set -eux; \
export ARCH=$(uname -m); \
WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}'); \
if [ ! -z "${WASM_VERSION}" ]; then \
wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \
fi; \
go mod download;

RUN set -eux; \
ARCH=$(uname -m); \
WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | cut -d ' ' -f 2); \
wget "https://github.com/CosmWasm/wasmvm/releases/download/${WASMVM_VERSION}/libwasmvm_muslc.${ARCH}.a" -O /lib/libwasmvm_muslc.${ARCH}.a; \
wget "https://github.com/CosmWasm/wasmvm/releases/download/${WASMVM_VERSION}/checksums.txt" -O /tmp/checksums.txt && \
sha256sum /lib/libwasmvm_muslc.${ARCH}.a | grep $(grep "libwasmvm_muslc.${ARCH}.a" /tmp/checksums.txt | awk '{print $1}'); \
ln -sf "/lib/libwasmvm_muslc.${ARCH}.a" "/lib/libwasmvm.${ARCH}.a"; \
go mod download

# Copy over code
COPY . /code/
Expand All @@ -37,7 +39,8 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& (file /code/bin/junod | grep "statically linked")

# --------------------------------------------------------
FROM alpine:3.16

FROM alpine:3.21

COPY --from=go-builder /code/bin/junod /usr/bin/junod

Expand All @@ -46,7 +49,7 @@ RUN chmod +x /opt/*.sh

WORKDIR /opt

# rest server, tendermint p2p, tendermint rpc
# rest server, comet p2p, comet rpc
EXPOSE 1317 26656 26657

CMD ["/usr/bin/junod", "version"]
Loading

0 comments on commit 985d259

Please sign in to comment.