forked from forbole/callisto
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chains/cheqd/mainnet' of github.com:forbole/callisto in…
…to chains/cheqd/testnet
- Loading branch information
Showing
218 changed files
with
4,377 additions
and
1,993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ linters: | |
enable: | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- dogsled | ||
- gocritic | ||
- gofmt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: docker-build | ||
|
||
on: | ||
push: | ||
branches: | ||
- cosmos/*/* | ||
- chains/*/* | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Tests | ||
# Tests / Code Coverage workflow runs unit tests and uploads a code coverage report. | ||
# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed. | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- chains/* | ||
- cosmos/* | ||
|
||
jobs: | ||
Cleanup-runs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
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@v4 | ||
|
||
- name: Setup Go 🧰 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Compute diff 📜 | ||
uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
queue_rules: | ||
- name: default | ||
conditions: | ||
- or: | ||
- base~=cosmos/ | ||
- base~=chains/ | ||
|
||
pull_request_rules: | ||
- name: automerge with label automerge and branch protection passing | ||
conditions: | ||
- "#approved-reviews-by>0" | ||
- label=automerge | ||
actions: | ||
queue: | ||
name: default | ||
method: squash | ||
commit_message_template: > | ||
{{ title }} (#{{ number }}) | ||
{{ body }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
## Unreleased | ||
|
||
### Changes | ||
|
||
#### [cheqd] | ||
- ([\#545](https://github.com/forbole/callisto/pull/545)) Added `x/did` and `x/resource` module handlers to store data in db | ||
- ([\#550](https://github.com/forbole/callisto/pull/550)) Updated validators VP handlers, `voting_power` column type to TEXT, updated VotingPower type to `sdkmath.Int` for ValidatorVotingPower and ProposalValidatorStatusSnapshot struct | ||
- ([\#580](https://github.com/forbole/callisto/pull/580)) Removed `redelegation` from top accounts calculations | ||
|
||
#### [cheqd] Top Accounts Module | ||
- ([\#510](https://github.com/forbole/callisto/pull/510)) Implemented `top_accounts` module to store chain native token's balance for ranking | ||
- ([\#511](https://github.com/forbole/callisto/pull/511)) Implemented parse cmd for `top_accounts` module | ||
- ([\#520](https://github.com/forbole/callisto/pull/520)) Upgraded `cheqd-node` to `v1.2.2` and proposals parsing to correctly parse `v0.46.x` gov proposals | ||
- ([\#547](https://github.com/forbole/callisto/pull/547)) Upgraded `cheqd-node` to `v1.3.0` and added MsgDeactivateDidDoc handling | ||
- ([\#552](https://github.com/forbole/callisto/pull/552)) Upgraded `cheqd-node` to `v1.4.0` | ||
- ([\#555](https://github.com/forbole/callisto/pull/555)) Added `height` column to top accounts table | ||
- ([\#560](https://github.com/forbole/callisto/pull/560)) Stored latest block height instead of height `0` when updating top accounts and added RefreshAvailableBalance to periodic ops | ||
- ([\#570](https://github.com/forbole/callisto/pull/570)) Added `type` column to top accounts table, stored account type with top accounts module and added RefreshTopAccountsList to periodic ops | ||
|
||
#### CI | ||
- ([\#508](https://github.com/forbole/callisto/pull/508)) Upgrade workflow golangci version to v1.50.1 | ||
- ([\#610](https://github.com/forbole/callisto/pull/610)) Add support for gov `v1` proposals | ||
- ([\#652](https://github.com/forbole/callisto/pull/652)) Update gov module parsing | ||
- ([\#702](https://github.com/forbole/callisto/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/callisto/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/callisto/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/callisto/pull/467)) Store software upgrade plan and refresh data at upgrade height | ||
|
||
#### Staking Module | ||
- ([\#443](https://github.com/forbole/callisto/pull/443)) Remove tombstone status from staking module(already stored in slashing module) | ||
- ([\#455](https://github.com/forbole/callisto/pull/455)) Added `unbonding_tokens` and `staked_not_bonded_tokens` values to staking pool table | ||
- ([\#536](https://github.com/forbole/callisto/pull/536)) Fix `PoolSnapshot` tokens type from `sdk.Int` to `sdkmath.Int` | ||
|
||
#### Gov Module | ||
- ([\#461](https://github.com/forbole/callisto/pull/461)) Parse `x/gov` genesis with `genesisDoc.InitialHeight` instead of the hard-coded height 1 | ||
- ([\#465](https://github.com/forbole/callisto/pull/465)) Get open proposal ids in deposit or voting period by block time instead of current time | ||
- ([\#489](https://github.com/forbole/callisto/pull/489)) Remove block height foreign key from proposal_vote and proposal_deposit tables and add column timestamp | ||
- ([\#499](https://github.com/forbole/callisto/pull/499)) Check if proposal has passed voting end time before marking it invalid | ||
- ([\#523](https://github.com/forbole/callisto/pull/523)) Update proposal snapshots handling on block | ||
- ([\#681](https://github.com/forbole/callisto/pull/681)) Handle proposal status change from deposit to voting | ||
- | ||
#### Daily refetch | ||
- ([\#454](https://github.com/forbole/callisto/pull/454)) Added `daily refetch` module to refetch missing blocks every day | ||
|
||
#### Hasura | ||
- ([\#473](https://github.com/forbole/callisto/pull/473)) Improved Hasura permissions | ||
- ([\#491](https://github.com/forbole/callisto/pull/491)) Add host address to Hasura actions | ||
|
||
### Dependencies | ||
- ([\#542](https://github.com/forbole/callisto/pull/542)) Updated Juno to `v5.1.0` | ||
|
||
|
||
## Version v3.2.0 | ||
### Changes | ||
#### Mint module | ||
- ([\#432](https://github.com/forbole/callisto/pull/432)) Update inflation rate when mint param change proposal is passed | ||
|
||
#### Gov module | ||
- ([\#401](https://github.com/forbole/callisto/pull/401)) Update the proposal status to the latest in `callisto parse gov proposal [id]` command | ||
- ([\#430](https://github.com/forbole/callisto/pull/430)) Update the proposals that have invalid status but can still be in voting or deposit periods | ||
|
||
### Dependencies | ||
- ([\#440](https://github.com/forbole/callisto/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/callisto/pull/395)) Remove time label from Hasura Prometheus monitoring | ||
|
||
#### Bank module | ||
- ([\#410](https://github.com/forbole/callisto/pull/410)) Change total supply query from only 1 page to all pages | ||
|
||
## Version v3.0.1 | ||
### Dependencies | ||
- Updated Juno to `v3.1.1` | ||
|
||
## Version v3.0.0 | ||
### Notes | ||
This version introduces breaking changes to `transaction` and `message` PostgreSQL tables. It implements PostgreSQL table partitioning to fix slow data retrieval from database that stores large amount of transactions and messages. Read more details about [migrating to v3.0.0](https://docs.bigdipper.live/cosmos-based/parser/migrations/v2.0.0) | ||
|
||
### New features | ||
#### CLI | ||
- ([\#356](https://github.com/forbole/callisto/pull/356)) Implemented `migrate` command to perform easy migration to higher BDJuno versions | ||
- ([\#356](https://github.com/forbole/callisto/pull/356)) Updated `parse-genesis` command to parse genesis file without accessing the node | ||
|
||
#### Database | ||
- ([\#356](https://github.com/forbole/callisto/pull/356)) Added PostgreSQL table partition to `transaction` and `message` table | ||
- ([\#356](https://github.com/forbole/callisto/pull/356)) Created new `messages_by_address` function | ||
|
||
### Changes | ||
#### Hasura | ||
- ([\#377](https://github.com/forbole/callisto/pull/377)) Updated Hasura metadata | ||
- ([\#381](https://github.com/forbole/callisto/pull/381)) Hasura actions are now a module | ||
|
||
### Dependencies | ||
- ([\#356](https://github.com/forbole/callisto/pull/356)) Updated Juno to `v3.0.0` | ||
|
||
## Version v2.0.0 | ||
### Notes | ||
This version introduces breaking changes to certain address-specific data that is no longer periodically parsed from the node and stored in the database. Instead, the data is now obtained directly from the node when needed using Hasura Actions. Read more details about [migrating to v2.0.0](https://docs.bigdipper.live/cosmos-based/parser/migrations/v2.0.0) | ||
|
||
### New features | ||
#### CLI | ||
- ([\#257](https://github.com/forbole/callisto/pull/257)) Added `parse-genesis` command to parse the genesis file | ||
- ([\#228](https://github.com/forbole/callisto/pull/228)) ([\#248](https://github.com/forbole/callisto/pull/248)) Added `fix` command: | ||
- `auth`: fix vesting accounts details | ||
- `blocks`: fix missing blocks and transactions from given start height | ||
- `gov`: fix proposal with given proposal ID | ||
- `staking`: fix validators info at the latest height | ||
|
||
#### Hasura Actions | ||
- ([\#329](https://github.com/forbole/callisto/pull/329)) Implemented Hasura Actions service to replace periodic queries. If you are using GraphQL queries on your application, you should updated the old queries to use the below new actions instead. | ||
Here's a list of data acquired through Hasura Actions: | ||
- Of a certain address/delegator: | ||
- Account balance (`action_account_balance`) | ||
- Delegation rewards (`action_delegation_reward`) | ||
- Delegator withdraw address (`action_delegator_withdraw_address`) | ||
- Delegations (`action_delegation`) | ||
- Total delegations amount (`action_delegation_total`) | ||
- Unbonding delegations (`action_unbonding_delegation`) | ||
- Total unbonding delegations amount (`action_unbonding_delegation_total`) | ||
- Redelegations (`action_redelegation`) | ||
- Of a certain validator: | ||
- Commission amount (`action_validator_commission_amount`) | ||
- Delegations to this validator (`action_validator_delegations`) | ||
- Redelegations from this validator (`action_validator_redelegations_from`) | ||
- Unbonding delegations (`action_validator_unbonding_delegations`) | ||
- ([\#352](https://github.com/forbole/callisto/pull/352)) Added prometheus monitoring to hasura actions | ||
|
||
#### Local node support | ||
- Added the support for `node.type = "local"` for parsing a static local node without the usage gRPC queries: [config reference](https://docs.bigdipper.live/cosmos-based/parser/config/config#node). | ||
|
||
#### Modules | ||
- ([\#232](https://github.com/forbole/callisto/pull/232)) Updated the `x/auth` module support to handle and store `vesting accounts` and `vesting periods` inside the database. | ||
- ([\#276](https://github.com/forbole/callisto/pull/276)) Added the support for the `x/feegrant` module (v0.44.x) | ||
|
||
### Changes | ||
|
||
#### CLI | ||
- ([\#351](https://github.com/forbole/callisto/pull/351)) Fixed version display for `callisto version` cmd | ||
|
||
#### Database | ||
- ([\#300](https://github.com/forbole/callisto/pull/300)) Changed `bonded_tokens` and `not_bonded_tokens` type inside `staking_pool` table to `TEXT` to avoid value overflow | ||
- ([\#275](https://github.com/forbole/callisto/pull/275)) Added `tombstoned` column inside `validator_status` table | ||
- ([\#232](https://github.com/forbole/callisto/pull/232)) Added `vesting_account` and `vesting_period` table | ||
- ([\#276](https://github.com/forbole/callisto/pull/276)) Added `fee_grant_allowance` table (v0.44.x) | ||
|
||
#### Modules | ||
- ([\#353](https://github.com/forbole/callisto/pull/353)) Removed the support for the `history` module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
Oops, something went wrong.