Skip to content

Commit

Permalink
feat(evmstaking): use deterministic cosmos sdk (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezreal1997 authored and leeren committed Oct 16, 2024
1 parent c68f430 commit 441265b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/x/evmengine/keeper/abci_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestKeeper_PrepareProposal(t *testing.T) {

msgDelegate := stypes.NewMsgDelegate(
"delAddr", "valAddr", sdk.NewInt64Coin("stake", 100),
stypes.FlexibleDelegationID, stypes.PeriodType_FLEXIBLE,
stypes.FlexiblePeriodDelegationID, stypes.PeriodType_FLEXIBLE,
)
resp.Txs[0] = appendMsgToTx(t, txConfig, resp.Txs[0], msgDelegate)

Expand Down Expand Up @@ -611,7 +611,7 @@ func (m mockVEProvider) PrepareVotes(_ context.Context, _ abci.ExtendedCommitInf
coin := sdk.NewInt64Coin("stake", 100)
msg := stypes.NewMsgDelegate(
"addr", "addr", coin,
stypes.FlexibleDelegationID, stypes.PeriodType_FLEXIBLE,
stypes.FlexiblePeriodDelegationID, stypes.PeriodType_FLEXIBLE,
)

return []sdk.Msg{msg}, nil
Expand Down
2 changes: 0 additions & 2 deletions client/x/evmstaking/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ func (s *TestSuite) SetupTest() {
)
s.StakingKeeper = stakingKeeper
s.Require().NoError(s.StakingKeeper.SetParams(s.Ctx, stypes.DefaultParams()))
s.Require().NoError(s.StakingKeeper.SetPeriods(s.Ctx, stypes.DefaultPeriods()))
s.Require().NoError(s.StakingKeeper.SetTokenTypes(s.Ctx, stypes.DefaultTokenTypes()))

// emvstaking keeper
ethCl, err := ethclient.NewEngineMock(evmstakingKey)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ replace (
cosmossdk.io/core v0.12.0 => cosmossdk.io/core v0.11.0

// Direct cosmos-sdk branch link: https://github.com/piplabs/cosmos-sdk/tree/story/v0.50.7, current branch: story/v0.50.7
github.com/cosmos/cosmos-sdk => github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.2
github.com/cosmos/cosmos-sdk => github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.3

// See https://github.com/cosmos/cosmos-sdk/pull/14952
// Also https://github.com/cosmos/cosmos-db/blob/main/go.mod#L11-L12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1032,8 +1032,8 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.2 h1:rMTK83IzPrNxeW5ClwYYd21pUPjwTg6rePeeCb3cK6k=
github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.2/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s=
github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.3 h1:psxK/SkuqErPFobiYxuqSgW3gPw/xhDlTWQ36X5dhaU=
github.com/piplabs/cosmos-sdk v0.50.7-piplabs-v0.3/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
Expand Down

0 comments on commit 441265b

Please sign in to comment.