Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theta main #1356

Merged
merged 9 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- name: Install runsim
run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v2.1.7
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- name: Install runsim
run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v2.1.7
Expand All @@ -33,7 +33,7 @@ jobs:
# - uses: actions/checkout@v2.4.0
# - uses: actions/setup-go@v2.1.5
# with:
# go-version: 1.16
# go-version: 1.17
# - uses: technote-space/get-diff-action@v5.0.2
# with:
# PATTERNS: |
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions/checkout@v2.4.0
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- uses: actions/cache@v2.1.7
with:
path: ~/go/bin
Expand All @@ -80,7 +80,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2.4.0
- uses: technote-space/get-diff-action@v5.0.2
with:
Expand All @@ -105,7 +105,7 @@ jobs:
- uses: actions/checkout@v2.4.0
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- uses: technote-space/get-diff-action@v5.0.2
with:
PATTERNS: |
Expand All @@ -130,7 +130,7 @@ jobs:
- uses: actions/checkout@v2.4.0
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- uses: technote-space/get-diff-action@v5.0.2
with:
PATTERNS: |
Expand All @@ -144,4 +144,4 @@ jobs:
- name: test liveness
run: |
./contrib/localnet-blocks-test.sh 100 5 50 localhost
if: "env.GIT_DIFF != ''"
if: "env.GIT_DIFF != ''"
29 changes: 26 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.5
with:
go-version: 1.16
go-version: 1.17
- uses: actions/checkout@v2.4.0
- uses: technote-space/get-diff-action@v5.0.2
with:
Expand All @@ -31,7 +31,7 @@ jobs:
make build
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
make test-unit-cover
if: "env.GIT_DIFF != ''"
- name: filter out DONTCOVER
run: |
Expand All @@ -48,4 +48,27 @@ jobs:
with:
file: ./coverage.txt # optional
fail_ci_if_error: true
if: "env.GIT_DIFF != ''"
if: "env.GIT_DIFF != ''"

test-e2e:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/setup-go@v2.2.0
with:
go-version: 1.17
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Build Docker Image
run: |
make docker-build-debug
if: env.GIT_DIFF
- name: Test E2E
run: |
make test-e2e
if: env.GIT_DIFF
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run:
tests: false
# # timeout for analysis, e.g. 30s, 5m, default is 1m
# timeout: 5m
skip-dirs:
- tests/e2e

linters:
disable-all: true
Expand Down
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [7.0.0-rc0] - 2022-03-16
- (gaia) bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.45.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.1). See [CHANGELOG.md](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md#v0451---2022-02-03) for details.
- (gaia) bump [ibc-go](https://github.com/cosmos/ibc-go) module to [v3.0.0](https://github.com/cosmos/ibc-go/releases/tag/v3.0.0). See [CHANGELOG.md](https://github.com/cosmos/ibc-go/blob/v3.0.0/CHANGELOG.md#v300---2022-03-15) for details.
- (gaia) add [interhcian account](https://github.com/cosmos/ibc-go/tree/main/modules/apps/27-interchain-accounts) module (interhchain-account module is part of ibc-go module).
- (gaia) bump [liquidity](github.com/gravity-devs/liquidity/x/liquidity) module to [v1.5.0](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.5.0). See [CHANGELOG.md](https://github.com/Gravity-Devs/liquidity/blob/v1.5.0/CHANGELOG.md#v150---20220223) for details.
- (gaia) add [interchain account](https://github.com/cosmos/ibc-go/tree/main/modules/apps/27-interchain-accounts) module (interhchain-account module is part of ibc-go module).
- (gaia) bump [liquidity](https://github.com/gravity-devs/liquidity) module to [v1.5.0](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.5.0). See [CHANGELOG.md](https://github.com/Gravity-Devs/liquidity/blob/v1.5.0/CHANGELOG.md#v150---20220223) for details.
- (gaia) bump [packet-forward-middleware](https://github.com/strangelove-ventures/packet-forward-middleware) module to [v2.1.1](https://github.com/strangelove-ventures/packet-forward-middleware/releases/tag/v2.1.1).
- (gaia) add migration logs for upgrade process.

Expand Down Expand Up @@ -78,6 +78,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (gaia) This release includes a new AnteHandler that rejects redundant IBC transactions to save relayers fees.

## [v5.0.8] - 2021-10-14

* (gaia) This release includes a new AnteHandler that rejects redundant IBC transactions to save relayers fees.

## [v5.0.7] - 2021-09-30

* (gaia) Bump Cosmos SDK to 0.42.10
Expand Down Expand Up @@ -411,8 +415,7 @@ See the [Tendermint v0.34.7 SDK changelog](https://github.com/tendermint/tenderm

<!-- Release links -->

[Unreleased]: https://github.com/cosmos/gaia/compare/v7.0.0-rc1...HEAD
[7.0.0-rc0]: https://github.com/cosmos/gaia/releases/tag/v7.0.0-rc0
[Unreleased]: https://github.com/cosmos/gaia/compare/v7.0.0-rc0...HEAD
[v6.0.4]: https://github.com/cosmos/gaia/releases/tag/v6.0.4
[v6.0.3]: https://github.com/cosmos/gaia/releases/tag/v6.0.3
[v6.0.2]: https://github.com/cosmos/gaia/releases/tag/v6.0.2
Expand Down
46 changes: 31 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,39 @@ sync-docs:

include sims.mk

test: test-unit test-build

test-all: check test-race test-cover

test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./...

test-race:
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./...
PACKAGES_UNIT=$(shell go list ./... | grep -v -e '/tests/e2e')
PACKAGES_E2E=$(shell go list ./... | grep '/e2e')
TEST_PACKAGES=./...
TEST_TARGETS := test-unit test-unit-cover test-race test-e2e

test-unit: ARGS=-timeout=5m -tags='norace'
test-unit: TEST_PACKAGES=$(PACKAGES_UNIT)
test-unit-cover: ARGS=-timeout=5m -tags='norace' -coverprofile=coverage.txt -covermode=atomic
test-unit-cover: TEST_PACKAGES=$(PACKAGES_UNIT)
test-race: ARGS=-timeout=5m -race
test-race: TEST_PACKAGES=$(PACKAGES_UNIT)
test-e2e: ARGS=-timeout=25m -v
test-e2e: TEST_PACKAGES=$(PACKAGES_E2E)
$(TEST_TARGETS): run-tests

run-tests:
ifneq (,$(shell which tparse 2>/dev/null))
@echo "--> Running tests"
@go test -mod=readonly -json $(ARGS) $(TEST_PACKAGES) | tparse
else
@echo "--> Running tests"
@go test -mod=readonly $(ARGS) $(TEST_PACKAGES)
endif

test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...
.PHONY: run-tests $(TEST_TARGETS)

benchmark:
@go test -mod=readonly -bench=. ./...
docker-build-debug:
@docker build -t cosmos/gaiad-e2e --build-arg IMG_TAG=debug -f e2e.Dockerfile .

# TODO: Push this to the Cosmos Dockerhub so we don't have to keep building it
# in CI.
docker-build-hermes:
@cd tests/e2e/docker; docker build -t cosmos/hermes-e2e:latest -f hermes.Dockerfile .

###############################################################################
### Linting ###
Expand Down Expand Up @@ -229,7 +246,6 @@ test-docker-push: test-docker
.PHONY: all build-linux install format lint \
go-mod-cache draw-deps clean build \
setup-transactions setup-contract-tests-data start-gaia run-lcd-contract-tests contract-tests \
test test-all test-build test-cover test-unit test-race \
benchmark \
build-docker-gaiadnode localnet-start localnet-stop \
docker-single-node
docker-single-node docker-build-debug docker-build-hermes
55 changes: 26 additions & 29 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ import (
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
)

const appName = "GaiaApp"
const upgradeName = "v7-Theta"

var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
Expand Down Expand Up @@ -637,32 +634,32 @@ func NewGaiaApp(
hostParams := icahosttypes.Params{
HostEnabled: true,
AllowMessages: []string{
"/cosmos.authz.v1beta1.MsgExec",
"/cosmos.authz.v1beta1.MsgGrant",
"/cosmos.authz.v1beta1.MsgRevoke",
"/cosmos.bank.v1beta1.MsgSend",
"/cosmos.bank.v1beta1.MsgMultiSend",
"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
"/cosmos.distribution.v1beta1.MsgFundCommunityPool",
"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
"/cosmos.feegrant.v1beta1.MsgGrantAllowance",
"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",
"/cosmos.gov.v1beta1.MsgVoteWeighted",
"/cosmos.gov.v1beta1.MsgSubmitProposal",
"/cosmos.gov.v1beta1.MsgDeposit",
"/cosmos.gov.v1beta1.MsgVote",
"/cosmos.staking.v1beta1.MsgEditValidator",
"/cosmos.staking.v1beta1.MsgDelegate",
"/cosmos.staking.v1beta1.MsgUndelegate",
"/cosmos.staking.v1beta1.MsgBeginRedelegate",
"/cosmos.staking.v1beta1.MsgCreateValidator",
"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",
"/ibc.applications.transfer.v1.MsgTransfer",
"/tendermint.liquidity.v1beta1.MsgCreatePool",
"/tendermint.liquidity.v1beta1.MsgSwapWithinBatch",
"/tendermint.liquidity.v1beta1.MsgDepositWithinBatch",
"/tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch",
authzMsgExec,
authzMsgGrant,
authzMsgRevoke,
bankMsgSend,
bankMsgMultiSend,
distrMsgSetWithdrawAddr,
distrMsgWithdrawValidatorCommission,
distrMsgFundCommunityPool,
distrMsgWithdrawDelegatorReward,
feegrantMsgGrantAllowance,
feegrantMsgRevokeAllowance,
govMsgVoteWeighted,
govMsgSubmitProposal,
govMsgDeposit,
govMsgVote,
stakingMsgEditValidator,
stakingMsgDelegate,
stakingMsgUndelegate,
stakingMsgBeginRedelegate,
stakingMsgCreateValidator,
vestingMsgCreateVestingAccount,
transferMsgTransfer,
liquidityMsgCreatePool,
liquidityMsgSwapWithinBatch,
liquidityMsgDepositWithinBatch,
liquidityMsgWithdrawWithinBatch,
},
}

Expand Down
33 changes: 33 additions & 0 deletions app/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package gaia

const (
appName = "GaiaApp"
upgradeName = "v7-Theta"

authzMsgExec = "/cosmos.authz.v1beta1.MsgExec"
authzMsgGrant = "/cosmos.authz.v1beta1.MsgGrant"
authzMsgRevoke = "/cosmos.authz.v1beta1.MsgRevoke"
bankMsgSend = "/cosmos.bank.v1beta1.MsgSend"
bankMsgMultiSend = "/cosmos.bank.v1beta1.MsgMultiSend"
distrMsgSetWithdrawAddr = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress"
distrMsgWithdrawValidatorCommission = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"
distrMsgFundCommunityPool = "/cosmos.distribution.v1beta1.MsgFundCommunityPool"
distrMsgWithdrawDelegatorReward = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"
feegrantMsgGrantAllowance = "/cosmos.feegrant.v1beta1.MsgGrantAllowance"
feegrantMsgRevokeAllowance = "/cosmos.feegrant.v1beta1.MsgRevokeAllowance"
govMsgVoteWeighted = "/cosmos.gov.v1beta1.MsgVoteWeighted"
govMsgSubmitProposal = "/cosmos.gov.v1beta1.MsgSubmitProposal"
govMsgDeposit = "/cosmos.gov.v1beta1.MsgDeposit"
govMsgVote = "/cosmos.gov.v1beta1.MsgVote"
stakingMsgEditValidator = "/cosmos.staking.v1beta1.MsgEditValidator"
stakingMsgDelegate = "/cosmos.staking.v1beta1.MsgDelegate"
stakingMsgUndelegate = "/cosmos.staking.v1beta1.MsgUndelegate"
stakingMsgBeginRedelegate = "/cosmos.staking.v1beta1.MsgBeginRedelegate"
stakingMsgCreateValidator = "/cosmos.staking.v1beta1.MsgCreateValidator"
vestingMsgCreateVestingAccount = "/cosmos.vesting.v1beta1.MsgCreateVestingAccount"
transferMsgTransfer = "/ibc.applications.transfer.v1.MsgTransfer"
liquidityMsgCreatePool = "/tendermint.liquidity.v1beta1.MsgCreatePool"
liquidityMsgSwapWithinBatch = "/tendermint.liquidity.v1beta1.MsgSwapWithinBatch"
liquidityMsgDepositWithinBatch = "/tendermint.liquidity.v1beta1.MsgDepositWithinBatch"
liquidityMsgWithdrawWithinBatch = "/tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch"
)
Loading