Skip to content

Commit

Permalink
Merge branch 'main' into ibc
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat authored Dec 4, 2024
2 parents 4903702 + c693e7f commit 19ebd6c
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 179 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ name: build

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"

- name: Build
run: go build -v ./...
- name: Build
run: go build -v ./...
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ name: test

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:

run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"

- name: Test
run: go test -v ./...

- name: Test Simulation Deterministic
run: make test-sim-deterministic

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Test Simulation Import/Export
run: make test-sim-import-export

- name: Test
run: go test -v ./...
- name: Test Simulation Multi Seed Short
run: make test-sim-multi-seed-short
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,12 @@ test-wasm:
###############################################################################

integration-test-all: init-test-framework \
test-alliance \

init-test-framework: clean-testing-data install
@echo "Initializing both blockchains..."
./scripts/tests/init-test-framework.sh
./scripts/tests/relayer/interchain-acc-config/rly-init.sh

test-alliance:
@echo "Testing alliance..."
./scripts/tests/alliance/delegate.sh

clean-testing-data:
@echo "Killing eved and removing previous data"
-@pkill $(BINARY) 2>/dev/null
Expand Down
51 changes: 13 additions & 38 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ import (
feemarketpost "github.com/skip-mev/feemarket/x/feemarket/post"
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"
"github.com/spf13/cast"
bank "github.com/terra-money/alliance/custom/bank"
bankkeeper "github.com/terra-money/alliance/custom/bank/keeper"
alliancemodule "github.com/terra-money/alliance/x/alliance"
alliancemodulekeeper "github.com/terra-money/alliance/x/alliance/keeper"
alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
Expand Down Expand Up @@ -122,6 +117,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/authz"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"
"github.com/cosmos/cosmos-sdk/x/bank"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/consensus"
consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
Expand Down Expand Up @@ -207,16 +204,14 @@ var maccPerms = map[string][]string{
govtypes.ModuleName: {authtypes.Burner},
nft.ModuleName: nil,
// non sdk modules
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
alliancemoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
alliancemoduletypes.RewardsPoolName: nil,
feeabstypes.ModuleName: nil,
feemarkettypes.ModuleName: {authtypes.Burner},
feemarkettypes.FeeCollectorName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: nil,
icatypes.ModuleName: nil,
wasmtypes.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
feeabstypes.ModuleName: nil,
feemarkettypes.ModuleName: {authtypes.Burner},
feemarkettypes.FeeCollectorName: {authtypes.Burner},
}

var (
Expand Down Expand Up @@ -266,7 +261,6 @@ type EveApp struct {
TransferKeeper ibctransferkeeper.Keeper
Wasm08Keeper wasm08keeper.Keeper
WasmKeeper wasmkeeper.Keeper
AllianceKeeper alliancemodulekeeper.Keeper

IBCHooksKeeper ibchookskeeper.Keeper

Expand Down Expand Up @@ -343,7 +337,6 @@ func NewEveApp(
wasm08types.StoreKey, wasmtypes.StoreKey, icahosttypes.StoreKey,
icacontrollertypes.StoreKey, tokenfactorytypes.StoreKey,
ibchookstypes.StoreKey,
alliancemoduletypes.StoreKey,
feeabstypes.StoreKey, feemarkettypes.StoreKey,
)

Expand Down Expand Up @@ -427,17 +420,6 @@ func NewEveApp(
authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()),
authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()),
)
app.AllianceKeeper = alliancemodulekeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[alliancemoduletypes.StoreKey]),
app.AccountKeeper,
app.BankKeeper,
&app.StakingKeeper,
app.DistrKeeper,
authtypes.FeeCollectorName,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
app.BankKeeper.RegisterKeepers(app.AllianceKeeper, app.StakingKeeper)

app.MintKeeper = mintkeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -483,7 +465,7 @@ func NewEveApp(
// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks(), app.AllianceKeeper.StakingHooks()),
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()),
)

app.CircuitKeeper = circuitkeeper.NewKeeper(
Expand Down Expand Up @@ -578,7 +560,7 @@ func NewEveApp(
// See: https://docs.cosmos.network/main/modules/gov#proposal-messages
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).AddRoute(alliancemoduletypes.RouterKey, alliancemodule.NewAllianceProposalHandler(app.AllianceKeeper)).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(feeabstypes.RouterKey, feeabsmodule.NewHostZoneProposal(app.FeeabsKeeper))

govConfig := govtypes.DefaultConfig()
Expand Down Expand Up @@ -663,7 +645,7 @@ func NewEveApp(
app.GetSubspace(feeabstypes.ModuleName),
&app.StakingKeeper,
app.AccountKeeper,
app.BankKeeper.BaseKeeper,
app.BankKeeper,
app.TransferKeeper,

Check failure on line 649 in app/app.go

View workflow job for this annotation

GitHub Actions / lint

cannot use app.TransferKeeper (variable of type "github.com/cosmos/ibc-go/v9/modules/apps/transfer/keeper".Keeper) as "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper".Keeper value in argument to feeabskeeper.NewKeeper (typecheck)
app.IBCKeeper.ChannelKeeper,

Check failure on line 650 in app/app.go

View workflow job for this annotation

GitHub Actions / lint

cannot use app.IBCKeeper.ChannelKeeper (variable of type *"github.com/cosmos/ibc-go/v9/modules/core/04-channel/keeper".Keeper) as "github.com/cosmos/ibc-go/v8/modules/core/04-channel/keeper".Keeper value in argument to feeabskeeper.NewKeeper (typecheck)
app.IBCKeeper.PortKeeper,
Expand Down Expand Up @@ -815,7 +797,6 @@ func NewEveApp(
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
ibctm.NewAppModule(),
ibchooks.NewAppModule(app.AccountKeeper),
alliancemodule.NewAppModule(appCodec, app.AllianceKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry, app.GetSubspace(alliancemoduletypes.ModuleName)),

// sdk
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them,
Expand All @@ -840,7 +821,6 @@ func NewEveApp(
feeabsmodule.UpdateSetHostZoneClientProposalHandler,
},
),
alliancemoduletypes.ModuleName: alliancemodule.AppModuleBasic{},
// wasm08types.ModuleName: wasm08.AppModuleBasic{},
// wasmtypes.ModuleName: wasm.AppModuleBasic{},
})
Expand Down Expand Up @@ -877,7 +857,6 @@ func NewEveApp(
wasm08types.ModuleName,
wasmtypes.ModuleName,
tokenfactorytypes.ModuleName,
alliancemoduletypes.ModuleName,
feeabstypes.ModuleName,
)

Expand All @@ -899,7 +878,6 @@ func NewEveApp(
wasm08types.ModuleName,
wasmtypes.ModuleName,
tokenfactorytypes.ModuleName,
alliancemoduletypes.ModuleName,
feeabstypes.ModuleName,
)

Expand Down Expand Up @@ -944,7 +922,6 @@ func NewEveApp(

wasmtypes.ModuleName,
tokenfactorytypes.ModuleName,
alliancemoduletypes.ModuleName,

feemarkettypes.ModuleName,
feeabstypes.ModuleName,
Expand Down Expand Up @@ -1327,7 +1304,6 @@ func BlockedAddresses() map[string]bool {

// allow the following addresses to receive funds
delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String())
delete(modAccAddrs, authtypes.NewModuleAddress(alliancemoduletypes.ModuleName).String())
delete(modAccAddrs, authtypes.NewModuleAddress(feeabstypes.ModuleName).String())

return modAccAddrs
Expand Down Expand Up @@ -1355,7 +1331,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable())
paramsKeeper.Subspace(tokenfactorytypes.ModuleName).WithKeyTable(tokenfactorytypes.ParamKeyTable())
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(alliancemoduletypes.ModuleName)
paramsKeeper.Subspace(feeabstypes.ModuleName)
paramsKeeper.Subspace(feemarkettypes.ModuleName)

Expand Down
15 changes: 15 additions & 0 deletions coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: true
reviews:
profile: "assertive"
request_changes_workflow: false
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: true
chat:
auto_reply: true
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
cosmossdk.io/core v0.11.1
cosmossdk.io/errors v1.0.1
cosmossdk.io/log v1.4.1
cosmossdk.io/math v1.3.0
cosmossdk.io/math v1.4.0
cosmossdk.io/store v1.1.1
cosmossdk.io/tools/confix v0.1.2
cosmossdk.io/x/circuit v0.1.1
Expand All @@ -53,7 +53,6 @@ require (
github.com/cosmos/ibc-go/v9 v9.0.1
github.com/osmosis-labs/tokenfactory v0.0.0-20240310155926-981fbeb0fe42
github.com/skip-mev/feemarket v1.1.1
github.com/terra-money/alliance v0.4.3
go.uber.org/mock v0.5.0
)

Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@ cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0=
cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U=
cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM=
cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU=
cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE=
cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k=
cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ=
cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk=
cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y=
cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM=
cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4=
Expand Down Expand Up @@ -1358,8 +1358,6 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E=
github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME=
github.com/terra-money/alliance v0.4.3 h1:vlTsGkXOO78T8SJHjSQshbiTw7WSdieybWMOYsWyTmY=
github.com/terra-money/alliance v0.4.3/go.mod h1:ljXUIs49+2gHHbNljOoLrIaYV+1QHthS3vdtA7hODe0=
github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
Expand Down
Loading

0 comments on commit 19ebd6c

Please sign in to comment.