Skip to content

Commit

Permalink
Merge pull request #21 from slandymani/chains/band/cosmos-sdk-v0.50
Browse files Browse the repository at this point in the history
Chains/band/cosmos sdk v0.50
  • Loading branch information
slandymani authored Sep 30, 2024
2 parents 481bfb3 + 3b09ee7 commit fc0a579
Show file tree
Hide file tree
Showing 4,774 changed files with 6,905 additions and 1,282,408 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: ''
labels: 'kind/bug'
assignees: 'RiccardoM'
assignees: 'MonikaCat'

---
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updates:
interval: daily
open-pull-requests-limit: 10
reviewers:
- riccardom
- MonikaCat
labels:
- automerge
- dependencies
59 changes: 59 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: docker-build

on:
push:
branches:
- cosmos/*/*
- chains/*/*

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Set Callisto chain name 🔧
shell: bash
run: echo "CHAIN_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" >> $GITHUB_ENV

- name: Set Callisto version 🔧
shell: bash
run: echo "GITHUB_VERSION=$(git describe --tags)" >> $GITHUB_ENV

- name: Prepare tags 🏷️
id: prep
run: |
DOCKER_IMAGE=${{ secrets.DOCKERHUB_BDJUNO_REPO }}
CHAIN_NAME="${{env.CHAIN_NAME}}"
VERSION="${{env.GITHUB_VERSION}}"
TAGS="${DOCKER_IMAGE}:${CHAIN_NAME}-${VERSION}"
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Determine Dockerfile to use 🔍
run: |
if [[ -f Dockerfile.cosmwasm ]]; then
export DOCKERFILE=Dockerfile.cosmwasm
else
export DOCKERFILE=Dockerfile.default
fi
echo "DOCKERFILE=${DOCKERFILE}" >> $GITHUB_ENV
- name: Set up Docker Buildx 🧰
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub 👤
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push 📤
uses: docker/build-push-action@v5
with:
context: .
file: "./${{ env.DOCKERFILE }}"
push: true
tags: ${{ steps.prep.outputs.tags }}
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4.3.0
- uses: amannn/action-semantic-pull-request@v5.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 16 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,31 @@ on:
pull_request:
push:
branches:
- master
- chains/*
- cosmos/*

jobs:
GolangCI:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 6
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Go 🧰
uses: actions/setup-go@v5
with:
go-version: "1.21"

- name: Compute diff 📜
uses: technote-space/[email protected]
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- uses: golangci/[email protected]
with:
version: v1.28
args: --timeout 10m
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run lint ✅
if: "env.GIT_DIFF != ''"
run: make lint
40 changes: 29 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
pull_request:
push:
branches:
- master
- chains/*
- cosmos/*

jobs:
Cleanup-runs:
Expand All @@ -14,21 +15,38 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
if: "!startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/cosmos')"

Unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Go 🧰
uses: actions/setup-go@v5
with:
go-version: "1.21"

- name: Compute diff 📜
uses: technote-space/[email protected]
id: git_diff
with:
go-version: 1.17
- name: Test & Create coverage report
run: make install test-unit stop-docker-test
- name: Upload cove coverage
uses: codecov/codecov-action@v3
SUFFIX_FILTER: |
.go
.mod
.sum
- name: Build 🔨
if: "env.GIT_DIFF != ''"
run: make build

- name: Test & Coverage report creation 🧪
run: make test-unit stop-docker-test

- name: Upload coverage 📤
if: "env.GIT_DIFF != ''"
uses: codecov/[email protected]
with:
file: ./coverage.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
build/
vendor/

# Configuration
*.toml
Expand Down
12 changes: 6 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- gocritic
- gofmt
- goimports
- golint
- revive
- gosec
- gosimple
- govet
- ineffassign
- maligned
- misspell
- nakedret
- scopelint
- exportloopref
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
Expand Down Expand Up @@ -51,6 +47,10 @@ issues:
- text: "ST1016:"
linters:
- stylecheck
# Disable until Msg-based gov proposals are fully implemented
- text: "SA1019:"
linters:
- staticcheck
max-issues-per-linter: 10000
max-same-issues: 10000

Expand Down
10 changes: 6 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
queue_rules:
- name: default
conditions:
- base~=cosmos/
- or:
- base~=cosmos/
- base~=chains/

pull_request_rules:
- name: automerge to master with label automerge and branch protection passing
- name: automerge with label automerge and branch protection passing
conditions:
- "#approved-reviews-by>1"
- "#approved-reviews-by>0"
- label=automerge
actions:
queue:
Expand All @@ -15,4 +17,4 @@ pull_request_rules:
commit_message_template: >
{{ title }} (#{{ number }})
{{ body }}
{{ body }}
67 changes: 66 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
## Unreleased
- ([\#610](https://github.com/forbole/bdjuno/pull/610)) Add support for gov `v1` proposals
- ([\#652](https://github.com/forbole/bdjuno/pull/652)) Update gov module parsing
- ([\#702](https://github.com/forbole/bdjuno/pull/702)) Add `message_type` module and store msg types inside `message_type` table, add `messages_by_type` function to allow to query messages by their types
- ([\#704](https://github.com/forbole/bdjuno/pull/704)) Update `BDJuno` name to `Callisto`

## Version v4.0.0
## Notes
This version is thought to be used with Cosmos SDK `v0.47.x`.

### Changes

#### Parse Command
- ([\#492](https://github.com/forbole/bdjuno/pull/492)) Add parse command for periodic tasks: `x/bank` total supply, `x/distribution` community pool, `x/mint` inflation, `pricefeed` token price and price history, `x/staking` staking pool

#### Upgrade Module
- ([\#467](https://github.com/forbole/bdjuno/pull/467)) Store software upgrade plan and refresh data at upgrade height

#### Staking Module
- ([\#443](https://github.com/forbole/bdjuno/pull/443)) Remove tombstone status from staking module(already stored in slashing module)
- ([\#455](https://github.com/forbole/bdjuno/pull/455)) Added `unbonding_tokens` and `staked_not_bonded_tokens` values to staking pool table
- ([\#536](https://github.com/forbole/bdjuno/pull/536)) Fix `PoolSnapshot` tokens type from `sdk.Int` to `sdkmath.Int`

#### Gov Module
- ([\#461](https://github.com/forbole/bdjuno/pull/461)) Parse `x/gov` genesis with `genesisDoc.InitialHeight` instead of the hard-coded height 1
- ([\#465](https://github.com/forbole/bdjuno/pull/465)) Get open proposal ids in deposit or voting period by block time instead of current time
- ([\#489](https://github.com/forbole/bdjuno/pull/489)) Remove block height foreign key from proposal_vote and proposal_deposit tables and add column timestamp
- ([\#499](https://github.com/forbole/bdjuno/pull/499)) Check if proposal has passed voting end time before marking it invalid
- ([\#523](https://github.com/forbole/bdjuno/pull/523)) Update proposal snapshots handling on block
- ([\#681](https://github.com/forbole/bdjuno/pull/681)) Handle proposal status change from deposit to voting
-
#### Daily refetch
- ([\#454](https://github.com/forbole/bdjuno/pull/454)) Added `daily refetch` module to refetch missing blocks every day

#### Hasura
- ([\#473](https://github.com/forbole/bdjuno/pull/473)) Improved Hasura permissions
- ([\#491](https://github.com/forbole/bdjuno/pull/491)) Add host address to Hasura actions

### Dependencies
- ([\#542](https://github.com/forbole/bdjuno/pull/542)) Updated Juno to `v5.1.0`


## Version v3.2.0
### Changes
#### Mint module
- ([\#432](https://github.com/forbole/bdjuno/pull/432)) Update inflation rate when mint param change proposal is passed

#### Gov module
- ([\#401](https://github.com/forbole/bdjuno/pull/401)) Update the proposal status to the latest in `bdjuno parse gov proposal [id]` command
- ([\#430](https://github.com/forbole/bdjuno/pull/430)) Update the proposals that have invalid status but can still be in voting or deposit periods

### Dependencies
- ([\#440](https://github.com/forbole/bdjuno/pull/440)) Updated Juno to `v3.3.0`

## Version v3.1.0
### Dependencies
- Updated Juno to `v3.2.0`

### Changes
#### Hasura
- ([\#395](https://github.com/forbole/bdjuno/pull/395)) Remove time label from Hasura Prometheus monitoring

#### Bank module
- ([\#410](https://github.com/forbole/bdjuno/pull/410)) Change total supply query from only 1 page to all pages

## Version v3.0.1
### Dependencies
- Updated Juno to `v3.1.1`
Expand Down Expand Up @@ -74,4 +139,4 @@ This version introduces breaking changes to certain address-specific data that i
- ([\#276](https://github.com/forbole/bdjuno/pull/276)) Added `fee_grant_allowance` table (v0.44.x)

#### Modules
- ([\#353](https://github.com/forbole/bdjuno/pull/353)) Removed the support for the `history` module
- ([\#353](https://github.com/forbole/bdjuno/pull/353)) Removed the support for the `history` module
10 changes: 0 additions & 10 deletions Dockerfile

This file was deleted.

22 changes: 22 additions & 0 deletions Dockerfile.cosmwasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


FROM golang:1.20-alpine AS builder
RUN apk update && apk add --no-cache make git
WORKDIR /go/src/github.com/forbole/callisto
COPY . ./

RUN apk update && apk add --no-cache ca-certificates build-base git
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32
## Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.$(uname -m).a /lib/libwasmvm_muslc.a
RUN go mod download
RUN LINK_STATICALLY=true BUILD_TAGS="muslc" make build

FROM alpine:latest
RUN apk update && apk add --no-cache ca-certificates build-base
WORKDIR /callisto
COPY --from=builder /go/src/github.com/forbole/callisto/build/callisto /usr/bin/callisto
CMD [ "callisto" ]
11 changes: 11 additions & 0 deletions Dockerfile.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM golang:1.20-alpine AS builder
RUN apk update && apk add --no-cache make git
WORKDIR /go/src/github.com/forbole/callisto
COPY . ./
RUN go mod download
RUN make build

FROM alpine:latest
WORKDIR /callisto
COPY --from=builder /go/src/github.com/forbole/callisto/build/callisto /usr/bin/callisto
CMD [ "callisto" ]
Loading

0 comments on commit fc0a579

Please sign in to comment.