diff --git a/app/upgrade.go b/app/upgrade.go index ec66e42c1..e0c24f7f4 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -4,6 +4,7 @@ import ( serverconfig "github.com/cosmos/cosmos-sdk/server/config" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/x/gashub/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" bridgemoduletypes "github.com/bnb-chain/greenfield/x/bridge/types" @@ -91,7 +92,6 @@ func (app *App) registerPampasUpgradeHandler() { app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.storage.MsgMigrateBucket") app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.storage.MsgCancelMigrateBucket") app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.storage.MsgCompleteMigrateBucket") - return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) @@ -112,6 +112,15 @@ func (app *App) registerEddystoneUpgradeHandler() { func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { app.Logger().Info("upgrade to ", plan.Name) + // + app.GashubKeeper.SetMsgGasParams(ctx, *types.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgReserveSwapIn", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *types.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCancelSwapIn", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *types.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteSwapIn", 1.2e3)) + + app.GashubKeeper.SetMsgGasParams(ctx, *types.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderForceExit", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *types.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderExit", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *types.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteStorageProviderExit", 1.2e3)) + return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index 50fa8d1f4..b1d576d6e 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -277,6 +277,7 @@ func (s *BaseSuite) SendTxBlockWithExpectErrorString(msg sdk.Msg, from keys.KeyM _, err := s.Client.BroadcastTx(context.Background(), []sdk.Msg{msg}, txOpt) s.T().Logf("tx failed, err: %v, expect error string: %s", err, expectErrorString) s.Require().Error(err) + fmt.Println(err.Error()) s.Require().True(strings.Contains(err.Error(), expectErrorString)) } @@ -733,6 +734,15 @@ func (s *BaseSuite) PickStorageProvider() *StorageProvider { return nil } +func (s *BaseSuite) PickStorageProviderByID(id uint32) *StorageProvider { + for _, sp := range s.StorageProviders { + if sp.Info.Id == id { + return sp + } + } + return nil +} + func (s *BaseSuite) PickDifferentStorageProvider(spId uint32) *StorageProvider { for _, sp := range s.StorageProviders { if sp.Info.Id != spId { diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index c344ecfad..8b4062366 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -4,6 +4,7 @@ import ( "bytes" "context" "fmt" + sptypes "github.com/bnb-chain/greenfield/x/sp/types" "math" "reflect" "strconv" @@ -679,3 +680,462 @@ CheckProposalStatus: s.T().Errorf("update params failed") } } + +func (s *VirtualGroupTestSuite) TestSPExit() { + user := s.GenAndChargeAccounts(1, 1000000)[0] + + // 1. create an SP-x that wants to exit + spx := s.BaseSuite.CreateNewStorageProvider() + s.T().Logf("new SP(successor) Info: %s", spx.Info.String()) + + // 2. create a successor SP-y + spy := s.BaseSuite.CreateNewStorageProvider() + s.T().Logf("new SP(successor) Info: %s", spy.Info.String()) + + // 3, SP-x create a new family with a GVG. Family {GVG: [x|2, 3, 4, 5, 6, 7]} + gvgID, familyID := s.BaseSuite.CreateGlobalVirtualGroup(spx, 0, []uint32{2, 3, 4, 5, 6, 7}, 1) + + // 4. create object + s.BaseSuite.CreateObject(user, spx, gvgID, storagetestutil.GenRandomBucketName(), storagetestutil.GenRandomObjectName()) + + // 5. SP-2 creates gvg contains SP-x [2|x,3,4,5,6,7] + sp2 := s.BaseSuite.PickStorageProviderByID(2) + s.T().Logf("SP 2 Info: %s", spx.Info.String()) + gvgID2, familyID2 := s.BaseSuite.CreateGlobalVirtualGroup(sp2, 0, []uint32{spx.Info.Id, 3, 4, 5, 6, 7}, 1) + + // 6. SP-x declare to exit + s.SendTxBlock(spx.OperatorKey, &virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: spx.OperatorKey.GetAddr().String(), + }) + resp, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) + + // 7. SP-x complete exit, it would fail due to there are family and GVG binded to it. + s.SendTxBlockWithExpectErrorString( + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String()}, + spx.OperatorKey, + "not swap out from all the family") + + // 8.The SP-y will reserve the swapIn as primary sp for the SP-x's family + msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + + // 9 query the swapInInfo onchain, show reservation is recorded onchain + swapInInfo, err := s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().NoError(err) + s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) + s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) + + // 10. SP-y cancel the swapIn + msgCancelSwapIn := virtualgroupmoduletypes.NewMsgCancelSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) + s.Require().NoError(err) + s.SendTxBlock(spy.OperatorKey, msgCancelSwapIn) + + // 11. SP-y wants to complete swap in, as primary sp, failure is expected. + msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) + s.Require().NoError(err) + s.SendTxBlockWithExpectErrorString(msgCompleteSwapIn, spy.OperatorKey, "The swap info not found in blockchain") + + // 12 SP-y reserves swapIn again, and complete swapIn + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().NoError(err) + s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) + s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) + + s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) + + // 13. query the swapInInfo should be not found onChain. + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().Error(err) + + // 14. The SP-y has replaced Sp-x in the family successfully, and it becomes the primary SP. Family {GVG: [y|2, 3, 4, 5, 6, 7]} + familyAfterSwapIn, err := s.Client.GlobalVirtualGroupFamily(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupFamilyRequest{FamilyId: familyID}) + s.Require().NoError(err) + s.Require().Equal(spy.Info.Id, familyAfterSwapIn.GlobalVirtualGroupFamily.PrimarySpId) + s.Require().Equal(gvgID, familyAfterSwapIn.GlobalVirtualGroupFamily.GlobalVirtualGroupIds[0]) + + gvgAfterSwapIn, err := s.Client.GlobalVirtualGroup(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupRequest{GlobalVirtualGroupId: gvgID}) + s.Require().NoError(err) + s.Require().Equal(spy.Info.Id, gvgAfterSwapIn.GlobalVirtualGroup.PrimarySpId) + s.Require().Equal(familyID, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) + s.Require().Equal([]uint32{2, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) + + // 15. SP-x tries to complete exit, but would fail, since SP-2 has a GVG that includes SP-x [2|x,3,4,5,6,7] + s.SendTxBlockWithExpectErrorString( + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String()}, + spx.OperatorKey, + "not swap out from all the gvgs") + + // 16. SP-y reserves the swapIn, as secondary sp + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, 0, gvgID2) + s.Require().NoError(err) + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + + // query the swapInInfo + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupId: gvgID2, + }) + s.Require().NoError(err) + s.Require().Equal(spy.Info.Id, swapInInfo.SwapInInfo.SuccessorSpId) + s.Require().Equal(spx.Info.Id, swapInInfo.SwapInInfo.TargetSpId) + + // 17 SP-y cancels swap in as secondary sp + msgCancelSwapIn = virtualgroupmoduletypes.NewMsgCancelSwapIn(spy.OperatorKey.GetAddr(), 0, gvgID2) + s.Require().NoError(err) + s.SendTxBlock(spy.OperatorKey, msgCancelSwapIn) + + // 18 query the swapInInfo not found + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupId: gvgID2, + }) + s.Require().Error(err) + + // 19. SP-y tries to complete swapIn, failure expected. + msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), 0, gvgID2) + s.SendTxBlockWithExpectErrorString(msgCompleteSwapIn, spy.OperatorKey, "The swap info not found in blockchain") + + // 20. SP-y reserves swapIn again, as secondary sp + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, 0, gvgID2) + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + + // 21 SP-y complete the swap in + msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), 0, gvgID2) + s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) + + // 22 SP-y has replaced Sp-x in Sp-2's GVG, the GVG becomes [2|y, 3, 4, 5, 6, 7]} + gvgAfterSwapIn, err = s.Client.GlobalVirtualGroup(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupRequest{GlobalVirtualGroupId: gvgID2}) + s.Require().NoError(err) + s.Require().Equal(sp2.Info.Id, gvgAfterSwapIn.GlobalVirtualGroup.PrimarySpId) + s.Require().Equal(familyID2, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) + s.Require().Equal([]uint32{spy.Info.Id, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) + + // 23. SP-x complete exit success + s.SendTxBlock( + spx.OperatorKey, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String()}, + ) + + // 24 SP-x no longer found on chain + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().Error(err) +} + +func (s *VirtualGroupTestSuite) TestSPExit2() { + // 1. Create SP-x, y, z, SP-x wants to exit, SP-y, SP-z will SwapIn SP-x family and GVG + spx := s.BaseSuite.CreateNewStorageProvider() + spy := s.BaseSuite.CreateNewStorageProvider() + spz := s.BaseSuite.CreateNewStorageProvider() + + // 2 SP-x creates a new family with a GVG. Family: {GVG: [x|y, 3, 4, 5, 6, 7]}, SP-y is a secondary on this GVG. + gvgID, familyID := s.BaseSuite.CreateGlobalVirtualGroup(spx, 0, []uint32{spy.Info.Id, 3, 4, 5, 6, 7}, 1) + + // 3. SP-x announces to exit + s.SendTxBlock(spx.OperatorKey, &virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: spx.OperatorKey.GetAddr().String(), + }) + resp, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) + + // 4. SP-y also announces to exit, multiple SP exit concurrently not allowed. + s.SendTxBlockWithExpectErrorString(&virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: spy.OperatorKey.GetAddr().String()}, spy.OperatorKey, "") + resp, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_IN_SERVICE) + + // 5. SP-y reserves the swapIn and complete it for SP-x family {GVG: [x|y, 3, 4, 5, 6, 7]}, then have {[y|y,3,4,5,6,7]} + // Sp-y will act both role in this GVG, primary and one of the secondary. + msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) + s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) + + gvgAfterSwapIn, err := s.Client.GlobalVirtualGroup(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupRequest{GlobalVirtualGroupId: gvgID}) + s.Require().NoError(err) + s.Require().Equal(spy.Info.Id, gvgAfterSwapIn.GlobalVirtualGroup.PrimarySpId) + s.Require().Equal(familyID, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) + s.Require().Equal([]uint32{spy.Info.Id, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) + + // 6. SP-x now can complete the exit, since it has only 1 family and it has been taken by SP-y + s.SendTxBlock( + spx.OperatorKey, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String()}, + ) + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().Error(err) + + // 7. SP-y try to exit as well, not allowed and rejected by chain due to it has GVG [y|y,3,4,5,6,7] that break the redundancy requirement + s.SendTxBlockWithExpectErrorString(&virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: spy.OperatorKey.GetAddr().String()}, spy.OperatorKey, "break the redundancy requirement") + resp, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_IN_SERVICE) + + // 8 SP-z reserves and completes the swap, GVG becomes [y|z,3,4,5,6,7], + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spy.Info.Id, 0, gvgID) + s.SendTxBlock(spz.OperatorKey, msgReserveSwapIn) + msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spz.OperatorKey.GetAddr(), 0, gvgID) + s.SendTxBlock(spz.OperatorKey, msgCompleteSwapIn) + + gvgAfterSwapIn, err = s.Client.GlobalVirtualGroup(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupRequest{GlobalVirtualGroupId: gvgID}) + s.Require().NoError(err) + s.Require().Equal(spy.Info.Id, gvgAfterSwapIn.GlobalVirtualGroup.PrimarySpId) + s.Require().Equal(familyID, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) + s.Require().Equal([]uint32{spz.Info.Id, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) + + // 9 SP-y can declare to exit + s.SendTxBlock(spy.OperatorKey, &virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: spy.OperatorKey.GetAddr().String()}) + resp, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) + + // 10 SP-z reserves and complete swapIn for family {[y|z,3,4,5,6,7]} and becomes {[z|z,3,4,5,6,7]} + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spy.Info.Id, familyID, 0) + s.SendTxBlock(spz.OperatorKey, msgReserveSwapIn) + msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spz.OperatorKey.GetAddr(), familyID, 0) + s.SendTxBlock(spz.OperatorKey, msgCompleteSwapIn) + + gvgAfterSwapIn, err = s.Client.GlobalVirtualGroup(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupRequest{GlobalVirtualGroupId: gvgID}) + s.Require().NoError(err) + s.Require().Equal(spz.Info.Id, gvgAfterSwapIn.GlobalVirtualGroup.PrimarySpId) + s.Require().Equal(familyID, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) + s.Require().Equal([]uint32{spz.Info.Id, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) + + // 11 SP-y complete the exit + s.SendTxBlock( + spy.OperatorKey, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spy.OperatorKey.GetAddr().String()}, + ) + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) + s.Require().Error(err) +} + +func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { + + // update the param, swapInInfo validity period is 10s + queryParamsResp, err := s.Client.VirtualGroupQueryClient.Params(context.Background(), &virtualgroupmoduletypes.QueryParamsRequest{}) + s.Require().NoError(err) + updatedParams := queryParamsResp.Params + updatedParams.SwapInValidityPeriod = 5 // the swapInInfo will expire in 10 seconds + s.updateParams(updatedParams) + + queryParamsResp, err = s.Client.VirtualGroupQueryClient.Params(context.Background(), &virtualgroupmoduletypes.QueryParamsRequest{}) + s.Require().NoError(err) + s.Require().Equal(5, int(queryParamsResp.Params.SwapInValidityPeriod)) + + // 1. create an SP-x that wants to exit + spx := s.BaseSuite.CreateNewStorageProvider() + s.T().Logf("new SP(successor) Info: %s", spx.Info.String()) + + // 2. create a successor SP-y, successor SP-z + spy := s.BaseSuite.CreateNewStorageProvider() + s.T().Logf("new SP(successor) Info: %s", spy.Info.String()) + spz := s.BaseSuite.CreateNewStorageProvider() + s.T().Logf("new SP(successor) Info: %s", spz.Info.String()) + + // 3 SP-x create a new family with a GVG. Family {GVG: [x|2, 3, 4, 5, 6, 7]} + _, familyID := s.BaseSuite.CreateGlobalVirtualGroup(spx, 0, []uint32{2, 3, 4, 5, 6, 7}, 1) + + // 4. SP-x declare to exit + s.SendTxBlock(spx.OperatorKey, &virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: spx.OperatorKey.GetAddr().String(), + }) + resp, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) + + // 5 SP-y reserves the swap + msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + + // 6 query the swapInInfo onchain, show reservation is recorded onchain + swapInInfo, err := s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().NoError(err) + s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) + s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) + + // SP-z try swapIn, failes + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.SendTxBlockWithExpectErrorString(msgReserveSwapIn, spz.OperatorKey, "already exist SP") + + // 7 waits for 5 seconds, the swapIno is expired + time.Sleep(6 * time.Second) + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().Error(err) + s.Require().ErrorContains(err, "swap in info expired") + + // SP-y try to complete + msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) + s.SendTxBlockWithExpectErrorString(msgCompleteSwapIn, spy.OperatorKey, "reserved swap expired") + + // SP-y try to reserve again and it is not allowed + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.SendTxBlockWithExpectErrorString(msgReserveSwapIn, spy.OperatorKey, "already tried to swap in but expired") + + // SP-z can reserve the swap since the previous one is expired + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.SendTxBlock(spz.OperatorKey, msgReserveSwapIn) + + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().NoError(err) + s.Require().Equal(spz.Info.Id, swapInInfo.SwapInInfo.SuccessorSpId) + s.Require().Equal(spx.Info.Id, swapInInfo.SwapInInfo.TargetSpId) +} + +func (s *VirtualGroupTestSuite) TestSPForceExit() { + ctx := context.Background() + + // 1. create SPs + spx := s.BaseSuite.CreateNewStorageProvider() + spy := s.BaseSuite.CreateNewStorageProvider() + // 2. SP-x creates a new family with a gvg: {[x|2,3,4,5,6,7]} + gvgID, familyID := s.BaseSuite.CreateGlobalVirtualGroup(spx, 0, []uint32{2, 3, 4, 5, 6, 7}, 1) + + // 3. create a proposal that put SP-x to FORCE_EXIT + govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() + msgForceExit := virtualgroupmoduletypes.NewMsgStorageProviderForceExit(govAddr, spx.OperatorKey.GetAddr()) + + proposal, err := v1.NewMsgSubmitProposal([]sdk.Msg{msgForceExit}, sdk.NewCoins(sdk.NewCoin("BNB", sdk.NewInt(1000000000000000000))), + s.Validator.GetAddr().String(), "", "put SP to force exit status", "put SP to force exit status") + s.Require().NoError(err) + txBroadCastResp, err := s.SendTxBlockWithoutCheck(proposal, s.Validator) + s.Require().NoError(err) + s.T().Log("create proposal tx hash: ", txBroadCastResp.TxResponse.TxHash) + + // get proposal id + proposalID := 0 + txResp, err := s.WaitForTx(txBroadCastResp.TxResponse.TxHash) + s.Require().NoError(err) + if txResp.Code == 0 && txResp.Height > 0 { + for _, event := range txResp.Events { + if event.Type == "submit_proposal" { + proposalID, err = strconv.Atoi(event.GetAttributes()[0].Value) + s.Require().NoError(err) + } + } + } + s.Require().True(proposalID != 0) + queryProposal := &v1.QueryProposalRequest{ProposalId: uint64(proposalID)} + _, err = s.Client.GovQueryClientV1.Proposal(ctx, queryProposal) + s.Require().NoError(err) + + // 4. submit MsgVote and wait the proposal exec + msgVote := v1.NewMsgVote(s.Validator.GetAddr(), uint64(proposalID), v1.OptionYes, "test") + txRes := s.SendTxBlock(s.Validator, msgVote) + s.Require().Equal(txRes.Code, uint32(0)) + + queryVoteParamsReq := v1.QueryParamsRequest{ParamsType: "voting"} + queryVoteParamsResp, err := s.Client.GovQueryClientV1.Params(ctx, &queryVoteParamsReq) + s.Require().NoError(err) + + // 5. wait a voting period and confirm that the proposal success. + s.T().Logf("voting period %s", *queryVoteParamsResp.Params.VotingPeriod) + time.Sleep(*queryVoteParamsResp.Params.VotingPeriod + time.Second) + proposalRes, err := s.Client.GovQueryClientV1.Proposal(ctx, queryProposal) + s.Require().NoError(err) + s.Require().Equal(proposalRes.Proposal.Status, v1.ProposalStatus_PROPOSAL_STATUS_PASSED) + + // 6. SP-x status will be FORCE_EXITING + resp, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_FORCE_EXITING) + + // 7. SP-x successor SP try swapIn family + msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + s.Require().NoError(err) + s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) + + // query the swapInInfo + swapInInfo, err := s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().NoError(err) + s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) + s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) + + // should be null + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupId: gvgID, + }) + s.Require().Error(err) + + // 8. SP-y complete SwapIn + msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) + s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) + + // 9. query the swapInInfo should be not found + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().Error(err) + + gvgAfterSwapIn, err := s.Client.GlobalVirtualGroup(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupRequest{GlobalVirtualGroupId: gvgID}) + s.Require().NoError(err) + s.Require().Equal(spy.Info.Id, gvgAfterSwapIn.GlobalVirtualGroup.PrimarySpId) + s.Require().Equal(familyID, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) + s.Require().Equal([]uint32{2, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) +} + +func (s *VirtualGroupTestSuite) updateParams(params virtualgroupmoduletypes.Params) { + govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() + msgUpdateParams := &virtualgroupmoduletypes.MsgUpdateParams{ + Authority: govAddr, + Params: params, + } + proposal, err := v1.NewMsgSubmitProposal([]sdk.Msg{msgUpdateParams}, sdk.NewCoins(sdk.NewCoin("BNB", sdk.NewInt(1000000000000000000))), + s.Validator.GetAddr().String(), "", "update virtual group params", "update virtual group params") + s.Require().NoError(err) + txBroadCastResp, err := s.SendTxBlockWithoutCheck(proposal, s.Validator) + s.Require().NoError(err) + s.T().Log("create proposal tx hash: ", txBroadCastResp.TxResponse.TxHash) + + // get proposal id + proposalID := 0 + txResp, err := s.WaitForTx(txBroadCastResp.TxResponse.TxHash) + s.Require().NoError(err) + if txResp.Code == 0 && txResp.Height > 0 { + for _, event := range txResp.Events { + if event.Type == "submit_proposal" { + proposalID, err = strconv.Atoi(event.GetAttributes()[0].Value) + s.Require().NoError(err) + } + } + } + s.Require().True(proposalID != 0) + queryProposal := &v1.QueryProposalRequest{ProposalId: uint64(proposalID)} + _, err = s.Client.GovQueryClientV1.Proposal(context.Background(), queryProposal) + s.Require().NoError(err) + + // 4. submit MsgVote and wait the proposal exec + msgVote := v1.NewMsgVote(s.Validator.GetAddr(), uint64(proposalID), v1.OptionYes, "test") + txRes := s.SendTxBlock(s.Validator, msgVote) + s.Require().Equal(txRes.Code, uint32(0)) + + queryVoteParamsReq := v1.QueryParamsRequest{ParamsType: "voting"} + queryVoteParamsResp, err := s.Client.GovQueryClientV1.Params(context.Background(), &queryVoteParamsReq) + s.Require().NoError(err) + + // 5. wait a voting period and confirm that the proposal success. + s.T().Logf("voting period %s", *queryVoteParamsResp.Params.VotingPeriod) + time.Sleep(*queryVoteParamsResp.Params.VotingPeriod + time.Second) + proposalRes, err := s.Client.GovQueryClientV1.Proposal(context.Background(), queryProposal) + s.Require().NoError(err) + s.Require().Equal(proposalRes.Proposal.Status, v1.ProposalStatus_PROPOSAL_STATUS_PASSED) +} diff --git a/proto/greenfield/sp/types.proto b/proto/greenfield/sp/types.proto index 3d83286b6..d56a49332 100644 --- a/proto/greenfield/sp/types.proto +++ b/proto/greenfield/sp/types.proto @@ -29,6 +29,7 @@ enum Status { STATUS_IN_JAILED = 1; STATUS_GRACEFUL_EXITING = 2; STATUS_IN_MAINTENANCE = 3; + STATUS_FORCE_EXITING = 4; } // StorageProvider defines the meta info of storage provider diff --git a/proto/greenfield/virtualgroup/events.proto b/proto/greenfield/virtualgroup/events.proto index 47e25debe..98b659869 100644 --- a/proto/greenfield/virtualgroup/events.proto +++ b/proto/greenfield/virtualgroup/events.proto @@ -174,3 +174,41 @@ message EventCompleteStorageProviderExit { (gogoproto.nullable) = false ]; } + +message EventSwapIn { + // The id of the storage provider who wants to swap in + uint32 storage_provider_id = 1; + // The id of the gvg family which the storage provider wants to swap in as primary sp + uint32 global_virtual_group_family_id = 2; + // The id of the gvg which the storage provider wants to swap in as secondary sp + uint32 global_virtual_group_id = 3; + // The id of the target sp who will be swapped + uint32 target_sp_id = 4; +} + +message EventCompleteSwapIn { + // The id of the storage provider who complete swap in. + uint32 storage_provider_id = 1; + // The id of the storage provider who swap in the family or gvgs + uint32 target_storage_provider_id = 2; + // The id of the gvg family + uint32 global_virtual_group_family_id = 3; + // The id of the gvg + uint32 global_virtual_group_id = 4; +} + +message EventCancelSwapIn { + // The id of the storage provider who cancel swap in. + uint32 storage_provider_id = 1; + // The id of the gvg family + uint32 global_virtual_group_family_id = 2; + // The id of the gvg + uint32 global_virtual_group_id = 3; + // The id of the target sp who was swapped from family or gvgs + uint32 target_sp_id = 4; +} + +message EventStorageProviderForceExit { + // The id of the storage provider who wants to exit + uint32 storage_provider_id = 1; +} \ No newline at end of file diff --git a/proto/greenfield/virtualgroup/params.proto b/proto/greenfield/virtualgroup/params.proto index ea37f8004..77df1544f 100644 --- a/proto/greenfield/virtualgroup/params.proto +++ b/proto/greenfield/virtualgroup/params.proto @@ -25,4 +25,8 @@ message Params { uint32 max_global_virtual_group_num_per_family = 4; // if the store size reach the exceed, the family is not allowed to sever more buckets uint64 max_store_size_per_family = 5; -} + // the validity period that a successor SP can reserve to complete the swap for Global virtual group/family + uint64 swap_in_validity_period = 6; + // sp_concurrent_exit_num defines the number of sp allowed for exit concurrently. + uint32 sp_concurrent_exit_num = 7; +} \ No newline at end of file diff --git a/proto/greenfield/virtualgroup/query.proto b/proto/greenfield/virtualgroup/query.proto index 0b71cc417..402c40223 100644 --- a/proto/greenfield/virtualgroup/query.proto +++ b/proto/greenfield/virtualgroup/query.proto @@ -41,6 +41,11 @@ service Query { rpc AvailableGlobalVirtualGroupFamilies(AvailableGlobalVirtualGroupFamiliesRequest) returns (AvailableGlobalVirtualGroupFamiliesResponse) { option (google.api.http).get = "/greenfield/virtualgroup/available_global_virtual_group_families"; } + + // AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on + rpc SwapInInfo(QuerySwapInInfoRequest) returns (QuerySwapInInfoResponse) { + option (google.api.http).get = "/greenfield/virtualgroup/swap_in_info"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -92,3 +97,12 @@ message AvailableGlobalVirtualGroupFamiliesRequest { message AvailableGlobalVirtualGroupFamiliesResponse { repeated uint32 global_virtual_group_family_ids = 1; } + +message QuerySwapInInfoRequest { + uint32 global_virtual_group_family_id = 1; + uint32 global_virtual_group_id = 2; +} + +message QuerySwapInInfoResponse { + SwapInInfo swap_in_info = 1; +} \ No newline at end of file diff --git a/proto/greenfield/virtualgroup/tx.proto b/proto/greenfield/virtualgroup/tx.proto index 42c8eb3a2..7b35b6c16 100644 --- a/proto/greenfield/virtualgroup/tx.proto +++ b/proto/greenfield/virtualgroup/tx.proto @@ -29,6 +29,13 @@ service Msg { rpc CompleteStorageProviderExit(MsgCompleteStorageProviderExit) returns (MsgCompleteStorageProviderExitResponse); rpc CompleteSwapOut(MsgCompleteSwapOut) returns (MsgCompleteSwapOutResponse); rpc CancelSwapOut(MsgCancelSwapOut) returns (MsgCancelSwapOutResponse); + rpc SwapIn(MsgReserveSwapIn) returns (MsgReserveSwapInResponse); + rpc CancelSwapIn(MsgCancelSwapIn) returns (MsgCancelSwapInResponse); + rpc CompleteSwapIn(MsgCompleteSwapIn) returns (MsgCompleteSwapInResponse); + + // StorageProviderForceExit defines a governance operation for a SP force exit + // The authority is defined in the keeper. + rpc StorageProviderForceExit(MsgStorageProviderForceExit) returns (MsgStorageProviderForceExitResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -119,8 +126,6 @@ message MsgSwapOut { common.Approval successor_sp_approval = 5; } -message MsgSwapOutResponse {} - message MsgCompleteSwapOut { option (cosmos.msg.v1.signer) = "storage_provider"; @@ -187,3 +192,67 @@ message MsgCompleteStorageProviderExit { } message MsgCompleteStorageProviderExitResponse {} + +message MsgSwapOutResponse {} + +message MsgReserveSwapIn { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who want to swap into the virtual group family or global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // target_sp_id defines the storage provider id to be replaced by the successor sp. + uint32 target_sp_id = 2; + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap in as the primary storage provider + // it it set to zero, it represents that the operator swap in as the secondary storage provider. + uint32 global_virtual_group_family_id = 3; + // global_virtual_group_id is a global virtual group ID associated with the swap in. + // It allows to be empty only when the operator is the primary storage provider. + uint32 global_virtual_group_id = 4; +} + +message MsgReserveSwapInResponse {} + +message MsgCompleteSwapIn { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who want to swap into the virtual group family or global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap in as the primary storage provider + // it it set to zero, it represents that the operator swap in as the secondary storage provider. + uint32 global_virtual_group_family_id = 2; + // global_virtual_group_id is a global virtual group ID associated with the swap in. + // It allows to be empty only when the operator is the primary storage provider. + uint32 global_virtual_group_id = 3; +} + +message MsgCompleteSwapInResponse {} + +message MsgCancelSwapIn { + option (cosmos.msg.v1.signer) = "storage_provider"; + + // storage_provider defines the operator account address of the storage provider who want to swap into the virtual group family or global virtual group. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap in as the primary storage provider + // it it set to zero, it represents that the operator swap in as the secondary storage provider. + uint32 global_virtual_group_family_id = 2; + // global_virtual_group_id is a global virtual group IDs associated with the swap in. + // It allows to be empty only when the operator is the primary storage provider. + uint32 global_virtual_group_id = 3; +} + +message MsgCancelSwapInResponse {} +// this line is used by starport scaffolding # proto/tx/message +message MsgStorageProviderForceExit { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // storage_provider defines the account address of the storage provider which need to force exit + string storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +message MsgStorageProviderForceExitResponse {} \ No newline at end of file diff --git a/proto/greenfield/virtualgroup/types.proto b/proto/greenfield/virtualgroup/types.proto index 2a1e40865..317f045db 100644 --- a/proto/greenfield/virtualgroup/types.proto +++ b/proto/greenfield/virtualgroup/types.proto @@ -59,11 +59,18 @@ message GlobalVirtualGroupsBindingOnBucket { message GVGStatisticsWithinSP { // storage_provider_id defines the id of the sp which the statistics associated to uint32 storage_provider_id = 1; - // primary_sp_family_count defines the number of the family which this sp serves as primary sp + // primary_count defines the number of global virtual groups (GVGs) which this sp serves as primary sp uint32 primary_count = 2; // secondary_count defines the number of global virtual groups (GVGs) in // which this storage provider serves as a secondary storage provider. uint32 secondary_count = 3; + // Redundancy defines the number of gvg that sp serves as sp and secondary sp, which breaks the data redundancy requirement. + // In most case, this should not happen, + // during sp exit, a successor sp might need to swapIn GVG(s) that it is already a secondary and become the primary SP + // of whole family. + // a successor sp which need to swapIn a GVG as secondary must be unique to all other SP. So this will not be used for + // swapIn individual GVG as secondary + uint32 break_redundancy_reqmt_gvg_count = 4; } message SwapOutInfo { @@ -72,3 +79,12 @@ message SwapOutInfo { // successor_sp_id is the id of the successor storage provider. uint32 successor_sp_id = 2; } + +message SwapInInfo { + // successor_sp_id defines the id of sp who want to join the family or GVG + uint32 successor_sp_id = 1; + // target_sp_id is the id of SP in the family or GVG to be swapped. + uint32 target_sp_id = 2; + // expiration_time is the expiration of epoch time for the swapInInfo + uint64 expiration_time = 4; +} diff --git a/x/sp/types/errors.go b/x/sp/types/errors.go index 3b6594550..d740dc64f 100644 --- a/x/sp/types/errors.go +++ b/x/sp/types/errors.go @@ -24,6 +24,7 @@ var ( ErrStorageProviderStatusUpdateNotAllow = errors.Register(ModuleName, 16, "StorageProvider status is not allow to change") ErrStorageProviderMaintenanceAddrExists = errors.Register(ModuleName, 17, "StorageProvider already exist for this maintenance address; must use new StorageProvider maintenance address.") ErrStorageProviderPriceUpdateNotAllow = errors.Register(ModuleName, 18, "StorageProvider update price is disallowed") + ErrStorageProviderWrongStatus = errors.Register(ModuleName, 19, "StorageProvider is in wrong status") ErrSignerNotGovModule = errors.Register(ModuleName, 40, "signer is not gov module account") ErrSignerEmpty = errors.Register(ModuleName, 41, "signer is empty") diff --git a/x/sp/types/types.pb.go b/x/sp/types/types.pb.go index 36d19af42..a0ea46c73 100644 --- a/x/sp/types/types.pb.go +++ b/x/sp/types/types.pb.go @@ -34,6 +34,7 @@ const ( STATUS_IN_JAILED Status = 1 STATUS_GRACEFUL_EXITING Status = 2 STATUS_IN_MAINTENANCE Status = 3 + STATUS_FORCE_EXITING Status = 4 ) var Status_name = map[int32]string{ @@ -41,6 +42,7 @@ var Status_name = map[int32]string{ 1: "STATUS_IN_JAILED", 2: "STATUS_GRACEFUL_EXITING", 3: "STATUS_IN_MAINTENANCE", + 4: "STATUS_FORCE_EXITING", } var Status_value = map[string]int32{ @@ -48,6 +50,7 @@ var Status_value = map[string]int32{ "STATUS_IN_JAILED": 1, "STATUS_GRACEFUL_EXITING": 2, "STATUS_IN_MAINTENANCE": 3, + "STATUS_FORCE_EXITING": 4, } func (x Status) String() string { @@ -581,70 +584,71 @@ func init() { func init() { proto.RegisterFile("greenfield/sp/types.proto", fileDescriptor_7a9af9b5be8c2eeb) } var fileDescriptor_7a9af9b5be8c2eeb = []byte{ - // 999 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xc1, 0x6e, 0x23, 0x45, - 0x10, 0xf5, 0xd8, 0x8e, 0xb3, 0x29, 0x27, 0xb1, 0xd3, 0x49, 0xd8, 0x49, 0x10, 0xde, 0xc8, 0x87, - 0x10, 0x56, 0x8a, 0xad, 0x0d, 0x87, 0x95, 0x80, 0x8b, 0x63, 0x9b, 0xc8, 0xb0, 0x1b, 0x2d, 0xe3, - 0x2c, 0x42, 0x20, 0x34, 0x6a, 0x4f, 0x57, 0x9c, 0x56, 0xec, 0xee, 0xd9, 0xee, 0x76, 0x16, 0xff, - 0x01, 0x47, 0xbe, 0x80, 0x03, 0x7c, 0x01, 0xd2, 0x9e, 0xf8, 0x82, 0x3d, 0xae, 0xf6, 0x84, 0x38, - 0xac, 0x50, 0xf2, 0x15, 0xdc, 0xd0, 0xcc, 0xf4, 0x8c, 0x4d, 0x38, 0x58, 0x48, 0x39, 0xd9, 0xf5, - 0xaa, 0xde, 0xeb, 0x9a, 0xea, 0xaa, 0x9a, 0x81, 0x9d, 0xa1, 0x42, 0x14, 0xe7, 0x1c, 0x47, 0xac, - 0xa9, 0xc3, 0xa6, 0x99, 0x86, 0xa8, 0x1b, 0xa1, 0x92, 0x46,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f6, 0x55, 0x04, 0x92, - 0xef, 0xa1, 0xac, 0x8d, 0x54, 0x68, 0xb3, 0x58, 0xba, 0x83, 0x2c, 0x20, 0x16, 0x8c, 0xd3, 0xa8, - 0xff, 0x9d, 0x07, 0x72, 0x32, 0x92, 0x03, 0x3a, 0x4a, 0x2a, 0x87, 0x59, 0x76, 0xb7, 0x4b, 0xe4, - 0x2c, 0x2e, 0x51, 0xfe, 0x6e, 0x4b, 0x34, 0x82, 0xcd, 0x50, 0xf1, 0x31, 0x55, 0x53, 0x7f, 0xbe, - 0x04, 0x77, 0x71, 0x11, 0x1b, 0x56, 0x78, 0xee, 0x91, 0x43, 0xd8, 0xd6, 0x18, 0x48, 0xc1, 0x6e, - 0x9f, 0x57, 0xbc, 0x83, 0xf3, 0x36, 0x33, 0xe9, 0xd9, 0x89, 0xf5, 0x67, 0x40, 0xfa, 0xe1, 0xd3, - 0xd9, 0x36, 0x89, 0x46, 0x58, 0x93, 0x4f, 0x60, 0x59, 0x61, 0x20, 0x15, 0x8b, 0x46, 0xa6, 0x70, - 0x50, 0x3e, 0xda, 0xbb, 0x35, 0x99, 0x73, 0x0c, 0x2f, 0x0e, 0xf4, 0x52, 0x42, 0xfd, 0x67, 0x07, - 0x36, 0xfe, 0xe3, 0x26, 0xef, 0x41, 0xe9, 0x02, 0xf9, 0xf0, 0xc2, 0xd8, 0x3b, 0xb4, 0x56, 0xf4, - 0xb2, 0x52, 0xf8, 0x62, 0x82, 0xda, 0xf8, 0x6c, 0xa2, 0x68, 0xbc, 0x0c, 0x92, 0x41, 0xa8, 0x58, - 0xbc, 0x63, 0x61, 0xf2, 0x21, 0x54, 0x68, 0x60, 0x26, 0xd1, 0x86, 0x4b, 0x23, 0x0b, 0x71, 0xe4, - 0x7a, 0x02, 0x67, 0x81, 0x1f, 0x44, 0x0d, 0x91, 0x68, 0xd2, 0xe4, 0xd5, 0x57, 0x88, 0xae, 0x34, - 0x46, 0x5a, 0xe6, 0xa1, 0x86, 0x52, 0xb2, 0xa8, 0xc8, 0x36, 0x6c, 0xf4, 0xcf, 0x5a, 0x67, 0xcf, - 0xfb, 0x7e, 0xef, 0xd4, 0xef, 0x77, 0xbd, 0xaf, 0x7b, 0xed, 0x6e, 0x35, 0x47, 0xb6, 0xa0, 0x3a, - 0x83, 0xbf, 0x68, 0xf5, 0x9e, 0x74, 0x3b, 0x55, 0x87, 0xbc, 0x0f, 0xf7, 0x2d, 0x7a, 0xe2, 0xb5, - 0xda, 0xdd, 0xcf, 0x9f, 0x3f, 0xf1, 0xbb, 0xdf, 0xf4, 0xce, 0x7a, 0xa7, 0x27, 0xd5, 0x3c, 0xd9, - 0x81, 0xed, 0x19, 0xe5, 0x69, 0xab, 0x77, 0x7a, 0xd6, 0x3d, 0x6d, 0x9d, 0xb6, 0xbb, 0xd5, 0xc2, - 0x6e, 0xf1, 0xc7, 0x5f, 0x6b, 0xb9, 0xe3, 0xce, 0xeb, 0xeb, 0x9a, 0xf3, 0xe6, 0xba, 0xe6, 0xfc, - 0x75, 0x5d, 0x73, 0x7e, 0xba, 0xa9, 0xe5, 0xde, 0xdc, 0xd4, 0x72, 0x7f, 0xdc, 0xd4, 0x72, 0xdf, - 0x3e, 0x9c, 0xbb, 0xcc, 0x81, 0x18, 0x1c, 0x06, 0x17, 0x94, 0x8b, 0xe6, 0xdc, 0xe7, 0xc9, 0x0f, - 0xd9, 0x07, 0xca, 0xa0, 0x14, 0x7f, 0x41, 0x7c, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc4, - 0xb8, 0x2c, 0x5d, 0xbe, 0x08, 0x00, 0x00, + // 1013 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xda, 0x8e, 0xd3, 0x3c, 0x27, 0xb1, 0x33, 0x49, 0xe8, 0x26, 0x08, 0x37, 0xf2, 0x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 0xe3, 0x6f, 0xb5, 0xdc, 0x71, 0xe7, 0xd5, 0x55, 0xcd, 0x7a, 0x7d, 0x55, 0xb3, 0xfe, 0xbe, + 0xaa, 0x59, 0x3f, 0x5f, 0xd7, 0x72, 0xaf, 0xaf, 0x6b, 0xb9, 0x3f, 0xaf, 0x6b, 0xb9, 0x6f, 0xef, + 0xcf, 0xdd, 0xf3, 0x80, 0x0f, 0x0e, 0xfd, 0x73, 0xca, 0x78, 0x73, 0xee, 0xcb, 0xe5, 0x87, 0xec, + 0xdb, 0x65, 0x50, 0x8a, 0x3f, 0x2e, 0x3e, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x72, 0xdf, 0x0b, + 0xff, 0xd9, 0x08, 0x00, 0x00, } func (m *Description) Marshal() (dAtA []byte, err error) { diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 6e7c4f2c2..f1a640b29 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "encoding/binary" "fmt" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" @@ -372,6 +373,14 @@ func (k Keeper) UpdateBucketInfo(ctx sdk.Context, operator sdk.AccAddress, bucke return types.ErrSourceTypeMismatch } + //TODO change name + if ctx.IsUpgraded(upgradetypes.Pampas) { + sp := k.MustGetPrimarySPForBucket(ctx, bucketInfo) + if sp.Status == sptypes.STATUS_GRACEFUL_EXITING || sp.Status == sptypes.STATUS_FORCE_EXITING { + return types.ErrUpdateQuotaFailed.Wrapf("The SP is in %s, bucket can not be updated", sp.Status) + } + } + // check permission effect := k.VerifyBucketPermission(ctx, bucketInfo, operator, permtypes.ACTION_UPDATE_BUCKET_INFO, nil) if effect != permtypes.EFFECT_ALLOW { @@ -1154,7 +1163,18 @@ func (k Keeper) DiscontinueObject(ctx sdk.Context, operator sdk.AccAddress, buck spInState := k.MustGetPrimarySPForBucket(ctx, bucketInfo) if sp.Id != spInState.Id { - return errors.Wrapf(types.ErrAccessDenied, "only primary sp is allowed to do discontinue objects") + if ctx.IsUpgraded(upgradetypes.Eddystone) { + swapInInfo, found := k.virtualGroupKeeper.GetSwapInInfo(ctx, bucketInfo.GlobalVirtualGroupFamilyId, virtualgroupmoduletypes.NoSpecifiedGVGId) + if found { + if swapInInfo.TargetSpId != spInState.Id || + swapInInfo.SuccessorSpId != sp.Id || + uint64(ctx.BlockTime().Unix()) > swapInInfo.ExpirationTime { + return errors.Wrapf(types.ErrAccessDenied, "the sp is allowed to do discontinue objects, reserved swapInfo=%s", swapInInfo.String()) + } + } + } else { + return errors.Wrapf(types.ErrAccessDenied, "only primary sp is allowed to do discontinue objects") + } } count := k.GetDiscontinueObjectCount(ctx, operator) diff --git a/x/storage/types/expected_keepers.go b/x/storage/types/expected_keepers.go index 9e9342752..8f2dd357d 100644 --- a/x/storage/types/expected_keepers.go +++ b/x/storage/types/expected_keepers.go @@ -95,6 +95,7 @@ type VirtualGroupKeeper interface { SettleAndDistributeGVG(ctx sdk.Context, gvg *types.GlobalVirtualGroup) error GetAndCheckGVGFamilyAvailableForNewBucket(ctx sdk.Context, familyID uint32) (*types.GlobalVirtualGroupFamily, error) GetGlobalVirtualGroupIfAvailable(ctx sdk.Context, gvgID uint32, expectedStoreSize uint64) (*types.GlobalVirtualGroup, error) + GetSwapInInfo(ctx sdk.Context, familyID, gvgID uint32) (*types.SwapInInfo, bool) } // StorageKeeper used by the cross-chain applications diff --git a/x/virtualgroup/keeper/grpc_query.go b/x/virtualgroup/keeper/grpc_query.go index 2fe684529..056163c49 100644 --- a/x/virtualgroup/keeper/grpc_query.go +++ b/x/virtualgroup/keeper/grpc_query.go @@ -119,3 +119,37 @@ func (k Keeper) AvailableGlobalVirtualGroupFamilies(goCtx context.Context, req * } return &types.AvailableGlobalVirtualGroupFamiliesResponse{GlobalVirtualGroupFamilyIds: availableFamilyIds}, nil } + +func (k Keeper) SwapInInfo(goCtx context.Context, req *types.QuerySwapInInfoRequest) (*types.QuerySwapInInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + swapInInfo, found := k.GetSwapInInfo(ctx, req.GetGlobalVirtualGroupFamilyId(), req.GetGlobalVirtualGroupId()) + if !found { + return nil, types.ErrSwapInInfoNotExist + } + if uint64(ctx.BlockTime().Unix()) > swapInInfo.ExpirationTime { + return nil, types.ErrSwapInInfoExpired + } + return &types.QuerySwapInInfoResponse{ + SwapInInfo: swapInInfo, + }, nil +} + +func (k Keeper) GetSwapInInfo(ctx sdk.Context, globalVirtualGroupFamilyId, globalVirtualGroupId uint32) (*types.SwapInInfo, bool) { + store := ctx.KVStore(k.storeKey) + var key []byte + if globalVirtualGroupFamilyId != types.NoSpecifiedFamilyId { + key = types.GetSwapInFamilyKey(globalVirtualGroupFamilyId) + } else { + key = types.GetSwapInGVGKey(globalVirtualGroupId) + } + bz := store.Get(key) + if bz == nil { + return nil, false + } + swapInInfo := &types.SwapInInfo{} + k.cdc.MustUnmarshal(bz, swapInInfo) + return swapInInfo, true +} diff --git a/x/virtualgroup/keeper/keeper.go b/x/virtualgroup/keeper/keeper.go index c325bc1c1..22b04da8d 100644 --- a/x/virtualgroup/keeper/keeper.go +++ b/x/virtualgroup/keeper/keeper.go @@ -647,3 +647,282 @@ func (k Keeper) CompleteSwapOut(ctx sdk.Context, gvgFamilyID uint32, gvgIDs []ui } return nil } + +func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, successorSPID uint32, targetSP *sptypes.StorageProvider) error { + curTime := uint64(ctx.BlockTime().Unix()) + // swapIn a family, the target sp needs to be exiting status if swapIn the family's as primary SP. + if gvgFamilyID != types.NoSpecifiedFamilyId { + if targetSP.Status != sptypes.STATUS_GRACEFUL_EXITING && targetSP.Status != sptypes.STATUS_FORCE_EXITING { + return sptypes.ErrStorageProviderWrongStatus.Wrapf("The target sp is not exiting, can not be swapped") + } + family, found := k.GetGVGFamily(ctx, gvgFamilyID) + if !found { + return types.ErrGVGFamilyNotExist + } + if family.PrimarySpId != targetSP.Id { + return types.ErrSwapInFailed.Wrapf("the family(ID: %d) primary SP(ID: %d) does not match the target SP(ID: %d) which need to be swapped", family.Id, family.PrimarySpId, targetSP.Id) + } + return k.setSwapInInfo(ctx, types.GetSwapInFamilyKey(gvgFamilyID), successorSPID, targetSP.Id, curTime) + } + + gvg, found := k.GetGVG(ctx, gvgID) + if !found { + return types.ErrGVGNotExist + } + if gvg.PrimarySpId == successorSPID { + return types.ErrSwapInFailed.Wrapf("The SP(ID=%d) is already the primary SP of GVG(ID=%d)", successorSPID, gvgID) + } + exist := false + for _, sspID := range gvg.GetSecondarySpIds() { + if sspID == successorSPID { + return types.ErrSwapInFailed.Wrapf("The sp(ID: %d) is already one of the secondary in this GVG(ID:%d)", successorSPID, gvgID) + } + if sspID == targetSP.Id { + exist = true + } + } + if !exist { + return types.ErrSwapInFailed.Wrapf("The sp(ID: %d) that needs swap out is not one of the secondary sps of gvg gvg(%s).", targetSP.Id, gvg.String()) + } + + // swap into GVG when there is a secondary SP is exiting. + if targetSP.Status == sptypes.STATUS_GRACEFUL_EXITING || targetSP.Status == sptypes.STATUS_FORCE_EXITING { + return k.setSwapInInfo(ctx, types.GetSwapInGVGKey(gvgID), successorSPID, targetSP.Id, curTime) + } + // swap into GVG that not fulfil redundancy requirement. e.g. [1|2,3,4,5,6,1] + breakRedundancy := false + for _, sspID := range gvg.GetSecondarySpIds() { + if sspID == gvg.PrimarySpId { + breakRedundancy = true + } + } + if !breakRedundancy { + return types.ErrSwapInFailed.Wrap("can not swap into GVG which all SP are unique") + } + return k.setSwapInInfo(ctx, types.GetSwapInGVGKey(gvgID), successorSPID, targetSP.Id, curTime) +} + +func (k Keeper) setSwapInInfo(ctx sdk.Context, key []byte, successorSPID, targetSPID uint32, curTime uint64) error { + store := ctx.KVStore(k.storeKey) + bz := store.Get(key) + if bz == nil { + swapInInfo := &types.SwapInInfo{ + SuccessorSpId: successorSPID, + TargetSpId: targetSPID, + ExpirationTime: curTime + k.SwapInValidityPeriod(ctx), + } + store.Set(key, k.cdc.MustMarshal(swapInInfo)) + } else { + prevSwapInInfo := &types.SwapInInfo{} + k.cdc.MustUnmarshal(bz, prevSwapInInfo) + if curTime < prevSwapInInfo.ExpirationTime { + return types.ErrSwapInFailed.Wrapf("already exist SP(ID=%d) try to swap in", prevSwapInInfo.SuccessorSpId) + } + // override the stale swapIn info of prev successor sp + if prevSwapInInfo.SuccessorSpId == successorSPID { + return types.ErrSwapInFailed.Wrapf("already tried to swap in but expired") + } + swapInInfo := &types.SwapInInfo{ + SuccessorSpId: successorSPID, + TargetSpId: targetSPID, + ExpirationTime: curTime + k.SwapInValidityPeriod(ctx), + } + store.Set(key, k.cdc.MustMarshal(swapInInfo)) + } + return nil +} + +func (k Keeper) DeleteSwapInInfo(ctx sdk.Context, gvgFamilyID, gvgID uint32, successorSPID uint32) error { + store := ctx.KVStore(k.storeKey) + + swapInInfo := types.SwapInInfo{} + if gvgFamilyID != types.NoSpecifiedFamilyId { + key := types.GetSwapInFamilyKey(gvgFamilyID) + bz := store.Get(key) + if bz == nil { + return types.ErrSwapInFailed.Wrapf("The swap info not found in blockchain.") + } + k.cdc.MustUnmarshal(bz, &swapInInfo) + if swapInInfo.SuccessorSpId != successorSPID { + return sptypes.ErrStorageProviderNotFound.Wrapf("spID(%d) is different from the spID(%d) in swapInInfo", successorSPID, swapInInfo.SuccessorSpId) + } + store.Delete(key) + } else { + key := types.GetSwapInGVGKey(gvgID) + bz := store.Get(key) + if bz == nil { + return types.ErrSwapInFailed.Wrapf("The swap info not found in blockchain.") + } + k.cdc.MustUnmarshal(bz, &swapInInfo) + if swapInInfo.SuccessorSpId != successorSPID { + return sptypes.ErrStorageProviderNotFound.Wrapf("spID(%d) is different from the spID(%d) in swapInInfo", successorSPID, swapInInfo.SuccessorSpId) + } + store.Delete(key) + } + + if err := ctx.EventManager().EmitTypedEvents(&types.EventCancelSwapIn{ + StorageProviderId: swapInInfo.SuccessorSpId, + GlobalVirtualGroupFamilyId: gvgFamilyID, + GlobalVirtualGroupId: gvgID, + TargetSpId: swapInInfo.TargetSpId, + }); err != nil { + return err + } + return nil +} + +func (k Keeper) CompleteSwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, successorSP *sptypes.StorageProvider) error { + store := ctx.KVStore(k.storeKey) + swapInInfo := types.SwapInInfo{} + // swapIn family + if gvgFamilyID != types.NoSpecifiedFamilyId { + key := types.GetSwapInFamilyKey(gvgFamilyID) + bz := store.Get(key) + if bz == nil { + return types.ErrSwapInFailed.Wrapf("The swap info not found in blockchain.") + } + k.cdc.MustUnmarshal(bz, &swapInInfo) + if successorSP.Id != swapInInfo.SuccessorSpId { + return types.ErrSwapInFailed.Wrapf("The SP(ID: %d) has not reserved the swap(swapInfo=%s)", successorSP.Id, swapInInfo.String()) + } + if uint64(ctx.BlockTime().Unix()) >= swapInInfo.ExpirationTime { + return types.ErrSwapInFailed.Wrapf("reserved swap expired") + } + + targetPrimarySP, found := k.spKeeper.GetStorageProvider(ctx, swapInInfo.TargetSpId) + if !found { + return sptypes.ErrStorageProviderNotFound.Wrapf("The storage provider(ID: %d) not found when complete swap in.", swapInInfo.TargetSpId) + } + if err := k.completeSwapInFamily(ctx, successorSP, targetPrimarySP, gvgFamilyID); err != nil { + return err + } + store.Delete(key) + } else { + key := types.GetSwapInGVGKey(gvgID) + bz := store.Get(key) + if bz == nil { + return types.ErrSwapInFailed.Wrapf("The swap info not found in blockchain.") + } + k.cdc.MustUnmarshal(bz, &swapInInfo) + if successorSP.Id != swapInInfo.SuccessorSpId { + return types.ErrSwapInFailed.Wrapf("The sp(ID: %d) has not reserved the swap for secondary SP(ID: %d)", successorSP.Id, swapInInfo.TargetSpId) + } + targetSecondarySP, found := k.spKeeper.GetStorageProvider(ctx, swapInInfo.TargetSpId) + if !found { + return sptypes.ErrStorageProviderNotFound.Wrapf("The storage provider(ID: %d) not found when complete swap in.", swapInInfo.TargetSpId) + } + if err := k.completeSwapInGVG(ctx, successorSP.Id, targetSecondarySP.Id, gvgID); err != nil { + return err + } + store.Delete(key) + } + if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteSwapIn{ + StorageProviderId: successorSP.Id, + TargetStorageProviderId: swapInInfo.TargetSpId, + GlobalVirtualGroupFamilyId: gvgFamilyID, + GlobalVirtualGroupId: gvgID, + }); err != nil { + return err + } + return nil +} + +func (k Keeper) completeSwapInFamily(ctx sdk.Context, successorSP, targetPrimarySP *sptypes.StorageProvider, familyID uint32) error { + family, found := k.GetGVGFamily(ctx, familyID) + if !found { + return types.ErrGVGFamilyNotExist + } + srcStat := k.MustGetGVGStatisticsWithinSP(ctx, targetPrimarySP.Id) + dstStat := k.GetOrCreateGVGStatisticsWithinSP(ctx, successorSP.Id) + + gvgs := make([]*types.GlobalVirtualGroup, len(family.GlobalVirtualGroupIds)) + for i, gvgID := range family.GlobalVirtualGroupIds { + gvg, found := k.GetGVG(ctx, gvgID) + if !found { + return types.ErrGVGNotExist + } + if gvg.PrimarySpId != targetPrimarySP.Id { + return types.ErrSwapInFailed.Wrapf( + "the primary id (%d) in global virtual group does not match the target primary sp id (%d)", gvg.PrimarySpId, targetPrimarySP.Id) + } + // swap deposit + if !gvg.TotalDeposit.IsZero() { + coins := sdk.NewCoins(sdk.NewCoin(k.DepositDenomForGVG(ctx), gvg.TotalDeposit)) + err := k.bankKeeper.SendCoins(ctx, sdk.MustAccAddressFromHex(targetPrimarySP.FundingAddress), sdk.MustAccAddressFromHex(successorSP.FundingAddress), coins) + if err != nil { + return err + } + } + + // the successor SP might have played a secondary already in this GVG + for _, secondarySPID := range gvg.SecondarySpIds { + if successorSP.Id == secondarySPID { + dstStat.BreakRedundancyReqmtGvgCount++ + break + } + } + gvg.PrimarySpId = successorSP.Id + gvgs[i] = gvg + srcStat.PrimaryCount-- + dstStat.PrimaryCount++ + } + family.PrimarySpId = successorSP.Id + + // settlement + err := k.SettleAndDistributeGVGFamily(ctx, targetPrimarySP, family) + if err != nil { + return types.ErrSwapOutFailed.Wrapf("fail to settle GVG family %d", familyID) + } + + if err := k.SetGVGFamilyAndEmitUpdateEvent(ctx, family); err != nil { + return types.ErrSwapOutFailed.Wrapf("failed to set gvg family and emit update event, err: %s", err) + } + + for _, gvg := range gvgs { + if err := k.SetGVGAndEmitUpdateEvent(ctx, gvg); err != nil { + return types.ErrSwapOutFailed.Wrapf("failed to set gvg and emit update event, err: %s", err) + } + } + k.SetGVGStatisticsWithSP(ctx, srcStat) + k.SetGVGStatisticsWithSP(ctx, dstStat) + return nil +} + +func (k Keeper) completeSwapInGVG(ctx sdk.Context, successorSPID, targetSecondarySPID uint32, gvgID uint32) error { + gvg, found := k.GetGVG(ctx, gvgID) + if !found { + return types.ErrGVGNotExist + } + if successorSPID == gvg.PrimarySpId { + return types.ErrSwapInFailed.Wrapf("the primary SP(ID: %d) can not swap into GVG's secondary (%s).", successorSPID, gvg.String()) + } + + // settlement + err := k.SettleAndDistributeGVG(ctx, gvg) + if err != nil { + return types.ErrSwapOutFailed.Wrapf("fail to settle GVG %d", gvgID) + } + secondarySPIndex := -1 + for i, sspID := range gvg.GetSecondarySpIds() { + if sspID == targetSecondarySPID { + secondarySPIndex = i + } + } + if secondarySPIndex == -1 { + panic("secondary sp found but the index is not correct when swap out as secondary sp") + } + gvg.SecondarySpIds[secondarySPIndex] = successorSPID + origin := k.MustGetGVGStatisticsWithinSP(ctx, targetSecondarySPID) + successor, found := k.GetGVGStatisticsWithinSP(ctx, successorSPID) + if !found { + successor = &types.GVGStatisticsWithinSP{StorageProviderId: successorSPID} + } + if targetSecondarySPID == gvg.PrimarySpId { + origin.BreakRedundancyReqmtGvgCount-- + } + origin.SecondaryCount-- + successor.SecondaryCount++ + k.SetGVGStatisticsWithSP(ctx, origin) + k.SetGVGStatisticsWithSP(ctx, successor) + return k.SetGVGAndEmitUpdateEvent(ctx, gvg) +} diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index 94726bd8a..b9151eda0 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -443,6 +443,26 @@ func (k msgServer) StorageProviderExit(goCtx context.Context, msg *types.MsgStor return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("sp not in service, status: %s", sp.Status.String()) } + stat, found := k.GetGVGStatisticsWithinSP(ctx, sp.Id) + if found && stat.BreakRedundancyReqmtGvgCount != 0 { + return nil, types.ErrSPCanNotExit.Wrapf("The SP has %d GVG that break the redundancy requirement, need to be resolved before exit.", stat.BreakRedundancyReqmtGvgCount) + } + + // can only allow 1 sp exit at a time, a GVG can have only 1 SwapInInfo associated. + exittingSPNum := uint32(0) + sps := k.spKeeper.GetAllStorageProviders(ctx) + for _, curSP := range sps { + // TODO Remove FORCE_EXIT SP info from chain + if curSP.Status == sptypes.STATUS_GRACEFUL_EXITING || + curSP.Status == sptypes.STATUS_FORCE_EXITING { + exittingSPNum++ + } + } + maxSPExitingNum := k.SpConcurrentExitNum(ctx) + if exittingSPNum >= maxSPExitingNum { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("There are %d SP exiting, only allow %d sp exit concurrently", exittingSPNum, maxSPExitingNum) + } + sp.Status = sptypes.STATUS_GRACEFUL_EXITING k.spKeeper.SetStorageProvider(ctx, sp) @@ -496,3 +516,97 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types } return &types.MsgCompleteStorageProviderExitResponse{}, nil } + +func (k msgServer) SwapIn(goCtx context.Context, msg *types.MsgReserveSwapIn) (*types.MsgReserveSwapInResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + operatorAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + successorSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be the operator address of sp.") + } + if successorSP.Id == msg.TargetSpId { + return nil, types.ErrSwapInFailed.Wrapf("The SP(ID=%d) can not swap itself", successorSP.Id) + } + targetSP, found := k.spKeeper.GetStorageProvider(ctx, msg.TargetSpId) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("Target sp(ID=%d) try to swap not found.", msg.TargetSpId) + } + if err := k.Keeper.SwapIn(ctx, msg.GlobalVirtualGroupFamilyId, msg.GlobalVirtualGroupId, successorSP.Id, targetSP); err != nil { + return nil, err + } + if err := ctx.EventManager().EmitTypedEvents(&types.EventSwapIn{ + StorageProviderId: successorSP.Id, + GlobalVirtualGroupFamilyId: msg.GlobalVirtualGroupFamilyId, + GlobalVirtualGroupId: msg.GlobalVirtualGroupId, + TargetSpId: msg.TargetSpId, + }); err != nil { + return nil, err + } + return &types.MsgReserveSwapInResponse{}, nil +} + +func (k msgServer) CancelSwapIn(goCtx context.Context, msg *types.MsgCancelSwapIn) (*types.MsgCancelSwapInResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + operatorAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + successorSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be operator address of sp.") + } + err := k.DeleteSwapInInfo(ctx, msg.GlobalVirtualGroupFamilyId, msg.GlobalVirtualGroupId, successorSP.Id) + if err != nil { + return nil, err + } + return &types.MsgCancelSwapInResponse{}, nil +} + +func (k msgServer) CompleteSwapIn(goCtx context.Context, msg *types.MsgCompleteSwapIn) (*types.MsgCompleteSwapInResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + operatorAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + successorSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be operator address of sp.") + } + err := k.Keeper.CompleteSwapIn(ctx, msg.GlobalVirtualGroupFamilyId, msg.GlobalVirtualGroupId, successorSP) + if err != nil { + return nil, err + } + return &types.MsgCompleteSwapInResponse{}, nil +} +func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.MsgStorageProviderForceExit) (*types.MsgStorageProviderForceExitResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + if k.GetAuthority() != msg.Authority { + return nil, sdkerrors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), msg.Authority) + } + + spAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + + sp, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, spAddr) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The SP with operator address %s must not found", msg.StorageProvider) + } + + exittingSPNum := uint32(0) + sps := k.spKeeper.GetAllStorageProviders(ctx) + for _, curSP := range sps { + if curSP.Status == sptypes.STATUS_GRACEFUL_EXITING || + curSP.Status == sptypes.STATUS_FORCE_EXITING { + exittingSPNum++ + } + } + maxSPExitingNum := k.SpConcurrentExitNum(ctx) + if exittingSPNum >= maxSPExitingNum { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("%d SP exiting, allow %d sp exit concurrently, s: %s", exittingSPNum, maxSPExitingNum) + } + + // Governance can put an SP into force exiting status no matter what status it is in. + sp.Status = sptypes.STATUS_FORCE_EXITING + k.spKeeper.SetStorageProvider(ctx, sp) + if err := ctx.EventManager().EmitTypedEvents(&types.EventStorageProviderForceExit{ + StorageProviderId: sp.Id, + }); err != nil { + return nil, err + } + return &types.MsgStorageProviderForceExitResponse{}, nil +} diff --git a/x/virtualgroup/keeper/params.go b/x/virtualgroup/keeper/params.go index 0fed21384..cba92d4a5 100644 --- a/x/virtualgroup/keeper/params.go +++ b/x/virtualgroup/keeper/params.go @@ -27,6 +27,16 @@ func (k Keeper) MaxStoreSizePerFamily(ctx sdk.Context) (res uint64) { return params.MaxStoreSizePerFamily } +func (k Keeper) SwapInValidityPeriod(ctx sdk.Context) (res uint64) { + params := k.GetParams(ctx) + return params.SwapInValidityPeriod +} + +func (k Keeper) SpConcurrentExitNum(ctx sdk.Context) (res uint32) { + params := k.GetParams(ctx) + return params.SpConcurrentExitNum +} + // GetParams returns the current sp module parameters. func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { store := ctx.KVStore(k.storeKey) diff --git a/x/virtualgroup/types/errors.go b/x/virtualgroup/types/errors.go index 6f5e85f98..e54db1774 100644 --- a/x/virtualgroup/types/errors.go +++ b/x/virtualgroup/types/errors.go @@ -22,6 +22,9 @@ var ( ErrLimitationExceed = errors.Register(ModuleName, 1123, "limitation exceed.") ErrDuplicateSecondarySP = errors.Register(ModuleName, 1124, "the global virtual group has duplicate secondary sp.") ErrInsufficientStaking = errors.Register(ModuleName, 1125, "insufficient staking for gvg") + ErrSwapInFailed = errors.Register(ModuleName, 1127, "swap in failed.") + ErrSwapInInfoNotExist = errors.Register(ModuleName, 1128, "swap in info not exist.") + ErrSwapInInfoExpired = errors.Register(ModuleName, 1129, "swap in info expired") ErrInvalidDenom = errors.Register(ModuleName, 2000, "Invalid denom.") ) diff --git a/x/virtualgroup/types/events.pb.go b/x/virtualgroup/types/events.pb.go index 8c1c0afca..9915fc5d6 100644 --- a/x/virtualgroup/types/events.pb.go +++ b/x/virtualgroup/types/events.pb.go @@ -940,6 +940,267 @@ func (m *EventCompleteStorageProviderExit) GetOperatorAddress() string { return "" } +type EventSwapIn struct { + // The id of the storage provider who wants to swap in + StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` + // The id of the gvg family which the storage provider wants to swap in as primary sp + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,2,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + // The id of the gvg which the storage provider wants to swap in as secondary sp + GlobalVirtualGroupId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` + // The id of the target sp who will be swapped + TargetSpId uint32 `protobuf:"varint,4,opt,name=target_sp_id,json=targetSpId,proto3" json:"target_sp_id,omitempty"` +} + +func (m *EventSwapIn) Reset() { *m = EventSwapIn{} } +func (m *EventSwapIn) String() string { return proto.CompactTextString(m) } +func (*EventSwapIn) ProtoMessage() {} +func (*EventSwapIn) Descriptor() ([]byte, []int) { + return fileDescriptor_ece39ea12016bd5b, []int{14} +} +func (m *EventSwapIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSwapIn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSwapIn.Merge(m, src) +} +func (m *EventSwapIn) XXX_Size() int { + return m.Size() +} +func (m *EventSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_EventSwapIn.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSwapIn proto.InternalMessageInfo + +func (m *EventSwapIn) GetStorageProviderId() uint32 { + if m != nil { + return m.StorageProviderId + } + return 0 +} + +func (m *EventSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId + } + return 0 +} + +func (m *EventSwapIn) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId + } + return 0 +} + +func (m *EventSwapIn) GetTargetSpId() uint32 { + if m != nil { + return m.TargetSpId + } + return 0 +} + +type EventCompleteSwapIn struct { + // The id of the storage provider who complete swap in. + StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` + // The id of the storage provider who swap in the family or gvgs + TargetStorageProviderId uint32 `protobuf:"varint,2,opt,name=target_storage_provider_id,json=targetStorageProviderId,proto3" json:"target_storage_provider_id,omitempty"` + // The id of the gvg family + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + // The id of the gvg + GlobalVirtualGroupId uint32 `protobuf:"varint,4,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` +} + +func (m *EventCompleteSwapIn) Reset() { *m = EventCompleteSwapIn{} } +func (m *EventCompleteSwapIn) String() string { return proto.CompactTextString(m) } +func (*EventCompleteSwapIn) ProtoMessage() {} +func (*EventCompleteSwapIn) Descriptor() ([]byte, []int) { + return fileDescriptor_ece39ea12016bd5b, []int{15} +} +func (m *EventCompleteSwapIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCompleteSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCompleteSwapIn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventCompleteSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCompleteSwapIn.Merge(m, src) +} +func (m *EventCompleteSwapIn) XXX_Size() int { + return m.Size() +} +func (m *EventCompleteSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_EventCompleteSwapIn.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCompleteSwapIn proto.InternalMessageInfo + +func (m *EventCompleteSwapIn) GetStorageProviderId() uint32 { + if m != nil { + return m.StorageProviderId + } + return 0 +} + +func (m *EventCompleteSwapIn) GetTargetStorageProviderId() uint32 { + if m != nil { + return m.TargetStorageProviderId + } + return 0 +} + +func (m *EventCompleteSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId + } + return 0 +} + +func (m *EventCompleteSwapIn) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId + } + return 0 +} + +type EventCancelSwapIn struct { + // The id of the storage provider who cancel swap in. + StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` + // The id of the gvg family + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,2,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + // The id of the gvg + GlobalVirtualGroupId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` + // The id of the target sp who was swapped from family or gvgs + TargetSpId uint32 `protobuf:"varint,4,opt,name=target_sp_id,json=targetSpId,proto3" json:"target_sp_id,omitempty"` +} + +func (m *EventCancelSwapIn) Reset() { *m = EventCancelSwapIn{} } +func (m *EventCancelSwapIn) String() string { return proto.CompactTextString(m) } +func (*EventCancelSwapIn) ProtoMessage() {} +func (*EventCancelSwapIn) Descriptor() ([]byte, []int) { + return fileDescriptor_ece39ea12016bd5b, []int{16} +} +func (m *EventCancelSwapIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCancelSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCancelSwapIn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventCancelSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCancelSwapIn.Merge(m, src) +} +func (m *EventCancelSwapIn) XXX_Size() int { + return m.Size() +} +func (m *EventCancelSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_EventCancelSwapIn.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCancelSwapIn proto.InternalMessageInfo + +func (m *EventCancelSwapIn) GetStorageProviderId() uint32 { + if m != nil { + return m.StorageProviderId + } + return 0 +} + +func (m *EventCancelSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId + } + return 0 +} + +func (m *EventCancelSwapIn) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId + } + return 0 +} + +func (m *EventCancelSwapIn) GetTargetSpId() uint32 { + if m != nil { + return m.TargetSpId + } + return 0 +} + +type EventStorageProviderForceExit struct { + // The id of the storage provider who wants to exit + StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` +} + +func (m *EventStorageProviderForceExit) Reset() { *m = EventStorageProviderForceExit{} } +func (m *EventStorageProviderForceExit) String() string { return proto.CompactTextString(m) } +func (*EventStorageProviderForceExit) ProtoMessage() {} +func (*EventStorageProviderForceExit) Descriptor() ([]byte, []int) { + return fileDescriptor_ece39ea12016bd5b, []int{17} +} +func (m *EventStorageProviderForceExit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventStorageProviderForceExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventStorageProviderForceExit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventStorageProviderForceExit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventStorageProviderForceExit.Merge(m, src) +} +func (m *EventStorageProviderForceExit) XXX_Size() int { + return m.Size() +} +func (m *EventStorageProviderForceExit) XXX_DiscardUnknown() { + xxx_messageInfo_EventStorageProviderForceExit.DiscardUnknown(m) +} + +var xxx_messageInfo_EventStorageProviderForceExit proto.InternalMessageInfo + +func (m *EventStorageProviderForceExit) GetStorageProviderId() uint32 { + if m != nil { + return m.StorageProviderId + } + return 0 +} + func init() { proto.RegisterType((*EventCreateGlobalVirtualGroup)(nil), "greenfield.virtualgroup.EventCreateGlobalVirtualGroup") proto.RegisterType((*EventUpdateGlobalVirtualGroup)(nil), "greenfield.virtualgroup.EventUpdateGlobalVirtualGroup") @@ -955,6 +1216,10 @@ func init() { proto.RegisterType((*EventCancelSwapOut)(nil), "greenfield.virtualgroup.EventCancelSwapOut") proto.RegisterType((*EventStorageProviderExit)(nil), "greenfield.virtualgroup.EventStorageProviderExit") proto.RegisterType((*EventCompleteStorageProviderExit)(nil), "greenfield.virtualgroup.EventCompleteStorageProviderExit") + proto.RegisterType((*EventSwapIn)(nil), "greenfield.virtualgroup.EventSwapIn") + proto.RegisterType((*EventCompleteSwapIn)(nil), "greenfield.virtualgroup.EventCompleteSwapIn") + proto.RegisterType((*EventCancelSwapIn)(nil), "greenfield.virtualgroup.EventCancelSwapIn") + proto.RegisterType((*EventStorageProviderForceExit)(nil), "greenfield.virtualgroup.EventStorageProviderForceExit") } func init() { @@ -962,56 +1227,61 @@ func init() { } var fileDescriptor_ece39ea12016bd5b = []byte{ - // 778 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x4f, 0x13, 0x4f, - 0x14, 0xef, 0xb6, 0x85, 0x2f, 0x1d, 0x28, 0xf0, 0x5d, 0x4b, 0xba, 0x82, 0x94, 0xa6, 0x1a, 0xd2, - 0x4b, 0xdb, 0x83, 0x12, 0x3d, 0x78, 0xb1, 0x80, 0xa4, 0x89, 0x51, 0xd2, 0x06, 0x13, 0xbd, 0x6c, - 0xb6, 0x3b, 0xc3, 0x32, 0x61, 0xbb, 0xb3, 0x99, 0x99, 0x22, 0xe5, 0x9f, 0xd0, 0xf8, 0xb7, 0xf0, - 0x07, 0x78, 0xe4, 0x48, 0x38, 0x19, 0x0f, 0xc4, 0x50, 0x2f, 0xde, 0x3c, 0x7b, 0xd1, 0xec, 0xcc, - 0xb4, 0xb4, 0xf4, 0x07, 0x58, 0xd4, 0xa8, 0xa7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x02, 0x8b, 0x03, 0xdc, 0x71, 0x18, 0xe6, 0x9c, 0x1e, 0x04, 0x01, 0x77, 0x6f, - 0x5b, 0x30, 0x07, 0xa9, 0xe7, 0x1a, 0x30, 0x87, 0x15, 0x15, 0x19, 0x56, 0xd4, 0x0b, 0x55, 0xd3, - 0xa0, 0x86, 0x8e, 0x5e, 0x53, 0xe6, 0x9d, 0x06, 0x6e, 0x75, 0xb4, 0xf5, 0x09, 0xb1, 0x2f, 0xd1, - 0xca, 0x03, 0x10, 0xab, 0xd6, 0xed, 0x5d, 0xc4, 0x5b, 0x01, 0x63, 0xc5, 0x05, 0x75, 0x12, 0xa2, - 0x5b, 0x58, 0xe8, 0x7c, 0x52, 0x75, 0x2a, 0xf8, 0x2c, 0x4f, 0x48, 0xef, 0x12, 0xd4, 0x57, 0x40, - 0x72, 0x00, 0x7c, 0x35, 0xc6, 0x12, 0xfd, 0xd0, 0x5f, 0x9c, 0x52, 0xd1, 0x8b, 0x53, 0xea, 0x1c, - 0x82, 0x6c, 0xd9, 0xdf, 0x08, 0x61, 0x47, 0x21, 0x90, 0x0d, 0xfe, 0x85, 0x08, 0x32, 0x4d, 0x0d, - 0x4c, 0x89, 0x54, 0x95, 0x57, 0x96, 0xff, 0xac, 0xce, 0xf5, 0x3c, 0xb8, 0x11, 0x14, 0x62, 0x39, - 0x28, 0xb8, 0xd5, 0xf6, 0x30, 0x44, 0xd4, 0x6c, 0xe7, 0xfa, 0x5f, 0x2d, 0x6d, 0xaa, 0x95, 0x12, - 0xd4, 0x8b, 0x20, 0xd5, 0x97, 0x82, 0x8b, 0x97, 0xd6, 0xbc, 0x33, 0x40, 0xa6, 0xd7, 0x38, 0x08, - 0xfa, 0x32, 0x98, 0x61, 0x75, 0xdb, 0x46, 0x8c, 0x11, 0xda, 0x35, 0x29, 0xe3, 0x6d, 0xb3, 0x50, - 0xf5, 0x57, 0x0d, 0x24, 0xa4, 0xaa, 0x49, 0xcd, 0x0f, 0x28, 0x1d, 0x15, 0xed, 0x0a, 0x48, 0x32, - 0x6a, 0x9b, 0xfd, 0xf6, 0x48, 0x98, 0x09, 0x46, 0xed, 0xca, 0x08, 0x24, 0x45, 0xae, 0x45, 0xd2, - 0xd0, 0x11, 0xf6, 0x59, 0x03, 0xba, 0x04, 0x6f, 0x79, 0x36, 0x72, 0xff, 0xe9, 0x46, 0xbf, 0xd6, - 0x80, 0x21, 0xe5, 0xdc, 0x5d, 0xff, 0xfa, 0x3e, 0xfe, 0x71, 0xc4, 0xab, 0x60, 0x96, 0xf8, 0x88, - 0x5a, 0x9c, 0xd0, 0xf6, 0xfd, 0x13, 0xbe, 0xe4, 0xfe, 0x99, 0x69, 0xed, 0x50, 0xe6, 0x40, 0x7a, - 0xe9, 0x6e, 0xe9, 0xfd, 0x21, 0x95, 0xfd, 0x86, 0x77, 0x4c, 0xf1, 0xe9, 0xd1, 0x59, 0x4a, 0x3b, - 0x3e, 0x4b, 0x69, 0x1f, 0xcf, 0x52, 0xda, 0x9b, 0x66, 0x2a, 0x74, 0xdc, 0x4c, 0x85, 0xde, 0x37, - 0x53, 0xa1, 0x97, 0xf7, 0x3a, 0xa2, 0x57, 0xbd, 0x6a, 0xce, 0xde, 0xb1, 0xb0, 0x57, 0xe8, 0x78, - 0x8d, 0xef, 0x77, 0xbf, 0xc7, 0x45, 0xbe, 0xea, 0xb8, 0x78, 0x45, 0xdf, 0xfd, 0x1e, 0x00, 0x00, - 0xff, 0xff, 0x21, 0xa5, 0x62, 0x6c, 0xb7, 0x0b, 0x00, 0x00, + // 862 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4b, 0x8f, 0x1b, 0x45, + 0x10, 0x76, 0xdb, 0x4e, 0x88, 0xcb, 0xeb, 0x3c, 0x26, 0x8e, 0x3c, 0x38, 0xc4, 0x6b, 0x0d, 0x28, + 0xf2, 0xc5, 0xf6, 0x01, 0x22, 0x90, 0xe0, 0x82, 0xf3, 0x92, 0x25, 0x44, 0x56, 0xb6, 0x82, 0x04, + 0x97, 0xd1, 0x78, 0xba, 0x33, 0xdb, 0xca, 0x78, 0x7a, 0xd4, 0xdd, 0x5e, 0xe2, 0xfc, 0x09, 0x10, + 0xbf, 0x25, 0x3f, 0x80, 0x63, 0x8e, 0x51, 0x4e, 0x28, 0x87, 0x28, 0x5a, 0x73, 0xe1, 0xc6, 0x19, + 0x09, 0x81, 0xa6, 0xbb, 0xed, 0xf8, 0xbd, 0xcb, 0x2c, 0xcb, 0x63, 0x4f, 0xf6, 0x54, 0x57, 0x57, + 0xd7, 0xf7, 0xd5, 0x57, 0xd5, 0x33, 0xf0, 0x41, 0xc0, 0x09, 0x89, 0x1e, 0x51, 0x12, 0xe2, 0xf6, + 0x01, 0xe5, 0x72, 0xe4, 0x85, 0x01, 0x67, 0xa3, 0xb8, 0x4d, 0x0e, 0x48, 0x24, 0x45, 0x2b, 0xe6, + 0x4c, 0x32, 0xab, 0xf2, 0xd6, 0xab, 0x35, 0xef, 0x55, 0x7d, 0xd7, 0x67, 0x62, 0xc8, 0x84, 0xab, + 0xdc, 0xda, 0xfa, 0x41, 0xef, 0xa9, 0x96, 0x03, 0x16, 0x30, 0x6d, 0x4f, 0xfe, 0x69, 0xab, 0xf3, + 0x6b, 0x16, 0x6e, 0xdc, 0x4d, 0x42, 0xdf, 0xe6, 0xc4, 0x93, 0xe4, 0x7e, 0xc8, 0x06, 0x5e, 0xf8, + 0x95, 0x0e, 0x79, 0x3f, 0x09, 0x69, 0x5d, 0x84, 0x2c, 0xc5, 0x36, 0xaa, 0xa3, 0x46, 0xa9, 0x97, + 0xa5, 0xd8, 0xba, 0x0e, 0x85, 0x47, 0xde, 0x90, 0x86, 0x63, 0x97, 0x62, 0x3b, 0xab, 0xcc, 0x17, + 0xb4, 0xa1, 0x8b, 0x2d, 0x07, 0x4a, 0x31, 0xa7, 0x43, 0x8f, 0x8f, 0x5d, 0x11, 0x27, 0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6, + 0x30, 0x94, 0xdf, 0xcc, 0x90, 0xf3, 0x06, 0xc1, 0x95, 0xa5, 0xb9, 0x72, 0xd6, 0x4a, 0xfc, 0xc0, + 0xbc, 0x39, 0x2f, 0xf1, 0x7e, 0x8f, 0x71, 0x9f, 0xa4, 0x69, 0xdc, 0xce, 0x97, 0xcf, 0x0f, 0x6b, + 0xe8, 0xc5, 0x61, 0x0d, 0xbd, 0x39, 0xac, 0xa1, 0xef, 0x27, 0xb5, 0xcc, 0x8b, 0x49, 0x2d, 0xf3, + 0xd3, 0xa4, 0x96, 0xf9, 0xe6, 0xa3, 0xb9, 0x76, 0x1b, 0x44, 0x83, 0xa6, 0xbf, 0xef, 0xd1, 0xa8, + 0x3d, 0xf7, 0x79, 0xfa, 0x64, 0xf1, 0x03, 0x55, 0x35, 0xe0, 0xe0, 0xbc, 0xfa, 0xac, 0xfc, 0xf0, + 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x1a, 0x3f, 0xb8, 0xc8, 0x0e, 0x00, 0x00, } func (m *EventCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -1715,62 +1985,219 @@ func (m *EventCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { - offset -= sovEvents(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *EventSwapIn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *EventCreateGlobalVirtualGroup) Size() (n int) { - if m == nil { - return 0 - } + +func (m *EventSwapIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Id != 0 { - n += 1 + sovEvents(uint64(m.Id)) - } - if m.FamilyId != 0 { - n += 1 + sovEvents(uint64(m.FamilyId)) - } - if m.PrimarySpId != 0 { - n += 1 + sovEvents(uint64(m.PrimarySpId)) + if m.TargetSpId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.TargetSpId)) + i-- + dAtA[i] = 0x20 } - if len(m.SecondarySpIds) > 0 { - l = 0 - for _, e := range m.SecondarySpIds { - l += sovEvents(uint64(e)) - } - n += 1 + sovEvents(uint64(l)) + l + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x18 } - if m.StoredSize != 0 { - n += 1 + sovEvents(uint64(m.StoredSize)) + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 } - l = len(m.VirtualPaymentAddress) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) + if m.StorageProviderId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.StorageProviderId)) + i-- + dAtA[i] = 0x8 } - l = m.TotalDeposit.Size() - n += 1 + l + sovEvents(uint64(l)) - return n + return len(dAtA) - i, nil } -func (m *EventUpdateGlobalVirtualGroup) Size() (n int) { - if m == nil { - return 0 +func (m *EventCompleteSwapIn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *EventCompleteSwapIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCompleteSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Id != 0 { - n += 1 + sovEvents(uint64(m.Id)) - } - if m.StoreSize != 0 { - n += 1 + sovEvents(uint64(m.StoreSize)) + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x20 + } + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x18 + } + if m.TargetStorageProviderId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.TargetStorageProviderId)) + i-- + dAtA[i] = 0x10 + } + if m.StorageProviderId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.StorageProviderId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventCancelSwapIn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventCancelSwapIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCancelSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TargetSpId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.TargetSpId)) + i-- + dAtA[i] = 0x20 + } + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x18 + } + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 + } + if m.StorageProviderId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.StorageProviderId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventStorageProviderForceExit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventStorageProviderForceExit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventStorageProviderForceExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StorageProviderId != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.StorageProviderId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventCreateGlobalVirtualGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + if m.FamilyId != 0 { + n += 1 + sovEvents(uint64(m.FamilyId)) + } + if m.PrimarySpId != 0 { + n += 1 + sovEvents(uint64(m.PrimarySpId)) + } + if len(m.SecondarySpIds) > 0 { + l = 0 + for _, e := range m.SecondarySpIds { + l += sovEvents(uint64(e)) + } + n += 1 + sovEvents(uint64(l)) + l + } + if m.StoredSize != 0 { + n += 1 + sovEvents(uint64(m.StoredSize)) + } + l = len(m.VirtualPaymentAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = m.TotalDeposit.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func (m *EventUpdateGlobalVirtualGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + if m.StoreSize != 0 { + n += 1 + sovEvents(uint64(m.StoreSize)) } l = m.TotalDeposit.Size() n += 1 + l + sovEvents(uint64(l)) @@ -2028,6 +2455,81 @@ func (m *EventCompleteStorageProviderExit) Size() (n int) { return n } +func (m *EventSwapIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StorageProviderId != 0 { + n += 1 + sovEvents(uint64(m.StorageProviderId)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovEvents(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovEvents(uint64(m.GlobalVirtualGroupId)) + } + if m.TargetSpId != 0 { + n += 1 + sovEvents(uint64(m.TargetSpId)) + } + return n +} + +func (m *EventCompleteSwapIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StorageProviderId != 0 { + n += 1 + sovEvents(uint64(m.StorageProviderId)) + } + if m.TargetStorageProviderId != 0 { + n += 1 + sovEvents(uint64(m.TargetStorageProviderId)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovEvents(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovEvents(uint64(m.GlobalVirtualGroupId)) + } + return n +} + +func (m *EventCancelSwapIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StorageProviderId != 0 { + n += 1 + sovEvents(uint64(m.StorageProviderId)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovEvents(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovEvents(uint64(m.GlobalVirtualGroupId)) + } + if m.TargetSpId != 0 { + n += 1 + sovEvents(uint64(m.TargetSpId)) + } + return n +} + +func (m *EventStorageProviderForceExit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StorageProviderId != 0 { + n += 1 + sovEvents(uint64(m.StorageProviderId)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4225,6 +4727,453 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { } return nil } +func (m *EventSwapIn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSwapIn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderId", wireType) + } + m.StorageProviderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageProviderId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + } + m.GlobalVirtualGroupFamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetSpId", wireType) + } + m.TargetSpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetSpId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventCompleteSwapIn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCompleteSwapIn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCompleteSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderId", wireType) + } + m.StorageProviderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageProviderId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetStorageProviderId", wireType) + } + m.TargetStorageProviderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetStorageProviderId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + } + m.GlobalVirtualGroupFamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventCancelSwapIn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCancelSwapIn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCancelSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderId", wireType) + } + m.StorageProviderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageProviderId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + } + m.GlobalVirtualGroupFamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetSpId", wireType) + } + m.TargetSpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetSpId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventStorageProviderForceExit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventStorageProviderForceExit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventStorageProviderForceExit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderId", wireType) + } + m.StorageProviderId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageProviderId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/virtualgroup/types/expected_keepers.go b/x/virtualgroup/types/expected_keepers.go index 240915cb7..c2f8a8ba4 100644 --- a/x/virtualgroup/types/expected_keepers.go +++ b/x/virtualgroup/types/expected_keepers.go @@ -15,6 +15,7 @@ type SpKeeper interface { SetStorageProvider(ctx sdk.Context, sp *sptypes.StorageProvider) Exit(ctx sdk.Context, sp *sptypes.StorageProvider) error DepositDenomForSP(ctx sdk.Context) (res string) + GetAllStorageProviders(ctx sdk.Context) (sps []sptypes.StorageProvider) } // AccountKeeper defines the expected account keeper used for simulations (noalias) diff --git a/x/virtualgroup/types/keys.go b/x/virtualgroup/types/keys.go index a20f1d9c4..55ddf5a94 100644 --- a/x/virtualgroup/types/keys.go +++ b/x/virtualgroup/types/keys.go @@ -28,6 +28,8 @@ const ( // NoSpecifiedFamilyId defines NoSpecifiedFamilyId = uint32(0) + + NoSpecifiedGVGId = uint32(0) ) var ( @@ -43,6 +45,9 @@ var ( SwapOutFamilyKey = []byte{0x51} SwapOutGVGKey = []byte{0x61} + + SwapInFamilyKey = []byte{0x52} + SwapInGVGKey = []byte{0x62} ) func GetGVGKey(gvgID uint32) []byte { @@ -69,3 +74,13 @@ func GetSwapOutGVGKey(globalVirtualGroupID uint32) []byte { var uint32Seq sequence.Sequence[uint32] return append(SwapOutGVGKey, uint32Seq.EncodeSequence(globalVirtualGroupID)...) } + +func GetSwapInFamilyKey(globalVirtualGroupFamilyID uint32) []byte { + var uint32Seq sequence.Sequence[uint32] + return append(SwapInFamilyKey, uint32Seq.EncodeSequence(globalVirtualGroupFamilyID)...) +} + +func GetSwapInGVGKey(globalVirtualGroupID uint32) []byte { + var uint32Seq sequence.Sequence[uint32] + return append(SwapInGVGKey, uint32Seq.EncodeSequence(globalVirtualGroupID)...) +} diff --git a/x/virtualgroup/types/message.go b/x/virtualgroup/types/message.go index a1e1a08d0..b023dd30c 100644 --- a/x/virtualgroup/types/message.go +++ b/x/virtualgroup/types/message.go @@ -17,6 +17,9 @@ const ( TypeMsgSwapOut = "swap_out" TypeMsgUpdateParams = "update_params" TypeMsgSettle = "settle" + TypeMsgReserveSwapIn = "swap_in" + TypeMsgCancelSwapIn = "cancel_swap_in" + TypeMsgCompleteSwapIn = "complete_swap_in" ) var ( @@ -27,6 +30,9 @@ var ( _ sdk.Msg = &MsgSwapOut{} _ sdk.Msg = &MsgUpdateParams{} _ sdk.Msg = &MsgSettle{} + _ sdk.Msg = &MsgReserveSwapIn{} + _ sdk.Msg = &MsgCancelSwapIn{} + _ sdk.Msg = &MsgCompleteSwapIn{} ) func NewMsgCreateGlobalVirtualGroup(primarySpAddress sdk.AccAddress, globalVirtualFamilyId uint32, secondarySpIds []uint32, deposit sdk.Coin) *MsgCreateGlobalVirtualGroup { @@ -325,3 +331,137 @@ func (msg *MsgSettle) ValidateBasic() error { return nil } + +func NewMsgReserveSwapIn(storageProvider sdk.AccAddress, targetSPId, globalVirtualGroupFamilyID, globalVirtualGroupID uint32) *MsgReserveSwapIn { + return &MsgReserveSwapIn{ + StorageProvider: storageProvider.String(), + TargetSpId: targetSPId, + GlobalVirtualGroupFamilyId: globalVirtualGroupFamilyID, + GlobalVirtualGroupId: globalVirtualGroupID, + } +} + +func (msg *MsgReserveSwapIn) Route() string { + return RouterKey +} + +func (msg *MsgReserveSwapIn) Type() string { + return TypeMsgReserveSwapIn +} + +func (msg *MsgReserveSwapIn) ValidateBasic() error { + _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid creator address (%s)", err) + } + if msg.GlobalVirtualGroupFamilyId == NoSpecifiedFamilyId { + if msg.GlobalVirtualGroupId == NoSpecifiedGVGId { + return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be specified when familyID is not specified.") + } + } else { + if msg.GlobalVirtualGroupId != NoSpecifiedGVGId { + return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be empty(0) when familyID is specified.") + } + } + return nil +} + +func (msg *MsgReserveSwapIn) GetSigners() []sdk.AccAddress { + operator, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + panic(err) + } + return []sdk.AccAddress{operator} +} + +func (msg *MsgReserveSwapIn) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func NewMsgCancelSwapIn(storageProvider sdk.AccAddress, globalVirtualGroupFamilyID, globalVirtualGroupID uint32) *MsgCancelSwapIn { + return &MsgCancelSwapIn{ + StorageProvider: storageProvider.String(), + GlobalVirtualGroupFamilyId: globalVirtualGroupFamilyID, + GlobalVirtualGroupId: globalVirtualGroupID, + } +} + +func (msg *MsgCancelSwapIn) Route() string { + return RouterKey +} + +func (msg *MsgCancelSwapIn) Type() string { + return TypeMsgCancelSwapIn +} + +func (msg *MsgCancelSwapIn) GetSigners() []sdk.AccAddress { + operator, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + panic(err) + } + return []sdk.AccAddress{operator} +} + +func (msg *MsgCancelSwapIn) ValidateBasic() error { + _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid creator address (%s)", err) + } + if msg.GlobalVirtualGroupFamilyId == NoSpecifiedFamilyId { + if msg.GlobalVirtualGroupId == NoSpecifiedGVGId { + return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be specified when familyID is not specified.") + } + } else { + if msg.GlobalVirtualGroupId != NoSpecifiedGVGId { + return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be empty(0) when familyID is specified.") + } + } + return nil +} + +func NewMsgCompleteSwapIn(storageProvider sdk.AccAddress, globalVirtualGroupFamilyID, globalVirtualGroupID uint32) *MsgCompleteSwapIn { + return &MsgCompleteSwapIn{ + StorageProvider: storageProvider.String(), + GlobalVirtualGroupFamilyId: globalVirtualGroupFamilyID, + GlobalVirtualGroupId: globalVirtualGroupID, + } +} + +func (msg *MsgCompleteSwapIn) Route() string { + return RouterKey +} + +func (msg *MsgCompleteSwapIn) Type() string { + return TypeMsgCompleteSwapIn +} + +func (msg *MsgCompleteSwapIn) GetSigners() []sdk.AccAddress { + operator, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + panic(err) + } + return []sdk.AccAddress{operator} +} + +func (msg *MsgCompleteSwapIn) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgCompleteSwapIn) ValidateBasic() error { + _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid creator address (%s)", err) + } + if msg.GlobalVirtualGroupFamilyId == NoSpecifiedFamilyId { + if msg.GlobalVirtualGroupId == NoSpecifiedGVGId { + return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be specified when familyID is not specified.") + } + } else { + if msg.GlobalVirtualGroupId != NoSpecifiedGVGId { + return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be empty(0) when familyID is specified.") + } + } + return nil +} diff --git a/x/virtualgroup/types/message_storage_provider_force_exit.go b/x/virtualgroup/types/message_storage_provider_force_exit.go new file mode 100644 index 000000000..04940216f --- /dev/null +++ b/x/virtualgroup/types/message_storage_provider_force_exit.go @@ -0,0 +1,46 @@ +package types + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgStorageProviderForceExit = "storage_provider_force_exit" + +var _ sdk.Msg = &MsgStorageProviderForceExit{} + +func NewMsgStorageProviderForceExit(authority string, spAddress sdk.AccAddress) *MsgStorageProviderForceExit { + return &MsgStorageProviderForceExit{ + Authority: authority, + StorageProvider: spAddress.String(), + } +} + +func (msg *MsgStorageProviderForceExit) Route() string { + return RouterKey +} + +func (msg *MsgStorageProviderForceExit) Type() string { + return TypeMsgStorageProviderForceExit +} + +func (msg *MsgStorageProviderForceExit) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromHexUnsafe(msg.Authority) + return []sdk.AccAddress{addr} +} + +func (msg *MsgStorageProviderForceExit) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgStorageProviderForceExit) ValidateBasic() error { + if _, err := sdk.AccAddressFromHexUnsafe(msg.Authority); err != nil { + return errors.Wrap(err, "invalid authority address") + } + _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sp address (%s)", err) + } + return nil +} diff --git a/x/virtualgroup/types/params.go b/x/virtualgroup/types/params.go index 7637d6948..8fcff1404 100644 --- a/x/virtualgroup/types/params.go +++ b/x/virtualgroup/types/params.go @@ -21,11 +21,15 @@ var ( DefaultGVGStakingPerBytes = sdk.NewInt(16000) // 20%~30% of store price DefaultMaxGlobalVirtualGroupNumPerFamily = uint32(10) DefaultMaxStoreSizePerFamily = uint64(64) * 1024 * 1024 * 1024 * 1024 //64T + DefaultSwapInValidityPeriod = uint64(60) * 60 * 24 * 7 // 7 days + DefaultSPConcurrentExitNum = uint32(1) KeyDepositDenom = []byte("DepositDenom") KeyGVGStakingPerBytes = []byte("GVGStakingPerBytes") KeyMaxGlobalVirtualGroupNumPerFamily = []byte("MaxGlobalVirtualGroupNumPerFamily") KeyMaxStoreSizePerFamily = []byte("MaxStoreSizePerFamily") + KeySwapInValidityPeriod = []byte("SwapInValidityPeriod") + KeySPConcurrentExitNum = []byte("SPConcurrentExitNum") ) var _ paramtypes.ParamSet = (*Params)(nil) @@ -37,18 +41,25 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params instance func NewParams(depositDenom string, gvgStakingPerBytes math.Int, maxGlobalVirtualGroupPerFamily uint32, - maxStoreSizePerFamily uint64) Params { + maxStoreSizePerFamily, swapInValidityPeriod uint64, spConcurrentExitNum uint32) Params { return Params{ DepositDenom: depositDenom, GvgStakingPerBytes: gvgStakingPerBytes, MaxGlobalVirtualGroupNumPerFamily: maxGlobalVirtualGroupPerFamily, MaxStoreSizePerFamily: maxStoreSizePerFamily, + SwapInValidityPeriod: swapInValidityPeriod, + SpConcurrentExitNum: spConcurrentExitNum, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams(DefaultDepositDenom, DefaultGVGStakingPerBytes, DefaultMaxGlobalVirtualGroupNumPerFamily, DefaultMaxStoreSizePerFamily) + return NewParams(DefaultDepositDenom, + DefaultGVGStakingPerBytes, + DefaultMaxGlobalVirtualGroupNumPerFamily, + DefaultMaxStoreSizePerFamily, + DefaultSwapInValidityPeriod, + DefaultSPConcurrentExitNum) } // ParamSetPairs get the params.ParamSet @@ -58,6 +69,8 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyGVGStakingPerBytes, &p.GvgStakingPerBytes, validateGVGStakingPerBytes), paramtypes.NewParamSetPair(KeyMaxGlobalVirtualGroupNumPerFamily, &p.MaxGlobalVirtualGroupNumPerFamily, validateMaxGlobalVirtualGroupNumPerFamily), paramtypes.NewParamSetPair(KeyMaxStoreSizePerFamily, &p.MaxStoreSizePerFamily, validateMaxStoreSizePerFamily), + paramtypes.NewParamSetPair(KeySwapInValidityPeriod, &p.SwapInValidityPeriod, validateSwapInValidityPeriod), + paramtypes.NewParamSetPair(KeySPConcurrentExitNum, &p.SpConcurrentExitNum, validateSPConcurrentExitNum), } } @@ -75,6 +88,13 @@ func (p Params) Validate() error { if err := validateMaxStoreSizePerFamily(p.MaxStoreSizePerFamily); err != nil { return err } + if err := validateSwapInValidityPeriod(p.SwapInValidityPeriod); err != nil { + return err + } + if err := validateSwapInValidityPeriod(p.SwapInValidityPeriod); err != nil { + return err + } + return nil } @@ -137,3 +157,27 @@ func validateMaxStoreSizePerFamily(i interface{}) error { return nil } + +func validateSwapInValidityPeriod(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if v == 0 { + return fmt.Errorf("swapIn info validity period must be positive: %d", v) + } + return nil +} + +func validateSPConcurrentExitNum(i interface{}) error { + v, ok := i.(uint32) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v == 0 { + return fmt.Errorf("number of sp concurrent exit must be positive: %d", v) + } + + return nil +} diff --git a/x/virtualgroup/types/params.pb.go b/x/virtualgroup/types/params.pb.go index 4f0e126cd..b2c2fadc0 100644 --- a/x/virtualgroup/types/params.pb.go +++ b/x/virtualgroup/types/params.pb.go @@ -37,6 +37,10 @@ type Params struct { MaxGlobalVirtualGroupNumPerFamily uint32 `protobuf:"varint,4,opt,name=max_global_virtual_group_num_per_family,json=maxGlobalVirtualGroupNumPerFamily,proto3" json:"max_global_virtual_group_num_per_family,omitempty"` // if the store size reach the exceed, the family is not allowed to sever more buckets MaxStoreSizePerFamily uint64 `protobuf:"varint,5,opt,name=max_store_size_per_family,json=maxStoreSizePerFamily,proto3" json:"max_store_size_per_family,omitempty"` + // the validity period that a successor SP can reserve to complete the swap for Global virtual group/family + SwapInValidityPeriod uint64 `protobuf:"varint,6,opt,name=swap_in_validity_period,json=swapInValidityPeriod,proto3" json:"swap_in_validity_period,omitempty"` + // sp_concurrent_exit_num defines the number of sp allowed for exit concurrently. + SpConcurrentExitNum uint32 `protobuf:"varint,7,opt,name=sp_concurrent_exit_num,json=spConcurrentExitNum,proto3" json:"sp_concurrent_exit_num,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -99,6 +103,20 @@ func (m *Params) GetMaxStoreSizePerFamily() uint64 { return 0 } +func (m *Params) GetSwapInValidityPeriod() uint64 { + if m != nil { + return m.SwapInValidityPeriod + } + return 0 +} + +func (m *Params) GetSpConcurrentExitNum() uint32 { + if m != nil { + return m.SpConcurrentExitNum + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "greenfield.virtualgroup.Params") } @@ -108,33 +126,37 @@ func init() { } var fileDescriptor_d8ecf89dd5128885 = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x3f, 0x6f, 0xd4, 0x30, - 0x18, 0x87, 0x63, 0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 0x4c, 0xa4, 0x83, 0x4d, 0x69, 0xff, 0xdd, 0x15, 0x37, 0xdf, 0xfc, 0xc0, 0xdd, 0xf0, 0x8b, - 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x12, 0x99, 0xe2, 0xe9, 0x53, 0x02, 0x00, 0x00, + // 478 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xc7, 0x13, 0x36, 0x0a, 0x58, 0xec, 0x12, 0x36, 0x96, 0xed, 0x90, 0x96, 0x17, 0x8d, 0x5e, + 0xda, 0x1c, 0x06, 0x12, 0x42, 0x9c, 0xca, 0xcb, 0x54, 0x09, 0x55, 0x55, 0x2a, 0xed, 0xc0, 0xc5, + 0x72, 0x12, 0xcf, 0xb3, 0x1a, 0xbf, 0xc8, 0x76, 0x4a, 0xba, 0x4f, 0xc1, 0x91, 0xe3, 0x3e, 0x04, + 0x1f, 0x62, 0xc7, 0x89, 0x13, 0xe2, 0x30, 0xa1, 0xf6, 0xc2, 0x07, 0xe0, 0x03, 0x20, 0x3b, 0x11, + 0x0b, 0x42, 0x3b, 0x25, 0x7e, 0x9e, 0xdf, 0xf3, 0xd3, 0xdf, 0xf2, 0x03, 0x9e, 0x12, 0x85, 0x31, + 0x3f, 0xa1, 0xb8, 0xc8, 0xe3, 0x05, 0x55, 0xa6, 0x44, 0x05, 0x51, 0xa2, 0x94, 0xb1, 0x44, 0x0a, + 0x31, 0x3d, 0x94, 0x4a, 0x18, 0x11, 0xec, 0x5e, 0x53, 0xc3, 0x36, 0xb5, 0xbf, 0x97, 0x09, 0xcd, + 0x84, 0x86, 0x0e, 0x8b, 0xeb, 0x43, 0x3d, 0xb3, 0xbf, 0x4d, 0x04, 0x11, 0x75, 0xdd, 0xfe, 0xd5, + 0xd5, 0xc7, 0xbf, 0x37, 0x40, 0x67, 0xea, 0xd4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0x93, 0x1d, + 0x86, 0xaa, 0x99, 0xed, 0xcf, 0xe8, 0x19, 0xbe, 0x9e, 0x7c, 0x01, 0x76, 0xf5, 0x27, 0x24, 0x21, + 0xe5, 0x70, 0x81, 0x0a, 0x9a, 0x53, 0xb3, 0xb4, 0xb3, 0x54, 0xe4, 0x61, 0xc7, 0xcd, 0x6d, 0xdb, + 0xf6, 0x98, 0x1f, 0x37, 0xcd, 0xa9, 0xeb, 0x05, 0x87, 0xe0, 0xa1, 0x96, 0x30, 0x13, 0x3c, 0x2b, + 0x95, 0xc2, 0xdc, 0x40, 0x5c, 0x51, 0x63, 0xe3, 0x87, 0x77, 0x5c, 0xe6, 0x07, 0x5a, 0xbe, 0xf9, + 0xdb, 0x7c, 0x57, 0x51, 0x33, 0x29, 0xd9, 0xab, 0xbb, 0x5f, 0xce, 0xbb, 0xde, 0xaf, 0xf3, 0xae, + 0x3f, 0x9a, 0x5c, 0xac, 0x22, 0xff, 0x72, 0x15, 0xf9, 0x3f, 0x57, 0x91, 0xff, 0x79, 0x1d, 0x79, + 0x97, 0xeb, 0xc8, 0xfb, 0xbe, 0x8e, 0xbc, 0x8f, 0xcf, 0x5b, 0x2f, 0x97, 0xf2, 0x74, 0x90, 0x9d, + 0x22, 0xca, 0xe3, 0xd6, 0x56, 0x56, 0xff, 0xee, 0xa5, 0x7b, 0xcb, 0xb4, 0xe3, 0xb6, 0xe9, 0xf0, + 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xd2, 0x20, 0xc6, 0xbf, 0x02, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -171,6 +193,12 @@ func (this *Params) Equal(that interface{}) bool { if this.MaxStoreSizePerFamily != that1.MaxStoreSizePerFamily { return false } + if this.SwapInValidityPeriod != that1.SwapInValidityPeriod { + return false + } + if this.SpConcurrentExitNum != that1.SpConcurrentExitNum { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -193,6 +221,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SpConcurrentExitNum != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.SpConcurrentExitNum)) + i-- + dAtA[i] = 0x38 + } + if m.SwapInValidityPeriod != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.SwapInValidityPeriod)) + i-- + dAtA[i] = 0x30 + } if m.MaxStoreSizePerFamily != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxStoreSizePerFamily)) i-- @@ -260,6 +298,12 @@ func (m *Params) Size() (n int) { if m.MaxStoreSizePerFamily != 0 { n += 1 + sovParams(uint64(m.MaxStoreSizePerFamily)) } + if m.SwapInValidityPeriod != 0 { + n += 1 + sovParams(uint64(m.SwapInValidityPeriod)) + } + if m.SpConcurrentExitNum != 0 { + n += 1 + sovParams(uint64(m.SpConcurrentExitNum)) + } return n } @@ -421,6 +465,44 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapInValidityPeriod", wireType) + } + m.SwapInValidityPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SwapInValidityPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpConcurrentExitNum", wireType) + } + m.SpConcurrentExitNum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpConcurrentExitNum |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/virtualgroup/types/query.pb.go b/x/virtualgroup/types/query.pb.go index 87be1e8f6..ec691fa4c 100644 --- a/x/virtualgroup/types/query.pb.go +++ b/x/virtualgroup/types/query.pb.go @@ -579,6 +579,102 @@ func (m *AvailableGlobalVirtualGroupFamiliesResponse) GetGlobalVirtualGroupFamil return nil } +type QuerySwapInInfoRequest struct { + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,1,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + GlobalVirtualGroupId uint32 `protobuf:"varint,2,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` +} + +func (m *QuerySwapInInfoRequest) Reset() { *m = QuerySwapInInfoRequest{} } +func (m *QuerySwapInInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySwapInInfoRequest) ProtoMessage() {} +func (*QuerySwapInInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_83cd53fc415e00e7, []int{12} +} +func (m *QuerySwapInInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapInInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapInInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySwapInInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapInInfoRequest.Merge(m, src) +} +func (m *QuerySwapInInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapInInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapInInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapInInfoRequest proto.InternalMessageInfo + +func (m *QuerySwapInInfoRequest) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId + } + return 0 +} + +func (m *QuerySwapInInfoRequest) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId + } + return 0 +} + +type QuerySwapInInfoResponse struct { + SwapInInfo *SwapInInfo `protobuf:"bytes,1,opt,name=swap_in_info,json=swapInInfo,proto3" json:"swap_in_info,omitempty"` +} + +func (m *QuerySwapInInfoResponse) Reset() { *m = QuerySwapInInfoResponse{} } +func (m *QuerySwapInInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySwapInInfoResponse) ProtoMessage() {} +func (*QuerySwapInInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_83cd53fc415e00e7, []int{13} +} +func (m *QuerySwapInInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySwapInInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySwapInInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySwapInInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySwapInInfoResponse.Merge(m, src) +} +func (m *QuerySwapInInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySwapInInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySwapInInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySwapInInfoResponse proto.InternalMessageInfo + +func (m *QuerySwapInInfoResponse) GetSwapInInfo() *SwapInInfo { + if m != nil { + return m.SwapInInfo + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "greenfield.virtualgroup.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "greenfield.virtualgroup.QueryParamsResponse") @@ -592,6 +688,8 @@ func init() { proto.RegisterType((*QueryGlobalVirtualGroupFamiliesResponse)(nil), "greenfield.virtualgroup.QueryGlobalVirtualGroupFamiliesResponse") proto.RegisterType((*AvailableGlobalVirtualGroupFamiliesRequest)(nil), "greenfield.virtualgroup.AvailableGlobalVirtualGroupFamiliesRequest") proto.RegisterType((*AvailableGlobalVirtualGroupFamiliesResponse)(nil), "greenfield.virtualgroup.AvailableGlobalVirtualGroupFamiliesResponse") + proto.RegisterType((*QuerySwapInInfoRequest)(nil), "greenfield.virtualgroup.QuerySwapInInfoRequest") + proto.RegisterType((*QuerySwapInInfoResponse)(nil), "greenfield.virtualgroup.QuerySwapInInfoResponse") } func init() { @@ -599,55 +697,61 @@ func init() { } var fileDescriptor_83cd53fc415e00e7 = []byte{ - // 762 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0xc7, 0x3b, 0xa8, 0x44, 0x1e, 0x72, 0x19, 0x6a, 0x20, 0x0b, 0xd9, 0xea, 0x82, 0x80, 0x20, - 0xbb, 0x01, 0x01, 0x89, 0x01, 0x84, 0x42, 0x40, 0x2e, 0x06, 0x1b, 0xa2, 0x89, 0x89, 0x69, 0x66, - 0xe9, 0x30, 0x6c, 0xb2, 0xdd, 0x5d, 0xba, 0xdb, 0xc6, 0xde, 0x8c, 0x67, 0x0e, 0x26, 0x9e, 0xfc, - 0x67, 0x3c, 0x73, 0x24, 0xf1, 0xa0, 0x27, 0x35, 0xe0, 0xc5, 0x7f, 0xc1, 0x78, 0x30, 0x9d, 0x99, - 0x4d, 0xa9, 0xed, 0xf4, 0x17, 0xde, 0x9a, 0xdd, 0xf7, 0xbe, 0xef, 0xfb, 0x79, 0xc3, 0x7c, 0x59, - 0x18, 0x63, 0x05, 0x4a, 0xbd, 0x43, 0x87, 0xba, 0x39, 0xab, 0xe4, 0x14, 0xa2, 0x22, 0x71, 0x59, - 0xc1, 0x2f, 0x06, 0xd6, 0x71, 0x91, 0x16, 0xca, 0x66, 0x50, 0xf0, 0x23, 0x1f, 0x0f, 0x55, 0x8b, - 0xcc, 0xcb, 0x45, 0xda, 0x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 0x44, 0x22, 0x3f, 0xe5, 0xc8, 0x69, 0xbc, 0xae, - 0x44, 0x26, 0xb1, 0x5a, 0xb6, 0x29, 0x7c, 0xfa, 0xd9, 0xe9, 0xb9, 0x8e, 0xce, 0xce, 0x75, 0xf4, - 0xe3, 0x5c, 0x47, 0xef, 0x2f, 0xf4, 0xc4, 0xd9, 0x85, 0x9e, 0xf8, 0x7a, 0xa1, 0x27, 0x5e, 0x2d, - 0x30, 0x27, 0x3a, 0x2a, 0xda, 0xe6, 0x81, 0x9f, 0xb7, 0x6c, 0xcf, 0x9e, 0x3d, 0x38, 0x22, 0x8e, - 0x77, 0x79, 0xde, 0x9b, 0x06, 0x9f, 0xa8, 0x76, 0x2f, 0xff, 0x46, 0x7d, 0xf8, 0x37, 0x00, 0x00, - 0xff, 0xff, 0x7c, 0x68, 0xc4, 0x2a, 0x8e, 0x0b, 0x00, 0x00, + // 853 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4f, 0x4f, 0xe3, 0x46, + 0x18, 0xc6, 0x33, 0xb4, 0x45, 0xed, 0x0b, 0x5c, 0x86, 0xb4, 0x20, 0x83, 0x9c, 0xd6, 0xfc, 0x09, + 0x85, 0x62, 0x17, 0x0a, 0x14, 0x55, 0x40, 0x21, 0x50, 0x68, 0x2e, 0x15, 0x4d, 0x51, 0x2b, 0x55, + 0xaa, 0xdc, 0x31, 0x71, 0x8c, 0x25, 0xc7, 0x63, 0x62, 0x27, 0x34, 0xb7, 0xaa, 0x67, 0x0e, 0x95, + 0x38, 0xf5, 0xd0, 0xfd, 0x28, 0x7b, 0xe6, 0x88, 0xb4, 0x87, 0xdd, 0xd3, 0xee, 0x0a, 0xf6, 0xb2, + 0x5f, 0x61, 0x4f, 0xab, 0x8c, 0xc7, 0x9b, 0x64, 0x9d, 0x71, 0xfe, 0xc0, 0xcd, 0x4a, 0xde, 0xf7, + 0x79, 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0xd3, 0x33, 0x62, 0xbb, 0xad, 0xa2, 0x7f, 0x75, 0xf8, + 0x76, 0x30, 0x86, 0xd9, 0xc7, 0xc3, 0x37, 0x6f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xdb, 0xd8, + 0x64, 0x27, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -674,6 +778,8 @@ type QueryClient interface { GlobalVirtualGroupFamilies(ctx context.Context, in *QueryGlobalVirtualGroupFamiliesRequest, opts ...grpc.CallOption) (*QueryGlobalVirtualGroupFamiliesResponse, error) // AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on AvailableGlobalVirtualGroupFamilies(ctx context.Context, in *AvailableGlobalVirtualGroupFamiliesRequest, opts ...grpc.CallOption) (*AvailableGlobalVirtualGroupFamiliesResponse, error) + // AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on + SwapInInfo(ctx context.Context, in *QuerySwapInInfoRequest, opts ...grpc.CallOption) (*QuerySwapInInfoResponse, error) } type queryClient struct { @@ -738,6 +844,15 @@ func (c *queryClient) AvailableGlobalVirtualGroupFamilies(ctx context.Context, i return out, nil } +func (c *queryClient) SwapInInfo(ctx context.Context, in *QuerySwapInInfoRequest, opts ...grpc.CallOption) (*QuerySwapInInfoResponse, error) { + out := new(QuerySwapInInfoResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Query/SwapInInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -752,6 +867,8 @@ type QueryServer interface { GlobalVirtualGroupFamilies(context.Context, *QueryGlobalVirtualGroupFamiliesRequest) (*QueryGlobalVirtualGroupFamiliesResponse, error) // AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on AvailableGlobalVirtualGroupFamilies(context.Context, *AvailableGlobalVirtualGroupFamiliesRequest) (*AvailableGlobalVirtualGroupFamiliesResponse, error) + // AvailableGlobalVirtualGroupFamilies filters a list of GlobalVirtualGroupFamilies ID which are qualified to create bucket on + SwapInInfo(context.Context, *QuerySwapInInfoRequest) (*QuerySwapInInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -776,6 +893,9 @@ func (*UnimplementedQueryServer) GlobalVirtualGroupFamilies(ctx context.Context, func (*UnimplementedQueryServer) AvailableGlobalVirtualGroupFamilies(ctx context.Context, req *AvailableGlobalVirtualGroupFamiliesRequest) (*AvailableGlobalVirtualGroupFamiliesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AvailableGlobalVirtualGroupFamilies not implemented") } +func (*UnimplementedQueryServer) SwapInInfo(ctx context.Context, req *QuerySwapInInfoRequest) (*QuerySwapInInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapInInfo not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -889,6 +1009,24 @@ func _Query_AvailableGlobalVirtualGroupFamilies_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } +func _Query_SwapInInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySwapInInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SwapInInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Query/SwapInInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SwapInInfo(ctx, req.(*QuerySwapInInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "greenfield.virtualgroup.Query", HandlerType: (*QueryServer)(nil), @@ -917,6 +1055,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AvailableGlobalVirtualGroupFamilies", Handler: _Query_AvailableGlobalVirtualGroupFamilies_Handler, }, + { + MethodName: "SwapInInfo", + Handler: _Query_SwapInInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "greenfield/virtualgroup/query.proto", @@ -1335,6 +1477,74 @@ func (m *AvailableGlobalVirtualGroupFamiliesResponse) MarshalToSizedBuffer(dAtA return len(dAtA) - i, nil } +func (m *QuerySwapInInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySwapInInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapInInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x10 + } + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QuerySwapInInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySwapInInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySwapInInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SwapInInfo != nil { + { + size, err := m.SwapInInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1507,6 +1717,34 @@ func (m *AvailableGlobalVirtualGroupFamiliesResponse) Size() (n int) { return n } +func (m *QuerySwapInInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovQuery(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovQuery(uint64(m.GlobalVirtualGroupId)) + } + return n +} + +func (m *QuerySwapInInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SwapInInfo != nil { + l = m.SwapInInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2567,6 +2805,180 @@ func (m *AvailableGlobalVirtualGroupFamiliesResponse) Unmarshal(dAtA []byte) err } return nil } +func (m *QuerySwapInInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySwapInInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapInInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + } + m.GlobalVirtualGroupFamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySwapInInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySwapInInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySwapInInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapInInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SwapInInfo == nil { + m.SwapInInfo = &SwapInInfo{} + } + if err := m.SwapInInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/virtualgroup/types/query.pb.gw.go b/x/virtualgroup/types/query.pb.gw.go index 6cad96d24..e0f1f4686 100644 --- a/x/virtualgroup/types/query.pb.gw.go +++ b/x/virtualgroup/types/query.pb.gw.go @@ -231,6 +231,42 @@ func local_request_Query_AvailableGlobalVirtualGroupFamilies_0(ctx context.Conte } +var ( + filter_Query_SwapInInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SwapInInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapInInfoRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SwapInInfo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SwapInInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SwapInInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySwapInInfoRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SwapInInfo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SwapInInfo(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -375,6 +411,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SwapInInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SwapInInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SwapInInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -536,6 +595,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SwapInInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SwapInInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SwapInInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -551,6 +630,8 @@ var ( pattern_Query_GlobalVirtualGroupFamilies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "virtualgroup", "global_virtual_group_families"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AvailableGlobalVirtualGroupFamilies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "virtualgroup", "available_global_virtual_group_families"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SwapInInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "virtualgroup", "swap_in_info"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -565,4 +646,6 @@ var ( forward_Query_GlobalVirtualGroupFamilies_0 = runtime.ForwardResponseMessage forward_Query_AvailableGlobalVirtualGroupFamilies_0 = runtime.ForwardResponseMessage + + forward_Query_SwapInInfo_0 = runtime.ForwardResponseMessage ) diff --git a/x/virtualgroup/types/tx.pb.go b/x/virtualgroup/types/tx.pb.go index 8b5d07a78..41fe6a914 100644 --- a/x/virtualgroup/types/tx.pb.go +++ b/x/virtualgroup/types/tx.pb.go @@ -609,42 +609,6 @@ func (m *MsgSwapOut) GetSuccessorSpApproval() *common.Approval { return nil } -type MsgSwapOutResponse struct { -} - -func (m *MsgSwapOutResponse) Reset() { *m = MsgSwapOutResponse{} } -func (m *MsgSwapOutResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSwapOutResponse) ProtoMessage() {} -func (*MsgSwapOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{11} -} -func (m *MsgSwapOutResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSwapOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSwapOutResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSwapOutResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSwapOutResponse.Merge(m, src) -} -func (m *MsgSwapOutResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSwapOutResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSwapOutResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSwapOutResponse proto.InternalMessageInfo - type MsgCompleteSwapOut struct { // storage_provider defines the operator account address of the storage provider who complete swap out task. StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` @@ -661,7 +625,7 @@ func (m *MsgCompleteSwapOut) Reset() { *m = MsgCompleteSwapOut{} } func (m *MsgCompleteSwapOut) String() string { return proto.CompactTextString(m) } func (*MsgCompleteSwapOut) ProtoMessage() {} func (*MsgCompleteSwapOut) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{12} + return fileDescriptor_478f7001009bf3f2, []int{11} } func (m *MsgCompleteSwapOut) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -718,7 +682,7 @@ func (m *MsgCompleteSwapOutResponse) Reset() { *m = MsgCompleteSwapOutRe func (m *MsgCompleteSwapOutResponse) String() string { return proto.CompactTextString(m) } func (*MsgCompleteSwapOutResponse) ProtoMessage() {} func (*MsgCompleteSwapOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{13} + return fileDescriptor_478f7001009bf3f2, []int{12} } func (m *MsgCompleteSwapOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -763,7 +727,7 @@ func (m *MsgCancelSwapOut) Reset() { *m = MsgCancelSwapOut{} } func (m *MsgCancelSwapOut) String() string { return proto.CompactTextString(m) } func (*MsgCancelSwapOut) ProtoMessage() {} func (*MsgCancelSwapOut) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{14} + return fileDescriptor_478f7001009bf3f2, []int{13} } func (m *MsgCancelSwapOut) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -820,7 +784,7 @@ func (m *MsgCancelSwapOutResponse) Reset() { *m = MsgCancelSwapOutRespon func (m *MsgCancelSwapOutResponse) String() string { return proto.CompactTextString(m) } func (*MsgCancelSwapOutResponse) ProtoMessage() {} func (*MsgCancelSwapOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{15} + return fileDescriptor_478f7001009bf3f2, []int{14} } func (m *MsgCancelSwapOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -866,7 +830,7 @@ func (m *MsgSettle) Reset() { *m = MsgSettle{} } func (m *MsgSettle) String() string { return proto.CompactTextString(m) } func (*MsgSettle) ProtoMessage() {} func (*MsgSettle) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{16} + return fileDescriptor_478f7001009bf3f2, []int{15} } func (m *MsgSettle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -923,7 +887,7 @@ func (m *MsgSettleResponse) Reset() { *m = MsgSettleResponse{} } func (m *MsgSettleResponse) String() string { return proto.CompactTextString(m) } func (*MsgSettleResponse) ProtoMessage() {} func (*MsgSettleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{17} + return fileDescriptor_478f7001009bf3f2, []int{16} } func (m *MsgSettleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -961,7 +925,7 @@ func (m *MsgStorageProviderExit) Reset() { *m = MsgStorageProviderExit{} func (m *MsgStorageProviderExit) String() string { return proto.CompactTextString(m) } func (*MsgStorageProviderExit) ProtoMessage() {} func (*MsgStorageProviderExit) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{18} + return fileDescriptor_478f7001009bf3f2, []int{17} } func (m *MsgStorageProviderExit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1004,7 +968,7 @@ func (m *MsgStorageProviderExitResponse) Reset() { *m = MsgStorageProvid func (m *MsgStorageProviderExitResponse) String() string { return proto.CompactTextString(m) } func (*MsgStorageProviderExitResponse) ProtoMessage() {} func (*MsgStorageProviderExitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{19} + return fileDescriptor_478f7001009bf3f2, []int{18} } func (m *MsgStorageProviderExitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1042,7 +1006,7 @@ func (m *MsgCompleteStorageProviderExit) Reset() { *m = MsgCompleteStora func (m *MsgCompleteStorageProviderExit) String() string { return proto.CompactTextString(m) } func (*MsgCompleteStorageProviderExit) ProtoMessage() {} func (*MsgCompleteStorageProviderExit) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{20} + return fileDescriptor_478f7001009bf3f2, []int{19} } func (m *MsgCompleteStorageProviderExit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1087,7 +1051,7 @@ func (m *MsgCompleteStorageProviderExitResponse) Reset() { func (m *MsgCompleteStorageProviderExitResponse) String() string { return proto.CompactTextString(m) } func (*MsgCompleteStorageProviderExitResponse) ProtoMessage() {} func (*MsgCompleteStorageProviderExitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{21} + return fileDescriptor_478f7001009bf3f2, []int{20} } func (m *MsgCompleteStorageProviderExitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1116,1235 +1080,1191 @@ func (m *MsgCompleteStorageProviderExitResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCompleteStorageProviderExitResponse proto.InternalMessageInfo -func init() { - proto.RegisterType((*MsgUpdateParams)(nil), "greenfield.virtualgroup.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "greenfield.virtualgroup.MsgUpdateParamsResponse") - proto.RegisterType((*MsgCreateGlobalVirtualGroup)(nil), "greenfield.virtualgroup.MsgCreateGlobalVirtualGroup") - proto.RegisterType((*MsgCreateGlobalVirtualGroupResponse)(nil), "greenfield.virtualgroup.MsgCreateGlobalVirtualGroupResponse") - proto.RegisterType((*MsgDeleteGlobalVirtualGroup)(nil), "greenfield.virtualgroup.MsgDeleteGlobalVirtualGroup") - proto.RegisterType((*MsgDeleteGlobalVirtualGroupResponse)(nil), "greenfield.virtualgroup.MsgDeleteGlobalVirtualGroupResponse") - proto.RegisterType((*MsgDeposit)(nil), "greenfield.virtualgroup.MsgDeposit") - proto.RegisterType((*MsgDepositResponse)(nil), "greenfield.virtualgroup.MsgDepositResponse") - proto.RegisterType((*MsgWithdraw)(nil), "greenfield.virtualgroup.MsgWithdraw") - proto.RegisterType((*MsgWithdrawResponse)(nil), "greenfield.virtualgroup.MsgWithdrawResponse") - proto.RegisterType((*MsgSwapOut)(nil), "greenfield.virtualgroup.MsgSwapOut") - proto.RegisterType((*MsgSwapOutResponse)(nil), "greenfield.virtualgroup.MsgSwapOutResponse") - proto.RegisterType((*MsgCompleteSwapOut)(nil), "greenfield.virtualgroup.MsgCompleteSwapOut") - proto.RegisterType((*MsgCompleteSwapOutResponse)(nil), "greenfield.virtualgroup.MsgCompleteSwapOutResponse") - proto.RegisterType((*MsgCancelSwapOut)(nil), "greenfield.virtualgroup.MsgCancelSwapOut") - proto.RegisterType((*MsgCancelSwapOutResponse)(nil), "greenfield.virtualgroup.MsgCancelSwapOutResponse") - proto.RegisterType((*MsgSettle)(nil), "greenfield.virtualgroup.MsgSettle") - proto.RegisterType((*MsgSettleResponse)(nil), "greenfield.virtualgroup.MsgSettleResponse") - proto.RegisterType((*MsgStorageProviderExit)(nil), "greenfield.virtualgroup.MsgStorageProviderExit") - proto.RegisterType((*MsgStorageProviderExitResponse)(nil), "greenfield.virtualgroup.MsgStorageProviderExitResponse") - proto.RegisterType((*MsgCompleteStorageProviderExit)(nil), "greenfield.virtualgroup.MsgCompleteStorageProviderExit") - proto.RegisterType((*MsgCompleteStorageProviderExitResponse)(nil), "greenfield.virtualgroup.MsgCompleteStorageProviderExitResponse") +type MsgSwapOutResponse struct { } -func init() { proto.RegisterFile("greenfield/virtualgroup/tx.proto", fileDescriptor_478f7001009bf3f2) } - -var fileDescriptor_478f7001009bf3f2 = []byte{ - // 970 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0x8e, 0x9b, 0x92, 0x26, 0xaf, 0x6c, 0x13, 0x9c, 0x84, 0x38, 0x0e, 0x72, 0x57, 0xdb, 0x52, - 0x2d, 0x2d, 0xb5, 0x49, 0x5b, 0xa8, 0x28, 0x20, 0xd4, 0x04, 0xa8, 0x72, 0x08, 0xad, 0x36, 0xe2, - 0x87, 0x40, 0x62, 0x35, 0x6b, 0x4f, 0x1d, 0x23, 0xdb, 0x63, 0x79, 0x66, 0x37, 0x89, 0x84, 0x84, - 0xc4, 0x81, 0x23, 0xe2, 0x06, 0x7f, 0x46, 0x0f, 0xfc, 0x11, 0x3d, 0x56, 0x9c, 0x10, 0x12, 0x15, - 0x4a, 0x90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, 0x8c, 0x79, 0xf9, 0x68, 0x8c, 0xcc, 0xfc, - 0x25, 0x3c, 0x7f, 0xe8, 0x1d, 0xa8, 0xa9, 0x8a, 0x2d, 0x23, 0xcd, 0xd7, 0xc6, 0x45, 0xca, 0x5a, - 0x5f, 0xc3, 0xfc, 0xa8, 0xc7, 0xd4, 0x51, 0xd2, 0x1d, 0x0e, 0x30, 0x6f, 0x3e, 0x61, 0x80, 0x24, - 0xf0, 0x83, 0x06, 0x2b, 0xaa, 0x86, 0xa1, 0x4c, 0xac, 0x08, 0x34, 0xdf, 0x7d, 0xca, 0x40, 0xc9, - 0x8c, 0xc2, 0xec, 0xe0, 0xd0, 0x71, 0x65, 0xac, 0x9c, 0xe2, 0x36, 0x5d, 0x7f, 0x02, 0xb0, 0x2c, - 0x1a, 0x41, 0xed, 0xf0, 0x77, 0xfb, 0x2b, 0xca, 0x2c, 0x65, 0xa8, 0xb9, 0x3a, 0x36, 0xb4, 0x28, - 0xb7, 0xf6, 0xe1, 0xc3, 0x7d, 0x4b, 0x7b, 0xb4, 0x6f, 0x69, 0xbf, 0xef, 0x5b, 0xda, 0xf7, 0x07, - 0xd6, 0xc4, 0xa3, 0x03, 0x6b, 0xe2, 0x97, 0x03, 0x6b, 0xe2, 0xb3, 0x1b, 0x7e, 0xc0, 0xb6, 0xbb, - 0x9d, 0x6c, 0xa0, 0x73, 0x3a, 0x71, 0xe7, 0xaa, 0xbb, 0x8d, 0x82, 0xd8, 0x29, 0xbd, 0xc7, 0xef, - 0x0e, 0xfc, 0x20, 0xb1, 0x97, 0x60, 0xda, 0x99, 0xe2, 0x6f, 0xf2, 0xd7, 0xff, 0x0d, 0x00, 0x00, - 0xff, 0xff, 0xc0, 0xc3, 0x09, 0x30, 0xb8, 0x10, 0x00, 0x00, +func (m *MsgSwapOutResponse) Reset() { *m = MsgSwapOutResponse{} } +func (m *MsgSwapOutResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSwapOutResponse) ProtoMessage() {} +func (*MsgSwapOutResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{21} +} +func (m *MsgSwapOutResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSwapOutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSwapOutResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSwapOutResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSwapOutResponse.Merge(m, src) +} +func (m *MsgSwapOutResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSwapOutResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSwapOutResponse.DiscardUnknown(m) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +var xxx_messageInfo_MsgSwapOutResponse proto.InternalMessageInfo -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - CreateGlobalVirtualGroup(ctx context.Context, in *MsgCreateGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgCreateGlobalVirtualGroupResponse, error) - DeleteGlobalVirtualGroup(ctx context.Context, in *MsgDeleteGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgDeleteGlobalVirtualGroupResponse, error) - Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) - Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) - SwapOut(ctx context.Context, in *MsgSwapOut, opts ...grpc.CallOption) (*MsgSwapOutResponse, error) - Settle(ctx context.Context, in *MsgSettle, opts ...grpc.CallOption) (*MsgSettleResponse, error) - // Since: cosmos-sdk 0.47 - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - StorageProviderExit(ctx context.Context, in *MsgStorageProviderExit, opts ...grpc.CallOption) (*MsgStorageProviderExitResponse, error) - CompleteStorageProviderExit(ctx context.Context, in *MsgCompleteStorageProviderExit, opts ...grpc.CallOption) (*MsgCompleteStorageProviderExitResponse, error) - CompleteSwapOut(ctx context.Context, in *MsgCompleteSwapOut, opts ...grpc.CallOption) (*MsgCompleteSwapOutResponse, error) - CancelSwapOut(ctx context.Context, in *MsgCancelSwapOut, opts ...grpc.CallOption) (*MsgCancelSwapOutResponse, error) +type MsgReserveSwapIn struct { + // storage_provider defines the operator account address of the storage provider who want to swap into the virtual group family or global virtual group. + StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` + // target_sp_id defines the storage provider id to be replaced by the successor sp. + TargetSpId uint32 `protobuf:"varint,2,opt,name=target_sp_id,json=targetSpId,proto3" json:"target_sp_id,omitempty"` + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap in as the primary storage provider + // it it set to zero, it represents that the operator swap in as the secondary storage provider. + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + // global_virtual_group_id is a global virtual group ID associated with the swap in. + // It allows to be empty only when the operator is the primary storage provider. + GlobalVirtualGroupId uint32 `protobuf:"varint,4,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` } -type msgClient struct { - cc grpc1.ClientConn +func (m *MsgReserveSwapIn) Reset() { *m = MsgReserveSwapIn{} } +func (m *MsgReserveSwapIn) String() string { return proto.CompactTextString(m) } +func (*MsgReserveSwapIn) ProtoMessage() {} +func (*MsgReserveSwapIn) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{22} } - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} +func (m *MsgReserveSwapIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *msgClient) CreateGlobalVirtualGroup(ctx context.Context, in *MsgCreateGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgCreateGlobalVirtualGroupResponse, error) { - out := new(MsgCreateGlobalVirtualGroupResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CreateGlobalVirtualGroup", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgReserveSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReserveSwapIn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil } - -func (c *msgClient) DeleteGlobalVirtualGroup(ctx context.Context, in *MsgDeleteGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgDeleteGlobalVirtualGroupResponse, error) { - out := new(MsgDeleteGlobalVirtualGroupResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/DeleteGlobalVirtualGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *MsgReserveSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReserveSwapIn.Merge(m, src) } - -func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { - out := new(MsgDepositResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/Deposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *MsgReserveSwapIn) XXX_Size() int { + return m.Size() } - -func (c *msgClient) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) { - out := new(MsgWithdrawResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/Withdraw", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *MsgReserveSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReserveSwapIn.DiscardUnknown(m) } -func (c *msgClient) SwapOut(ctx context.Context, in *MsgSwapOut, opts ...grpc.CallOption) (*MsgSwapOutResponse, error) { - out := new(MsgSwapOutResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/SwapOut", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} +var xxx_messageInfo_MsgReserveSwapIn proto.InternalMessageInfo -func (c *msgClient) Settle(ctx context.Context, in *MsgSettle, opts ...grpc.CallOption) (*MsgSettleResponse, error) { - out := new(MsgSettleResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/Settle", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgReserveSwapIn) GetStorageProvider() string { + if m != nil { + return m.StorageProvider } - return out, nil + return "" } -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgReserveSwapIn) GetTargetSpId() uint32 { + if m != nil { + return m.TargetSpId } - return out, nil + return 0 } -func (c *msgClient) StorageProviderExit(ctx context.Context, in *MsgStorageProviderExit, opts ...grpc.CallOption) (*MsgStorageProviderExitResponse, error) { - out := new(MsgStorageProviderExitResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/StorageProviderExit", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgReserveSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId } - return out, nil + return 0 } -func (c *msgClient) CompleteStorageProviderExit(ctx context.Context, in *MsgCompleteStorageProviderExit, opts ...grpc.CallOption) (*MsgCompleteStorageProviderExitResponse, error) { - out := new(MsgCompleteStorageProviderExitResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CompleteStorageProviderExit", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgReserveSwapIn) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId } - return out, nil + return 0 } -func (c *msgClient) CompleteSwapOut(ctx context.Context, in *MsgCompleteSwapOut, opts ...grpc.CallOption) (*MsgCompleteSwapOutResponse, error) { - out := new(MsgCompleteSwapOutResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CompleteSwapOut", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type MsgReserveSwapInResponse struct { } -func (c *msgClient) CancelSwapOut(ctx context.Context, in *MsgCancelSwapOut, opts ...grpc.CallOption) (*MsgCancelSwapOutResponse, error) { - out := new(MsgCancelSwapOutResponse) - err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CancelSwapOut", in, out, opts...) - if err != nil { - return nil, err +func (m *MsgReserveSwapInResponse) Reset() { *m = MsgReserveSwapInResponse{} } +func (m *MsgReserveSwapInResponse) String() string { return proto.CompactTextString(m) } +func (*MsgReserveSwapInResponse) ProtoMessage() {} +func (*MsgReserveSwapInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{23} +} +func (m *MsgReserveSwapInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReserveSwapInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReserveSwapInResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *MsgReserveSwapInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReserveSwapInResponse.Merge(m, src) +} +func (m *MsgReserveSwapInResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgReserveSwapInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReserveSwapInResponse.DiscardUnknown(m) } -// MsgServer is the server API for Msg service. -type MsgServer interface { - CreateGlobalVirtualGroup(context.Context, *MsgCreateGlobalVirtualGroup) (*MsgCreateGlobalVirtualGroupResponse, error) - DeleteGlobalVirtualGroup(context.Context, *MsgDeleteGlobalVirtualGroup) (*MsgDeleteGlobalVirtualGroupResponse, error) - Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) - Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) - SwapOut(context.Context, *MsgSwapOut) (*MsgSwapOutResponse, error) - Settle(context.Context, *MsgSettle) (*MsgSettleResponse, error) - // Since: cosmos-sdk 0.47 - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - StorageProviderExit(context.Context, *MsgStorageProviderExit) (*MsgStorageProviderExitResponse, error) - CompleteStorageProviderExit(context.Context, *MsgCompleteStorageProviderExit) (*MsgCompleteStorageProviderExitResponse, error) - CompleteSwapOut(context.Context, *MsgCompleteSwapOut) (*MsgCompleteSwapOutResponse, error) - CancelSwapOut(context.Context, *MsgCancelSwapOut) (*MsgCancelSwapOutResponse, error) -} +var xxx_messageInfo_MsgReserveSwapInResponse proto.InternalMessageInfo -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { +type MsgCompleteSwapIn struct { + // storage_provider defines the operator account address of the storage provider who want to swap into the virtual group family or global virtual group. + StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap in as the primary storage provider + // it it set to zero, it represents that the operator swap in as the secondary storage provider. + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,2,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + // global_virtual_group_id is a global virtual group ID associated with the swap in. + // It allows to be empty only when the operator is the primary storage provider. + GlobalVirtualGroupId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` } -func (*UnimplementedMsgServer) CreateGlobalVirtualGroup(ctx context.Context, req *MsgCreateGlobalVirtualGroup) (*MsgCreateGlobalVirtualGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGlobalVirtualGroup not implemented") -} -func (*UnimplementedMsgServer) DeleteGlobalVirtualGroup(ctx context.Context, req *MsgDeleteGlobalVirtualGroup) (*MsgDeleteGlobalVirtualGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteGlobalVirtualGroup not implemented") -} -func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") -} -func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") +func (m *MsgCompleteSwapIn) Reset() { *m = MsgCompleteSwapIn{} } +func (m *MsgCompleteSwapIn) String() string { return proto.CompactTextString(m) } +func (*MsgCompleteSwapIn) ProtoMessage() {} +func (*MsgCompleteSwapIn) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{24} } -func (*UnimplementedMsgServer) SwapOut(ctx context.Context, req *MsgSwapOut) (*MsgSwapOutResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SwapOut not implemented") -} -func (*UnimplementedMsgServer) Settle(ctx context.Context, req *MsgSettle) (*MsgSettleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Settle not implemented") -} -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +func (m *MsgCompleteSwapIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedMsgServer) StorageProviderExit(ctx context.Context, req *MsgStorageProviderExit) (*MsgStorageProviderExitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StorageProviderExit not implemented") +func (m *MsgCompleteSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCompleteSwapIn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (*UnimplementedMsgServer) CompleteStorageProviderExit(ctx context.Context, req *MsgCompleteStorageProviderExit) (*MsgCompleteStorageProviderExitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompleteStorageProviderExit not implemented") +func (m *MsgCompleteSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCompleteSwapIn.Merge(m, src) } -func (*UnimplementedMsgServer) CompleteSwapOut(ctx context.Context, req *MsgCompleteSwapOut) (*MsgCompleteSwapOutResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompleteSwapOut not implemented") +func (m *MsgCompleteSwapIn) XXX_Size() int { + return m.Size() } -func (*UnimplementedMsgServer) CancelSwapOut(ctx context.Context, req *MsgCancelSwapOut) (*MsgCancelSwapOutResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelSwapOut not implemented") +func (m *MsgCompleteSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCompleteSwapIn.DiscardUnknown(m) } -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} +var xxx_messageInfo_MsgCompleteSwapIn proto.InternalMessageInfo -func _Msg_CreateGlobalVirtualGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateGlobalVirtualGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateGlobalVirtualGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/CreateGlobalVirtualGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateGlobalVirtualGroup(ctx, req.(*MsgCreateGlobalVirtualGroup)) +func (m *MsgCompleteSwapIn) GetStorageProvider() string { + if m != nil { + return m.StorageProvider } - return interceptor(ctx, in, info, handler) + return "" } -func _Msg_DeleteGlobalVirtualGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeleteGlobalVirtualGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteGlobalVirtualGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/DeleteGlobalVirtualGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteGlobalVirtualGroup(ctx, req.(*MsgDeleteGlobalVirtualGroup)) +func (m *MsgCompleteSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId } - return interceptor(ctx, in, info, handler) + return 0 } -func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeposit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Deposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/Deposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) +func (m *MsgCompleteSwapIn) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId } - return interceptor(ctx, in, info, handler) + return 0 } -func _Msg_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdraw) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Withdraw(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/Withdraw", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Withdraw(ctx, req.(*MsgWithdraw)) - } - return interceptor(ctx, in, info, handler) +type MsgCompleteSwapInResponse struct { } -func _Msg_SwapOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSwapOut) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SwapOut(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/SwapOut", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SwapOut(ctx, req.(*MsgSwapOut)) +func (m *MsgCompleteSwapInResponse) Reset() { *m = MsgCompleteSwapInResponse{} } +func (m *MsgCompleteSwapInResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCompleteSwapInResponse) ProtoMessage() {} +func (*MsgCompleteSwapInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{25} +} +func (m *MsgCompleteSwapInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCompleteSwapInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCompleteSwapInResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *MsgCompleteSwapInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCompleteSwapInResponse.Merge(m, src) +} +func (m *MsgCompleteSwapInResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCompleteSwapInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCompleteSwapInResponse.DiscardUnknown(m) } -func _Msg_Settle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSettle) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Settle(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/Settle", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Settle(ctx, req.(*MsgSettle)) - } - return interceptor(ctx, in, info, handler) +var xxx_messageInfo_MsgCompleteSwapInResponse proto.InternalMessageInfo + +type MsgCancelSwapIn struct { + // storage_provider defines the operator account address of the storage provider who want to swap into the virtual group family or global virtual group. + StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` + // virtual_group_family_id is the identifier of the virtual group family. + // if it set to non-zero, it represents that the operator swap in as the primary storage provider + // it it set to zero, it represents that the operator swap in as the secondary storage provider. + GlobalVirtualGroupFamilyId uint32 `protobuf:"varint,2,opt,name=global_virtual_group_family_id,json=globalVirtualGroupFamilyId,proto3" json:"global_virtual_group_family_id,omitempty"` + // global_virtual_group_id is a global virtual group IDs associated with the swap in. + // It allows to be empty only when the operator is the primary storage provider. + GlobalVirtualGroupId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` } -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) +func (m *MsgCancelSwapIn) Reset() { *m = MsgCancelSwapIn{} } +func (m *MsgCancelSwapIn) String() string { return proto.CompactTextString(m) } +func (*MsgCancelSwapIn) ProtoMessage() {} +func (*MsgCancelSwapIn) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{26} +} +func (m *MsgCancelSwapIn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelSwapIn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *MsgCancelSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelSwapIn.Merge(m, src) +} +func (m *MsgCancelSwapIn) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelSwapIn.DiscardUnknown(m) } -func _Msg_StorageProviderExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgStorageProviderExit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).StorageProviderExit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/StorageProviderExit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).StorageProviderExit(ctx, req.(*MsgStorageProviderExit)) +var xxx_messageInfo_MsgCancelSwapIn proto.InternalMessageInfo + +func (m *MsgCancelSwapIn) GetStorageProvider() string { + if m != nil { + return m.StorageProvider } - return interceptor(ctx, in, info, handler) + return "" } -func _Msg_CompleteStorageProviderExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCompleteStorageProviderExit) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CompleteStorageProviderExit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/CompleteStorageProviderExit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CompleteStorageProviderExit(ctx, req.(*MsgCompleteStorageProviderExit)) +func (m *MsgCancelSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { + if m != nil { + return m.GlobalVirtualGroupFamilyId } - return interceptor(ctx, in, info, handler) + return 0 } -func _Msg_CompleteSwapOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCompleteSwapOut) - if err := dec(in); err != nil { - return nil, err +func (m *MsgCancelSwapIn) GetGlobalVirtualGroupId() uint32 { + if m != nil { + return m.GlobalVirtualGroupId } - if interceptor == nil { - return srv.(MsgServer).CompleteSwapOut(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/CompleteSwapOut", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CompleteSwapOut(ctx, req.(*MsgCompleteSwapOut)) - } - return interceptor(ctx, in, info, handler) + return 0 } -func _Msg_CancelSwapOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCancelSwapOut) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CancelSwapOut(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/CancelSwapOut", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CancelSwapOut(ctx, req.(*MsgCancelSwapOut)) - } - return interceptor(ctx, in, info, handler) +type MsgCancelSwapInResponse struct { } -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "greenfield.virtualgroup.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateGlobalVirtualGroup", - Handler: _Msg_CreateGlobalVirtualGroup_Handler, - }, - { - MethodName: "DeleteGlobalVirtualGroup", - Handler: _Msg_DeleteGlobalVirtualGroup_Handler, - }, - { - MethodName: "Deposit", - Handler: _Msg_Deposit_Handler, - }, - { - MethodName: "Withdraw", - Handler: _Msg_Withdraw_Handler, - }, - { - MethodName: "SwapOut", - Handler: _Msg_SwapOut_Handler, - }, - { - MethodName: "Settle", - Handler: _Msg_Settle_Handler, - }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "StorageProviderExit", - Handler: _Msg_StorageProviderExit_Handler, - }, - { - MethodName: "CompleteStorageProviderExit", - Handler: _Msg_CompleteStorageProviderExit_Handler, - }, - { - MethodName: "CompleteSwapOut", - Handler: _Msg_CompleteSwapOut_Handler, - }, - { - MethodName: "CancelSwapOut", - Handler: _Msg_CancelSwapOut_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "greenfield/virtualgroup/tx.proto", +func (m *MsgCancelSwapInResponse) Reset() { *m = MsgCancelSwapInResponse{} } +func (m *MsgCancelSwapInResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelSwapInResponse) ProtoMessage() {} +func (*MsgCancelSwapInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{27} } - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgCancelSwapInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelSwapInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelSwapInResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *MsgCancelSwapInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelSwapInResponse.Merge(m, src) +} +func (m *MsgCancelSwapInResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelSwapInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelSwapInResponse.DiscardUnknown(m) } -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_MsgCancelSwapInResponse proto.InternalMessageInfo + +// this line is used by starport scaffolding # proto/tx/message +type MsgStorageProviderForceExit struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // storage_provider defines the account address of the storage provider which need to force exit + StorageProvider string `protobuf:"bytes,2,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` } -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) +func (m *MsgStorageProviderForceExit) Reset() { *m = MsgStorageProviderForceExit{} } +func (m *MsgStorageProviderForceExit) String() string { return proto.CompactTextString(m) } +func (*MsgStorageProviderForceExit) ProtoMessage() {} +func (*MsgStorageProviderForceExit) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{28} +} +func (m *MsgStorageProviderForceExit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStorageProviderForceExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStorageProviderForceExit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa + return b[:n], nil } - return len(dAtA) - i, nil } - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (m *MsgStorageProviderForceExit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStorageProviderForceExit.Merge(m, src) } - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgStorageProviderForceExit) XXX_Size() int { + return m.Size() +} +func (m *MsgStorageProviderForceExit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStorageProviderForceExit.DiscardUnknown(m) } -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +var xxx_messageInfo_MsgStorageProviderForceExit proto.InternalMessageInfo + +func (m *MsgStorageProviderForceExit) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" } -func (m *MsgCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *MsgStorageProviderForceExit) GetStorageProvider() string { + if m != nil { + return m.StorageProvider } - return dAtA[:n], nil + return "" } -func (m *MsgCreateGlobalVirtualGroup) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type MsgStorageProviderForceExitResponse struct { } -func (m *MsgCreateGlobalVirtualGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) +func (m *MsgStorageProviderForceExitResponse) Reset() { *m = MsgStorageProviderForceExitResponse{} } +func (m *MsgStorageProviderForceExitResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStorageProviderForceExitResponse) ProtoMessage() {} +func (*MsgStorageProviderForceExitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_478f7001009bf3f2, []int{29} +} +func (m *MsgStorageProviderForceExitResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStorageProviderForceExitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStorageProviderForceExitResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.SecondarySpIds) > 0 { - dAtA4 := make([]byte, len(m.SecondarySpIds)*10) - var j3 int - for _, num := range m.SecondarySpIds { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ + return nil, err } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintTx(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x1a - } - if m.FamilyId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.FamilyId)) - i-- - dAtA[i] = 0x10 - } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa + return b[:n], nil } - return len(dAtA) - i, nil } - -func (m *MsgCreateGlobalVirtualGroupResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (m *MsgStorageProviderForceExitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStorageProviderForceExitResponse.Merge(m, src) } - -func (m *MsgCreateGlobalVirtualGroupResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgStorageProviderForceExitResponse) XXX_Size() int { + return m.Size() } - -func (m *MsgCreateGlobalVirtualGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (m *MsgStorageProviderForceExitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStorageProviderForceExitResponse.DiscardUnknown(m) } -func (m *MsgDeleteGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +var xxx_messageInfo_MsgStorageProviderForceExitResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "greenfield.virtualgroup.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "greenfield.virtualgroup.MsgUpdateParamsResponse") + proto.RegisterType((*MsgCreateGlobalVirtualGroup)(nil), "greenfield.virtualgroup.MsgCreateGlobalVirtualGroup") + proto.RegisterType((*MsgCreateGlobalVirtualGroupResponse)(nil), "greenfield.virtualgroup.MsgCreateGlobalVirtualGroupResponse") + proto.RegisterType((*MsgDeleteGlobalVirtualGroup)(nil), "greenfield.virtualgroup.MsgDeleteGlobalVirtualGroup") + proto.RegisterType((*MsgDeleteGlobalVirtualGroupResponse)(nil), "greenfield.virtualgroup.MsgDeleteGlobalVirtualGroupResponse") + proto.RegisterType((*MsgDeposit)(nil), "greenfield.virtualgroup.MsgDeposit") + proto.RegisterType((*MsgDepositResponse)(nil), "greenfield.virtualgroup.MsgDepositResponse") + proto.RegisterType((*MsgWithdraw)(nil), "greenfield.virtualgroup.MsgWithdraw") + proto.RegisterType((*MsgWithdrawResponse)(nil), "greenfield.virtualgroup.MsgWithdrawResponse") + proto.RegisterType((*MsgSwapOut)(nil), "greenfield.virtualgroup.MsgSwapOut") + proto.RegisterType((*MsgCompleteSwapOut)(nil), "greenfield.virtualgroup.MsgCompleteSwapOut") + proto.RegisterType((*MsgCompleteSwapOutResponse)(nil), "greenfield.virtualgroup.MsgCompleteSwapOutResponse") + proto.RegisterType((*MsgCancelSwapOut)(nil), "greenfield.virtualgroup.MsgCancelSwapOut") + proto.RegisterType((*MsgCancelSwapOutResponse)(nil), "greenfield.virtualgroup.MsgCancelSwapOutResponse") + proto.RegisterType((*MsgSettle)(nil), "greenfield.virtualgroup.MsgSettle") + proto.RegisterType((*MsgSettleResponse)(nil), "greenfield.virtualgroup.MsgSettleResponse") + proto.RegisterType((*MsgStorageProviderExit)(nil), "greenfield.virtualgroup.MsgStorageProviderExit") + proto.RegisterType((*MsgStorageProviderExitResponse)(nil), "greenfield.virtualgroup.MsgStorageProviderExitResponse") + proto.RegisterType((*MsgCompleteStorageProviderExit)(nil), "greenfield.virtualgroup.MsgCompleteStorageProviderExit") + proto.RegisterType((*MsgCompleteStorageProviderExitResponse)(nil), "greenfield.virtualgroup.MsgCompleteStorageProviderExitResponse") + proto.RegisterType((*MsgSwapOutResponse)(nil), "greenfield.virtualgroup.MsgSwapOutResponse") + proto.RegisterType((*MsgReserveSwapIn)(nil), "greenfield.virtualgroup.MsgReserveSwapIn") + proto.RegisterType((*MsgReserveSwapInResponse)(nil), "greenfield.virtualgroup.MsgReserveSwapInResponse") + proto.RegisterType((*MsgCompleteSwapIn)(nil), "greenfield.virtualgroup.MsgCompleteSwapIn") + proto.RegisterType((*MsgCompleteSwapInResponse)(nil), "greenfield.virtualgroup.MsgCompleteSwapInResponse") + proto.RegisterType((*MsgCancelSwapIn)(nil), "greenfield.virtualgroup.MsgCancelSwapIn") + proto.RegisterType((*MsgCancelSwapInResponse)(nil), "greenfield.virtualgroup.MsgCancelSwapInResponse") + proto.RegisterType((*MsgStorageProviderForceExit)(nil), "greenfield.virtualgroup.MsgStorageProviderForceExit") + proto.RegisterType((*MsgStorageProviderForceExitResponse)(nil), "greenfield.virtualgroup.MsgStorageProviderForceExitResponse") } -func (m *MsgDeleteGlobalVirtualGroup) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func init() { proto.RegisterFile("greenfield/virtualgroup/tx.proto", fileDescriptor_478f7001009bf3f2) } + +var fileDescriptor_478f7001009bf3f2 = []byte{ + // 1161 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0x21, 0x4d, 0x5e, 0xeb, 0x24, 0x6c, 0x12, 0xe2, 0x6c, 0x90, 0x6b, 0xb9, 0xa5, + 0x32, 0x29, 0xf5, 0x92, 0x34, 0x50, 0x51, 0x40, 0xa8, 0x09, 0xb4, 0xf2, 0x21, 0xb4, 0x72, 0xc4, + 0x1f, 0x81, 0x84, 0x35, 0xf6, 0x4e, 0x36, 0x8b, 0xec, 0x9d, 0xd5, 0xce, 0xda, 0x49, 0x24, 0x24, + 0x24, 0xae, 0x48, 0x88, 0x1b, 0x7c, 0x06, 0x4e, 0x3d, 0xf0, 0x21, 0x7a, 0xac, 0x38, 0x21, 0xa4, + 0x56, 0x28, 0x41, 0x02, 0x81, 0xf8, 0x04, 0x5c, 0xd0, 0xce, 0x8c, 0xc7, 0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0x4c, 0x91, 0x4d, 0x37, 0x47, 0x30, 0x96, + 0x8b, 0x36, 0x20, 0xdd, 0xfd, 0xfe, 0x7f, 0x59, 0x19, 0x25, 0x6a, 0x6a, 0x6c, 0x0c, 0x6d, 0x2a, + 0x97, 0xdb, 0x87, 0x69, 0x71, 0xb1, 0x29, 0xd7, 0xe9, 0x7a, 0x29, 0xa8, 0xd7, 0xe9, 0xfb, 0xa8, + 0x08, 0x53, 0xba, 0xeb, 0x1a, 0x2d, 0x0c, 0x07, 0xb5, 0xe4, 0xaa, 0x53, 0xba, 0xdf, 0x85, 0xa5, + 0x7b, 0x30, 0x17, 0x7b, 0xbc, 0xac, 0x0f, 0xbb, 0x13, 0x25, 0xd7, 0xd8, 0x1c, 0xde, 0xb6, 0xab, + 0x6a, 0x27, 0xde, 0x8f, 0x5b, 0x23, 0x9c, 0x0c, 0xe9, 0xa5, 0xae, 0xda, 0x83, 0xee, 0xb7, 0xed, + 0xf7, 0x1f, 0x9d, 0x64, 0xb5, 0xc7, 0x27, 0x59, 0xed, 0xd7, 0x93, 0xac, 0xf6, 0xed, 0x69, 0x76, + 0xe2, 0xf1, 0x69, 0x76, 0xe2, 0xe7, 0xd3, 0xec, 0xc4, 0x27, 0x5b, 0xb6, 0x13, 0x1c, 0x34, 0xab, + 0x61, 0xd7, 0x6e, 0x56, 0xdd, 0xea, 0x8d, 0xda, 0x01, 0x72, 0x5c, 0x33, 0xf2, 0xb1, 0xf6, 0x28, + 0xf6, 0xd5, 0xf9, 0xd8, 0xc3, 0xb4, 0x3a, 0xcd, 0x3e, 0xd7, 0xde, 0xfc, 0x37, 0x00, 0x00, 0xff, + 0xff, 0x32, 0x7d, 0x54, 0x91, 0x9d, 0x16, 0x00, 0x00, } -func (m *MsgDeleteGlobalVirtualGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GlobalVirtualGroupId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) - i-- - dAtA[i] = 0x10 - } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + CreateGlobalVirtualGroup(ctx context.Context, in *MsgCreateGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgCreateGlobalVirtualGroupResponse, error) + DeleteGlobalVirtualGroup(ctx context.Context, in *MsgDeleteGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgDeleteGlobalVirtualGroupResponse, error) + Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) + Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) + SwapOut(ctx context.Context, in *MsgSwapOut, opts ...grpc.CallOption) (*MsgSwapOutResponse, error) + Settle(ctx context.Context, in *MsgSettle, opts ...grpc.CallOption) (*MsgSettleResponse, error) + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + StorageProviderExit(ctx context.Context, in *MsgStorageProviderExit, opts ...grpc.CallOption) (*MsgStorageProviderExitResponse, error) + CompleteStorageProviderExit(ctx context.Context, in *MsgCompleteStorageProviderExit, opts ...grpc.CallOption) (*MsgCompleteStorageProviderExitResponse, error) + CompleteSwapOut(ctx context.Context, in *MsgCompleteSwapOut, opts ...grpc.CallOption) (*MsgCompleteSwapOutResponse, error) + CancelSwapOut(ctx context.Context, in *MsgCancelSwapOut, opts ...grpc.CallOption) (*MsgCancelSwapOutResponse, error) + SwapIn(ctx context.Context, in *MsgReserveSwapIn, opts ...grpc.CallOption) (*MsgReserveSwapInResponse, error) + CancelSwapIn(ctx context.Context, in *MsgCancelSwapIn, opts ...grpc.CallOption) (*MsgCancelSwapInResponse, error) + CompleteSwapIn(ctx context.Context, in *MsgCompleteSwapIn, opts ...grpc.CallOption) (*MsgCompleteSwapInResponse, error) + // StorageProviderForceExit defines a governance operation for a SP force exit + // The authority is defined in the keeper. + StorageProviderForceExit(ctx context.Context, in *MsgStorageProviderForceExit, opts ...grpc.CallOption) (*MsgStorageProviderForceExitResponse, error) } -func (m *MsgDeleteGlobalVirtualGroupResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateGlobalVirtualGroup(ctx context.Context, in *MsgCreateGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgCreateGlobalVirtualGroupResponse, error) { + out := new(MsgCreateGlobalVirtualGroupResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CreateGlobalVirtualGroup", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgDeleteGlobalVirtualGroupResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) DeleteGlobalVirtualGroup(ctx context.Context, in *MsgDeleteGlobalVirtualGroup, opts ...grpc.CallOption) (*MsgDeleteGlobalVirtualGroupResponse, error) { + out := new(MsgDeleteGlobalVirtualGroupResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/DeleteGlobalVirtualGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgDeleteGlobalVirtualGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { + out := new(MsgDepositResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/Deposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) { + out := new(MsgWithdrawResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/Withdraw", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) SwapOut(ctx context.Context, in *MsgSwapOut, opts ...grpc.CallOption) (*MsgSwapOutResponse, error) { + out := new(MsgSwapOutResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/SwapOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.GlobalVirtualGroupId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) - i-- - dAtA[i] = 0x10 - } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa +func (c *msgClient) Settle(ctx context.Context, in *MsgSettle, opts ...grpc.CallOption) (*MsgSettleResponse, error) { + out := new(MsgSettleResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/Settle", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) StorageProviderExit(ctx context.Context, in *MsgStorageProviderExit, opts ...grpc.CallOption) (*MsgStorageProviderExitResponse, error) { + out := new(MsgStorageProviderExitResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/StorageProviderExit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (c *msgClient) CompleteStorageProviderExit(ctx context.Context, in *MsgCompleteStorageProviderExit, opts ...grpc.CallOption) (*MsgCompleteStorageProviderExitResponse, error) { + out := new(MsgCompleteStorageProviderExitResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CompleteStorageProviderExit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgWithdraw) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) CompleteSwapOut(ctx context.Context, in *MsgCompleteSwapOut, opts ...grpc.CallOption) (*MsgCompleteSwapOutResponse, error) { + out := new(MsgCompleteSwapOutResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CompleteSwapOut", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) CancelSwapOut(ctx context.Context, in *MsgCancelSwapOut, opts ...grpc.CallOption) (*MsgCancelSwapOutResponse, error) { + out := new(MsgCancelSwapOutResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CancelSwapOut", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Withdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.GlobalVirtualGroupId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) - i-- - dAtA[i] = 0x10 +func (c *msgClient) SwapIn(ctx context.Context, in *MsgReserveSwapIn, opts ...grpc.CallOption) (*MsgReserveSwapInResponse, error) { + out := new(MsgReserveSwapInResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/SwapIn", in, out, opts...) + if err != nil { + return nil, err } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa + return out, nil +} + +func (c *msgClient) CancelSwapIn(ctx context.Context, in *MsgCancelSwapIn, opts ...grpc.CallOption) (*MsgCancelSwapInResponse, error) { + out := new(MsgCancelSwapInResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CancelSwapIn", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) CompleteSwapIn(ctx context.Context, in *MsgCompleteSwapIn, opts ...grpc.CallOption) (*MsgCompleteSwapInResponse, error) { + out := new(MsgCompleteSwapInResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/CompleteSwapIn", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSwapOut) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *msgClient) StorageProviderForceExit(ctx context.Context, in *MsgStorageProviderForceExit, opts ...grpc.CallOption) (*MsgStorageProviderForceExitResponse, error) { + out := new(MsgStorageProviderForceExitResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/StorageProviderForceExit", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *MsgSwapOut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// MsgServer is the server API for Msg service. +type MsgServer interface { + CreateGlobalVirtualGroup(context.Context, *MsgCreateGlobalVirtualGroup) (*MsgCreateGlobalVirtualGroupResponse, error) + DeleteGlobalVirtualGroup(context.Context, *MsgDeleteGlobalVirtualGroup) (*MsgDeleteGlobalVirtualGroupResponse, error) + Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) + Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) + SwapOut(context.Context, *MsgSwapOut) (*MsgSwapOutResponse, error) + Settle(context.Context, *MsgSettle) (*MsgSettleResponse, error) + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + StorageProviderExit(context.Context, *MsgStorageProviderExit) (*MsgStorageProviderExitResponse, error) + CompleteStorageProviderExit(context.Context, *MsgCompleteStorageProviderExit) (*MsgCompleteStorageProviderExitResponse, error) + CompleteSwapOut(context.Context, *MsgCompleteSwapOut) (*MsgCompleteSwapOutResponse, error) + CancelSwapOut(context.Context, *MsgCancelSwapOut) (*MsgCancelSwapOutResponse, error) + SwapIn(context.Context, *MsgReserveSwapIn) (*MsgReserveSwapInResponse, error) + CancelSwapIn(context.Context, *MsgCancelSwapIn) (*MsgCancelSwapInResponse, error) + CompleteSwapIn(context.Context, *MsgCompleteSwapIn) (*MsgCompleteSwapInResponse, error) + // StorageProviderForceExit defines a governance operation for a SP force exit + // The authority is defined in the keeper. + StorageProviderForceExit(context.Context, *MsgStorageProviderForceExit) (*MsgStorageProviderForceExitResponse, error) } -func (m *MsgSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SuccessorSpApproval != nil { - { - size, err := m.SuccessorSpApproval.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.SuccessorSpId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SuccessorSpId)) - i-- - dAtA[i] = 0x20 - } - if len(m.GlobalVirtualGroupIds) > 0 { - dAtA9 := make([]byte, len(m.GlobalVirtualGroupIds)*10) - var j8 int - for _, num := range m.GlobalVirtualGroupIds { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintTx(dAtA, i, uint64(j8)) - i-- - dAtA[i] = 0x1a - } - if m.GlobalVirtualGroupFamilyId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) - i-- - dAtA[i] = 0x10 - } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { } -func (m *MsgSwapOutResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedMsgServer) CreateGlobalVirtualGroup(ctx context.Context, req *MsgCreateGlobalVirtualGroup) (*MsgCreateGlobalVirtualGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGlobalVirtualGroup not implemented") } - -func (m *MsgSwapOutResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedMsgServer) DeleteGlobalVirtualGroup(ctx context.Context, req *MsgDeleteGlobalVirtualGroup) (*MsgDeleteGlobalVirtualGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteGlobalVirtualGroup not implemented") } - -func (m *MsgSwapOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } - -func (m *MsgCompleteSwapOut) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") +} +func (*UnimplementedMsgServer) SwapOut(ctx context.Context, req *MsgSwapOut) (*MsgSwapOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapOut not implemented") +} +func (*UnimplementedMsgServer) Settle(ctx context.Context, req *MsgSettle) (*MsgSettleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Settle not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (*UnimplementedMsgServer) StorageProviderExit(ctx context.Context, req *MsgStorageProviderExit) (*MsgStorageProviderExitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StorageProviderExit not implemented") +} +func (*UnimplementedMsgServer) CompleteStorageProviderExit(ctx context.Context, req *MsgCompleteStorageProviderExit) (*MsgCompleteStorageProviderExitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompleteStorageProviderExit not implemented") +} +func (*UnimplementedMsgServer) CompleteSwapOut(ctx context.Context, req *MsgCompleteSwapOut) (*MsgCompleteSwapOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompleteSwapOut not implemented") +} +func (*UnimplementedMsgServer) CancelSwapOut(ctx context.Context, req *MsgCancelSwapOut) (*MsgCancelSwapOutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelSwapOut not implemented") +} +func (*UnimplementedMsgServer) SwapIn(ctx context.Context, req *MsgReserveSwapIn) (*MsgReserveSwapInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SwapIn not implemented") +} +func (*UnimplementedMsgServer) CancelSwapIn(ctx context.Context, req *MsgCancelSwapIn) (*MsgCancelSwapInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelSwapIn not implemented") +} +func (*UnimplementedMsgServer) CompleteSwapIn(ctx context.Context, req *MsgCompleteSwapIn) (*MsgCompleteSwapInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompleteSwapIn not implemented") +} +func (*UnimplementedMsgServer) StorageProviderForceExit(ctx context.Context, req *MsgStorageProviderForceExit) (*MsgStorageProviderForceExitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StorageProviderForceExit not implemented") } -func (m *MsgCompleteSwapOut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) } -func (m *MsgCompleteSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.GlobalVirtualGroupIds) > 0 { - dAtA11 := make([]byte, len(m.GlobalVirtualGroupIds)*10) - var j10 int - for _, num := range m.GlobalVirtualGroupIds { - for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j10++ - } - dAtA11[j10] = uint8(num) - j10++ - } - i -= j10 - copy(dAtA[i:], dAtA11[:j10]) - i = encodeVarintTx(dAtA, i, uint64(j10)) - i-- - dAtA[i] = 0x1a +func _Msg_CreateGlobalVirtualGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateGlobalVirtualGroup) + if err := dec(in); err != nil { + return nil, err } - if m.GlobalVirtualGroupFamilyId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) - i-- - dAtA[i] = 0x10 + if interceptor == nil { + return srv.(MsgServer).CreateGlobalVirtualGroup(ctx, in) } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/CreateGlobalVirtualGroup", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateGlobalVirtualGroup(ctx, req.(*MsgCreateGlobalVirtualGroup)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgCompleteSwapOutResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Msg_DeleteGlobalVirtualGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteGlobalVirtualGroup) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *MsgCompleteSwapOutResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCompleteSwapOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(MsgServer).DeleteGlobalVirtualGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/DeleteGlobalVirtualGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteGlobalVirtualGroup(ctx, req.(*MsgDeleteGlobalVirtualGroup)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgCancelSwapOut) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeposit) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(MsgServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/Deposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgCancelSwapOut) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCancelSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.GlobalVirtualGroupIds) > 0 { - dAtA13 := make([]byte, len(m.GlobalVirtualGroupIds)*10) - var j12 int - for _, num := range m.GlobalVirtualGroupIds { - for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j12++ - } - dAtA13[j12] = uint8(num) - j12++ - } - i -= j12 - copy(dAtA[i:], dAtA13[:j12]) - i = encodeVarintTx(dAtA, i, uint64(j12)) - i-- - dAtA[i] = 0x1a +func _Msg_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdraw) + if err := dec(in); err != nil { + return nil, err } - if m.GlobalVirtualGroupFamilyId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) - i-- - dAtA[i] = 0x10 + if interceptor == nil { + return srv.(MsgServer).Withdraw(ctx, in) } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/Withdraw", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Withdraw(ctx, req.(*MsgWithdraw)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgCancelSwapOutResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Msg_SwapOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSwapOut) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *MsgCancelSwapOutResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(MsgServer).SwapOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/SwapOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapOut(ctx, req.(*MsgSwapOut)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgCancelSwapOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func _Msg_Settle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSettle) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Settle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/Settle", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Settle(ctx, req.(*MsgSettle)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgSettle) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgSettle) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Msg_StorageProviderExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStorageProviderExit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StorageProviderExit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/StorageProviderExit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StorageProviderExit(ctx, req.(*MsgStorageProviderExit)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgSettle) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.GlobalVirtualGroupIds) > 0 { - dAtA15 := make([]byte, len(m.GlobalVirtualGroupIds)*10) - var j14 int - for _, num := range m.GlobalVirtualGroupIds { - for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j14++ - } - dAtA15[j14] = uint8(num) - j14++ - } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintTx(dAtA, i, uint64(j14)) - i-- - dAtA[i] = 0x1a +func _Msg_CompleteStorageProviderExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCompleteStorageProviderExit) + if err := dec(in); err != nil { + return nil, err } - if m.GlobalVirtualGroupFamilyId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) - i-- - dAtA[i] = 0x10 + if interceptor == nil { + return srv.(MsgServer).CompleteStorageProviderExit(ctx, in) } - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/CompleteStorageProviderExit", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CompleteStorageProviderExit(ctx, req.(*MsgCompleteStorageProviderExit)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgSettleResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Msg_CompleteSwapOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCompleteSwapOut) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(MsgServer).CompleteSwapOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/CompleteSwapOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CompleteSwapOut(ctx, req.(*MsgCompleteSwapOut)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgSettleResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Msg_CancelSwapOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelSwapOut) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelSwapOut(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/CancelSwapOut", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelSwapOut(ctx, req.(*MsgCancelSwapOut)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgSettleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func _Msg_SwapIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgReserveSwapIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SwapIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/SwapIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SwapIn(ctx, req.(*MsgReserveSwapIn)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgStorageProviderExit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Msg_CancelSwapIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelSwapIn) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(MsgServer).CancelSwapIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/CancelSwapIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelSwapIn(ctx, req.(*MsgCancelSwapIn)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgStorageProviderExit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Msg_CompleteSwapIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCompleteSwapIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CompleteSwapIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/CompleteSwapIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CompleteSwapIn(ctx, req.(*MsgCompleteSwapIn)) + } + return interceptor(ctx, in, info, handler) } -func (m *MsgStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func _Msg_StorageProviderForceExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStorageProviderForceExit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).StorageProviderForceExit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Msg/StorageProviderForceExit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).StorageProviderForceExit(ctx, req.(*MsgStorageProviderForceExit)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "greenfield.virtualgroup.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateGlobalVirtualGroup", + Handler: _Msg_CreateGlobalVirtualGroup_Handler, + }, + { + MethodName: "DeleteGlobalVirtualGroup", + Handler: _Msg_DeleteGlobalVirtualGroup_Handler, + }, + { + MethodName: "Deposit", + Handler: _Msg_Deposit_Handler, + }, + { + MethodName: "Withdraw", + Handler: _Msg_Withdraw_Handler, + }, + { + MethodName: "SwapOut", + Handler: _Msg_SwapOut_Handler, + }, + { + MethodName: "Settle", + Handler: _Msg_Settle_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "StorageProviderExit", + Handler: _Msg_StorageProviderExit_Handler, + }, + { + MethodName: "CompleteStorageProviderExit", + Handler: _Msg_CompleteStorageProviderExit_Handler, + }, + { + MethodName: "CompleteSwapOut", + Handler: _Msg_CompleteSwapOut_Handler, + }, + { + MethodName: "CancelSwapOut", + Handler: _Msg_CancelSwapOut_Handler, + }, + { + MethodName: "SwapIn", + Handler: _Msg_SwapIn_Handler, + }, + { + MethodName: "CancelSwapIn", + Handler: _Msg_CancelSwapIn_Handler, + }, + { + MethodName: "CompleteSwapIn", + Handler: _Msg_CompleteSwapIn_Handler, + }, + { + MethodName: "StorageProviderForceExit", + Handler: _Msg_StorageProviderForceExit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "greenfield/virtualgroup/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.StorageProvider) > 0 { - i -= len(m.StorageProvider) - copy(dAtA[i:], m.StorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgStorageProviderExitResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2354,12 +2274,12 @@ func (m *MsgStorageProviderExitResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgStorageProviderExitResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2367,7 +2287,7 @@ func (m *MsgStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgCompleteStorageProviderExit) Marshal() (dAtA []byte, err error) { +func (m *MsgCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2377,16 +2297,49 @@ func (m *MsgCompleteStorageProviderExit) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCompleteStorageProviderExit) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateGlobalVirtualGroup) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateGlobalVirtualGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.SecondarySpIds) > 0 { + dAtA4 := make([]byte, len(m.SecondarySpIds)*10) + var j3 int + for _, num := range m.SecondarySpIds { + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintTx(dAtA, i, uint64(j3)) + i-- + dAtA[i] = 0x1a + } + if m.FamilyId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.FamilyId)) + i-- + dAtA[i] = 0x10 + } if len(m.StorageProvider) > 0 { i -= len(m.StorageProvider) copy(dAtA[i:], m.StorageProvider) @@ -2397,7 +2350,7 @@ func (m *MsgCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgCompleteStorageProviderExitResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgCreateGlobalVirtualGroupResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2407,12 +2360,12 @@ func (m *MsgCompleteStorageProviderExitResponse) Marshal() (dAtA []byte, err err return dAtA[:n], nil } -func (m *MsgCompleteStorageProviderExitResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateGlobalVirtualGroupResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCompleteStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateGlobalVirtualGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2420,340 +2373,1904 @@ func (m *MsgCompleteStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byt return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgDeleteGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgDeleteGlobalVirtualGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteGlobalVirtualGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x10 } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgDeleteGlobalVirtualGroupResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgCreateGlobalVirtualGroup) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgDeleteGlobalVirtualGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteGlobalVirtualGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.FamilyId != 0 { - n += 1 + sovTx(uint64(m.FamilyId)) - } - if len(m.SecondarySpIds) > 0 { - l = 0 - for _, e := range m.SecondarySpIds { - l += sovTx(uint64(e)) - } - n += 1 + sovTx(uint64(l)) + l - } - l = m.Deposit.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return dAtA[:n], nil } -func (m *MsgCreateGlobalVirtualGroupResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDeleteGlobalVirtualGroup) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.GlobalVirtualGroupId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x10 } - return n + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *MsgDeleteGlobalVirtualGroupResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.GlobalVirtualGroupId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) - } - l = m.Deposit.Size() - n += 1 + l + sovTx(uint64(l)) - return n +func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDepositResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgWithdraw) Size() (n int) { - if m == nil { - return 0 +func (m *MsgWithdraw) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + { + size, err := m.Withdraw.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.GlobalVirtualGroupId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x10 } - l = m.Withdraw.Size() - n += 1 + l + sovTx(uint64(l)) - return n + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *MsgWithdrawResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgSwapOut) Size() (n int) { - if m == nil { - return 0 +func (m *MsgSwapOut) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgSwapOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if m.SuccessorSpApproval != nil { + { + size, err := m.SuccessorSpApproval.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - if m.GlobalVirtualGroupFamilyId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + if m.SuccessorSpId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.SuccessorSpId)) + i-- + dAtA[i] = 0x20 } if len(m.GlobalVirtualGroupIds) > 0 { - l = 0 - for _, e := range m.GlobalVirtualGroupIds { - l += sovTx(uint64(e)) + dAtA9 := make([]byte, len(m.GlobalVirtualGroupIds)*10) + var j8 int + for _, num := range m.GlobalVirtualGroupIds { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ } - n += 1 + sovTx(uint64(l)) + l + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintTx(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0x1a } - if m.SuccessorSpId != 0 { - n += 1 + sovTx(uint64(m.SuccessorSpId)) + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 } - if m.SuccessorSpApproval != nil { - l = m.SuccessorSpApproval.Size() - n += 1 + l + sovTx(uint64(l)) + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *MsgSwapOutResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgCompleteSwapOut) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgCompleteSwapOut) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgCompleteSwapOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCompleteSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.GlobalVirtualGroupIds) > 0 { + dAtA11 := make([]byte, len(m.GlobalVirtualGroupIds)*10) + var j10 int + for _, num := range m.GlobalVirtualGroupIds { + for num >= 1<<7 { + dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j10++ + } + dAtA11[j10] = uint8(num) + j10++ + } + i -= j10 + copy(dAtA[i:], dAtA11[:j10]) + i = encodeVarintTx(dAtA, i, uint64(j10)) + i-- + dAtA[i] = 0x1a } if m.GlobalVirtualGroupFamilyId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 } - if len(m.GlobalVirtualGroupIds) > 0 { - l = 0 - for _, e := range m.GlobalVirtualGroupIds { - l += sovTx(uint64(e)) - } - n += 1 + sovTx(uint64(l)) + l + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *MsgCompleteSwapOutResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgCompleteSwapOutResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgCompleteSwapOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCompleteSwapOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgCancelSwapOut) Size() (n int) { - if m == nil { - return 0 +func (m *MsgCancelSwapOut) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgCancelSwapOut) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.GlobalVirtualGroupIds) > 0 { + dAtA13 := make([]byte, len(m.GlobalVirtualGroupIds)*10) + var j12 int + for _, num := range m.GlobalVirtualGroupIds { + for num >= 1<<7 { + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j12++ + } + dAtA13[j12] = uint8(num) + j12++ + } + i -= j12 + copy(dAtA[i:], dAtA13[:j12]) + i = encodeVarintTx(dAtA, i, uint64(j12)) + i-- + dAtA[i] = 0x1a } if m.GlobalVirtualGroupFamilyId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 } - if len(m.GlobalVirtualGroupIds) > 0 { - l = 0 - for _, e := range m.GlobalVirtualGroupIds { - l += sovTx(uint64(e)) - } - n += 1 + sovTx(uint64(l)) + l + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *MsgCancelSwapOutResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgCancelSwapOutResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgCancelSwapOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSwapOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgSettle) Size() (n int) { - if m == nil { - return 0 +func (m *MsgSettle) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MsgSettle) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSettle) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.GlobalVirtualGroupIds) > 0 { + dAtA15 := make([]byte, len(m.GlobalVirtualGroupIds)*10) + var j14 int + for _, num := range m.GlobalVirtualGroupIds { + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + i -= j14 + copy(dAtA[i:], dAtA15[:j14]) + i = encodeVarintTx(dAtA, i, uint64(j14)) + i-- + dAtA[i] = 0x1a } if m.GlobalVirtualGroupFamilyId != 0 { - n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 } - if len(m.GlobalVirtualGroupIds) > 0 { - l = 0 - for _, e := range m.GlobalVirtualGroupIds { - l += sovTx(uint64(e)) + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSettleResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSettleResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSettleResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStorageProviderExit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStorageProviderExit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStorageProviderExitResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStorageProviderExitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCompleteStorageProviderExit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCompleteStorageProviderExit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCompleteStorageProviderExitResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCompleteStorageProviderExitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCompleteStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSwapOutResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSwapOutResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSwapOutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgReserveSwapIn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgReserveSwapIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReserveSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x20 + } + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x18 + } + if m.TargetSpId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TargetSpId)) + i-- + dAtA[i] = 0x10 + } + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgReserveSwapInResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgReserveSwapInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReserveSwapInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCompleteSwapIn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCompleteSwapIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCompleteSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x18 + } + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 + } + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCompleteSwapInResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCompleteSwapInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCompleteSwapInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelSwapIn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelSwapIn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GlobalVirtualGroupId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupId)) + i-- + dAtA[i] = 0x18 + } + if m.GlobalVirtualGroupFamilyId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GlobalVirtualGroupFamilyId)) + i-- + dAtA[i] = 0x10 + } + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelSwapInResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelSwapInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSwapInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgStorageProviderForceExit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStorageProviderForceExit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStorageProviderForceExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StorageProvider) > 0 { + i -= len(m.StorageProvider) + copy(dAtA[i:], m.StorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStorageProviderForceExitResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStorageProviderForceExitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStorageProviderForceExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCreateGlobalVirtualGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.FamilyId != 0 { + n += 1 + sovTx(uint64(m.FamilyId)) + } + if len(m.SecondarySpIds) > 0 { + l = 0 + for _, e := range m.SecondarySpIds { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + l = m.Deposit.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateGlobalVirtualGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteGlobalVirtualGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + } + return n +} + +func (m *MsgDeleteGlobalVirtualGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + } + l = m.Deposit.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdraw) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + } + l = m.Withdraw.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgWithdrawResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSwapOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if len(m.GlobalVirtualGroupIds) > 0 { + l = 0 + for _, e := range m.GlobalVirtualGroupIds { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + if m.SuccessorSpId != 0 { + n += 1 + sovTx(uint64(m.SuccessorSpId)) + } + if m.SuccessorSpApproval != nil { + l = m.SuccessorSpApproval.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCompleteSwapOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if len(m.GlobalVirtualGroupIds) > 0 { + l = 0 + for _, e := range m.GlobalVirtualGroupIds { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + return n +} + +func (m *MsgCompleteSwapOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelSwapOut) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if len(m.GlobalVirtualGroupIds) > 0 { + l = 0 + for _, e := range m.GlobalVirtualGroupIds { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + return n +} + +func (m *MsgCancelSwapOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSettle) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if len(m.GlobalVirtualGroupIds) > 0 { + l = 0 + for _, e := range m.GlobalVirtualGroupIds { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l + } + return n +} + +func (m *MsgSettleResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStorageProviderExit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStorageProviderExitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCompleteStorageProviderExit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCompleteStorageProviderExitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSwapOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgReserveSwapIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.TargetSpId != 0 { + n += 1 + sovTx(uint64(m.TargetSpId)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + } + return n +} + +func (m *MsgReserveSwapInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCompleteSwapIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + } + return n +} + +func (m *MsgCompleteSwapInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelSwapIn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.GlobalVirtualGroupFamilyId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupFamilyId)) + } + if m.GlobalVirtualGroupId != 0 { + n += 1 + sovTx(uint64(m.GlobalVirtualGroupId)) + } + return n +} + +func (m *MsgCancelSwapInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgStorageProviderForceExit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.StorageProvider) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgStorageProviderForceExitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGlobalVirtualGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateGlobalVirtualGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGlobalVirtualGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FamilyId", wireType) + } + m.FamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SecondarySpIds = append(m.SecondarySpIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.SecondarySpIds) == 0 { + m.SecondarySpIds = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SecondarySpIds = append(m.SecondarySpIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SecondarySpIds", wireType) + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateGlobalVirtualGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGlobalVirtualGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDeleteGlobalVirtualGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageProvider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - n += 1 + sovTx(uint64(l)) + l - } - return n -} - -func (m *MsgSettleResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgStorageProviderExit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) } - return n -} -func (m *MsgStorageProviderExitResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n + return nil } - -func (m *MsgCompleteStorageProviderExit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StorageProvider) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) +func (m *MsgDeleteGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - return n -} -func (m *MsgCompleteStorageProviderExitResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { +func (m *MsgDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2776,15 +4293,15 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeposit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2812,11 +4329,30 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.StorageProvider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2843,7 +4379,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2868,7 +4404,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2891,10 +4427,10 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2918,7 +4454,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateGlobalVirtualGroup) Unmarshal(dAtA []byte) error { +func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2941,10 +4477,10 @@ func (m *MsgCreateGlobalVirtualGroup) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateGlobalVirtualGroup: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateGlobalVirtualGroup: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2981,102 +4517,26 @@ func (m *MsgCreateGlobalVirtualGroup) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FamilyId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) } - m.FamilyId = 0 + m.GlobalVirtualGroupId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FamilyId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SecondarySpIds = append(m.SecondarySpIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.SecondarySpIds) == 0 { - m.SecondarySpIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SecondarySpIds = append(m.SecondarySpIds, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field SecondarySpIds", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Withdraw", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3103,7 +4563,7 @@ func (m *MsgCreateGlobalVirtualGroup) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Withdraw.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3128,7 +4588,7 @@ func (m *MsgCreateGlobalVirtualGroup) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3151,10 +4611,10 @@ func (m *MsgCreateGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateGlobalVirtualGroupResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateGlobalVirtualGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3178,7 +4638,7 @@ func (m *MsgCreateGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeleteGlobalVirtualGroup) Unmarshal(dAtA []byte) error { +func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3201,10 +4661,10 @@ func (m *MsgDeleteGlobalVirtualGroup) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroup: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapOut: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroup: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapOut: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3241,9 +4701,9 @@ func (m *MsgDeleteGlobalVirtualGroup) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) } - m.GlobalVirtualGroupId = 0 + m.GlobalVirtualGroupFamilyId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3253,61 +4713,142 @@ func (m *MsgDeleteGlobalVirtualGroup) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err + case 3: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.GlobalVirtualGroupIds) == 0 { + m.GlobalVirtualGroupIds = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SuccessorSpId", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + m.SuccessorSpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SuccessorSpId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeleteGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SuccessorSpApproval", wireType) } - if iNdEx >= l { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.SuccessorSpApproval == nil { + m.SuccessorSpApproval = &common.Approval{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroupResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteGlobalVirtualGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + if err := m.SuccessorSpApproval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3329,7 +4870,7 @@ func (m *MsgDeleteGlobalVirtualGroupResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeposit) Unmarshal(dAtA []byte) error { +func (m *MsgCompleteSwapOut) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3352,10 +4893,10 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeposit: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCompleteSwapOut: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCompleteSwapOut: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3392,9 +4933,9 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) } - m.GlobalVirtualGroupId = 0 + m.GlobalVirtualGroupFamilyId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3404,44 +4945,87 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx } - if iNdEx >= l { + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } } + elementCount = count + if elementCount != 0 && len(m.GlobalVirtualGroupIds) == 0 { + m.GlobalVirtualGroupIds = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3463,7 +5047,7 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCompleteSwapOutResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3486,10 +5070,10 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDepositResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCompleteSwapOutResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCompleteSwapOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3513,7 +5097,7 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { +func (m *MsgCancelSwapOut) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3536,10 +5120,10 @@ func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelSwapOut: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelSwapOut: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3576,9 +5160,9 @@ func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) } - m.GlobalVirtualGroupId = 0 + m.GlobalVirtualGroupFamilyId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3588,44 +5172,87 @@ func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Withdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { + m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } } + elementCount = count + if elementCount != 0 && len(m.GlobalVirtualGroupIds) == 0 { + m.GlobalVirtualGroupIds = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Withdraw.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3647,7 +5274,7 @@ func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCancelSwapOutResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3670,10 +5297,10 @@ func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelSwapOutResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelSwapOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3697,7 +5324,7 @@ func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { +func (m *MsgSettle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3720,10 +5347,10 @@ func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSwapOut: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSettle: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSwapOut: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSettle: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3853,30 +5480,111 @@ func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessorSpId", wireType) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSettleResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSettleResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSettleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStorageProviderExit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.SuccessorSpId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SuccessorSpId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 5: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStorageProviderExit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStorageProviderExit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessorSpApproval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3886,27 +5594,23 @@ func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if m.SuccessorSpApproval == nil { - m.SuccessorSpApproval = &common.Approval{} - } - if err := m.SuccessorSpApproval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.StorageProvider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3929,7 +5633,7 @@ func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSwapOutResponse) Unmarshal(dAtA []byte) error { +func (m *MsgStorageProviderExitResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3952,10 +5656,10 @@ func (m *MsgSwapOutResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSwapOutResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgStorageProviderExitResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSwapOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgStorageProviderExitResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3979,7 +5683,7 @@ func (m *MsgSwapOutResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCompleteSwapOut) Unmarshal(dAtA []byte) error { +func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4002,10 +5706,10 @@ func (m *MsgCompleteSwapOut) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCompleteSwapOut: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCompleteStorageProviderExit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCompleteSwapOut: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCompleteStorageProviderExit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4040,101 +5744,56 @@ func (m *MsgCompleteSwapOut) Unmarshal(dAtA []byte) error { } m.StorageProvider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err } - m.GlobalVirtualGroupFamilyId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx } - case 3: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.GlobalVirtualGroupIds) == 0 { - m.GlobalVirtualGroupIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCompleteStorageProviderExitResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCompleteStorageProviderExitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCompleteStorageProviderExitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4156,7 +5815,7 @@ func (m *MsgCompleteSwapOut) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCompleteSwapOutResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSwapOutResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4179,10 +5838,10 @@ func (m *MsgCompleteSwapOutResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCompleteSwapOutResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSwapOutResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCompleteSwapOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSwapOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4206,7 +5865,7 @@ func (m *MsgCompleteSwapOutResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCancelSwapOut) Unmarshal(dAtA []byte) error { +func (m *MsgReserveSwapIn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4229,10 +5888,10 @@ func (m *MsgCancelSwapOut) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCancelSwapOut: wiretype end group for non-group") + return fmt.Errorf("proto: MsgReserveSwapIn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCancelSwapOut: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgReserveSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4269,9 +5928,47 @@ func (m *MsgCancelSwapOut) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetSpId", wireType) + } + m.TargetSpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetSpId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + } + m.GlobalVirtualGroupFamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) } - m.GlobalVirtualGroupFamilyId = 0 + m.GlobalVirtualGroupId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -4281,87 +5978,11 @@ func (m *MsgCancelSwapOut) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.GlobalVirtualGroupIds) == 0 { - m.GlobalVirtualGroupIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4383,7 +6004,7 @@ func (m *MsgCancelSwapOut) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCancelSwapOutResponse) Unmarshal(dAtA []byte) error { +func (m *MsgReserveSwapInResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4406,10 +6027,10 @@ func (m *MsgCancelSwapOutResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCancelSwapOutResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgReserveSwapInResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCancelSwapOutResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgReserveSwapInResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4433,7 +6054,7 @@ func (m *MsgCancelSwapOutResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSettle) Unmarshal(dAtA []byte) error { +func (m *MsgCompleteSwapIn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4456,10 +6077,10 @@ func (m *MsgSettle) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSettle: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCompleteSwapIn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSettle: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCompleteSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4514,80 +6135,23 @@ func (m *MsgSettle) Unmarshal(dAtA []byte) error { } } case 3: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTx + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.GlobalVirtualGroupIds) == 0 { - m.GlobalVirtualGroupIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.GlobalVirtualGroupIds = append(m.GlobalVirtualGroupIds, v) + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupIds", wireType) } default: iNdEx = preIndex @@ -4610,7 +6174,7 @@ func (m *MsgSettle) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSettleResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCompleteSwapInResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4633,10 +6197,10 @@ func (m *MsgSettleResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSettleResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCompleteSwapInResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSettleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCompleteSwapInResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4660,7 +6224,7 @@ func (m *MsgSettleResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgStorageProviderExit) Unmarshal(dAtA []byte) error { +func (m *MsgCancelSwapIn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4683,10 +6247,10 @@ func (m *MsgStorageProviderExit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgStorageProviderExit: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelSwapIn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStorageProviderExit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4721,6 +6285,44 @@ func (m *MsgStorageProviderExit) Unmarshal(dAtA []byte) error { } m.StorageProvider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupFamilyId", wireType) + } + m.GlobalVirtualGroupFamilyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupFamilyId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalVirtualGroupId", wireType) + } + m.GlobalVirtualGroupId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GlobalVirtualGroupId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -4742,7 +6344,7 @@ func (m *MsgStorageProviderExit) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgStorageProviderExitResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCancelSwapInResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4765,10 +6367,10 @@ func (m *MsgStorageProviderExitResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgStorageProviderExitResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCancelSwapInResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStorageProviderExitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCancelSwapInResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4792,7 +6394,7 @@ func (m *MsgStorageProviderExitResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { +func (m *MsgStorageProviderForceExit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4815,13 +6417,45 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCompleteStorageProviderExit: wiretype end group for non-group") + return fmt.Errorf("proto: MsgStorageProviderForceExit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCompleteStorageProviderExit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgStorageProviderForceExit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) } @@ -4874,7 +6508,7 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCompleteStorageProviderExitResponse) Unmarshal(dAtA []byte) error { +func (m *MsgStorageProviderForceExitResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4897,10 +6531,10 @@ func (m *MsgCompleteStorageProviderExitResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCompleteStorageProviderExitResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgStorageProviderForceExitResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCompleteStorageProviderExitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgStorageProviderForceExitResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/virtualgroup/types/types.pb.go b/x/virtualgroup/types/types.pb.go index bb3ff54f1..67bb4be82 100644 --- a/x/virtualgroup/types/types.pb.go +++ b/x/virtualgroup/types/types.pb.go @@ -253,11 +253,18 @@ func (m *GlobalVirtualGroupsBindingOnBucket) GetLocalVirtualGroupIds() []uint32 type GVGStatisticsWithinSP struct { // storage_provider_id defines the id of the sp which the statistics associated to StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` - // primary_sp_family_count defines the number of the family which this sp serves as primary sp + // primary_count defines the number of global virtual groups (GVGs) which this sp serves as primary sp PrimaryCount uint32 `protobuf:"varint,2,opt,name=primary_count,json=primaryCount,proto3" json:"primary_count,omitempty"` // secondary_count defines the number of global virtual groups (GVGs) in // which this storage provider serves as a secondary storage provider. SecondaryCount uint32 `protobuf:"varint,3,opt,name=secondary_count,json=secondaryCount,proto3" json:"secondary_count,omitempty"` + // Redundancy defines the number of gvg that sp serves as sp and secondary sp, which breaks the data redundancy requirement. + // In most case, this should not happen, + // during sp exit, a successor sp might need to swapIn GVG(s) that it is already a secondary and become the primary SP + // of whole family. + // a successor sp which need to swapIn a GVG as secondary must be unique to all other SP. So this will not be used for + // swapIn individual GVG as secondary + BreakRedundancyReqmtGvgCount uint32 `protobuf:"varint,4,opt,name=break_redundancy_reqmt_gvg_count,json=breakRedundancyReqmtGvgCount,proto3" json:"break_redundancy_reqmt_gvg_count,omitempty"` } func (m *GVGStatisticsWithinSP) Reset() { *m = GVGStatisticsWithinSP{} } @@ -314,6 +321,13 @@ func (m *GVGStatisticsWithinSP) GetSecondaryCount() uint32 { return 0 } +func (m *GVGStatisticsWithinSP) GetBreakRedundancyReqmtGvgCount() uint32 { + if m != nil { + return m.BreakRedundancyReqmtGvgCount + } + return 0 +} + type SwapOutInfo struct { // sp_id is the unique id of the storage provider who want to swap out. SpId uint32 `protobuf:"varint,1,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` @@ -368,12 +382,76 @@ func (m *SwapOutInfo) GetSuccessorSpId() uint32 { return 0 } +type SwapInInfo struct { + // successor_sp_id defines the id of sp who want to join the family or GVG + SuccessorSpId uint32 `protobuf:"varint,1,opt,name=successor_sp_id,json=successorSpId,proto3" json:"successor_sp_id,omitempty"` + // target_sp_id is the id of SP in the family or GVG to be swapped. + TargetSpId uint32 `protobuf:"varint,2,opt,name=target_sp_id,json=targetSpId,proto3" json:"target_sp_id,omitempty"` + // expiration_time is the expiration of epoch time for the swapInInfo + ExpirationTime uint64 `protobuf:"varint,4,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` +} + +func (m *SwapInInfo) Reset() { *m = SwapInInfo{} } +func (m *SwapInInfo) String() string { return proto.CompactTextString(m) } +func (*SwapInInfo) ProtoMessage() {} +func (*SwapInInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1fe6fc664532d0c3, []int{5} +} +func (m *SwapInInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SwapInInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SwapInInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SwapInInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SwapInInfo.Merge(m, src) +} +func (m *SwapInInfo) XXX_Size() int { + return m.Size() +} +func (m *SwapInInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SwapInInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SwapInInfo proto.InternalMessageInfo + +func (m *SwapInInfo) GetSuccessorSpId() uint32 { + if m != nil { + return m.SuccessorSpId + } + return 0 +} + +func (m *SwapInInfo) GetTargetSpId() uint32 { + if m != nil { + return m.TargetSpId + } + return 0 +} + +func (m *SwapInInfo) GetExpirationTime() uint64 { + if m != nil { + return m.ExpirationTime + } + return 0 +} + func init() { proto.RegisterType((*GlobalVirtualGroup)(nil), "greenfield.virtualgroup.GlobalVirtualGroup") proto.RegisterType((*GlobalVirtualGroupFamily)(nil), "greenfield.virtualgroup.GlobalVirtualGroupFamily") proto.RegisterType((*GlobalVirtualGroupsBindingOnBucket)(nil), "greenfield.virtualgroup.GlobalVirtualGroupsBindingOnBucket") proto.RegisterType((*GVGStatisticsWithinSP)(nil), "greenfield.virtualgroup.GVGStatisticsWithinSP") proto.RegisterType((*SwapOutInfo)(nil), "greenfield.virtualgroup.SwapOutInfo") + proto.RegisterType((*SwapInInfo)(nil), "greenfield.virtualgroup.SwapInInfo") } func init() { @@ -381,47 +459,52 @@ func init() { } var fileDescriptor_1fe6fc664532d0c3 = []byte{ - // 627 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x6f, 0xd3, 0x3c, - 0x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xbc, 0x3a, 0xbb, 0x6a, 0x59, 0xe7, 0x57, 0x2d, 0xeb, 0xdb, 0x55, 0xcb, - 0xfa, 0x70, 0xdd, 0xaa, 0x9c, 0x5f, 0xb7, 0x2a, 0x9f, 0xaf, 0x5b, 0x95, 0xb7, 0x0f, 0x6e, 0xb4, - 0x7b, 0xc8, 0xc2, 0x6e, 0x74, 0x88, 0x28, 0xeb, 0xdf, 0x78, 0x96, 0xde, 0xff, 0xe1, 0x61, 0x0a, - 0x17, 0xd4, 0x7b, 0x72, 0xff, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x83, 0x77, 0xa9, 0xc0, - 0x04, 0x00, 0x00, + // 714 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x4f, 0x1b, 0x39, + 0x14, 0xce, 0x84, 0xc0, 0x12, 0x87, 0xc0, 0xae, 0x01, 0x31, 0x0b, 0xab, 0x10, 0x0d, 0x12, 0xe4, + 0x92, 0xe4, 0xb0, 0xbb, 0x6a, 0x0f, 0xbd, 0x34, 0xad, 0x88, 0xd2, 0x43, 0x89, 0x26, 0x2d, 0x95, + 0x7a, 0x19, 0x39, 0x63, 0x33, 0x58, 0x64, 0xec, 0xa9, 0xed, 0x49, 0x09, 0x97, 0xfe, 0x85, 0xfe, + 0x18, 0x7e, 0x04, 0xa7, 0x0a, 0x71, 0x6a, 0x2b, 0x15, 0x55, 0xa0, 0xfe, 0x8f, 0x6a, 0x6c, 0x37, + 0x81, 0x06, 0x51, 0xa9, 0xa7, 0x19, 0x7f, 0xef, 0x7b, 0x9f, 0xf5, 0xbe, 0xf7, 0x9e, 0xc1, 0x56, + 0x24, 0x08, 0x61, 0x07, 0x94, 0x0c, 0x70, 0x73, 0x48, 0x85, 0x4a, 0xd1, 0x20, 0x12, 0x3c, 0x4d, + 0x9a, 0x6a, 0x94, 0x10, 0xd9, 0x48,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0xce, 0xfb, 0xeb, 0x4a, 0xee, 0xfc, 0xba, 0x92, 0xfb, + 0x78, 0x5d, 0xc9, 0xbd, 0xfe, 0xef, 0xc6, 0xde, 0xf6, 0x59, 0xbf, 0x1e, 0x1e, 0x22, 0xca, 0x9a, + 0x37, 0xde, 0xd7, 0xe3, 0x3b, 0x5e, 0xd8, 0xfe, 0x9c, 0x7e, 0x18, 0xff, 0xfd, 0x1e, 0x00, 0x00, + 0xff, 0xff, 0x1f, 0x68, 0x37, 0x34, 0x89, 0x05, 0x00, 0x00, } func (m *GlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -649,6 +732,11 @@ func (m *GVGStatisticsWithinSP) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.BreakRedundancyReqmtGvgCount != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BreakRedundancyReqmtGvgCount)) + i-- + dAtA[i] = 0x20 + } if m.SecondaryCount != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.SecondaryCount)) i-- @@ -700,6 +788,44 @@ func (m *SwapOutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SwapInInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SwapInInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SwapInInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpirationTime != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExpirationTime)) + i-- + dAtA[i] = 0x20 + } + if m.TargetSpId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TargetSpId)) + i-- + dAtA[i] = 0x10 + } + if m.SuccessorSpId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SuccessorSpId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -811,6 +937,9 @@ func (m *GVGStatisticsWithinSP) Size() (n int) { if m.SecondaryCount != 0 { n += 1 + sovTypes(uint64(m.SecondaryCount)) } + if m.BreakRedundancyReqmtGvgCount != 0 { + n += 1 + sovTypes(uint64(m.BreakRedundancyReqmtGvgCount)) + } return n } @@ -829,6 +958,24 @@ func (m *SwapOutInfo) Size() (n int) { return n } +func (m *SwapInInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SuccessorSpId != 0 { + n += 1 + sovTypes(uint64(m.SuccessorSpId)) + } + if m.TargetSpId != 0 { + n += 1 + sovTypes(uint64(m.TargetSpId)) + } + if m.ExpirationTime != 0 { + n += 1 + sovTypes(uint64(m.ExpirationTime)) + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1621,6 +1768,25 @@ func (m *GVGStatisticsWithinSP) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BreakRedundancyReqmtGvgCount", wireType) + } + m.BreakRedundancyReqmtGvgCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BreakRedundancyReqmtGvgCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -1730,6 +1896,113 @@ func (m *SwapOutInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *SwapInInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SwapInInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SwapInInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SuccessorSpId", wireType) + } + m.SuccessorSpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SuccessorSpId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetSpId", wireType) + } + m.TargetSpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetSpId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", wireType) + } + m.ExpirationTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpirationTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0