Skip to content

Commit

Permalink
ibc v7 -> v8
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed Sep 16, 2023
1 parent 8332a52 commit 49b970a
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 168 deletions.
309 changes: 161 additions & 148 deletions app/sovereign/app.go

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions app/sovereign/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package app

import (
"encoding/json"

"github.com/cosmos/cosmos-sdk/codec"
)

// The genesis state of the blockchain is represented here as a map of raw json
Expand All @@ -14,8 +12,3 @@ import (
// the ModuleBasicManager which populates json from each BasicModule
// object provided to it during init.
type GenesisState map[string]json.RawMessage

// NewDefaultGenesisState generates the default state for the application.
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState {
return ModuleBasics.DefaultGenesis(cdc)
}
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/storage v1.31.0 // indirect
cosmossdk.io/api v0.7.1
cosmossdk.io/core v0.12.0 // indirect
cosmossdk.io/core v0.12.0
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/tools/rosetta v0.2.1
filippo.io/edwards25519 v1.0.0 // indirect
Expand Down Expand Up @@ -158,10 +158,13 @@ require (
)

require (
cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508
cosmossdk.io/log v1.2.1
cosmossdk.io/store v1.0.0-rc.0
cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508
cosmossdk.io/x/evidence v0.0.0-20230913185058-9b5a203d35bc
cosmossdk.io/x/feegrant v0.0.0-20230913185058-9b5a203d35bc
cosmossdk.io/x/tx v0.10.0
cosmossdk.io/x/upgrade v0.0.0-20230915075604-076dc1ee9619
github.com/cosmos/cosmos-db v1.0.0
github.com/cosmos/ibc-go/modules/capability v1.0.0-rc5
Expand All @@ -171,10 +174,7 @@ require (
)

require (
cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508 // indirect
cosmossdk.io/x/tx v0.10.0 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/bits-and-blooms/bitset v1.8.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions tests/difference/core/driver/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func (s *CoreSuite) consAddr(i int64) sdk.ConsAddress {

// isJailed returns the jail status of validator with id (ix) i
func (s *CoreSuite) isJailed(i int64) bool {
val, found := s.providerStakingKeeper().GetValidator(s.ctx(P), s.validator(i))
s.Require().Truef(found, "GetValidator() -> !found")
val, err := s.providerStakingKeeper().GetValidator(s.ctx(P), s.validator(i))
s.Require().NoError(err)
return val.IsJailed()
}

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/democracy.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ func (s *ConsumerDemocracyTestSuite) TestDemocracyRewardsDistribution() {
providerDifference.Add(distrModuleDifference)).MustFloat64(),
sdkmath.LegacyNewDec(1).Sub(consumerRedistributionFraction).MustFloat64(), float64(0.0001))

totalRepresentativePower := stakingKeeper.GetValidatorSet().TotalBondedTokens(s.consumerCtx())
totalRepresentativePower, err := stakingKeeper.GetValidatorSet().TotalBondedTokens(s.consumerCtx())
s.Require().NoError(err)

// check that each representative has gotten the correct amount of rewards
for key, representativeTokens := range representativesTokens {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *CCVTestSuite) TestRewardsDistribution() {

// check that the fee pool has the expected amount of coins
communityCoins := s.providerApp.GetTestDistributionKeeper().GetFeePoolCommunityCoins(s.providerCtx())
s.Require().True(communityCoins[ibcCoinIndex].Amount.Equal(sdkmath.LegacyNewDecCoinFromCoin(providerExpectedRewards[0]).Amount))
s.Require().True(communityCoins[ibcCoinIndex].Amount.Equal(sdk.NewDecCoinFromCoin(providerExpectedRewards[0]).Amount))
}

// TestSendRewardsRetries tests that failed reward transmissions are retried every BlocksPerDistributionTransmission blocks
Expand Down
6 changes: 3 additions & 3 deletions x/ccv/provider/types/provider.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions x/ccv/types/shared_consumer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 49b970a

Please sign in to comment.