From ded06b09bfe92438f7d51a094909c8492bf670f9 Mon Sep 17 00:00:00 2001 From: keruch Date: Thu, 7 Nov 2024 14:03:09 +0100 Subject: [PATCH] migrations --- app/upgrades/v4/delayedack_params.go | 18 +++ app/upgrades/v4/dymns.go | 1 - app/upgrades/v4/dymns_params.go | 13 ++ app/upgrades/v4/old_rollapps.go | 17 --- app/upgrades/v4/upgrade.go | 15 +-- app/upgrades/v4/upgrade_test.go | 2 + .../dymension/eibc/demand_order.proto | 6 +- x/eibc/types/demand_order.go | 2 +- x/eibc/types/demand_order.pb.go | 119 ++++++++++++------ 9 files changed, 125 insertions(+), 68 deletions(-) create mode 100644 app/upgrades/v4/delayedack_params.go delete mode 100644 app/upgrades/v4/dymns.go create mode 100644 app/upgrades/v4/dymns_params.go diff --git a/app/upgrades/v4/delayedack_params.go b/app/upgrades/v4/delayedack_params.go new file mode 100644 index 000000000..81974ff55 --- /dev/null +++ b/app/upgrades/v4/delayedack_params.go @@ -0,0 +1,18 @@ +package v4 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + delayedackkeeper "github.com/dymensionxyz/dymension/v3/x/delayedack/keeper" + delayedacktypes "github.com/dymensionxyz/dymension/v3/x/delayedack/types" +) + +func migrateDelayedAckParams(ctx sdk.Context, delayedAckKeeper delayedackkeeper.Keeper) { + // overwrite params for rollapp module due to proto change + params := delayedacktypes.DefaultParams() + + // EpochIdentifier is the only one that hasn't changed + params.EpochIdentifier = delayedAckKeeper.GetParams(ctx).EpochIdentifier + + delayedAckKeeper.SetParams(ctx, params) +} diff --git a/app/upgrades/v4/dymns.go b/app/upgrades/v4/dymns.go deleted file mode 100644 index 97813e5c8..000000000 --- a/app/upgrades/v4/dymns.go +++ /dev/null @@ -1 +0,0 @@ -package v4 diff --git a/app/upgrades/v4/dymns_params.go b/app/upgrades/v4/dymns_params.go new file mode 100644 index 000000000..a7b5b113c --- /dev/null +++ b/app/upgrades/v4/dymns_params.go @@ -0,0 +1,13 @@ +package v4 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + dymnskeeper "github.com/dymensionxyz/dymension/v3/x/dymns/keeper" + dymnstypes "github.com/dymensionxyz/dymension/v3/x/dymns/types" +) + +func migrateDymnsParams(ctx sdk.Context, dk dymnskeeper.Keeper) error { + params := dymnstypes.DefaultParams() + return dk.SetParams(ctx, params) +} diff --git a/app/upgrades/v4/old_rollapps.go b/app/upgrades/v4/old_rollapps.go index b705aaf8a..6cbae4653 100644 --- a/app/upgrades/v4/old_rollapps.go +++ b/app/upgrades/v4/old_rollapps.go @@ -1,12 +1,8 @@ package v4 import ( - "fmt" - "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - rollappkeeper "github.com/dymensionxyz/dymension/v3/x/rollapp/keeper" rollapptypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" ) @@ -84,16 +80,3 @@ var ( "ibc/04E01477A69DF1E5EE99F85C15B66D68D23292275357CAA44B2E0527310A405E", // EVMOS } ) - -func validateOldRollappsAreInStore(ctx sdk.Context, rk *rollappkeeper.Keeper) error { - // validate old rollapps are in the store - _, found := rk.GetRollapp(ctx, nimRollappID) - if !found { - return fmt.Errorf("rollapp not found: %s", nimRollappID) - } - _, found = rk.GetRollapp(ctx, mandeRollappID) - if !found { - return fmt.Errorf("rollapp not found: %s", mandeRollappID) - } - return nil -} diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go index fd2fe74b1..2fcad9b66 100644 --- a/app/upgrades/v4/upgrade.go +++ b/app/upgrades/v4/upgrade.go @@ -49,11 +49,6 @@ func CreateUpgradeHandler( return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { logger := ctx.Logger().With("upgrade", UpgradeName) - // sanity check to re-ensure old rollapps are in the store - if err := validateOldRollappsAreInStore(ctx, keepers.RollappKeeper); err != nil { - return nil, err - } - LoadDeprecatedParamsSubspaces(keepers) migrateModuleParams(ctx, keepers) @@ -87,6 +82,10 @@ func CreateUpgradeHandler( return nil, err } + if err := migrateDymnsParams(ctx, keepers.DymNSKeeper); err != nil { + return nil, err + } + // Start running the module migrations logger.Debug("running module migrations ...") return mm.RunMigrations(ctx, configurator, fromVM) @@ -145,12 +144,6 @@ func LoadDeprecatedParamsSubspaces(keepers *keepers.AppKeepers) { } } -func migrateDelayedAckParams(ctx sdk.Context, delayedAckKeeper delayedackkeeper.Keeper) { - // overwrite params for delayedack module due to added parameters - params := delayedacktypes.DefaultParams() - delayedAckKeeper.SetParams(ctx, params) -} - // migrateRollappGauges creates a gauge for each rollapp in the store func migrateRollappGauges(ctx sdk.Context, rollappkeeper *rollappkeeper.Keeper, incentivizeKeeper *incentiveskeeper.Keeper) error { rollapps := rollappkeeper.GetAllRollapps(ctx) diff --git a/app/upgrades/v4/upgrade_test.go b/app/upgrades/v4/upgrade_test.go index 43037e9b9..85ab853e5 100644 --- a/app/upgrades/v4/upgrade_test.go +++ b/app/upgrades/v4/upgrade_test.go @@ -204,6 +204,8 @@ func (s *UpgradeTestSuite) validateRollappsMigration(numRoll int) error { s.Require().Equal(expectLivenessSlashInterval, s.App.RollappKeeper.GetParams(s.Ctx).LivenessSlashInterval) if !reflect.DeepEqual(rollapps, expectRollapps) { + s.T().Log("Expect rollapps", expectRollapps) + s.T().Log("Actual rollapps", rollapps) return fmt.Errorf("rollapps do not match") } return nil diff --git a/proto/dymensionxyz/dymension/eibc/demand_order.proto b/proto/dymensionxyz/dymension/eibc/demand_order.proto index 6be352769..493deea6d 100644 --- a/proto/dymensionxyz/dymension/eibc/demand_order.proto +++ b/proto/dymensionxyz/dymension/eibc/demand_order.proto @@ -26,7 +26,11 @@ message DemandOrder { (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; string recipient = 5; - reserved 6; + + // Deprecated: use DemandOrder.IsFulfilled method instead. + // Only used for backwards compatibility. + bool deprecated_is_fulfilled = 6 [deprecated = true]; + dymensionxyz.dymension.common.Status tracking_packet_status = 8; string rollapp_id = 9; common.RollappPacket.Type type = 10; diff --git a/x/eibc/types/demand_order.go b/x/eibc/types/demand_order.go index 7978bdfc1..26c22ecf6 100644 --- a/x/eibc/types/demand_order.go +++ b/x/eibc/types/demand_order.go @@ -161,7 +161,7 @@ func (m *DemandOrder) ValidateOrderIsOutstanding() error { } func (m *DemandOrder) IsFulfilled() bool { - return m.FulfillerAddress != "" + return m.FulfillerAddress != "" || m.DeprecatedIsFulfilled } // BuildDemandIDFromPacketKey returns a unique demand order id from the packet key. diff --git a/x/eibc/types/demand_order.pb.go b/x/eibc/types/demand_order.pb.go index 01db852f6..58ba61131 100644 --- a/x/eibc/types/demand_order.pb.go +++ b/x/eibc/types/demand_order.pb.go @@ -36,11 +36,14 @@ type DemandOrder struct { // price is the amount that the fulfiller sends to original eibc transfer recipient Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` // fee is the effective profit made by the fulfiller because they pay price and receive fee + price - Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` - Recipient string `protobuf:"bytes,5,opt,name=recipient,proto3" json:"recipient,omitempty"` - TrackingPacketStatus types1.Status `protobuf:"varint,8,opt,name=tracking_packet_status,json=trackingPacketStatus,proto3,enum=dymensionxyz.dymension.common.Status" json:"tracking_packet_status,omitempty"` - RollappId string `protobuf:"bytes,9,opt,name=rollapp_id,json=rollappId,proto3" json:"rollapp_id,omitempty"` - Type types1.RollappPacket_Type `protobuf:"varint,10,opt,name=type,proto3,enum=dymensionxyz.dymension.common.RollappPacket_Type" json:"type,omitempty"` + Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` + Recipient string `protobuf:"bytes,5,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Deprecated: use DemandOrder.IsFulfilled method instead. + // Only used for backwards compatibility. + DeprecatedIsFulfilled bool `protobuf:"varint,6,opt,name=deprecated_is_fulfilled,json=deprecatedIsFulfilled,proto3" json:"deprecated_is_fulfilled,omitempty"` // Deprecated: Do not use. + TrackingPacketStatus types1.Status `protobuf:"varint,8,opt,name=tracking_packet_status,json=trackingPacketStatus,proto3,enum=dymensionxyz.dymension.common.Status" json:"tracking_packet_status,omitempty"` + RollappId string `protobuf:"bytes,9,opt,name=rollapp_id,json=rollappId,proto3" json:"rollapp_id,omitempty"` + Type types1.RollappPacket_Type `protobuf:"varint,10,opt,name=type,proto3,enum=dymensionxyz.dymension.common.RollappPacket_Type" json:"type,omitempty"` // fulfiller_address is the bech32-encoded address of the account which fulfilled the order. FulfillerAddress string `protobuf:"bytes,11,opt,name=fulfiller_address,json=fulfillerAddress,proto3" json:"fulfiller_address,omitempty"` // creation_height is the height of the block when order was created. @@ -115,6 +118,14 @@ func (m *DemandOrder) GetRecipient() string { return "" } +// Deprecated: Do not use. +func (m *DemandOrder) GetDeprecatedIsFulfilled() bool { + if m != nil { + return m.DeprecatedIsFulfilled + } + return false +} + func (m *DemandOrder) GetTrackingPacketStatus() types1.Status { if m != nil { return m.TrackingPacketStatus @@ -159,38 +170,39 @@ func init() { } var fileDescriptor_2fc99140861fbacd = []byte{ - // 485 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x6d, 0xda, 0x6e, 0xac, 0x2e, 0x2a, 0x9b, 0x99, 0x50, 0x18, 0x90, 0x55, 0x48, 0x88, 0x0a, - 0x84, 0x4d, 0xbb, 0x2f, 0x60, 0x80, 0x04, 0xec, 0x01, 0x14, 0x78, 0x02, 0xa1, 0xca, 0xb5, 0x6f, - 0x5b, 0xab, 0x49, 0x1c, 0xd9, 0xee, 0xb4, 0xf0, 0x15, 0x7c, 0x07, 0x5f, 0xb2, 0x07, 0x1e, 0xf6, - 0xc8, 0x13, 0xa0, 0xf6, 0x47, 0x50, 0xec, 0x74, 0x1b, 0x48, 0x85, 0x17, 0x9e, 0x92, 0x9c, 0x7b, - 0xce, 0x3d, 0xbe, 0x3e, 0x37, 0x88, 0x88, 0x22, 0x85, 0xcc, 0x48, 0x95, 0x9d, 0x14, 0x9f, 0xe8, - 0xf9, 0x07, 0x05, 0x39, 0xe2, 0x54, 0x40, 0xca, 0x32, 0x31, 0x54, 0x5a, 0x80, 0x26, 0xb9, 0x56, - 0x56, 0xe1, 0x5b, 0x97, 0xf9, 0x17, 0x62, 0x52, 0xf2, 0xf7, 0x76, 0x27, 0x6a, 0xa2, 0x1c, 0x8f, - 0x96, 0x6f, 0x5e, 0xb2, 0xf7, 0x60, 0x8d, 0x05, 0x57, 0x69, 0xaa, 0x32, 0x6a, 0x2c, 0xb3, 0x73, - 0x53, 0x71, 0x07, 0x7f, 0xe7, 0x6a, 0x95, 0x24, 0x2c, 0xcf, 0x87, 0x39, 0xe3, 0x33, 0xb0, 0x95, - 0x26, 0xe2, 0xca, 0xa4, 0xca, 0xd0, 0x11, 0x33, 0x40, 0x8f, 0xfb, 0x23, 0xb0, 0xac, 0x4f, 0xb9, - 0x92, 0x99, 0xaf, 0xdf, 0xfd, 0xda, 0x44, 0xed, 0x67, 0x6e, 0x92, 0xd7, 0xe5, 0x20, 0xb8, 0x83, - 0xea, 0x52, 0x84, 0x41, 0x37, 0xe8, 0xb5, 0xe2, 0xba, 0x14, 0x98, 0xa0, 0xeb, 0x56, 0x33, 0x3e, - 0x93, 0xd9, 0xa4, 0x6a, 0x3c, 0x9c, 0x41, 0x11, 0xd6, 0x1d, 0x61, 0x67, 0x55, 0x7a, 0xe3, 0x2a, - 0x47, 0x50, 0x60, 0x86, 0x36, 0x72, 0x2d, 0x39, 0x84, 0x8d, 0x6e, 0xa3, 0xd7, 0x1e, 0xdc, 0x24, - 0xde, 0x9f, 0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, 0x73, 0x6b, 0x73, 0xfb, 0xca, 0xe1, 0xd1, 0xe9, 0x22, - 0x0a, 0xce, 0x16, 0x51, 0xf0, 0x73, 0x11, 0x05, 0x9f, 0x97, 0x51, 0xed, 0x6c, 0x19, 0xd5, 0xbe, - 0x2d, 0xa3, 0xda, 0xfb, 0xfe, 0xa5, 0x14, 0xd6, 0xec, 0xf1, 0xf1, 0x01, 0x3d, 0xf1, 0xff, 0x96, - 0x0b, 0x65, 0xb4, 0xe9, 0x56, 0xf4, 0xe0, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0c, 0xaf, - 0x6c, 0x87, 0x03, 0x00, 0x00, + // 512 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcf, 0x6f, 0xd3, 0x30, + 0x14, 0x6e, 0xba, 0x75, 0x5a, 0x5d, 0x54, 0x98, 0x19, 0x60, 0x06, 0x64, 0x15, 0x12, 0x22, 0x02, + 0xe1, 0xd0, 0xee, 0xc6, 0x8d, 0xf2, 0x43, 0x4c, 0x3b, 0x80, 0x02, 0x27, 0x10, 0x8a, 0x52, 0xfb, + 0xb5, 0xb5, 0xda, 0xc4, 0x91, 0xed, 0x4e, 0x0b, 0x47, 0xfe, 0x02, 0xfe, 0x0e, 0xfe, 0x92, 0x1d, + 0x77, 0xe4, 0x04, 0xa8, 0xfd, 0x47, 0x50, 0xec, 0x74, 0x1d, 0x48, 0x85, 0x0b, 0xa7, 0x24, 0xdf, + 0xfb, 0xbe, 0xf7, 0xf9, 0xf3, 0x7b, 0x41, 0x94, 0x17, 0x29, 0x64, 0x5a, 0xc8, 0xec, 0xa4, 0xf8, + 0x14, 0x9e, 0x7f, 0x84, 0x20, 0x06, 0x2c, 0xe4, 0x90, 0x26, 0x19, 0x8f, 0xa5, 0xe2, 0xa0, 0x68, + 0xae, 0xa4, 0x91, 0xf8, 0xd6, 0x45, 0xf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x6e, 0xcd, 0xf6, 0x1f, 0x1f, 0x84, 0x27, 0xee, 0x8f, 0xb4, 0xa3, 0x1c, 0x6c, 0xd9, + 0xc5, 0x3e, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x42, 0xcd, 0xcc, 0xbd, 0x03, 0x00, 0x00, } func (m *DemandOrder) Marshal() (dAtA []byte, err error) { @@ -242,6 +254,16 @@ func (m *DemandOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } + if m.DeprecatedIsFulfilled { + i-- + if m.DeprecatedIsFulfilled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } if len(m.Recipient) > 0 { i -= len(m.Recipient) copy(dAtA[i:], m.Recipient) @@ -335,6 +357,9 @@ func (m *DemandOrder) Size() (n int) { if l > 0 { n += 1 + l + sovDemandOrder(uint64(l)) } + if m.DeprecatedIsFulfilled { + n += 2 + } if m.TrackingPacketStatus != 0 { n += 1 + sovDemandOrder(uint64(m.TrackingPacketStatus)) } @@ -554,6 +579,26 @@ func (m *DemandOrder) Unmarshal(dAtA []byte) error { } m.Recipient = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedIsFulfilled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDemandOrder + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DeprecatedIsFulfilled = bool(v != 0) case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TrackingPacketStatus", wireType)