mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-04-04 15:55:23 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1f82949c56 | ||
![]() |
803f54113a | ||
![]() |
821d67a20b | ||
![]() |
c1e6321179 | ||
![]() |
1db1e8da8a | ||
![]() |
72063ddda9 | ||
![]() |
802f1c8112 |
@ -1,9 +1,15 @@
|
|||||||
out/
|
out/
|
||||||
**/node_modules/
|
**/node_modules/
|
||||||
.git/
|
.git/
|
||||||
docs/
|
.github/
|
||||||
tests/
|
tests/
|
||||||
|
|
||||||
|
ci/
|
||||||
contracts/
|
contracts/
|
||||||
|
contrib/
|
||||||
|
docs/
|
||||||
|
networks/
|
||||||
|
scratch/
|
||||||
|
|
||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
|
4
.github/scripts/install-rocksdb.sh
vendored
4
.github/scripts/install-rocksdb.sh
vendored
@ -7,9 +7,9 @@ sudo apt-get install -y libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4
|
|||||||
# get rocksdb sources
|
# get rocksdb sources
|
||||||
git clone https://github.com/facebook/rocksdb.git /home/runner/rocksdb
|
git clone https://github.com/facebook/rocksdb.git /home/runner/rocksdb
|
||||||
|
|
||||||
cd /home/runner/rocksdb
|
cd /home/runner/rocksdb || exit 1
|
||||||
|
|
||||||
git checkout "$ROCKSDB_VERSION"
|
git checkout "$ROCKSDB_VERSION"
|
||||||
|
|
||||||
# install rocksdb locally
|
# install rocksdb locally
|
||||||
sudo make -j $(nproc --all) install-shared
|
sudo make -j "$(nproc --all)" install-shared && sudo ldconfig
|
||||||
|
12
.github/workflows/cd-reset-internal-testnet.yml
vendored
12
.github/workflows/cd-reset-internal-testnet.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: take the chain offline
|
- name: take the chain offline
|
||||||
run: bash ${GITHUB_WORKSPACE}/.github/scripts/put-all-chain-nodes-on-standby.sh
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/put-all-chain-nodes-on-standby.sh
|
||||||
env:
|
env:
|
||||||
@ -45,18 +45,16 @@ jobs:
|
|||||||
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }}
|
||||||
- name: checkout infrastructure repo
|
- name: checkout infrastructure repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: Kava-Labs/infrastructure
|
repository: Kava-Labs/infrastructure
|
||||||
token: ${{ secrets.KAVA_PRIVATE_GITHUB_ACCESS_TOKEN }}
|
token: ${{ secrets.KAVA_PRIVATE_GITHUB_ACCESS_TOKEN }}
|
||||||
path: infrastructure
|
path: infrastructure
|
||||||
ref: master
|
ref: master
|
||||||
- name: set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: build kava node updater
|
- name: build kava node updater
|
||||||
run: cd infrastructure/cli/kava-node-updater && make install && cd ../../../
|
run: cd infrastructure/cli/kava-node-updater && make install && cd ../../../
|
||||||
- name: run reset playbook on all chain nodes
|
- name: run reset playbook on all chain nodes
|
||||||
|
18
.github/workflows/cd-seed-chain.yml
vendored
18
.github/workflows/cd-seed-chain.yml
vendored
@ -32,25 +32,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from master
|
- name: checkout repo from master
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: master
|
||||||
- name: checkout version of kava used by network
|
- name: checkout version of kava used by network
|
||||||
run: |
|
run: |
|
||||||
git pull -p
|
git pull -p
|
||||||
git checkout $(cat ${KAVA_VERSION_FILEPATH})
|
git checkout $(cat ${KAVA_VERSION_FILEPATH})
|
||||||
env:
|
env:
|
||||||
KAVA_VERSION_FILEPATH: ${{ inputs.kava_version_filepath }}
|
KAVA_VERSION_FILEPATH: ${{ inputs.kava_version_filepath }}
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: build kava binary
|
- name: build kava binary
|
||||||
run: make install
|
run: make install
|
||||||
- name: checkout go evm tools repo
|
- name: checkout go evm tools repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ethereum/go-ethereum
|
repository: ethereum/go-ethereum
|
||||||
path: go-ethereum
|
path: go-ethereum
|
||||||
@ -61,7 +59,7 @@ jobs:
|
|||||||
make devtools
|
make devtools
|
||||||
working-directory: go-ethereum
|
working-directory: go-ethereum
|
||||||
- name: checkout kava bridge repo for deploying evm contracts
|
- name: checkout kava bridge repo for deploying evm contracts
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: Kava-Labs/kava-bridge
|
repository: Kava-Labs/kava-bridge
|
||||||
path: kava-bridge
|
path: kava-bridge
|
||||||
@ -82,7 +80,7 @@ jobs:
|
|||||||
run: wget https://raw.githubusercontent.com/Kava-Labs/kava/master/.github/scripts/${SEED_SCRIPT_FILENAME} && chmod +x ${SEED_SCRIPT_FILENAME}
|
run: wget https://raw.githubusercontent.com/Kava-Labs/kava/master/.github/scripts/${SEED_SCRIPT_FILENAME} && chmod +x ${SEED_SCRIPT_FILENAME}
|
||||||
working-directory: kava-bridge/contract
|
working-directory: kava-bridge/contract
|
||||||
env:
|
env:
|
||||||
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
SEED_SCRIPT_FILENAME: ${{ inputs.seed-script-filename }}
|
||||||
- name: run seed scripts
|
- name: run seed scripts
|
||||||
run: bash ./${SEED_SCRIPT_FILENAME}
|
run: bash ./${SEED_SCRIPT_FILENAME}
|
||||||
working-directory: kava-bridge/contract
|
working-directory: kava-bridge/contract
|
||||||
|
12
.github/workflows/cd-start-chain.yml
vendored
12
.github/workflows/cd-start-chain.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: take the chain offline
|
- name: take the chain offline
|
||||||
run: bash ${GITHUB_WORKSPACE}/.github/scripts/put-all-chain-nodes-on-standby.sh
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/put-all-chain-nodes-on-standby.sh
|
||||||
env:
|
env:
|
||||||
@ -41,18 +41,16 @@ jobs:
|
|||||||
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }}
|
||||||
- name: checkout infrastructure repo
|
- name: checkout infrastructure repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: Kava-Labs/infrastructure
|
repository: Kava-Labs/infrastructure
|
||||||
token: ${{ secrets.KAVA_PRIVATE_GITHUB_ACCESS_TOKEN }}
|
token: ${{ secrets.KAVA_PRIVATE_GITHUB_ACCESS_TOKEN }}
|
||||||
path: infrastructure
|
path: infrastructure
|
||||||
ref: master
|
ref: master
|
||||||
- name: set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: build kava node updater
|
- name: build kava node updater
|
||||||
run: cd infrastructure/cli/kava-node-updater && make install && cd ../../../
|
run: cd infrastructure/cli/kava-node-updater && make install && cd ../../../
|
||||||
- name: run start-chain playbook on all chain nodes
|
- name: run start-chain playbook on all chain nodes
|
||||||
|
42
.github/workflows/ci-default.yml
vendored
42
.github/workflows/ci-default.yml
vendored
@ -7,28 +7,30 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
cache-dependency-path: |
|
||||||
cache: true
|
go.sum
|
||||||
|
tests/e2e/kvtool/go.sum
|
||||||
- name: build application
|
- name: build application
|
||||||
run: make build
|
run: make build
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
cache-dependency-path: |
|
||||||
cache: true
|
go.sum
|
||||||
|
tests/e2e/kvtool/go.sum
|
||||||
- name: run unit tests
|
- name: run unit tests
|
||||||
run: make test
|
run: make test
|
||||||
- name: run e2e tests
|
- name: run e2e tests
|
||||||
@ -37,13 +39,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: save version of kava that will be deployed if this pr is merged
|
- name: save version of kava that will be deployed if this pr is merged
|
||||||
id: kava-version
|
id: kava-version
|
||||||
run: |
|
run: |
|
||||||
echo "KAVA_VERSION=$(cat ./ci/env/kava-internal-testnet/KAVA.VERSION)" >> $GITHUB_OUTPUT
|
echo "KAVA_VERSION=$(cat ./ci/env/kava-internal-testnet/KAVA.VERSION)" >> $GITHUB_OUTPUT
|
||||||
- name: checkout repo from master
|
- name: checkout repo from master
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: master
|
||||||
- name: checkout version of kava that will be deployed if this pr is merged
|
- name: checkout version of kava that will be deployed if this pr is merged
|
||||||
@ -53,28 +55,24 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
KAVA_VERSION: ${{ steps.kava-version.outputs.KAVA_VERSION }}
|
KAVA_VERSION: ${{ steps.kava-version.outputs.KAVA_VERSION }}
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: build kava cli
|
- name: build kava cli
|
||||||
run: make install
|
run: make install
|
||||||
- name: checkout repo from current commit to validate current branch's genesis
|
- name: checkout repo from current commit to validate current branch's genesis
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: validate testnet genesis
|
- name: validate testnet genesis
|
||||||
run: kava validate-genesis ci/env/kava-internal-testnet/genesis.json
|
run: kava validate-genesis ci/env/kava-internal-testnet/genesis.json
|
||||||
validate-protonet-genesis:
|
validate-protonet-genesis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: build kava cli
|
- name: build kava cli
|
||||||
run: make install
|
run: make install
|
||||||
- name: validate protonet genesis
|
- name: validate protonet genesis
|
||||||
|
71
.github/workflows/ci-docker.yml
vendored
71
.github/workflows/ci-docker.yml
vendored
@ -6,6 +6,14 @@ on:
|
|||||||
dockerhub-username:
|
dockerhub-username:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
# this workflow publishes a rocksdb & goleveldb docker images with these tags:
|
||||||
|
# - <commit-hash>-goleveldb
|
||||||
|
# - <extra-image-tag>-goleveldb
|
||||||
|
# - <commit-hash>-rocksdb
|
||||||
|
# - <extra-image-tag>-rocksdb
|
||||||
|
extra-image-tag:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
CI_DOCKERHUB_TOKEN:
|
CI_DOCKERHUB_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
@ -14,34 +22,81 @@ on:
|
|||||||
# you can use images built by this action in future jobs.
|
# you can use images built by this action in future jobs.
|
||||||
# https://docs.docker.com/build/ci/github-actions/examples/#share-built-image-between-jobs
|
# https://docs.docker.com/build/ci/github-actions/examples/#share-built-image-between-jobs
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker-goleveldb:
|
||||||
# https://github.com/marketplace/actions/build-and-push-docker-images
|
# https://github.com/marketplace/actions/build-and-push-docker-images
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# ensure working with latest code
|
# ensure working with latest code
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# generate a git commit hash to be used as image tag
|
# generate a git commit hash to be used as image tag
|
||||||
- name: Generate short hash
|
- name: Generate short hash
|
||||||
id: commit-hash
|
id: commit-hash
|
||||||
run: echo "short=$( git rev-parse --short $GITHUB_SHA )" >> $GITHUB_OUTPUT
|
run: echo "short=$( git rev-parse --short $GITHUB_SHA )" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# qemu is used to emulate different platform architectures
|
# qemu is used to emulate different platform architectures
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
# cross-platform build of the image
|
# cross-platform build of the image
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# authenticate for publish to docker hub
|
# authenticate for publish to docker hub
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ inputs.dockerhub-username }}
|
username: ${{ inputs.dockerhub-username }}
|
||||||
password: ${{ secrets.CI_DOCKERHUB_TOKEN }}
|
password: ${{ secrets.CI_DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
# publish to docker hub, tag with short git hash
|
# publish to docker hub, tag with short git hash
|
||||||
- name: Build and push
|
- name: Build and push (goleveldb)
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: kava/kava:${{ steps.commit-hash.outputs.short }},kava/kava:master
|
tags: kava/kava:${{ steps.commit-hash.outputs.short }}-goleveldb,kava/kava:${{ inputs.extra-image-tag }}-goleveldb
|
||||||
|
|
||||||
|
docker-rocksdb:
|
||||||
|
# https://github.com/marketplace/actions/build-and-push-docker-images
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# ensure working with latest code
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# generate a git commit hash to be used as image tag
|
||||||
|
- name: Generate short hash
|
||||||
|
id: commit-hash
|
||||||
|
run: echo "short=$( git rev-parse --short $GITHUB_SHA )" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# qemu is used to emulate different platform architectures
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
# cross-platform build of the image
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
# authenticate for publish to docker hub
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ inputs.dockerhub-username }}
|
||||||
|
password: ${{ secrets.CI_DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
# publish to docker hub, tag with short git hash
|
||||||
|
- name: Build and push (rocksdb)
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: Dockerfile-rocksdb
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: kava/kava:${{ steps.commit-hash.outputs.short }}-rocksdb,kava/kava:${{ inputs.extra-image-tag }}-rocksdb
|
||||||
|
2
.github/workflows/ci-lint.yml
vendored
2
.github/workflows/ci-lint.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
golangci-lint:
|
golangci-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v4
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: reviewdog/action-golangci-lint@v2
|
uses: reviewdog/action-golangci-lint@v2
|
||||||
with:
|
with:
|
||||||
|
9
.github/workflows/ci-master.yml
vendored
9
.github/workflows/ci-master.yml
vendored
@ -19,13 +19,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: set build tag
|
- name: set build tag
|
||||||
run: echo "BUILD_TAG=$(date +%s)-$(git rev-parse HEAD | cut -c 1-8)" >> $GITHUB_ENV
|
run: echo "BUILD_TAG=$(date +%s)-$(git rev-parse HEAD | cut -c 1-8)" >> $GITHUB_ENV
|
||||||
- name: build rocksdb dependency
|
- name: build rocksdb dependency
|
||||||
@ -45,6 +43,7 @@ jobs:
|
|||||||
uses: ./.github/workflows/ci-docker.yml
|
uses: ./.github/workflows/ci-docker.yml
|
||||||
with:
|
with:
|
||||||
dockerhub-username: kavaops
|
dockerhub-username: kavaops
|
||||||
|
extra-image-tag: master
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
post-pipeline-metrics:
|
post-pipeline-metrics:
|
||||||
uses: ./.github/workflows/metric-pipeline.yml
|
uses: ./.github/workflows/metric-pipeline.yml
|
||||||
|
35
.github/workflows/ci-release.yml
vendored
Normal file
35
.github/workflows/ci-release.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Continuous Integration (Release)
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v[0-9]+.[0-9]+.[0-9]+*"
|
||||||
|
jobs:
|
||||||
|
# run per commit ci checks against released version
|
||||||
|
lint-checks:
|
||||||
|
uses: ./.github/workflows/ci-lint.yml
|
||||||
|
# run default ci checks against released version
|
||||||
|
default-checks:
|
||||||
|
uses: ./.github/workflows/ci-default.yml
|
||||||
|
|
||||||
|
# get the version tag that triggered this workflow
|
||||||
|
get-version-tag:
|
||||||
|
# prep version release only if all checks pass
|
||||||
|
needs: [lint-checks, default-checks]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
git-tag: ${{ steps.git-tag.outputs.tag }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- id: git-tag
|
||||||
|
run: echo "tag=$(git describe --always --tags --match='v*')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# build and upload versions of kava for use on internal infrastructure
|
||||||
|
# configurations for databases, cpu architectures and operating systems
|
||||||
|
docker:
|
||||||
|
# only run if all checks pass
|
||||||
|
needs: get-version-tag
|
||||||
|
uses: ./.github/workflows/ci-docker.yml
|
||||||
|
with:
|
||||||
|
dockerhub-username: kavaops
|
||||||
|
extra-image-tag: ${{ needs.get-version-tag.outputs.git-tag }}
|
||||||
|
secrets: inherit
|
16
.github/workflows/ci-rocksdb-build.yml
vendored
16
.github/workflows/ci-rocksdb-build.yml
vendored
@ -10,13 +10,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: build rocksdb dependency
|
- name: build rocksdb dependency
|
||||||
run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-rocksdb.sh
|
run: bash ${GITHUB_WORKSPACE}/.github/scripts/install-rocksdb.sh
|
||||||
- name: build application
|
- name: build application
|
||||||
@ -34,14 +32,12 @@ jobs:
|
|||||||
&& sudo make -j$(nproc) install-shared
|
&& sudo make -j$(nproc) install-shared
|
||||||
&& sudo ldconfig
|
&& sudo ldconfig
|
||||||
- name: checkout repo from current commit
|
- name: checkout repo from current commit
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.20"
|
go-version-file: go.mod
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
- name: run unit tests
|
- name: run unit tests
|
||||||
run: make test-rocksdb
|
run: make test-rocksdb
|
||||||
|
6
.github/workflows/proto.yml
vendored
6
.github/workflows/proto.yml
vendored
@ -8,11 +8,11 @@ jobs:
|
|||||||
name: "Check Proto"
|
name: "Check Proto"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v3
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
cache: true
|
|
||||||
- run: go mod download
|
- run: go mod download
|
||||||
- run: make install-build-deps
|
- run: make install-build-deps
|
||||||
- run: make check-proto-deps
|
- run: make check-proto-deps
|
||||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -36,6 +36,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [v0.25.0]
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- (community) [#1704] Add module params
|
- (community) [#1704] Add module params
|
||||||
@ -45,6 +47,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- (evmutil) [#1655] Initialize x/evmutil module account in InitGenesis
|
- (evmutil) [#1655] Initialize x/evmutil module account in InitGenesis
|
||||||
|
- (deps) [#1770] Bump ledger-cosmos-go to v0.13.1 to resolve signing error with
|
||||||
|
cosmos ledger app 2.34.12
|
||||||
|
|
||||||
## State Machine Breaking
|
## State Machine Breaking
|
||||||
|
|
||||||
@ -56,7 +60,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
- (community) [#1755] Keep funds in `x/community` in `CommunityPoolLendWithdrawProposal` handler
|
- (community) [#1755] Keep funds in `x/community` in `CommunityPoolLendWithdrawProposal` handler
|
||||||
- (staking) [#1761] Set validator minimum commission to 5% for all validators under 5%
|
- (staking) [#1761] Set validator minimum commission to 5% for all validators under 5%
|
||||||
|
|
||||||
## [v0.24.1](https://github.com/Kava-Labs/kava/releases/tag/v0.24.1)
|
## [v0.24.1]
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
- (metrics) [#1668] Adds non-state breaking x/metrics module for custom telemetry.
|
- (metrics) [#1668] Adds non-state breaking x/metrics module for custom telemetry.
|
||||||
@ -302,6 +306,7 @@ the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.38.4/CHANGELOG.md).
|
|||||||
- [#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run
|
- [#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run
|
||||||
large-scale simulations remotely using aws-batch
|
large-scale simulations remotely using aws-batch
|
||||||
|
|
||||||
|
[#1770]: https://github.com/Kava-Labs/kava/pull/1770
|
||||||
[#1755]: https://github.com/Kava-Labs/kava/pull/1755
|
[#1755]: https://github.com/Kava-Labs/kava/pull/1755
|
||||||
[#1761]: https://github.com/Kava-Labs/kava/pull/1761
|
[#1761]: https://github.com/Kava-Labs/kava/pull/1761
|
||||||
[#1752]: https://github.com/Kava-Labs/kava/pull/1752
|
[#1752]: https://github.com/Kava-Labs/kava/pull/1752
|
||||||
@ -354,8 +359,12 @@ the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.38.4/CHANGELOG.md).
|
|||||||
[#750]: https://github.com/Kava-Labs/kava/pull/750
|
[#750]: https://github.com/Kava-Labs/kava/pull/750
|
||||||
[#751]: https://github.com/Kava-Labs/kava/pull/751
|
[#751]: https://github.com/Kava-Labs/kava/pull/751
|
||||||
[#780]: https://github.com/Kava-Labs/kava/pull/780
|
[#780]: https://github.com/Kava-Labs/kava/pull/780
|
||||||
[unreleased]: https://github.com/Kava-Labs/kava/compare/v0.24.0...HEAD
|
|
||||||
[v0.24.0]: https://github.com/Kava-Labs/kava/compare/v0.24.0...v0.23.2
|
[unreleased]: https://github.com/Kava-Labs/kava/compare/v0.25.0...HEAD
|
||||||
|
|
||||||
|
[v0.25.0]: https://github.com/Kava-Labs/kava/compare/v0.24.1...v0.25.0
|
||||||
|
[v0.24.1]: https://github.com/Kava-Labs/kava/compare/v0.24.0...v0.24.1
|
||||||
|
[v0.24.0]: https://github.com/Kava-Labs/kava/compare/v0.23.2...v0.24.0
|
||||||
[v0.23.2]: https://github.com/Kava-Labs/kava/compare/v0.23.1...v0.23.2
|
[v0.23.2]: https://github.com/Kava-Labs/kava/compare/v0.23.1...v0.23.2
|
||||||
[v0.23.1]: https://github.com/Kava-Labs/kava/compare/v0.23.0...v0.23.1
|
[v0.23.1]: https://github.com/Kava-Labs/kava/compare/v0.23.0...v0.23.1
|
||||||
[v0.23.0]: https://github.com/Kava-Labs/kava/compare/v0.21.1...v0.23.0
|
[v0.23.0]: https://github.com/Kava-Labs/kava/compare/v0.21.1...v0.23.0
|
||||||
|
@ -10,6 +10,15 @@ RUN apk add bash git make libc-dev gcc linux-headers eudev-dev jq curl
|
|||||||
WORKDIR /root/kava
|
WORKDIR /root/kava
|
||||||
# default home directory is /root
|
# default home directory is /root
|
||||||
|
|
||||||
|
# Copy dependency files first to facilitate dependency caching
|
||||||
|
COPY ./go.mod ./
|
||||||
|
COPY ./go.sum ./
|
||||||
|
|
||||||
|
# Download dependencies
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
|
go version && go mod download
|
||||||
|
|
||||||
# Add source files
|
# Add source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
@ -19,8 +19,18 @@ RUN git clone https://github.com/facebook/rocksdb.git \
|
|||||||
&& make -j$(nproc) install-shared \
|
&& make -j$(nproc) install-shared \
|
||||||
&& ldconfig
|
&& ldconfig
|
||||||
|
|
||||||
# Add source files for kava
|
WORKDIR /root/kava
|
||||||
COPY . kava
|
# Copy dependency files first to facilitate dependency caching
|
||||||
|
COPY ./go.mod ./
|
||||||
|
COPY ./go.sum ./
|
||||||
|
|
||||||
|
# Download dependencies
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
|
go version && go mod download
|
||||||
|
|
||||||
|
# Add source files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
ARG kava_database_backend=rocksdb
|
ARG kava_database_backend=rocksdb
|
||||||
ENV KAVA_DATABASE_BACKEND=$kava_database_backend
|
ENV KAVA_DATABASE_BACKEND=$kava_database_backend
|
||||||
@ -28,7 +38,7 @@ ENV KAVA_DATABASE_BACKEND=$kava_database_backend
|
|||||||
# Mount go build and mod caches as container caches, persisted between builder invocations
|
# Mount go build and mod caches as container caches, persisted between builder invocations
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
--mount=type=cache,target=/go/pkg/mod \
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
cd kava && make install COSMOS_BUILD_OPTIONS=$KAVA_DATABASE_BACKEND
|
make install COSMOS_BUILD_OPTIONS=$KAVA_DATABASE_BACKEND
|
||||||
|
|
||||||
|
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
@ -42,7 +42,7 @@ func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []
|
|||||||
|
|
||||||
// prepare for fresh start at zero height
|
// prepare for fresh start at zero height
|
||||||
// NOTE zero height genesis is a temporary feature which will be deprecated
|
// NOTE zero height genesis is a temporary feature which will be deprecated
|
||||||
// in favour of export at a block height
|
// in favour of export at a block height
|
||||||
func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) {
|
func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []string) {
|
||||||
applyWhiteList := false
|
applyWhiteList := false
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@ import (
|
|||||||
// All methods return the builder so method calls can be chained together.
|
// All methods return the builder so method calls can be chained together.
|
||||||
//
|
//
|
||||||
// Example:
|
// Example:
|
||||||
// // create a single account genesis state
|
|
||||||
// builder := NewAuthBankGenesisBuilder().WithSimpleAccount(testUserAddress, testCoins)
|
|
||||||
// genesisState := builder.BuildMarshalled()
|
|
||||||
//
|
//
|
||||||
|
// // create a single account genesis state
|
||||||
|
// builder := NewAuthBankGenesisBuilder().WithSimpleAccount(testUserAddress, testCoins)
|
||||||
|
// genesisState := builder.BuildMarshalled()
|
||||||
type AuthBankGenesisBuilder struct {
|
type AuthBankGenesisBuilder struct {
|
||||||
AuthGenesis authtypes.GenesisState
|
AuthGenesis authtypes.GenesisState
|
||||||
BankGenesis banktypes.GenesisState
|
BankGenesis banktypes.GenesisState
|
||||||
|
264
app/upgrades.go
264
app/upgrades.go
@ -1,3 +1,265 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
func (app App) RegisterUpgradeHandlers() {}
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
|
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/module"
|
||||||
|
"github.com/cosmos/cosmos-sdk/x/authz"
|
||||||
|
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||||
|
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
|
||||||
|
|
||||||
|
communitytypes "github.com/kava-labs/kava/x/community/types"
|
||||||
|
kavadisttypes "github.com/kava-labs/kava/x/kavadist/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
UpgradeName_Mainnet = "v0.25.0"
|
||||||
|
UpgradeName_Testnet = "v0.25.0-alpha.0"
|
||||||
|
UpgradeName_E2ETest = "v0.25.0-testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// KAVA to ukava - 6 decimals
|
||||||
|
kavaConversionFactor = sdk.NewInt(1000_000)
|
||||||
|
secondsPerYear = sdk.NewInt(365 * 24 * 60 * 60)
|
||||||
|
|
||||||
|
// 10 Million KAVA per year in staking rewards, inflation disable time 2024-01-01T00:00:00 UTC
|
||||||
|
CommunityParams_Mainnet = communitytypes.NewParams(
|
||||||
|
time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
|
// before switchover
|
||||||
|
sdkmath.LegacyZeroDec(),
|
||||||
|
// after switchover - 10M KAVA to ukava per year / seconds per year
|
||||||
|
sdkmath.LegacyNewDec(10_000_000).
|
||||||
|
MulInt(kavaConversionFactor).
|
||||||
|
QuoInt(secondsPerYear),
|
||||||
|
)
|
||||||
|
|
||||||
|
// Testnet -- 15 Trillion KAVA per year in staking rewards, inflation disable time 2023-11-16T00:00:00 UTC
|
||||||
|
CommunityParams_Testnet = communitytypes.NewParams(
|
||||||
|
time.Date(2023, 11, 16, 0, 0, 0, 0, time.UTC),
|
||||||
|
// before switchover
|
||||||
|
sdkmath.LegacyZeroDec(),
|
||||||
|
// after switchover
|
||||||
|
sdkmath.LegacyNewDec(15_000_000).
|
||||||
|
MulInt64(1_000_000). // 15M * 1M = 15T
|
||||||
|
MulInt(kavaConversionFactor).
|
||||||
|
QuoInt(secondsPerYear),
|
||||||
|
)
|
||||||
|
|
||||||
|
CommunityParams_E2E = communitytypes.NewParams(
|
||||||
|
time.Now().Add(10*time.Second).UTC(), // relative time for testing
|
||||||
|
sdkmath.LegacyNewDec(0), // stakingRewardsPerSecond
|
||||||
|
sdkmath.LegacyNewDec(1000), // upgradeTimeSetstakingRewardsPerSecond
|
||||||
|
)
|
||||||
|
|
||||||
|
// ValidatorMinimumCommission is the new 5% minimum commission rate for validators
|
||||||
|
ValidatorMinimumCommission = sdk.NewDecWithPrec(5, 2)
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegisterUpgradeHandlers registers the upgrade handlers for the app.
|
||||||
|
func (app App) RegisterUpgradeHandlers() {
|
||||||
|
app.upgradeKeeper.SetUpgradeHandler(
|
||||||
|
UpgradeName_Mainnet,
|
||||||
|
upgradeHandler(app, UpgradeName_Mainnet, CommunityParams_Mainnet),
|
||||||
|
)
|
||||||
|
app.upgradeKeeper.SetUpgradeHandler(
|
||||||
|
UpgradeName_Testnet,
|
||||||
|
upgradeHandler(app, UpgradeName_Testnet, CommunityParams_Testnet),
|
||||||
|
)
|
||||||
|
app.upgradeKeeper.SetUpgradeHandler(
|
||||||
|
UpgradeName_E2ETest,
|
||||||
|
upgradeHandler(app, UpgradeName_Testnet, CommunityParams_E2E),
|
||||||
|
)
|
||||||
|
|
||||||
|
upgradeInfo, err := app.upgradeKeeper.ReadUpgradeInfoFromDisk()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
doUpgrade := upgradeInfo.Name == UpgradeName_Mainnet ||
|
||||||
|
upgradeInfo.Name == UpgradeName_Testnet ||
|
||||||
|
upgradeInfo.Name == UpgradeName_E2ETest
|
||||||
|
|
||||||
|
if doUpgrade && !app.upgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
|
||||||
|
storeUpgrades := storetypes.StoreUpgrades{
|
||||||
|
Added: []string{
|
||||||
|
// x/community added store
|
||||||
|
communitytypes.ModuleName,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// configure store loader that checks if version == upgradeHeight and applies store upgrades
|
||||||
|
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// upgradeHandler returns an UpgradeHandler for the given upgrade parameters.
|
||||||
|
func upgradeHandler(
|
||||||
|
app App,
|
||||||
|
name string,
|
||||||
|
communityParams communitytypes.Params,
|
||||||
|
) upgradetypes.UpgradeHandler {
|
||||||
|
return func(
|
||||||
|
ctx sdk.Context,
|
||||||
|
plan upgradetypes.Plan,
|
||||||
|
fromVM module.VersionMap,
|
||||||
|
) (module.VersionMap, error) {
|
||||||
|
app.Logger().Info(fmt.Sprintf("running %s upgrade handler", name))
|
||||||
|
|
||||||
|
toVM, err := app.mm.RunMigrations(ctx, app.configurator, fromVM)
|
||||||
|
if err != nil {
|
||||||
|
return toVM, err
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Staking validator minimum commission
|
||||||
|
//
|
||||||
|
UpdateValidatorMinimumCommission(ctx, app)
|
||||||
|
|
||||||
|
//
|
||||||
|
// Community Params
|
||||||
|
//
|
||||||
|
app.communityKeeper.SetParams(ctx, communityParams)
|
||||||
|
app.Logger().Info(
|
||||||
|
"initialized x/community params",
|
||||||
|
"UpgradeTimeDisableInflation", communityParams.UpgradeTimeDisableInflation,
|
||||||
|
"StakingRewardsPerSecond", communityParams.StakingRewardsPerSecond,
|
||||||
|
"UpgradeTimeSetStakingRewardsPerSecond", communityParams.UpgradeTimeSetStakingRewardsPerSecond,
|
||||||
|
)
|
||||||
|
|
||||||
|
//
|
||||||
|
// Kavadist gov grant
|
||||||
|
//
|
||||||
|
msgGrant, err := authz.NewMsgGrant(
|
||||||
|
app.accountKeeper.GetModuleAddress(kavadisttypes.ModuleName), // granter
|
||||||
|
app.accountKeeper.GetModuleAddress(govtypes.ModuleName), // grantee
|
||||||
|
authz.NewGenericAuthorization(sdk.MsgTypeURL(&banktypes.MsgSend{})), // authorization
|
||||||
|
nil, // expiration
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return toVM, err
|
||||||
|
}
|
||||||
|
_, err = app.authzKeeper.Grant(ctx, msgGrant)
|
||||||
|
if err != nil {
|
||||||
|
return toVM, err
|
||||||
|
}
|
||||||
|
app.Logger().Info("created gov grant for kavadist funds")
|
||||||
|
|
||||||
|
//
|
||||||
|
// Gov Quorum
|
||||||
|
//
|
||||||
|
govTallyParams := app.govKeeper.GetTallyParams(ctx)
|
||||||
|
oldQuorum := govTallyParams.Quorum
|
||||||
|
govTallyParams.Quorum = sdkmath.LegacyMustNewDecFromStr("0.2").String()
|
||||||
|
app.govKeeper.SetTallyParams(ctx, govTallyParams)
|
||||||
|
app.Logger().Info(fmt.Sprintf("updated tally quorum from %s to %s", oldQuorum, govTallyParams.Quorum))
|
||||||
|
|
||||||
|
//
|
||||||
|
// Incentive Params
|
||||||
|
//
|
||||||
|
UpdateIncentiveParams(ctx, app)
|
||||||
|
|
||||||
|
return toVM, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateValidatorMinimumCommission updates the commission rate for all
|
||||||
|
// validators to be at least the new min commission rate, and sets the minimum
|
||||||
|
// commission rate in the staking params.
|
||||||
|
func UpdateValidatorMinimumCommission(
|
||||||
|
ctx sdk.Context,
|
||||||
|
app App,
|
||||||
|
) {
|
||||||
|
resultCount := make(map[stakingtypes.BondStatus]int)
|
||||||
|
|
||||||
|
// Iterate over *all* validators including inactive
|
||||||
|
app.stakingKeeper.IterateValidators(
|
||||||
|
ctx,
|
||||||
|
func(index int64, validator stakingtypes.ValidatorI) (stop bool) {
|
||||||
|
// Skip if validator commission is already >= 5%
|
||||||
|
if validator.GetCommission().GTE(ValidatorMinimumCommission) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok := validator.(stakingtypes.Validator)
|
||||||
|
if !ok {
|
||||||
|
panic("expected stakingtypes.Validator")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set minimum commission rate to 5%, when commission is < 5%
|
||||||
|
val.Commission.Rate = ValidatorMinimumCommission
|
||||||
|
val.Commission.UpdateTime = ctx.BlockTime()
|
||||||
|
|
||||||
|
// Update MaxRate if necessary
|
||||||
|
if val.Commission.MaxRate.LT(ValidatorMinimumCommission) {
|
||||||
|
val.Commission.MaxRate = ValidatorMinimumCommission
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := app.stakingKeeper.BeforeValidatorModified(ctx, val.GetOperator()); err != nil {
|
||||||
|
panic(fmt.Sprintf("failed to call BeforeValidatorModified: %s", err))
|
||||||
|
}
|
||||||
|
app.stakingKeeper.SetValidator(ctx, val)
|
||||||
|
|
||||||
|
// Keep track of counts just for logging purposes
|
||||||
|
switch val.GetStatus() {
|
||||||
|
case stakingtypes.Bonded:
|
||||||
|
resultCount[stakingtypes.Bonded]++
|
||||||
|
case stakingtypes.Unbonded:
|
||||||
|
resultCount[stakingtypes.Unbonded]++
|
||||||
|
case stakingtypes.Unbonding:
|
||||||
|
resultCount[stakingtypes.Unbonding]++
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
app.Logger().Info(
|
||||||
|
"updated validator minimum commission rate for all existing validators",
|
||||||
|
stakingtypes.BondStatusBonded, resultCount[stakingtypes.Bonded],
|
||||||
|
stakingtypes.BondStatusUnbonded, resultCount[stakingtypes.Unbonded],
|
||||||
|
stakingtypes.BondStatusUnbonding, resultCount[stakingtypes.Unbonding],
|
||||||
|
)
|
||||||
|
|
||||||
|
stakingParams := app.stakingKeeper.GetParams(ctx)
|
||||||
|
stakingParams.MinCommissionRate = ValidatorMinimumCommission
|
||||||
|
app.stakingKeeper.SetParams(ctx, stakingParams)
|
||||||
|
|
||||||
|
app.Logger().Info(
|
||||||
|
"updated x/staking params minimum commission rate",
|
||||||
|
"MinCommissionRate", stakingParams.MinCommissionRate,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateIncentiveParams modifies the earn rewards period for bkava to be 600K KAVA per year.
|
||||||
|
func UpdateIncentiveParams(
|
||||||
|
ctx sdk.Context,
|
||||||
|
app App,
|
||||||
|
) {
|
||||||
|
incentiveParams := app.incentiveKeeper.GetParams(ctx)
|
||||||
|
|
||||||
|
// bkava annualized rewards: 600K KAVA
|
||||||
|
newAmount := sdkmath.LegacyNewDec(600_000).
|
||||||
|
MulInt(kavaConversionFactor).
|
||||||
|
QuoInt(secondsPerYear).
|
||||||
|
TruncateInt()
|
||||||
|
|
||||||
|
for i := range incentiveParams.EarnRewardPeriods {
|
||||||
|
if incentiveParams.EarnRewardPeriods[i].CollateralType != "bkava" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update rewards per second via index
|
||||||
|
incentiveParams.EarnRewardPeriods[i].RewardsPerSecond = sdk.NewCoins(
|
||||||
|
sdk.NewCoin("ukava", newAmount),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
app.incentiveKeeper.SetParams(ctx, incentiveParams)
|
||||||
|
}
|
||||||
|
241
app/upgrades_test.go
Normal file
241
app/upgrades_test.go
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
package app_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||||
|
"github.com/evmos/ethermint/crypto/ethsecp256k1"
|
||||||
|
"github.com/kava-labs/kava/app"
|
||||||
|
incentivetypes "github.com/kava-labs/kava/x/incentive/types"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||||
|
tmtime "github.com/tendermint/tendermint/types/time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestUpgradeCommunityParams_Mainnet(t *testing.T) {
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
sdkmath.LegacyZeroDec().String(),
|
||||||
|
app.CommunityParams_Mainnet.StakingRewardsPerSecond.String(),
|
||||||
|
)
|
||||||
|
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
// Manually confirmed
|
||||||
|
"317097.919837645865043125",
|
||||||
|
app.CommunityParams_Mainnet.UpgradeTimeSetStakingRewardsPerSecond.String(),
|
||||||
|
"mainnet kava per second should be correct",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestUpgradeCommunityParams_Testnet(t *testing.T) {
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
sdkmath.LegacyZeroDec().String(),
|
||||||
|
app.CommunityParams_Testnet.StakingRewardsPerSecond.String(),
|
||||||
|
)
|
||||||
|
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
// Manually confirmed
|
||||||
|
"475646879756.468797564687975646",
|
||||||
|
app.CommunityParams_Testnet.UpgradeTimeSetStakingRewardsPerSecond.String(),
|
||||||
|
"testnet kava per second should be correct",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestUpdateValidatorMinimumCommission(t *testing.T) {
|
||||||
|
tApp := app.NewTestApp()
|
||||||
|
tApp.InitializeFromGenesisStates()
|
||||||
|
ctx := tApp.NewContext(true, tmproto.Header{Height: 1, Time: tmtime.Now()})
|
||||||
|
|
||||||
|
sk := tApp.GetStakingKeeper()
|
||||||
|
stakingParams := sk.GetParams(ctx)
|
||||||
|
stakingParams.MinCommissionRate = sdk.ZeroDec()
|
||||||
|
sk.SetParams(ctx, stakingParams)
|
||||||
|
|
||||||
|
// Set some validators with varying commission rates
|
||||||
|
|
||||||
|
vals := []struct {
|
||||||
|
name string
|
||||||
|
operatorAddr sdk.ValAddress
|
||||||
|
consPriv *ethsecp256k1.PrivKey
|
||||||
|
commissionRateMin sdk.Dec
|
||||||
|
commissionRateMax sdk.Dec
|
||||||
|
shouldBeUpdated bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "zero commission rate",
|
||||||
|
operatorAddr: sdk.ValAddress("val0"),
|
||||||
|
consPriv: generateConsKey(t),
|
||||||
|
commissionRateMin: sdk.ZeroDec(),
|
||||||
|
commissionRateMax: sdk.ZeroDec(),
|
||||||
|
shouldBeUpdated: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "0.01 commission rate",
|
||||||
|
operatorAddr: sdk.ValAddress("val1"),
|
||||||
|
consPriv: generateConsKey(t),
|
||||||
|
commissionRateMin: sdk.MustNewDecFromStr("0.01"),
|
||||||
|
commissionRateMax: sdk.MustNewDecFromStr("0.01"),
|
||||||
|
shouldBeUpdated: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "0.05 commission rate",
|
||||||
|
operatorAddr: sdk.ValAddress("val2"),
|
||||||
|
consPriv: generateConsKey(t),
|
||||||
|
commissionRateMin: sdk.MustNewDecFromStr("0.05"),
|
||||||
|
commissionRateMax: sdk.MustNewDecFromStr("0.05"),
|
||||||
|
shouldBeUpdated: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "0.06 commission rate",
|
||||||
|
operatorAddr: sdk.ValAddress("val3"),
|
||||||
|
consPriv: generateConsKey(t),
|
||||||
|
commissionRateMin: sdk.MustNewDecFromStr("0.06"),
|
||||||
|
commissionRateMax: sdk.MustNewDecFromStr("0.06"),
|
||||||
|
shouldBeUpdated: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "0.5 commission rate",
|
||||||
|
operatorAddr: sdk.ValAddress("val4"),
|
||||||
|
consPriv: generateConsKey(t),
|
||||||
|
commissionRateMin: sdk.MustNewDecFromStr("0.5"),
|
||||||
|
commissionRateMax: sdk.MustNewDecFromStr("0.5"),
|
||||||
|
shouldBeUpdated: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, v := range vals {
|
||||||
|
val, err := stakingtypes.NewValidator(
|
||||||
|
v.operatorAddr,
|
||||||
|
v.consPriv.PubKey(),
|
||||||
|
stakingtypes.Description{},
|
||||||
|
)
|
||||||
|
require.NoError(t, err)
|
||||||
|
val.Commission.Rate = v.commissionRateMin
|
||||||
|
val.Commission.MaxRate = v.commissionRateMax
|
||||||
|
|
||||||
|
err = sk.SetValidatorByConsAddr(ctx, val)
|
||||||
|
require.NoError(t, err)
|
||||||
|
sk.SetValidator(ctx, val)
|
||||||
|
}
|
||||||
|
|
||||||
|
require.NotPanics(
|
||||||
|
t, func() {
|
||||||
|
app.UpdateValidatorMinimumCommission(ctx, tApp.App)
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
stakingParamsAfter := sk.GetParams(ctx)
|
||||||
|
require.Equal(t, stakingParamsAfter.MinCommissionRate, app.ValidatorMinimumCommission)
|
||||||
|
|
||||||
|
// Check that all validators have a commission rate >= 5%
|
||||||
|
for _, val := range vals {
|
||||||
|
t.Run(val.name, func(t *testing.T) {
|
||||||
|
validator, found := sk.GetValidator(ctx, val.operatorAddr)
|
||||||
|
require.True(t, found, "validator should be found")
|
||||||
|
|
||||||
|
require.True(
|
||||||
|
t,
|
||||||
|
validator.GetCommission().GTE(app.ValidatorMinimumCommission),
|
||||||
|
"commission rate should be >= 5%",
|
||||||
|
)
|
||||||
|
|
||||||
|
require.True(
|
||||||
|
t,
|
||||||
|
validator.Commission.MaxRate.GTE(app.ValidatorMinimumCommission),
|
||||||
|
"commission rate max should be >= 5%, got %s",
|
||||||
|
validator.Commission.MaxRate,
|
||||||
|
)
|
||||||
|
|
||||||
|
if val.shouldBeUpdated {
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
ctx.BlockTime(),
|
||||||
|
validator.Commission.UpdateTime,
|
||||||
|
"commission update time should be set to block time",
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
time.Unix(0, 0).UTC(),
|
||||||
|
validator.Commission.UpdateTime,
|
||||||
|
"commission update time should not be changed -- default value is 0",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestUpdateIncentiveParams(t *testing.T) {
|
||||||
|
tApp := app.NewTestApp()
|
||||||
|
tApp.InitializeFromGenesisStates()
|
||||||
|
ctx := tApp.NewContext(true, tmproto.Header{Height: 1, Time: tmtime.Now()})
|
||||||
|
|
||||||
|
ik := tApp.GetIncentiveKeeper()
|
||||||
|
params := ik.GetParams(ctx)
|
||||||
|
|
||||||
|
startPeriod := time.Date(2021, 10, 26, 15, 0, 0, 0, time.UTC)
|
||||||
|
endPeriod := time.Date(2022, 10, 26, 15, 0, 0, 0, time.UTC)
|
||||||
|
|
||||||
|
params.EarnRewardPeriods = incentivetypes.MultiRewardPeriods{
|
||||||
|
incentivetypes.NewMultiRewardPeriod(
|
||||||
|
true,
|
||||||
|
"bkava",
|
||||||
|
startPeriod,
|
||||||
|
endPeriod,
|
||||||
|
sdk.NewCoins(
|
||||||
|
sdk.NewCoin("ukava", sdk.NewInt(159459)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
ik.SetParams(ctx, params)
|
||||||
|
|
||||||
|
beforeParams := ik.GetParams(ctx)
|
||||||
|
require.Equal(t, params, beforeParams, "initial incentive params should be set")
|
||||||
|
|
||||||
|
// -- UPGRADE
|
||||||
|
app.UpdateIncentiveParams(ctx, tApp.App)
|
||||||
|
|
||||||
|
// -- After
|
||||||
|
afterParams := ik.GetParams(ctx)
|
||||||
|
|
||||||
|
require.Len(
|
||||||
|
t,
|
||||||
|
afterParams.EarnRewardPeriods[0].RewardsPerSecond,
|
||||||
|
1,
|
||||||
|
"bkava earn reward period should only contain 1 coin",
|
||||||
|
)
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
// Manual calculation of
|
||||||
|
// 600,000 * 1000,000 / (365 * 24 * 60 * 60)
|
||||||
|
sdk.NewCoin("ukava", sdkmath.NewInt(19025)),
|
||||||
|
afterParams.EarnRewardPeriods[0].RewardsPerSecond[0],
|
||||||
|
"bkava earn reward period should be updated",
|
||||||
|
)
|
||||||
|
|
||||||
|
// Check that other params are not changed
|
||||||
|
afterParams.EarnRewardPeriods[0].RewardsPerSecond[0] = beforeParams.EarnRewardPeriods[0].RewardsPerSecond[0]
|
||||||
|
require.Equal(
|
||||||
|
t,
|
||||||
|
beforeParams,
|
||||||
|
afterParams,
|
||||||
|
"other param values should not be changed",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func generateConsKey(
|
||||||
|
t *testing.T,
|
||||||
|
) *ethsecp256k1.PrivKey {
|
||||||
|
t.Helper()
|
||||||
|
|
||||||
|
key, err := ethsecp256k1.GenerateKey()
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
return key
|
||||||
|
}
|
@ -81,7 +81,7 @@ const (
|
|||||||
func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) {
|
func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) {
|
||||||
dataDir := filepath.Join(home, "data")
|
dataDir := filepath.Join(home, "data")
|
||||||
if backendType == dbm.RocksDBBackend {
|
if backendType == dbm.RocksDBBackend {
|
||||||
return openRocksdb(filepath.Join(dataDir, "application.db"), appOpts)
|
return openRocksdb(dataDir, appOpts)
|
||||||
}
|
}
|
||||||
|
|
||||||
return dbm.NewDB("application", backendType, dataDir)
|
return dbm.NewDB("application", backendType, dataDir)
|
||||||
@ -90,7 +90,8 @@ func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType)
|
|||||||
// openRocksdb loads existing options, overrides some of them with appOpts and opens database
|
// openRocksdb loads existing options, overrides some of them with appOpts and opens database
|
||||||
// option will be overridden only in case if it explicitly specified in appOpts
|
// option will be overridden only in case if it explicitly specified in appOpts
|
||||||
func openRocksdb(dir string, appOpts types.AppOptions) (dbm.DB, error) {
|
func openRocksdb(dir string, appOpts types.AppOptions) (dbm.DB, error) {
|
||||||
dbOpts, cfOpts, err := loadLatestOptions(dir)
|
optionsPath := filepath.Join(dir, "application.db")
|
||||||
|
dbOpts, cfOpts, err := loadLatestOptions(optionsPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
33
go.mod
33
go.mod
@ -28,18 +28,18 @@ require (
|
|||||||
github.com/tendermint/tendermint v0.34.27
|
github.com/tendermint/tendermint v0.34.27
|
||||||
github.com/tendermint/tm-db v0.6.7
|
github.com/tendermint/tm-db v0.6.7
|
||||||
golang.org/x/crypto v0.14.0
|
golang.org/x/crypto v0.14.0
|
||||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
|
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13
|
||||||
google.golang.org/grpc v1.56.3
|
google.golang.org/grpc v1.58.3
|
||||||
google.golang.org/protobuf v1.30.0
|
google.golang.org/protobuf v1.31.0
|
||||||
sigs.k8s.io/yaml v1.3.0
|
sigs.k8s.io/yaml v1.3.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go v0.110.0 // indirect
|
cloud.google.com/go v0.110.8 // indirect
|
||||||
cloud.google.com/go/compute v1.19.1 // indirect
|
cloud.google.com/go/compute v1.23.0 // indirect
|
||||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||||
cloud.google.com/go/iam v0.13.0 // indirect
|
cloud.google.com/go/iam v1.1.2 // indirect
|
||||||
cloud.google.com/go/storage v1.28.1 // indirect
|
cloud.google.com/go/storage v1.30.1 // indirect
|
||||||
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
|
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
|
||||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
||||||
github.com/99designs/keyring v1.2.1 // indirect
|
github.com/99designs/keyring v1.2.1 // indirect
|
||||||
@ -67,7 +67,7 @@ require (
|
|||||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||||
github.com/cosmos/gogoproto v1.4.6 // indirect
|
github.com/cosmos/gogoproto v1.4.6 // indirect
|
||||||
github.com/cosmos/iavl v0.19.5 // indirect
|
github.com/cosmos/iavl v0.19.5 // indirect
|
||||||
github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
|
github.com/cosmos/ledger-cosmos-go v0.13.1 // indirect
|
||||||
github.com/creachadair/taskgroup v0.3.2 // indirect
|
github.com/creachadair/taskgroup v0.3.2 // indirect
|
||||||
github.com/danieljoos/wincred v1.1.2 // indirect
|
github.com/danieljoos/wincred v1.1.2 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
@ -102,9 +102,10 @@ require (
|
|||||||
github.com/google/flatbuffers v1.12.1 // indirect
|
github.com/google/flatbuffers v1.12.1 // indirect
|
||||||
github.com/google/go-cmp v0.5.9 // indirect
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
github.com/google/orderedcode v0.0.1 // indirect
|
github.com/google/orderedcode v0.0.1 // indirect
|
||||||
|
github.com/google/s2a-go v0.1.4 // indirect
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
|
github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect
|
||||||
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
|
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||||
github.com/gorilla/handlers v1.5.1 // indirect
|
github.com/gorilla/handlers v1.5.1 // indirect
|
||||||
github.com/gorilla/websocket v1.5.0 // indirect
|
github.com/gorilla/websocket v1.5.0 // indirect
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||||
@ -176,19 +177,21 @@ require (
|
|||||||
github.com/ugorji/go/codec v1.2.7 // indirect
|
github.com/ugorji/go/codec v1.2.7 // indirect
|
||||||
github.com/ulikunitz/xz v0.5.10 // indirect
|
github.com/ulikunitz/xz v0.5.10 // indirect
|
||||||
github.com/zondax/hid v0.9.1 // indirect
|
github.com/zondax/hid v0.9.1 // indirect
|
||||||
github.com/zondax/ledger-go v0.14.1 // indirect
|
github.com/zondax/ledger-go v0.14.2 // indirect
|
||||||
go.etcd.io/bbolt v1.3.7 // indirect
|
go.etcd.io/bbolt v1.3.7 // indirect
|
||||||
go.opencensus.io v0.24.0 // indirect
|
go.opencensus.io v0.24.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect
|
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect
|
||||||
golang.org/x/net v0.17.0 // indirect
|
golang.org/x/net v0.17.0 // indirect
|
||||||
golang.org/x/oauth2 v0.7.0 // indirect
|
golang.org/x/oauth2 v0.10.0 // indirect
|
||||||
golang.org/x/sync v0.1.0 // indirect
|
golang.org/x/sync v0.3.0 // indirect
|
||||||
golang.org/x/sys v0.13.0 // indirect
|
golang.org/x/sys v0.13.0 // indirect
|
||||||
golang.org/x/term v0.13.0 // indirect
|
golang.org/x/term v0.13.0 // indirect
|
||||||
golang.org/x/text v0.13.0 // indirect
|
golang.org/x/text v0.13.0 // indirect
|
||||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||||
google.golang.org/api v0.114.0 // indirect
|
google.golang.org/api v0.128.0 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
|
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
@ -202,7 +205,7 @@ replace (
|
|||||||
// Use rocksdb 7.9.2
|
// Use rocksdb 7.9.2
|
||||||
github.com/cometbft/cometbft-db => github.com/kava-labs/cometbft-db v0.7.0-rocksdb-v7.9.2-kava.1
|
github.com/cometbft/cometbft-db => github.com/kava-labs/cometbft-db v0.7.0-rocksdb-v7.9.2-kava.1
|
||||||
// Use cosmos-sdk fork with backported fix for unsafe-reset-all, staking transfer events, and custom tally handler support
|
// Use cosmos-sdk fork with backported fix for unsafe-reset-all, staking transfer events, and custom tally handler support
|
||||||
github.com/cosmos/cosmos-sdk => github.com/kava-labs/cosmos-sdk v0.46.11-kava.1
|
github.com/cosmos/cosmos-sdk => github.com/kava-labs/cosmos-sdk v0.46.11-kava.3
|
||||||
// See https://github.com/cosmos/cosmos-sdk/pull/13093
|
// See https://github.com/cosmos/cosmos-sdk/pull/13093
|
||||||
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
|
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
|
||||||
// Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support
|
// Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support
|
||||||
|
69
go.sum
69
go.sum
@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9
|
|||||||
cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc=
|
cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc=
|
||||||
cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU=
|
cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU=
|
||||||
cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA=
|
cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA=
|
||||||
cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys=
|
cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME=
|
||||||
cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY=
|
cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk=
|
||||||
cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw=
|
cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw=
|
||||||
cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY=
|
cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY=
|
||||||
cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI=
|
cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI=
|
||||||
@ -73,8 +73,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz
|
|||||||
cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
|
cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
|
||||||
cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U=
|
cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U=
|
||||||
cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU=
|
cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU=
|
||||||
cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY=
|
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
|
||||||
cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE=
|
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||||
cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I=
|
cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I=
|
||||||
@ -114,13 +114,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97
|
|||||||
cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc=
|
cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc=
|
||||||
cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY=
|
cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY=
|
||||||
cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc=
|
cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc=
|
||||||
cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k=
|
cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4=
|
||||||
cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0=
|
cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU=
|
||||||
cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic=
|
cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic=
|
||||||
cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI=
|
cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI=
|
||||||
cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8=
|
cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8=
|
||||||
cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08=
|
cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08=
|
||||||
cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM=
|
|
||||||
cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4=
|
cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4=
|
||||||
cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w=
|
cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w=
|
||||||
cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE=
|
cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE=
|
||||||
@ -178,8 +177,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
|
|||||||
cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y=
|
cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y=
|
||||||
cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc=
|
cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc=
|
||||||
cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s=
|
cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s=
|
||||||
cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI=
|
cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM=
|
||||||
cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y=
|
cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E=
|
||||||
cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw=
|
cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw=
|
||||||
cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g=
|
cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g=
|
||||||
cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU=
|
cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU=
|
||||||
@ -383,8 +382,8 @@ github.com/cosmos/ibc-go/v6 v6.1.1 h1:oqqMNyjj6SLQF8rvgCaDGwfdITEIsbhs8F77/8xvRI
|
|||||||
github.com/cosmos/ibc-go/v6 v6.1.1/go.mod h1:NL17FpFAaWjRFVb1T7LUKuOoMSsATPpu+Icc4zL5/Ik=
|
github.com/cosmos/ibc-go/v6 v6.1.1/go.mod h1:NL17FpFAaWjRFVb1T7LUKuOoMSsATPpu+Icc4zL5/Ik=
|
||||||
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
|
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
|
||||||
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
|
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
|
||||||
github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA=
|
github.com/cosmos/ledger-cosmos-go v0.13.1 h1:12ac9+GwBb9BjP7X5ygpFk09Itwzjzfmg6A2CWFjoVs=
|
||||||
github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI=
|
github.com/cosmos/ledger-cosmos-go v0.13.1/go.mod h1:5tv2RVJEd2+Y38TIQN4CRjJeQGyqOEiKJDfqhk5UjqE=
|
||||||
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
|
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
|
||||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
@ -644,6 +643,8 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe
|
|||||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
|
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
|
||||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
|
github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc=
|
||||||
|
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
|
||||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
@ -653,8 +654,8 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
|
|||||||
github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
|
github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
|
github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
|
github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k=
|
github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+OkstIrNiMjGpEIyhx8f6W7s4=
|
||||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
|
github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||||
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
||||||
@ -664,8 +665,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99
|
|||||||
github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
|
github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
|
||||||
github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
|
github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
|
||||||
github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
|
github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
|
||||||
github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A=
|
github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
|
||||||
github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI=
|
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
|
||||||
github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
|
github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
|
||||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
@ -805,8 +806,8 @@ github.com/kava-labs/cometbft v0.34.27-kava.0 h1:FUEGRkF3xtrJH+h9A5G4eA2skf7QaNo
|
|||||||
github.com/kava-labs/cometbft v0.34.27-kava.0/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
|
github.com/kava-labs/cometbft v0.34.27-kava.0/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
|
||||||
github.com/kava-labs/cometbft-db v0.7.0-rocksdb-v7.9.2-kava.1 h1:EZnZAkZ+dqK+1OM4AK+e6wYH8a5xuyg4yFTR4Ez3AXk=
|
github.com/kava-labs/cometbft-db v0.7.0-rocksdb-v7.9.2-kava.1 h1:EZnZAkZ+dqK+1OM4AK+e6wYH8a5xuyg4yFTR4Ez3AXk=
|
||||||
github.com/kava-labs/cometbft-db v0.7.0-rocksdb-v7.9.2-kava.1/go.mod h1:mI/4J4IxRzPrXvMiwefrt0fucGwaQ5Hm9IKS7HnoJeI=
|
github.com/kava-labs/cometbft-db v0.7.0-rocksdb-v7.9.2-kava.1/go.mod h1:mI/4J4IxRzPrXvMiwefrt0fucGwaQ5Hm9IKS7HnoJeI=
|
||||||
github.com/kava-labs/cosmos-sdk v0.46.11-kava.1 h1:3VRpm4zf/gQgmpRVd1p99/2P8ZecAu2FVAXHru5caIo=
|
github.com/kava-labs/cosmos-sdk v0.46.11-kava.3 h1:TOhyyW/xHso/9uIOgYdsrOWDIhXi6foORWZxVRe/wS0=
|
||||||
github.com/kava-labs/cosmos-sdk v0.46.11-kava.1/go.mod h1:bG4AkW9bqc8ycrryyKGQEl3YV9BY2wr6HggGq8kvcgM=
|
github.com/kava-labs/cosmos-sdk v0.46.11-kava.3/go.mod h1:bSUUbmVwWkv1ZNVTWrQHa/i+73xIUvYYPsCvl5doiCs=
|
||||||
github.com/kava-labs/ethermint v0.21.0-kava-v23-1 h1:5TSyCtPvFdMuSe8p2iMVqXmFBlK3lHyjaT9EqN752aI=
|
github.com/kava-labs/ethermint v0.21.0-kava-v23-1 h1:5TSyCtPvFdMuSe8p2iMVqXmFBlK3lHyjaT9EqN752aI=
|
||||||
github.com/kava-labs/ethermint v0.21.0-kava-v23-1/go.mod h1:rdm6AinxZ4dzPEv/cjH+/AGyTbKufJ3RE7M2MDyklH0=
|
github.com/kava-labs/ethermint v0.21.0-kava-v23-1/go.mod h1:rdm6AinxZ4dzPEv/cjH+/AGyTbKufJ3RE7M2MDyklH0=
|
||||||
github.com/kava-labs/tm-db v0.6.7-kava.4 h1:M2RibOKmbi+k2OhAFry8z9+RJF0CYuDETB7/PrSdoro=
|
github.com/kava-labs/tm-db v0.6.7-kava.4 h1:M2RibOKmbi+k2OhAFry8z9+RJF0CYuDETB7/PrSdoro=
|
||||||
@ -1193,8 +1194,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
|||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo=
|
github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo=
|
||||||
github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
|
github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
|
||||||
github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c=
|
github.com/zondax/ledger-go v0.14.2 h1:NDaba434N7JUVKg4P4nFv6TOjSkUosYb9sdiw3c61Zk=
|
||||||
github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320=
|
github.com/zondax/ledger-go v0.14.2/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320=
|
||||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||||
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
|
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
|
||||||
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||||
@ -1244,6 +1245,7 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
|
|||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
|
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
|
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
|
||||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
@ -1383,8 +1385,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri
|
|||||||
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
||||||
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
||||||
golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A=
|
golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A=
|
||||||
golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
|
golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
|
||||||
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
|
golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@ -1399,8 +1401,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@ -1523,6 +1525,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
@ -1662,8 +1665,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ
|
|||||||
google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
|
google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
|
||||||
google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
|
google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
|
||||||
google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70=
|
google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70=
|
||||||
google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE=
|
google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg=
|
||||||
google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg=
|
google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
@ -1783,8 +1786,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw
|
|||||||
google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
||||||
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
||||||
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
|
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
|
||||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
|
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0=
|
||||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
|
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk=
|
||||||
|
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 h1:U7+wNaVuSTaUqNvK2+osJ9ejEZxbjHHk8F2b6Hpx0AE=
|
||||||
|
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U=
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY=
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
|
||||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
@ -1827,8 +1834,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu
|
|||||||
google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
||||||
google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
||||||
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
||||||
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
|
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
|
||||||
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
|
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
@ -1845,8 +1852,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
|
|||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
@ -24,6 +24,5 @@ The process is:
|
|||||||
On each release we can delete the previous releases migration and old GenesisState type.
|
On each release we can delete the previous releases migration and old GenesisState type.
|
||||||
eg kava-3 migrates `auth.GenesisState` from kava-2 to `auth.GenesisState` from kava-3,
|
eg kava-3 migrates `auth.GenesisState` from kava-2 to `auth.GenesisState` from kava-3,
|
||||||
but for kava-4 we don't need to keep around kava-2's `auth.GenesisState` type.
|
but for kava-4 we don't need to keep around kava-2's `auth.GenesisState` type.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
package migrate
|
package migrate
|
||||||
|
80
migrate/v0_25/migrate.md
Normal file
80
migrate/v0_25/migrate.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# Kava 15 Upgrade Instructions
|
||||||
|
|
||||||
|
## Software Version and Key Dates
|
||||||
|
|
||||||
|
- The version of `kava` for Kava 15 is v0.25.0
|
||||||
|
- The Kava 14 chain will be shutdown with a `SoftwareUpgradeProposal` that
|
||||||
|
activates at approximately 15:00 UTC on December 7th, 2023.
|
||||||
|
|
||||||
|
## Dependency Changes
|
||||||
|
|
||||||
|
### For validators using RocksDB
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> If you use goleveldb or other database backends, this is not required.
|
||||||
|
|
||||||
|
If you use RocksDB as your database backend, you will need to update RocksDB
|
||||||
|
from v7 to v8. The tested and recommended RocksDB version is `v8.1.1`.
|
||||||
|
Please reference the [RocksDB repository](https://github.com/facebook/rocksdb/tree/v8.1.1)
|
||||||
|
to update your installation before building the RocksDB kava binary.
|
||||||
|
|
||||||
|
## API Changes
|
||||||
|
|
||||||
|
If you require calculating the yearly staking reward percentages, standard
|
||||||
|
calculation will no longer be accurate. [Additional Details can be found here.](./staking_rewards.md)
|
||||||
|
|
||||||
|
### On the day of the upgrade
|
||||||
|
|
||||||
|
The kava chain is expected to halt at block height **7637070**. **Do not stop your node and begin the upgrade before the upgrade height**, or you may go offline and be unable to recover until after the upgrade!
|
||||||
|
|
||||||
|
**Make sure the kava process is stopped before proceeding and that you have backed up your validator**. Failure to backup your validator could make it impossible to restart your node if the upgrade fails.
|
||||||
|
|
||||||
|
**Ensure you are using golang 1.20.x and not a different version.** Golang 1.19 and below may cause app hash mismatches!
|
||||||
|
|
||||||
|
To update to v0.25.0
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# check go version - look for 1.20!
|
||||||
|
go version
|
||||||
|
# go version go1.20.5 linux/amd64
|
||||||
|
|
||||||
|
# in the `kava` folder
|
||||||
|
git fetch
|
||||||
|
git checkout v0.25.0
|
||||||
|
|
||||||
|
# Note: Golang 1.20 must be installed before this step
|
||||||
|
make install
|
||||||
|
|
||||||
|
# verify versions
|
||||||
|
kava version --long
|
||||||
|
# name: kava
|
||||||
|
# server_name: kava
|
||||||
|
# version: 0.25.0
|
||||||
|
# commit: <commit placeholder>
|
||||||
|
# build_tags: netgo ledger,
|
||||||
|
# go: go version go1.20.5 linux/amd64
|
||||||
|
# build_deps:
|
||||||
|
# ...
|
||||||
|
# cosmos_sdk_version: v0.46.11
|
||||||
|
|
||||||
|
# Restart node -
|
||||||
|
kava start
|
||||||
|
```
|
||||||
|
|
||||||
|
### Risks
|
||||||
|
|
||||||
|
As a validator, performing the upgrade procedure on your consensus nodes carries a heightened risk of double-signing and being slashed. The most important piece of this procedure is verifying your software version and genesis file hash before starting your validator and signing.
|
||||||
|
|
||||||
|
The riskiest thing a validator can do is discover that they made a mistake and repeat the upgrade procedure again during the network startup. If you discover a mistake in the process, the best thing to do is wait for the network to start before correcting it. If the network is halted and you have started with a different genesis file than the expected one, seek advice from a Kava developer before resetting your validator.
|
||||||
|
|
||||||
|
### Recovery
|
||||||
|
|
||||||
|
Prior to applying the Kava 15 upgrade, validators are encouraged to take a full data snapshot at the upgrade height before proceeding. Snap-shotting depends heavily on infrastructure, but generally this can be done by backing up the .kava directory.
|
||||||
|
|
||||||
|
It is critically important to back-up the .kava/data/priv_validator_state.json file after stopping your kava process. This file is updated every block as your validator participates in consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted.
|
||||||
|
|
||||||
|
In the event that the upgrade does not succeed, validators and operators must downgrade back to v0.24.x of the Kava software and restore to their latest snapshot before restarting their nodes.
|
||||||
|
|
||||||
|
### Coordination
|
||||||
|
|
||||||
|
If the Kava 15 chain does not launch by December 8th, 2023 at 00:00 UTC, the launch should be considered a failure. In the event of launch failure, coordination will occur in the [Kava discord](https://discord.com/invite/kQzh3Uv).
|
80
migrate/v0_25/staking_rewards.md
Normal file
80
migrate/v0_25/staking_rewards.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# Migrate Staking Reward Calculation to Endpoint
|
||||||
|
|
||||||
|
Kava 15 (v0.25.x) changes the mechanism for staking rewards, which will no longer be inflationary but will be paid out of the community module. In order to continue displaying expected yields or APYs to users, wallets and explorers will need to update.
|
||||||
|
|
||||||
|
The endpoint calculates staking rewards for the current kava version and is forward compatible with future changes.
|
||||||
|
|
||||||
|
All consumers who display yearly staking reward percentages are encouraged to migrate from the standard calculation to using the endpoint, as the standard calculation will no longer be accurate.
|
||||||
|
|
||||||
|
Endpoint: `/kava/community/v1beta1/annualized_rewards`
|
||||||
|
Example Response:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"staking_rewards": "0.203023625910000000"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Before Kava 15
|
||||||
|
|
||||||
|
The staking APR is calculated the same way as other cosmos-sdk chains. Various parameters are fetched and then combined in this calculation:
|
||||||
|
```
|
||||||
|
staking_apr ≈ mint_inflation *
|
||||||
|
(1 - distribution_params.community_tax) *
|
||||||
|
(total_supply_ukava/pool.bonded_tokens)
|
||||||
|
```
|
||||||
|
|
||||||
|
_Note this doesn’t include transaction fees paid to stakers._
|
||||||
|
|
||||||
|
Endpoints used:
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/mint/v1beta1/params
|
||||||
|
* https://api.data.kava.io/cosmos/distribution/v1beta1/params
|
||||||
|
* https://api.data.kava.io/cosmos/bank/v1beta1/supply/by_denom?denom=ukava
|
||||||
|
* https://api.data.kava.io/cosmos/staking/v1beta1/pool
|
||||||
|
|
||||||
|
Informational Endpoints
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/mint/v1beta1/inflation
|
||||||
|
* https://api.data.kava.io/cosmos/mint/v1beta1/annual_provisions
|
||||||
|
|
||||||
|
## After Kava 15
|
||||||
|
|
||||||
|
Kava 15 implements new staking rewards as ratified in this proposal: https://www.mintscan.io/kava/proposals/141. They will come into effect at the “switchover time” on 2024-01-01 00:00 UTC.
|
||||||
|
|
||||||
|
* All delegating and claiming transactions remain unchanged. There is no change in how rewards are claimed or how claimable balances are queried.
|
||||||
|
* After the switchover time, inflation will be set to zero (and rewards will be paid from the community module account).
|
||||||
|
* After the switchover time, rewards are paid out according to:
|
||||||
|
```
|
||||||
|
staking apy ≈ community_params.staking_rewards_per_second *
|
||||||
|
seconds_per_year / pool.bonded_tokens
|
||||||
|
```
|
||||||
|
|
||||||
|
_Note this doesn’t include transaction fees paid to stakers._
|
||||||
|
|
||||||
|
* There is a new endpoint `kava/community/v1beta1/annualized_rewards`
|
||||||
|
* before the switchover time, it will return the current staking APY (calculated in the previous section)
|
||||||
|
* after the switchover time, it will return the new staking APY above
|
||||||
|
|
||||||
|
* Existing endpoints above will remain active, but the params will change such that the old apr calculation will return 0.
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/mint/v1beta1/params
|
||||||
|
* no format changes
|
||||||
|
* `inflation_max` and `inflation_min` will be 0.0
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/distribution/v1beta1/params
|
||||||
|
* no format changes
|
||||||
|
* `community_tax` will be 0.0
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/bank/v1beta1/supply/by_denom?denom=ukava
|
||||||
|
* no changes
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/staking/v1beta1/pool
|
||||||
|
* no changes
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/mint/v1beta1/inflation
|
||||||
|
* no format changes
|
||||||
|
* `inflation` will be 0.0
|
||||||
|
|
||||||
|
* https://api.data.kava.io/cosmos/mint/v1beta1/annual_provisions
|
||||||
|
* no format changes
|
||||||
|
* `annual_provisions` will be 0.0
|
@ -19,14 +19,14 @@ E2E_SKIP_SHUTDOWN=false
|
|||||||
|
|
||||||
# The following variables should be defined to run an upgrade.
|
# The following variables should be defined to run an upgrade.
|
||||||
# E2E_INCLUDE_AUTOMATED_UPGRADE when true enables the automated upgrade & corresponding tests in the suite.
|
# E2E_INCLUDE_AUTOMATED_UPGRADE when true enables the automated upgrade & corresponding tests in the suite.
|
||||||
E2E_INCLUDE_AUTOMATED_UPGRADE=false
|
E2E_INCLUDE_AUTOMATED_UPGRADE=true
|
||||||
# E2E_KAVA_UPGRADE_NAME is the name of the upgrade that must be in the current local image.
|
# E2E_KAVA_UPGRADE_NAME is the name of the upgrade that must be in the current local image.
|
||||||
E2E_KAVA_UPGRADE_NAME=
|
E2E_KAVA_UPGRADE_NAME=v0.25.0-testing
|
||||||
# E2E_KAVA_UPGRADE_HEIGHT is the height at which the upgrade will be applied.
|
# E2E_KAVA_UPGRADE_HEIGHT is the height at which the upgrade will be applied.
|
||||||
# If IBC tests are enabled this should be >30. Otherwise, this should be >10.
|
# If IBC tests are enabled this should be >30. Otherwise, this should be >10.
|
||||||
E2E_KAVA_UPGRADE_HEIGHT=
|
E2E_KAVA_UPGRADE_HEIGHT=35
|
||||||
# E2E_KAVA_UPGRADE_BASE_IMAGE_TAG is the tag of the docker image the chain should upgrade from.
|
# E2E_KAVA_UPGRADE_BASE_IMAGE_TAG is the tag of the docker image the chain should upgrade from.
|
||||||
E2E_KAVA_UPGRADE_BASE_IMAGE_TAG=
|
E2E_KAVA_UPGRADE_BASE_IMAGE_TAG=v0.24.0
|
||||||
|
|
||||||
# E2E_KAVA_ERC20_ADDRESS is the address of a pre-deployed ERC20 token with the following properties:
|
# E2E_KAVA_ERC20_ADDRESS is the address of a pre-deployed ERC20 token with the following properties:
|
||||||
# - the E2E_KAVA_FUNDED_ACCOUNT_MNEMONIC has nonzero balance
|
# - the E2E_KAVA_FUNDED_ACCOUNT_MNEMONIC has nonzero balance
|
||||||
|
256
tests/e2e/e2e_upgrade_community_test.go
Normal file
256
tests/e2e/e2e_upgrade_community_test.go
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
package e2e_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
|
||||||
|
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||||
|
|
||||||
|
"github.com/kava-labs/kava/app"
|
||||||
|
"github.com/kava-labs/kava/tests/util"
|
||||||
|
communitytypes "github.com/kava-labs/kava/x/community/types"
|
||||||
|
kavadisttypes "github.com/kava-labs/kava/x/kavadist/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestUpgradeCommunityParams() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
|
||||||
|
beforeUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight - 1)
|
||||||
|
afterUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight)
|
||||||
|
|
||||||
|
// Before params
|
||||||
|
kavaDistParamsBefore, err := suite.Kava.Kavadist.Params(beforeUpgradeCtx, &kavadisttypes.QueryParamsRequest{})
|
||||||
|
suite.NoError(err)
|
||||||
|
mintParamsBefore, err := suite.Kava.Mint.Params(beforeUpgradeCtx, &minttypes.QueryParamsRequest{})
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
// Before parameters
|
||||||
|
suite.Run("x/community and x/kavadist parameters before upgrade", func() {
|
||||||
|
_, err = suite.Kava.Community.Params(beforeUpgradeCtx, &communitytypes.QueryParamsRequest{})
|
||||||
|
suite.Error(err, "x/community should not have params before upgrade")
|
||||||
|
|
||||||
|
suite.Require().True(
|
||||||
|
kavaDistParamsBefore.Params.Active,
|
||||||
|
"x/kavadist should be active before upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Require().True(
|
||||||
|
mintParamsBefore.Params.InflationMax.IsPositive(),
|
||||||
|
"x/mint inflation max should be positive before upgrade",
|
||||||
|
)
|
||||||
|
suite.Require().True(
|
||||||
|
mintParamsBefore.Params.InflationMin.IsPositive(),
|
||||||
|
"x/mint inflation min should be positive before upgrade",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
// After upgrade, Before switchover - parameters
|
||||||
|
suite.Run("x/kavadist, x/mint, x/community parameters after upgrade, before switchover", func() {
|
||||||
|
kavaDistParamsAfter, err := suite.Kava.Kavadist.Params(afterUpgradeCtx, &kavadisttypes.QueryParamsRequest{})
|
||||||
|
suite.NoError(err)
|
||||||
|
mintParamsAfter, err := suite.Kava.Mint.Params(afterUpgradeCtx, &minttypes.QueryParamsRequest{})
|
||||||
|
suite.NoError(err)
|
||||||
|
communityParamsAfter, err := suite.Kava.Community.Params(afterUpgradeCtx, &communitytypes.QueryParamsRequest{})
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
kavaDistParamsBefore.Params,
|
||||||
|
kavaDistParamsAfter.Params,
|
||||||
|
"x/kavadist should be unaffected after upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
mintParamsBefore.Params,
|
||||||
|
mintParamsAfter.Params,
|
||||||
|
"x/mint params should be unaffected after upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
expectedParams := app.CommunityParams_E2E
|
||||||
|
// Make UpgradeTimeDisableInflation match so that we ignore it, because
|
||||||
|
// referencing app.CommunityParams_E2E in this test files is different
|
||||||
|
// from the one set in the upgrade handler. At least check that it is
|
||||||
|
// set to a non-zero value in the assertion below
|
||||||
|
expectedParams.UpgradeTimeDisableInflation = communityParamsAfter.Params.UpgradeTimeDisableInflation
|
||||||
|
|
||||||
|
suite.False(
|
||||||
|
communityParamsAfter.Params.UpgradeTimeDisableInflation.IsZero(),
|
||||||
|
"x/community switchover time should be set after upgrade",
|
||||||
|
)
|
||||||
|
suite.Equal(
|
||||||
|
expectedParams,
|
||||||
|
communityParamsAfter.Params,
|
||||||
|
"x/community params should be set to E2E params after upgrade",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Require().Eventually(
|
||||||
|
func() bool {
|
||||||
|
// Get x/community for switchover time
|
||||||
|
params, err := suite.Kava.Community.Params(
|
||||||
|
context.Background(),
|
||||||
|
&communitytypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// Check that switchover time is set to zero, e.g. switchover happened
|
||||||
|
return params.Params.UpgradeTimeDisableInflation.Equal(time.Time{})
|
||||||
|
},
|
||||||
|
20*time.Second, 1*time.Second,
|
||||||
|
"switchover should happen and x/community params should be updated",
|
||||||
|
)
|
||||||
|
|
||||||
|
// Fetch exact block when inflation stop event emitted
|
||||||
|
_, switchoverHeight, err := suite.Kava.GetBeginBlockEventsFromQuery(
|
||||||
|
context.Background(),
|
||||||
|
fmt.Sprintf(
|
||||||
|
"%s.%s EXISTS",
|
||||||
|
communitytypes.EventTypeInflationStop,
|
||||||
|
communitytypes.AttributeKeyInflationDisableTime,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().NotZero(switchoverHeight)
|
||||||
|
|
||||||
|
beforeSwitchoverCtx := util.CtxAtHeight(switchoverHeight - 1)
|
||||||
|
afterSwitchoverCtx := util.CtxAtHeight(switchoverHeight)
|
||||||
|
|
||||||
|
suite.Run("x/kavadist, x/mint, x/community parameters after upgrade, after switchover", func() {
|
||||||
|
kavaDistParamsAfter, err := suite.Kava.Kavadist.Params(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&kavadisttypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
mintParamsAfter, err := suite.Kava.Mint.Params(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&minttypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
communityParamsAfter, err := suite.Kava.Community.Params(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&communitytypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
suite.False(
|
||||||
|
kavaDistParamsAfter.Params.Active,
|
||||||
|
"x/kavadist should be disabled after upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.True(
|
||||||
|
mintParamsAfter.Params.InflationMax.IsZero(),
|
||||||
|
"x/mint inflation max should be zero after switchover",
|
||||||
|
)
|
||||||
|
suite.True(
|
||||||
|
mintParamsAfter.Params.InflationMin.IsZero(),
|
||||||
|
"x/mint inflation min should be zero after switchover",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
time.Time{},
|
||||||
|
communityParamsAfter.Params.UpgradeTimeDisableInflation,
|
||||||
|
"x/community switchover time should be reset",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
communityParamsAfter.Params.UpgradeTimeSetStakingRewardsPerSecond,
|
||||||
|
communityParamsAfter.Params.StakingRewardsPerSecond,
|
||||||
|
"x/community staking rewards per second should match upgrade time staking rewards per second",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("x/kavadist, x/distribution, x/community balances after switchover", func() {
|
||||||
|
// Before balances - community pool fund consolidation
|
||||||
|
kavaDistBalBefore, err := suite.Kava.Kavadist.Balance(
|
||||||
|
beforeSwitchoverCtx,
|
||||||
|
&kavadisttypes.QueryBalanceRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
distrBalBefore, err := suite.Kava.Distribution.CommunityPool(
|
||||||
|
beforeSwitchoverCtx,
|
||||||
|
&distrtypes.QueryCommunityPoolRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
distrBalCoinsBefore, distrDustBefore := distrBalBefore.Pool.TruncateDecimal()
|
||||||
|
beforeCommPoolBalance, err := suite.Kava.Community.Balance(
|
||||||
|
beforeSwitchoverCtx,
|
||||||
|
&communitytypes.QueryBalanceRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
// After balances
|
||||||
|
kavaDistBalAfter, err := suite.Kava.Kavadist.Balance(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&kavadisttypes.QueryBalanceRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
distrBalAfter, err := suite.Kava.Distribution.CommunityPool(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&distrtypes.QueryCommunityPoolRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
afterCommPoolBalance, err := suite.Kava.Community.Balance(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&communitytypes.QueryBalanceRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
expectedKavadistBal := sdk.NewCoins(sdk.NewCoin(
|
||||||
|
"ukava",
|
||||||
|
kavaDistBalBefore.Coins.AmountOf("ukava"),
|
||||||
|
))
|
||||||
|
suite.Equal(
|
||||||
|
expectedKavadistBal,
|
||||||
|
kavaDistBalAfter.Coins,
|
||||||
|
"x/kavadist balance should persist the ukava amount and move all other funds",
|
||||||
|
)
|
||||||
|
expectedKavadistTransferred := kavaDistBalBefore.Coins.Sub(expectedKavadistBal...)
|
||||||
|
|
||||||
|
// very low ukava balance after (ignoring dust in x/distribution)
|
||||||
|
// a small amount of tx fees can still end up here.
|
||||||
|
// dust should stay in x/distribution, but may not be the same so it's unchecked
|
||||||
|
distrCoinsAfter, distrDustAfter := distrBalAfter.Pool.TruncateDecimal()
|
||||||
|
suite.Empty(distrCoinsAfter, "expected no coins in x/distribution community pool")
|
||||||
|
|
||||||
|
// Fetch block results for paid staking rewards in the block
|
||||||
|
blockRes, err := suite.Kava.TmSignClient.BlockResults(
|
||||||
|
context.Background(),
|
||||||
|
&switchoverHeight,
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
stakingRewardPaidEvents := util.FilterEventsByType(
|
||||||
|
blockRes.BeginBlockEvents,
|
||||||
|
communitytypes.EventTypeStakingRewardsPaid,
|
||||||
|
)
|
||||||
|
suite.Require().Len(stakingRewardPaidEvents, 1, "there should be only 1 staking reward paid event")
|
||||||
|
stakingRewardAmount := sdk.NewCoins()
|
||||||
|
for _, attr := range stakingRewardPaidEvents[0].Attributes {
|
||||||
|
if string(attr.Key) == communitytypes.AttributeKeyStakingRewardAmount {
|
||||||
|
stakingRewardAmount, err = sdk.ParseCoinsNormalized(string(attr.Value))
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
expectedCommunityBal := beforeCommPoolBalance.Coins.
|
||||||
|
Add(distrBalCoinsBefore...).
|
||||||
|
Add(expectedKavadistTransferred...).
|
||||||
|
Sub(stakingRewardAmount...) // Remove staking rewards paid in the block
|
||||||
|
|
||||||
|
// x/kavadist and x/distribution community pools should be moved to x/community
|
||||||
|
suite.Equal(
|
||||||
|
expectedCommunityBal,
|
||||||
|
afterCommPoolBalance.Coins,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
distrDustBefore,
|
||||||
|
distrDustAfter,
|
||||||
|
"x/distribution community pool dust should be unchanged",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
291
tests/e2e/e2e_upgrade_gov_and_authz_test.go
Normal file
291
tests/e2e/e2e_upgrade_gov_and_authz_test.go
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
package e2e_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||||
|
"github.com/cosmos/cosmos-sdk/x/authz"
|
||||||
|
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
|
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
||||||
|
|
||||||
|
"github.com/kava-labs/kava/tests/e2e/testutil"
|
||||||
|
"github.com/kava-labs/kava/tests/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
govModuleAcc = "kava10d07y265gmmuvt4z0w9aw880jnsr700jxh8cq5"
|
||||||
|
communityModuleAcc = "kava17d2wax0zhjrrecvaszuyxdf5wcu5a0p4qlx3t5"
|
||||||
|
kavadistModuleAcc = "kava1cj7njkw2g9fqx4e768zc75dp9sks8u9znxrf0w"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestGovParamChanges() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
|
||||||
|
beforeUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight - 1)
|
||||||
|
afterUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight)
|
||||||
|
|
||||||
|
// fetch gov parameters before upgrade
|
||||||
|
govBeforeParams, err := suite.Kava.Gov.Params(beforeUpgradeCtx, &govv1.QueryParamsRequest{ParamsType: "tallying"})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// assert expected gov quorum before upgrade
|
||||||
|
suite.NotEqual(govBeforeParams.TallyParams.Quorum, "0.200000000000000000")
|
||||||
|
|
||||||
|
govAfterParams, err := suite.Kava.Gov.Params(afterUpgradeCtx, &govv1.QueryParamsRequest{ParamsType: "tallying"})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// assert expected gov quorum after upgrade
|
||||||
|
suite.Equal(govAfterParams.TallyParams.Quorum, "0.200000000000000000")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestAuthzParamChanges() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
|
||||||
|
beforeUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight - 1)
|
||||||
|
afterUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight)
|
||||||
|
|
||||||
|
// fetch authz grants before upgrade
|
||||||
|
authzBeforeGrants, err := suite.Kava.Authz.Grants(beforeUpgradeCtx, &authz.QueryGrantsRequest{Granter: kavadistModuleAcc, Grantee: govModuleAcc, Pagination: &query.PageRequest{Limit: 1000, CountTotal: true}})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().Equal(authzBeforeGrants.Pagination.Total, uint64(len(authzBeforeGrants.Grants)), "expected all grants to have been requested")
|
||||||
|
|
||||||
|
// no kavadist -> gov grants
|
||||||
|
suite.Equal(0, len(authzBeforeGrants.Grants))
|
||||||
|
|
||||||
|
// fetch authz grants after upgrade
|
||||||
|
authzAfterGrants, err := suite.Kava.Authz.Grants(afterUpgradeCtx, &authz.QueryGrantsRequest{Granter: kavadistModuleAcc, Grantee: govModuleAcc, Pagination: &query.PageRequest{Limit: 1000, CountTotal: true}})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().Equal(authzAfterGrants.Pagination.Total, uint64(len(authzAfterGrants.Grants)), "expected all grants to have been requested")
|
||||||
|
|
||||||
|
// one kavadist -> gov grants
|
||||||
|
suite.Require().Equal(1, len(authzAfterGrants.Grants))
|
||||||
|
|
||||||
|
grant := authzAfterGrants.Grants[0]
|
||||||
|
|
||||||
|
var authorization authz.Authorization
|
||||||
|
suite.Kava.EncodingConfig.Marshaler.UnpackAny(grant.Authorization, &authorization)
|
||||||
|
|
||||||
|
genericAuthorization, ok := authorization.(*authz.GenericAuthorization)
|
||||||
|
suite.Require().True(ok, "expected generic authorization")
|
||||||
|
|
||||||
|
// kavadist allows gov to MsgSend it's funds
|
||||||
|
suite.Equal(sdk.MsgTypeURL(&banktypes.MsgSend{}), genericAuthorization.Msg)
|
||||||
|
// no expiration
|
||||||
|
var expectedExpiration *time.Time
|
||||||
|
suite.Equal(expectedExpiration, grant.Expiration)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestModuleAccountGovTransfers() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
suite.SkipIfKvtoolDisabled()
|
||||||
|
|
||||||
|
// the module account (authority) that executes the transfers
|
||||||
|
govAcc := sdk.MustAccAddressFromBech32(govModuleAcc)
|
||||||
|
|
||||||
|
// module accounts for gov transfer test cases
|
||||||
|
communityAcc := sdk.MustAccAddressFromBech32(communityModuleAcc)
|
||||||
|
kavadistAcc := sdk.MustAccAddressFromBech32(kavadistModuleAcc)
|
||||||
|
|
||||||
|
testCases := []struct {
|
||||||
|
name string
|
||||||
|
sender sdk.AccAddress
|
||||||
|
receiver sdk.AccAddress
|
||||||
|
amount sdk.Coin
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "transfer from community to kavadist for incentive rewards",
|
||||||
|
sender: communityAcc,
|
||||||
|
receiver: kavadistAcc,
|
||||||
|
amount: ukava(100e6),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "transfer from kavadist to community",
|
||||||
|
sender: kavadistAcc,
|
||||||
|
receiver: communityAcc,
|
||||||
|
amount: ukava(50e6),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tc := range testCases {
|
||||||
|
suite.Run(tc.name, func() {
|
||||||
|
// create msg exec for transfer between modules
|
||||||
|
msg := banktypes.NewMsgSend(
|
||||||
|
tc.sender,
|
||||||
|
tc.receiver,
|
||||||
|
sdk.NewCoins(tc.amount),
|
||||||
|
)
|
||||||
|
execMsg := authz.NewMsgExec(govAcc, []sdk.Msg{msg})
|
||||||
|
|
||||||
|
// ensure proposal passes
|
||||||
|
passBlock := suite.submitAndPassProposal([]sdk.Msg{&execMsg})
|
||||||
|
transfers := suite.getBankTransferAmountAtBlock(passBlock, tc.sender, tc.receiver)
|
||||||
|
|
||||||
|
suite.Require().Containsf(
|
||||||
|
transfers,
|
||||||
|
tc.amount,
|
||||||
|
"expected transfer of %s to be included in bank transfer events: %s",
|
||||||
|
tc.amount,
|
||||||
|
transfers,
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) submitAndPassProposal(msgs []sdk.Msg) int64 {
|
||||||
|
govParamsRes, err := suite.Kava.Gov.Params(context.Background(), &govv1.QueryParamsRequest{
|
||||||
|
ParamsType: govv1.ParamDeposit,
|
||||||
|
})
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
kavaAcc := suite.Kava.GetAccount(testutil.FundedAccountName)
|
||||||
|
|
||||||
|
proposalMsg, err := govv1.NewMsgSubmitProposal(
|
||||||
|
msgs,
|
||||||
|
govParamsRes.DepositParams.MinDeposit,
|
||||||
|
kavaAcc.SdkAddress.String(),
|
||||||
|
"",
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
gasLimit := 1e6
|
||||||
|
fee := ukava(1000)
|
||||||
|
|
||||||
|
req := util.KavaMsgRequest{
|
||||||
|
Msgs: []sdk.Msg{proposalMsg},
|
||||||
|
GasLimit: uint64(gasLimit),
|
||||||
|
FeeAmount: sdk.NewCoins(fee),
|
||||||
|
Memo: "this is a proposal please accept me",
|
||||||
|
}
|
||||||
|
res := kavaAcc.SignAndBroadcastKavaTx(req)
|
||||||
|
suite.Require().NoError(res.Err)
|
||||||
|
|
||||||
|
// Wait for proposal to be submitted
|
||||||
|
txRes, err := util.WaitForSdkTxCommit(suite.Kava.Tx, res.Result.TxHash, 6*time.Second)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
var govRes govv1.MsgSubmitProposalResponse
|
||||||
|
suite.decodeTxMsgResponse(txRes, &govRes)
|
||||||
|
|
||||||
|
// 2. Vote for proposal from whale account
|
||||||
|
whale := suite.Kava.GetAccount(testutil.FundedAccountName)
|
||||||
|
voteMsg := govv1.NewMsgVote(
|
||||||
|
whale.SdkAddress,
|
||||||
|
govRes.ProposalId,
|
||||||
|
govv1.OptionYes,
|
||||||
|
"",
|
||||||
|
)
|
||||||
|
|
||||||
|
voteReq := util.KavaMsgRequest{
|
||||||
|
Msgs: []sdk.Msg{voteMsg},
|
||||||
|
GasLimit: uint64(gasLimit),
|
||||||
|
FeeAmount: sdk.NewCoins(fee),
|
||||||
|
Memo: "voting",
|
||||||
|
}
|
||||||
|
voteRes := whale.SignAndBroadcastKavaTx(voteReq)
|
||||||
|
suite.Require().NoError(voteRes.Err)
|
||||||
|
|
||||||
|
_, err = util.WaitForSdkTxCommit(suite.Kava.Tx, voteRes.Result.TxHash, 6*time.Second)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// 3. Wait until proposal passes
|
||||||
|
suite.Require().Eventually(func() bool {
|
||||||
|
proposalRes, err := suite.Kava.Gov.Proposal(context.Background(), &govv1.QueryProposalRequest{
|
||||||
|
ProposalId: govRes.ProposalId,
|
||||||
|
})
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
switch status := proposalRes.Proposal.Status; status {
|
||||||
|
case govv1.StatusDepositPeriod, govv1.StatusVotingPeriod:
|
||||||
|
return false
|
||||||
|
case govv1.StatusPassed:
|
||||||
|
return true
|
||||||
|
case govv1.StatusFailed, govv1.StatusRejected:
|
||||||
|
suite.Failf("proposal failed", "proposal failed with status %s", status.String())
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}, 60*time.Second, 1*time.Second)
|
||||||
|
|
||||||
|
page := 1
|
||||||
|
perPage := 100
|
||||||
|
|
||||||
|
// Get the block the proposal was passed in
|
||||||
|
passBlock, err := suite.Kava.TmSignClient.BlockSearch(
|
||||||
|
context.Background(),
|
||||||
|
fmt.Sprintf(
|
||||||
|
"active_proposal.proposal_result = 'proposal_passed' AND active_proposal.proposal_id = %d",
|
||||||
|
govRes.ProposalId,
|
||||||
|
),
|
||||||
|
&page,
|
||||||
|
&perPage,
|
||||||
|
"asc",
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().Equal(1, len(passBlock.Blocks), "passed proposal should be searchable")
|
||||||
|
|
||||||
|
return passBlock.Blocks[len(passBlock.Blocks)-1].Block.Height
|
||||||
|
}
|
||||||
|
|
||||||
|
// getBankTransferAmountAtBlock returns the amount of coins transferred between
|
||||||
|
// the given accounts in the block at the given height. Note that this returns
|
||||||
|
// a slice of sdk.Coin that can contain multiple coins of the SAME denom -- ie. NOT sdk.Coins
|
||||||
|
func (suite *IntegrationTestSuite) getBankTransferAmountAtBlock(
|
||||||
|
blockHeight int64,
|
||||||
|
sender sdk.AccAddress,
|
||||||
|
receiver sdk.AccAddress,
|
||||||
|
) []sdk.Coin {
|
||||||
|
// Fetch block results for paid staking rewards in the block
|
||||||
|
blockRes, err := suite.Kava.TmSignClient.BlockResults(
|
||||||
|
context.Background(),
|
||||||
|
&blockHeight,
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
transferEvents := util.FilterEventsByType(
|
||||||
|
blockRes.EndBlockEvents, // gov proposals applied in EndBlocker
|
||||||
|
banktypes.EventTypeTransfer,
|
||||||
|
)
|
||||||
|
suite.Require().NotEmpty(transferEvents, "there should be at least 1 bank transfer event")
|
||||||
|
|
||||||
|
transfers := []sdk.Coin{}
|
||||||
|
|
||||||
|
event:
|
||||||
|
for _, event := range transferEvents {
|
||||||
|
if event.Type != banktypes.EventTypeTransfer {
|
||||||
|
suite.FailNowf(
|
||||||
|
"unexpected event type %s in block results",
|
||||||
|
event.Type,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, attr := range event.Attributes {
|
||||||
|
suite.T().Logf("event attr: %s = %s", string(attr.Key), string(attr.Value))
|
||||||
|
|
||||||
|
if string(attr.Key) == banktypes.AttributeKeyRecipient {
|
||||||
|
if string(attr.Value) != receiver.String() {
|
||||||
|
continue event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if string(attr.Key) == banktypes.AttributeKeySender {
|
||||||
|
if string(attr.Value) != sender.String() {
|
||||||
|
continue event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if string(attr.Key) == sdk.AttributeKeyAmount {
|
||||||
|
amount, err := sdk.ParseCoinNormalized(string(attr.Value))
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
transfers = append(transfers, amount)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return transfers
|
||||||
|
}
|
65
tests/e2e/e2e_upgrade_incentive_test.go
Normal file
65
tests/e2e/e2e_upgrade_incentive_test.go
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
package e2e_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
|
||||||
|
"github.com/kava-labs/kava/tests/util"
|
||||||
|
incentivetypes "github.com/kava-labs/kava/x/incentive/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestUpgradeIncentiveParams() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
|
||||||
|
beforeUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight - 1)
|
||||||
|
afterUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight)
|
||||||
|
|
||||||
|
// Before params
|
||||||
|
incentiveParamsBefore, err := suite.Kava.Incentive.Params(
|
||||||
|
beforeUpgradeCtx,
|
||||||
|
&incentivetypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
incentiveParamsAfter, err := suite.Kava.Incentive.Params(
|
||||||
|
afterUpgradeCtx,
|
||||||
|
&incentivetypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
suite.Run("x/incentive parameters before upgrade", func() {
|
||||||
|
suite.Require().Len(
|
||||||
|
incentiveParamsBefore.Params.EarnRewardPeriods,
|
||||||
|
1,
|
||||||
|
"x/incentive should have 1 earn reward period before upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Require().Equal(
|
||||||
|
sdk.NewCoins(sdk.NewCoin("ukava", sdk.NewInt(159_459))),
|
||||||
|
incentiveParamsBefore.Params.EarnRewardPeriods[0].RewardsPerSecond,
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("x/incentive parameters after upgrade", func() {
|
||||||
|
suite.Require().Len(
|
||||||
|
incentiveParamsAfter.Params.EarnRewardPeriods,
|
||||||
|
1,
|
||||||
|
"x/incentive should have 1 earn reward period before upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Require().Equal(
|
||||||
|
// Manual calculation of
|
||||||
|
// 600,000 * 1000,000 / (365 * 24 * 60 * 60)
|
||||||
|
sdk.NewCoins(sdk.NewCoin("ukava", sdkmath.NewInt(19025))),
|
||||||
|
incentiveParamsAfter.Params.EarnRewardPeriods[0].RewardsPerSecond,
|
||||||
|
)
|
||||||
|
|
||||||
|
// No other changes
|
||||||
|
incentiveParamsAfter.Params.EarnRewardPeriods[0].RewardsPerSecond = incentiveParamsBefore.Params.EarnRewardPeriods[0].RewardsPerSecond
|
||||||
|
suite.Require().Equal(
|
||||||
|
incentiveParamsBefore,
|
||||||
|
incentiveParamsAfter,
|
||||||
|
"other param values should not be changed",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
474
tests/e2e/e2e_upgrade_inflation_test.go
Normal file
474
tests/e2e/e2e_upgrade_inflation_test.go
Normal file
@ -0,0 +1,474 @@
|
|||||||
|
package e2e_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
|
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
|
distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
|
||||||
|
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||||
|
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||||
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
|
coretypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||||
|
|
||||||
|
"github.com/kava-labs/kava/tests/util"
|
||||||
|
communitytypes "github.com/kava-labs/kava/x/community/types"
|
||||||
|
kavadisttypes "github.com/kava-labs/kava/x/kavadist/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestUpgradeInflation_Disable() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
|
||||||
|
afterUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight)
|
||||||
|
|
||||||
|
// Get x/community for switchover time
|
||||||
|
params, err := suite.Kava.Community.Params(afterUpgradeCtx, &communitytypes.QueryParamsRequest{})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// Sleep until switchover time + 6 seconds for extra block
|
||||||
|
sleepDuration := time.Until(params.Params.UpgradeTimeDisableInflation.Add(6 * time.Second))
|
||||||
|
time.Sleep(sleepDuration)
|
||||||
|
|
||||||
|
suite.Require().Eventually(func() bool {
|
||||||
|
communityParams, err := suite.Kava.Community.Params(afterUpgradeCtx, &communitytypes.QueryParamsRequest{})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// After params are set in x/community -- non-zero switchover time
|
||||||
|
return !communityParams.Params.UpgradeTimeDisableInflation.Equal(time.Time{})
|
||||||
|
}, 20*time.Second, 3*time.Second)
|
||||||
|
|
||||||
|
// Fetch exact block when inflation stop event emitted
|
||||||
|
// This is run after the switchover, so we don't need to poll
|
||||||
|
_, switchoverHeight, err := suite.Kava.GetBeginBlockEventsFromQuery(
|
||||||
|
context.Background(),
|
||||||
|
fmt.Sprintf(
|
||||||
|
"%s.%s EXISTS",
|
||||||
|
communitytypes.EventTypeInflationStop,
|
||||||
|
communitytypes.AttributeKeyInflationDisableTime,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().NotZero(switchoverHeight)
|
||||||
|
|
||||||
|
// 1 block before switchover
|
||||||
|
beforeSwitchoverCtx := util.CtxAtHeight(switchoverHeight - 1)
|
||||||
|
afterSwitchoverCtx := util.CtxAtHeight(switchoverHeight)
|
||||||
|
|
||||||
|
suite.Run("x/mint, x/kavadist inflation before switchover", func() {
|
||||||
|
mintParams, err := suite.Kava.Mint.Params(
|
||||||
|
beforeSwitchoverCtx,
|
||||||
|
&minttypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
kavaDistParams, err := suite.Kava.Kavadist.Params(
|
||||||
|
beforeSwitchoverCtx,
|
||||||
|
&kavadisttypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
// Use .String() to compare Decs since x/mint uses the deprecated one,
|
||||||
|
// mismatch of types but same value.
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyMustNewDecFromStr("0.595000000000000000").String(),
|
||||||
|
mintParams.Params.InflationMin.String(),
|
||||||
|
"x/mint inflation min should be 59.5%% before switchover",
|
||||||
|
)
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyMustNewDecFromStr("0.595000000000000000").String(),
|
||||||
|
mintParams.Params.InflationMax.String(),
|
||||||
|
"x/mint inflation max should be 59.5%% before switchover",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.True(
|
||||||
|
kavaDistParams.Params.Active,
|
||||||
|
"x/kavadist should be active before switchover",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("x/distribution community tax before switchover", func() {
|
||||||
|
distrParams, err := suite.Kava.Distribution.Params(
|
||||||
|
beforeSwitchoverCtx,
|
||||||
|
&distributiontypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyMustNewDecFromStr("0.949500000000000000").String(),
|
||||||
|
distrParams.Params.CommunityTax.String(),
|
||||||
|
"x/distribution community tax should be 94.95%% before switchover",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("x/mint, x/kavadist inflation after switchover", func() {
|
||||||
|
mintParams, err := suite.Kava.Mint.Params(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&minttypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
kavaDistParams, err := suite.Kava.Kavadist.Params(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&kavadisttypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyZeroDec().String(),
|
||||||
|
mintParams.Params.InflationMin.String(),
|
||||||
|
"x/mint inflation min should be 0% after switchover",
|
||||||
|
)
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyZeroDec().String(),
|
||||||
|
mintParams.Params.InflationMax.String(),
|
||||||
|
"x/mint inflation max should be 0% after switchover",
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.False(
|
||||||
|
kavaDistParams.Params.Active,
|
||||||
|
"x/kavadist should be inactive after switchover",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("x/distribution community tax after switchover", func() {
|
||||||
|
distrParams, err := suite.Kava.Distribution.Params(
|
||||||
|
afterSwitchoverCtx,
|
||||||
|
&distributiontypes.QueryParamsRequest{},
|
||||||
|
)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyZeroDec().String(),
|
||||||
|
distrParams.Params.CommunityTax.String(),
|
||||||
|
"x/distribution community tax should be 0%% before switchover",
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Ensure inflation was still active before switchover
|
||||||
|
suite.Run("positive mint events before switchover", func() {
|
||||||
|
// 1 block before switchover
|
||||||
|
queryHeight := switchoverHeight - 1
|
||||||
|
|
||||||
|
block, err := suite.Kava.TmSignClient.BlockResults(
|
||||||
|
context.Background(),
|
||||||
|
&queryHeight,
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// Mint events should only occur in begin block
|
||||||
|
mintEvents := util.FilterEventsByType(block.BeginBlockEvents, minttypes.EventTypeMint)
|
||||||
|
|
||||||
|
suite.Require().NotEmpty(mintEvents, "mint events should be emitted")
|
||||||
|
|
||||||
|
// Ensure mint amounts are non-zero
|
||||||
|
found := false
|
||||||
|
for _, event := range mintEvents {
|
||||||
|
for _, attribute := range event.Attributes {
|
||||||
|
// Bonded ratio and annual provisions unchecked
|
||||||
|
|
||||||
|
if string(attribute.Key) == minttypes.AttributeKeyInflation {
|
||||||
|
suite.Equal(
|
||||||
|
sdkmath.LegacyMustNewDecFromStr("0.595000000000000000").String(),
|
||||||
|
string(attribute.Value),
|
||||||
|
"inflation should be 59.5%% before switchover",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if string(attribute.Key) == sdk.AttributeKeyAmount {
|
||||||
|
found = true
|
||||||
|
// Parse as native go int, not necessary to use sdk.Int
|
||||||
|
value, err := strconv.Atoi(string(attribute.Value))
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
suite.NotZero(value, "mint amount should be non-zero")
|
||||||
|
suite.Positive(value, "mint amount should be positive")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suite.True(found, "mint amount should be found")
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("staking denom supply increases before switchover", func() {
|
||||||
|
queryHeight := switchoverHeight - 2
|
||||||
|
|
||||||
|
supply1, err := suite.Kava.Bank.SupplyOf(
|
||||||
|
util.CtxAtHeight(queryHeight),
|
||||||
|
&types.QuerySupplyOfRequest{
|
||||||
|
Denom: suite.Kava.StakingDenom,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
suite.NotZero(supply1.Amount, "ukava supply should be non-zero")
|
||||||
|
|
||||||
|
// Next block
|
||||||
|
queryHeight += 1
|
||||||
|
supply2, err := suite.Kava.Bank.SupplyOf(
|
||||||
|
util.CtxAtHeight(queryHeight),
|
||||||
|
&types.QuerySupplyOfRequest{
|
||||||
|
Denom: suite.Kava.StakingDenom,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
suite.NotZero(supply2.Amount, "ukava supply should be non-zero")
|
||||||
|
|
||||||
|
suite.Truef(
|
||||||
|
supply2.Amount.Amount.GT(supply1.Amount.Amount),
|
||||||
|
"ukava supply before switchover should increase between blocks, %s > %s",
|
||||||
|
supply2.Amount.Amount.String(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Check if inflation is ACTUALLY disabled... check if any coins are being
|
||||||
|
// minted in the blocks after switchover
|
||||||
|
suite.Run("no minting after switchover", func() {
|
||||||
|
kavaSupply := sdk.NewCoin(suite.Kava.StakingDenom, sdkmath.ZeroInt())
|
||||||
|
|
||||||
|
// Next 5 blocks after switchover, ensure there's actually no more inflation
|
||||||
|
for i := 0; i < 5; i++ {
|
||||||
|
queryHeight := switchoverHeight + int64(i)
|
||||||
|
|
||||||
|
suite.Run(
|
||||||
|
fmt.Sprintf("x/mint events with 0 amount @ height=%d", queryHeight),
|
||||||
|
func() {
|
||||||
|
var block *coretypes.ResultBlockResults
|
||||||
|
suite.Require().Eventually(func() bool {
|
||||||
|
// Check begin block events
|
||||||
|
block, err = suite.Kava.TmSignClient.BlockResults(
|
||||||
|
context.Background(),
|
||||||
|
&queryHeight,
|
||||||
|
)
|
||||||
|
|
||||||
|
return err == nil
|
||||||
|
}, 20*time.Second, 3*time.Second)
|
||||||
|
|
||||||
|
var mintEvents []abci.Event
|
||||||
|
|
||||||
|
// Mint events should only occur in begin block, but we just include
|
||||||
|
// everything else just in case anything changes in x/mint
|
||||||
|
mintEventsBegin := util.FilterEventsByType(block.BeginBlockEvents, minttypes.EventTypeMint)
|
||||||
|
mintEventsEnd := util.FilterEventsByType(block.EndBlockEvents, minttypes.EventTypeMint)
|
||||||
|
mintEventsTx := util.FilterTxEventsByType(block.TxsResults, minttypes.EventTypeMint)
|
||||||
|
|
||||||
|
mintEvents = append(mintEvents, mintEventsBegin...)
|
||||||
|
mintEvents = append(mintEvents, mintEventsEnd...)
|
||||||
|
mintEvents = append(mintEvents, mintEventsTx...)
|
||||||
|
|
||||||
|
suite.Require().NotEmpty(mintEvents, "mint events should still be emitted")
|
||||||
|
|
||||||
|
// Ensure mint amounts are 0
|
||||||
|
found := false
|
||||||
|
for _, event := range mintEvents {
|
||||||
|
for _, attribute := range event.Attributes {
|
||||||
|
// Bonded ratio and annual provisions unchecked
|
||||||
|
|
||||||
|
if string(attribute.Key) == minttypes.AttributeKeyInflation {
|
||||||
|
suite.Equal(sdkmath.LegacyZeroDec().String(), string(attribute.Value))
|
||||||
|
}
|
||||||
|
|
||||||
|
if string(attribute.Key) == sdk.AttributeKeyAmount {
|
||||||
|
found = true
|
||||||
|
suite.Equal(sdkmath.ZeroInt().String(), string(attribute.Value))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suite.True(found, "mint amount should be found")
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
// Run this after the events check, since that one waits for the
|
||||||
|
// new block if necessary
|
||||||
|
suite.Run(
|
||||||
|
fmt.Sprintf("total staking denom supply should not change @ height=%d", queryHeight),
|
||||||
|
func() {
|
||||||
|
supplyRes, err := suite.Kava.Bank.SupplyOf(
|
||||||
|
util.CtxAtHeight(queryHeight),
|
||||||
|
&types.QuerySupplyOfRequest{
|
||||||
|
Denom: suite.Kava.StakingDenom,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
if kavaSupply.IsZero() {
|
||||||
|
// First iteration, set supply
|
||||||
|
kavaSupply = supplyRes.Amount
|
||||||
|
} else {
|
||||||
|
suite.Require().Equal(
|
||||||
|
kavaSupply,
|
||||||
|
supplyRes.Amount,
|
||||||
|
"ukava supply should not change",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("no staking rewards from x/community before switchover", func() {
|
||||||
|
// 1 block before switchover
|
||||||
|
queryHeight := switchoverHeight - 1
|
||||||
|
|
||||||
|
block, err := suite.Kava.TmSignClient.BlockResults(
|
||||||
|
context.Background(),
|
||||||
|
&queryHeight,
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// Events are not emitted if amount is 0
|
||||||
|
stakingRewardEvents := util.FilterEventsByType(block.BeginBlockEvents, communitytypes.EventTypeStakingRewardsPaid)
|
||||||
|
suite.Require().Empty(stakingRewardEvents, "staking reward events should not be emitted")
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("staking rewards pay out from x/community after switchover", func() {
|
||||||
|
for i := 0; i < 5; i++ {
|
||||||
|
// after switchover
|
||||||
|
queryHeight := switchoverHeight + int64(i)
|
||||||
|
|
||||||
|
block, err := suite.Kava.TmSignClient.BlockResults(
|
||||||
|
context.Background(),
|
||||||
|
&queryHeight,
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
stakingRewardEvents := util.FilterEventsByType(
|
||||||
|
block.BeginBlockEvents,
|
||||||
|
communitytypes.EventTypeStakingRewardsPaid,
|
||||||
|
)
|
||||||
|
suite.Require().NotEmptyf(
|
||||||
|
stakingRewardEvents,
|
||||||
|
"staking reward events should be emitted at height=%d",
|
||||||
|
queryHeight,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Ensure amounts are non-zero
|
||||||
|
found := false
|
||||||
|
for _, attr := range stakingRewardEvents[0].Attributes {
|
||||||
|
if string(attr.Key) == communitytypes.AttributeKeyStakingRewardAmount {
|
||||||
|
coins, err := sdk.ParseCoinNormalized(string(attr.Value))
|
||||||
|
suite.Require().NoError(err, "staking reward amount should be parsable coins")
|
||||||
|
|
||||||
|
suite.Truef(
|
||||||
|
coins.Amount.IsPositive(),
|
||||||
|
"staking reward amount should be a positive amount at height=%d",
|
||||||
|
queryHeight,
|
||||||
|
)
|
||||||
|
found = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suite.Truef(
|
||||||
|
found,
|
||||||
|
"staking reward amount should be found in events at height=%d",
|
||||||
|
queryHeight,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Staking rewards can still be claimed
|
||||||
|
suite.Run("staking rewards claimable after switchover", func() {
|
||||||
|
suite.SkipIfKvtoolDisabled()
|
||||||
|
|
||||||
|
// Get the delegator of the only validator
|
||||||
|
validators, err := suite.Kava.Staking.Validators(
|
||||||
|
context.Background(),
|
||||||
|
&stakingtypes.QueryValidatorsRequest{},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().Positive(len(validators.Validators), "should only be at least 1 validator")
|
||||||
|
|
||||||
|
valAddr, err := sdk.ValAddressFromBech32(validators.Validators[0].OperatorAddress)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
accAddr := sdk.AccAddress(valAddr.Bytes())
|
||||||
|
|
||||||
|
balBefore, err := suite.Kava.Bank.Balance(
|
||||||
|
context.Background(),
|
||||||
|
&types.QueryBalanceRequest{
|
||||||
|
Address: accAddr.String(),
|
||||||
|
Denom: suite.Kava.StakingDenom,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().False(balBefore.Balance.IsZero(), "val staking denom balance should be non-zero")
|
||||||
|
|
||||||
|
delegationRewards, err := suite.Kava.Distribution.DelegationRewards(
|
||||||
|
context.Background(),
|
||||||
|
&distributiontypes.QueryDelegationRewardsRequest{
|
||||||
|
ValidatorAddress: valAddr.String(),
|
||||||
|
DelegatorAddress: accAddr.String(),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
suite.False(delegationRewards.Rewards.Empty())
|
||||||
|
suite.True(delegationRewards.Rewards.IsAllPositive(), "queried rewards should be positive")
|
||||||
|
|
||||||
|
withdrawRewardsMsg := distributiontypes.NewMsgWithdrawDelegatorReward(
|
||||||
|
accAddr,
|
||||||
|
valAddr,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Get the validator private key from kava keyring
|
||||||
|
key, err := suite.Kava.Keyring.(unsafeExporter).ExportPrivateKeyObject(
|
||||||
|
"validator",
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
acc := suite.Kava.AddNewSigningAccountFromPrivKey(
|
||||||
|
"validator",
|
||||||
|
key,
|
||||||
|
"",
|
||||||
|
suite.Kava.ChainID,
|
||||||
|
)
|
||||||
|
|
||||||
|
gasLimit := int64(2e5)
|
||||||
|
fee := ukava(200)
|
||||||
|
req := util.KavaMsgRequest{
|
||||||
|
Msgs: []sdk.Msg{withdrawRewardsMsg},
|
||||||
|
GasLimit: uint64(gasLimit),
|
||||||
|
FeeAmount: sdk.NewCoins(fee),
|
||||||
|
Memo: "give me my money",
|
||||||
|
}
|
||||||
|
res := acc.SignAndBroadcastKavaTx(req)
|
||||||
|
|
||||||
|
_, err = util.WaitForSdkTxCommit(suite.Kava.Tx, res.Result.TxHash, 6*time.Second)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
balAfter, err := suite.Kava.Bank.Balance(
|
||||||
|
context.Background(),
|
||||||
|
&types.QueryBalanceRequest{
|
||||||
|
Address: accAddr.String(),
|
||||||
|
Denom: suite.Kava.StakingDenom,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
suite.Require().False(balAfter.Balance.IsZero(), "val staking denom balance should be non-zero")
|
||||||
|
|
||||||
|
balIncrease := balAfter.Balance.
|
||||||
|
Sub(*balBefore.Balance).
|
||||||
|
Add(res.Tx.GetFee()[0]) // Add the fee back to balance to compare actual balances
|
||||||
|
|
||||||
|
queriedRewardsCoins, _ := delegationRewards.Rewards.TruncateDecimal()
|
||||||
|
|
||||||
|
suite.Require().Truef(
|
||||||
|
queriedRewardsCoins.AmountOf(suite.Kava.StakingDenom).
|
||||||
|
LTE(balIncrease.Amount),
|
||||||
|
"claimed rewards should be >= queried delegation rewards, got claimed %s vs queried %s",
|
||||||
|
balIncrease.Amount.String(),
|
||||||
|
queriedRewardsCoins.AmountOf(suite.Kava.StakingDenom).String(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// unsafeExporter is implemented by key stores that support unsafe export
|
||||||
|
// of private keys' material.
|
||||||
|
type unsafeExporter interface {
|
||||||
|
// ExportPrivateKeyObject returns a private key in unarmored format.
|
||||||
|
ExportPrivateKeyObject(uid string) (cryptotypes.PrivKey, error)
|
||||||
|
}
|
103
tests/e2e/e2e_upgrade_min_commission_test.go
Normal file
103
tests/e2e/e2e_upgrade_min_commission_test.go
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
package e2e_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
|
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||||
|
|
||||||
|
"github.com/kava-labs/kava/tests/util"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (suite *IntegrationTestSuite) TestValMinCommission() {
|
||||||
|
suite.SkipIfUpgradeDisabled()
|
||||||
|
|
||||||
|
beforeUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight - 1)
|
||||||
|
afterUpgradeCtx := util.CtxAtHeight(suite.UpgradeHeight)
|
||||||
|
|
||||||
|
suite.Run("before upgrade", func() {
|
||||||
|
// Before params
|
||||||
|
beforeParams, err := suite.Kava.Staking.Params(beforeUpgradeCtx, &types.QueryParamsRequest{})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
suite.Require().Equal(
|
||||||
|
sdkmath.LegacyZeroDec().String(),
|
||||||
|
beforeParams.Params.MinCommissionRate.String(),
|
||||||
|
"min commission rate should be 0%% before upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
// Before validators
|
||||||
|
beforeValidators, err := suite.Kava.Staking.Validators(beforeUpgradeCtx, &types.QueryValidatorsRequest{})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
for _, val := range beforeValidators.Validators {
|
||||||
|
// In kvtool gentx, the commission rate is set to 0, with max of 0.01
|
||||||
|
expectedRate := sdkmath.LegacyZeroDec()
|
||||||
|
expectedRateMax := sdkmath.LegacyMustNewDecFromStr("0.01")
|
||||||
|
|
||||||
|
suite.Require().Equalf(
|
||||||
|
expectedRate.String(),
|
||||||
|
val.Commission.CommissionRates.Rate.String(),
|
||||||
|
"validator %s should have commission rate of %s before upgrade",
|
||||||
|
val.OperatorAddress,
|
||||||
|
expectedRate,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Require().Equalf(
|
||||||
|
expectedRateMax.String(),
|
||||||
|
val.Commission.CommissionRates.MaxRate.String(),
|
||||||
|
"validator %s should have max commission rate of %s before upgrade",
|
||||||
|
val.OperatorAddress,
|
||||||
|
expectedRateMax,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
suite.Run("after upgrade", func() {
|
||||||
|
block, err := suite.Kava.Tm.GetBlockByHeight(context.Background(), &tmservice.GetBlockByHeightRequest{
|
||||||
|
Height: suite.UpgradeHeight,
|
||||||
|
})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
// After params
|
||||||
|
afterParams, err := suite.Kava.Staking.Params(afterUpgradeCtx, &types.QueryParamsRequest{})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
expectedMinRate := sdk.MustNewDecFromStr("0.05")
|
||||||
|
|
||||||
|
suite.Require().Equal(
|
||||||
|
expectedMinRate.String(),
|
||||||
|
afterParams.Params.MinCommissionRate.String(),
|
||||||
|
"min commission rate should be 5%% after upgrade",
|
||||||
|
)
|
||||||
|
|
||||||
|
// After validators
|
||||||
|
afterValidators, err := suite.Kava.Staking.Validators(afterUpgradeCtx, &types.QueryValidatorsRequest{})
|
||||||
|
suite.Require().NoError(err)
|
||||||
|
|
||||||
|
for _, val := range afterValidators.Validators {
|
||||||
|
|
||||||
|
suite.Require().Truef(
|
||||||
|
val.Commission.CommissionRates.Rate.GTE(expectedMinRate),
|
||||||
|
"validator %s should have commission rate of at least 5%%",
|
||||||
|
val.OperatorAddress,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Require().Truef(
|
||||||
|
val.Commission.CommissionRates.MaxRate.GTE(expectedMinRate),
|
||||||
|
"validator %s should have max commission rate of at least 5%%",
|
||||||
|
val.OperatorAddress,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite.Require().Truef(
|
||||||
|
val.Commission.UpdateTime.Equal(block.SdkBlock.Header.Time),
|
||||||
|
"validator %s should have commission update time set to block time, expected %s, got %s",
|
||||||
|
val.OperatorAddress,
|
||||||
|
block.SdkBlock.Header.Time,
|
||||||
|
val.Commission.UpdateTime,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
@ -14,6 +14,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
txtypes "github.com/cosmos/cosmos-sdk/types/tx"
|
txtypes "github.com/cosmos/cosmos-sdk/types/tx"
|
||||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
|
authz "github.com/cosmos/cosmos-sdk/x/authz"
|
||||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
|
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
|
||||||
govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
||||||
@ -39,6 +40,7 @@ import (
|
|||||||
communitytypes "github.com/kava-labs/kava/x/community/types"
|
communitytypes "github.com/kava-labs/kava/x/community/types"
|
||||||
earntypes "github.com/kava-labs/kava/x/earn/types"
|
earntypes "github.com/kava-labs/kava/x/earn/types"
|
||||||
evmutiltypes "github.com/kava-labs/kava/x/evmutil/types"
|
evmutiltypes "github.com/kava-labs/kava/x/evmutil/types"
|
||||||
|
incentivetypes "github.com/kava-labs/kava/x/incentive/types"
|
||||||
kavadisttypes "github.com/kava-labs/kava/x/kavadist/types"
|
kavadisttypes "github.com/kava-labs/kava/x/kavadist/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -58,11 +60,13 @@ type Chain struct {
|
|||||||
EncodingConfig kavaparams.EncodingConfig
|
EncodingConfig kavaparams.EncodingConfig
|
||||||
|
|
||||||
Auth authtypes.QueryClient
|
Auth authtypes.QueryClient
|
||||||
|
Authz authz.QueryClient
|
||||||
Bank banktypes.QueryClient
|
Bank banktypes.QueryClient
|
||||||
Cdp cdptypes.QueryClient
|
Cdp cdptypes.QueryClient
|
||||||
Committee committeetypes.QueryClient
|
Committee committeetypes.QueryClient
|
||||||
Community communitytypes.QueryClient
|
Community communitytypes.QueryClient
|
||||||
Distribution distrtypes.QueryClient
|
Distribution distrtypes.QueryClient
|
||||||
|
Incentive incentivetypes.QueryClient
|
||||||
Kavadist kavadisttypes.QueryClient
|
Kavadist kavadisttypes.QueryClient
|
||||||
Earn earntypes.QueryClient
|
Earn earntypes.QueryClient
|
||||||
Evm evmtypes.QueryClient
|
Evm evmtypes.QueryClient
|
||||||
@ -120,11 +124,13 @@ func NewChain(t *testing.T, details *runner.ChainDetails, fundedAccountMnemonic
|
|||||||
}
|
}
|
||||||
|
|
||||||
chain.Auth = authtypes.NewQueryClient(grpcConn)
|
chain.Auth = authtypes.NewQueryClient(grpcConn)
|
||||||
|
chain.Authz = authz.NewQueryClient(grpcConn)
|
||||||
chain.Bank = banktypes.NewQueryClient(grpcConn)
|
chain.Bank = banktypes.NewQueryClient(grpcConn)
|
||||||
chain.Cdp = cdptypes.NewQueryClient(grpcConn)
|
chain.Cdp = cdptypes.NewQueryClient(grpcConn)
|
||||||
chain.Committee = committeetypes.NewQueryClient(grpcConn)
|
chain.Committee = committeetypes.NewQueryClient(grpcConn)
|
||||||
chain.Community = communitytypes.NewQueryClient(grpcConn)
|
chain.Community = communitytypes.NewQueryClient(grpcConn)
|
||||||
chain.Distribution = distrtypes.NewQueryClient(grpcConn)
|
chain.Distribution = distrtypes.NewQueryClient(grpcConn)
|
||||||
|
chain.Incentive = incentivetypes.NewQueryClient(grpcConn)
|
||||||
chain.Kavadist = kavadisttypes.NewQueryClient(grpcConn)
|
chain.Kavadist = kavadisttypes.NewQueryClient(grpcConn)
|
||||||
chain.Earn = earntypes.NewQueryClient(grpcConn)
|
chain.Earn = earntypes.NewQueryClient(grpcConn)
|
||||||
chain.Evm = evmtypes.NewQueryClient(grpcConn)
|
chain.Evm = evmtypes.NewQueryClient(grpcConn)
|
||||||
@ -224,6 +230,21 @@ func (chain *Chain) QuerySdkForBalances(addr sdk.AccAddress) sdk.Coins {
|
|||||||
return res.Balances
|
return res.Balances
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QuerySdkForBalancesAtHeight gets the balance of a particular address on this Chain, at the specified height.
|
||||||
|
func (chain *Chain) QuerySdkForBalancesAtHeight(
|
||||||
|
height int64,
|
||||||
|
addr sdk.AccAddress,
|
||||||
|
) sdk.Coins {
|
||||||
|
res, err := chain.Bank.AllBalances(
|
||||||
|
util.CtxAtHeight(height),
|
||||||
|
&banktypes.QueryAllBalancesRequest{
|
||||||
|
Address: addr.String(),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
require.NoError(chain.t, err)
|
||||||
|
return res.Balances
|
||||||
|
}
|
||||||
|
|
||||||
// GetModuleBalances returns the balance of a requested module account
|
// GetModuleBalances returns the balance of a requested module account
|
||||||
func (chain *Chain) GetModuleBalances(moduleName string) sdk.Coins {
|
func (chain *Chain) GetModuleBalances(moduleName string) sdk.Coins {
|
||||||
addr := authtypes.NewModuleAddress(moduleName)
|
addr := authtypes.NewModuleAddress(moduleName)
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// ParseAddrFromHexOrBech32 parses a string address that can be either a hex or
|
// ParseAddrFromHexOrBech32 parses a string address that can be either a hex or
|
||||||
//Bech32 string.
|
// Bech32 string.
|
||||||
func ParseAddrFromHexOrBech32(addrString string) (common.Address, error) {
|
func ParseAddrFromHexOrBech32(addrString string) (common.Address, error) {
|
||||||
if common.IsHexAddress(addrString) {
|
if common.IsHexAddress(addrString) {
|
||||||
return common.HexToAddress(addrString), nil
|
return common.HexToAddress(addrString), nil
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
sdkmath "cosmossdk.io/math"
|
sdkmath "cosmossdk.io/math"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package kavadist
|
package kavadist
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
errorsmod "cosmossdk.io/errors"
|
|
||||||
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||||
|
|
||||||
"github.com/kava-labs/kava/x/kavadist/keeper"
|
"github.com/kava-labs/kava/x/kavadist/keeper"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package keeper
|
package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
errorsmod "cosmossdk.io/errors"
|
|
||||||
|
|
||||||
"github.com/kava-labs/kava/x/kavadist/types"
|
"github.com/kava-labs/kava/x/kavadist/types"
|
||||||
)
|
)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package keeper
|
package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
errorsmod "cosmossdk.io/errors"
|
|
||||||
|
|
||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
sdkmath "cosmossdk.io/math"
|
|
||||||
|
|
||||||
"github.com/kava-labs/kava/x/liquid/types"
|
"github.com/kava-labs/kava/x/liquid/types"
|
||||||
)
|
)
|
||||||
|
@ -5,12 +5,12 @@ import (
|
|||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
errorsmod "cosmossdk.io/errors"
|
|
||||||
"github.com/cosmos/cosmos-sdk/version"
|
"github.com/cosmos/cosmos-sdk/version"
|
||||||
|
|
||||||
"github.com/kava-labs/kava/x/router/types"
|
"github.com/kava-labs/kava/x/router/types"
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
errorsmod "cosmossdk.io/errors"
|
|
||||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||||
|
|
||||||
earntypes "github.com/kava-labs/kava/x/earn/types"
|
earntypes "github.com/kava-labs/kava/x/earn/types"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
errorsmod "cosmossdk.io/errors"
|
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
|
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"github.com/kava-labs/kava/x/swap/types"
|
"github.com/kava-labs/kava/x/swap/types"
|
||||||
"github.com/kava-labs/kava/x/swap/types/mocks"
|
"github.com/kava-labs/kava/x/swap/types/mocks"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
sdkmath "cosmossdk.io/math"
|
sdkmath "cosmossdk.io/math"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/stretchr/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
package mocks
|
package mocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
mock "github.com/stretchr/testify/mock"
|
|
||||||
math "cosmossdk.io/math"
|
math "cosmossdk.io/math"
|
||||||
|
mock "github.com/stretchr/testify/mock"
|
||||||
|
|
||||||
types "github.com/cosmos/cosmos-sdk/types"
|
types "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user