Skip to content

Commit

Permalink
deps&rebase: use cosmos-sdk v0.45.16-lsm-ics
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Jul 7, 2023
1 parent 1016c69 commit 52463f4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
23 changes: 11 additions & 12 deletions app/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,19 @@ func genesisStateWithValSet(t *testing.T,
pkAny, err := codectypes.NewAnyWithValue(pk)
require.NoError(t, err)
validator := stakingtypes.Validator{
OperatorAddress: sdk.ValAddress(val.Address).String(),
ConsensusPubkey: pkAny,
Jailed: false,
Status: stakingtypes.Bonded,
Tokens: bondAmt,
DelegatorShares: sdk.OneDec(),
Description: stakingtypes.Description{},
UnbondingHeight: int64(0),
UnbondingTime: time.Unix(0, 0).UTC(),
Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
MinSelfDelegation: sdk.ZeroInt(),
OperatorAddress: sdk.ValAddress(val.Address).String(),
ConsensusPubkey: pkAny,
Jailed: false,
Status: stakingtypes.Bonded,
Tokens: bondAmt,
DelegatorShares: sdk.OneDec(),
Description: stakingtypes.Description{},
UnbondingHeight: int64(0),
UnbondingTime: time.Unix(0, 0).UTC(),
Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
}
validators = append(validators, validator)
delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()))
delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec(), true))

}
// set validators and delegations
Expand Down
1 change: 0 additions & 1 deletion cmd/gaiad/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ func InitTestnet(
sdk.NewCoin(sdk.DefaultBondDenom, valTokens),
stakingtypes.NewDescription(nodeDirName, "", "", "", ""),
stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()),
sdk.OneInt(),
)
if err != nil {
return err
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ require (
replace (
// Use cosmos keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0

// NOTE: @MSalopek test ics-lsm implementations
github.com/cosmos/cosmos-sdk => github.com/iqlusioninc/cosmos-sdk v0.34.4-0.20230628024121-1b4d7e811a43
github.com/cosmos/interchain-security/v2 => github.com/cosmos/interchain-security/v2 v2.0.1-0.20230707094121-790feda27368

// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ github.com/cosmos/iavl v0.19.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY=
github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw=
github.com/cosmos/ibc-go/v4 v4.4.2 h1:PG4Yy0/bw6Hvmha3RZbc53KYzaCwuB07Ot4GLyzcBvo=
github.com/cosmos/ibc-go/v4 v4.4.2/go.mod h1:j/kD2JCIaV5ozvJvaEkWhLxM2zva7/KTM++EtKFYcB8=
github.com/cosmos/interchain-security/v2 v2.0.0 h1:FQeU+9hYrK+XF4bRfiFgn+h7JJoM71KQKpeKYNxpjA4=
github.com/cosmos/interchain-security/v2 v2.0.0/go.mod h1:3AHbp93smkSJFX6PW9OfYDJtU1i/Ty0yv/FVbF2dO20=
github.com/cosmos/interchain-security/v2 v2.0.1-0.20230707094121-790feda27368 h1:Elxq9qx9HMQFDSRB9C/ATPuPA6JXbMTq1qlfMsStlik=
github.com/cosmos/interchain-security/v2 v2.0.1-0.20230707094121-790feda27368/go.mod h1:sfU+zaMOUKUs2z2XD50xXnPLrR0UZgQp81UAvtnrPWM=
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA=
Expand Down
4 changes: 0 additions & 4 deletions tests/e2e/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,6 @@ func (v *validator) buildCreateValidatorMsg(amount sdk.Coin) (sdk.Msg, error) {
MaxChangeRate: sdk.MustNewDecFromStr("0.01"),
}

// get the initial validator min self delegation
minSelfDelegation := sdk.OneInt()

valPubKey, err := cryptocodec.FromTmPubKeyInterface(v.consensusKey.PubKey)
if err != nil {
return nil, err
Expand All @@ -241,7 +238,6 @@ func (v *validator) buildCreateValidatorMsg(amount sdk.Coin) (sdk.Msg, error) {
amount,
description,
commissionRates,
minSelfDelegation,
)
}

Expand Down

0 comments on commit 52463f4

Please sign in to comment.