From 312358ce60e3d212673c7643bb9f5329f122130c Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 1 Dec 2023 10:39:00 +0800 Subject: [PATCH 01/27] implemente Msgs for SP exit --- app/upgrade.go | 10 +- e2e/core/basesuite.go | 10 + e2e/tests/virtualgroup_test.go | 460 ++ proto/greenfield/sp/types.proto | 1 + proto/greenfield/virtualgroup/events.proto | 38 + proto/greenfield/virtualgroup/params.proto | 6 +- proto/greenfield/virtualgroup/query.proto | 14 + proto/greenfield/virtualgroup/tx.proto | 73 +- proto/greenfield/virtualgroup/types.proto | 18 +- x/sp/types/errors.go | 1 + x/sp/types/types.pb.go | 132 +- x/storage/keeper/keeper.go | 22 +- x/storage/types/expected_keepers.go | 1 + x/virtualgroup/keeper/grpc_query.go | 34 + x/virtualgroup/keeper/keeper.go | 279 + x/virtualgroup/keeper/msg_server.go | 114 + x/virtualgroup/keeper/params.go | 10 + x/virtualgroup/types/errors.go | 3 + x/virtualgroup/types/events.pb.go | 1135 +++- x/virtualgroup/types/expected_keepers.go | 1 + x/virtualgroup/types/keys.go | 15 + x/virtualgroup/types/message.go | 140 + .../message_storage_provider_force_exit.go | 46 + x/virtualgroup/types/params.go | 48 +- x/virtualgroup/types/params.pb.go | 136 +- x/virtualgroup/types/query.pb.go | 510 +- x/virtualgroup/types/query.pb.gw.go | 83 + x/virtualgroup/types/tx.pb.go | 5272 +++++++++++------ x/virtualgroup/types/types.pb.go | 357 +- 29 files changed, 6867 insertions(+), 2102 deletions(-) create mode 100644 x/virtualgroup/types/message_storage_provider_force_exit.go diff --git a/app/upgrade.go b/app/upgrade.go index 9df1c0eaf..5996b8244 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -92,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) }) @@ -117,6 +116,15 @@ func (app *App) registerEddystoneUpgradeHandler() { msgSetTagGasParams := gashubtypes.NewMsgGasParamsWithFixedGas(typeUrl, 1.2e3) app.GashubKeeper.SetMsgGasParams(ctx, *msgSetTagGasParams) + // TODO use a new harfork + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgReserveSwapIn", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCancelSwapIn", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteSwapIn", 1.2e3)) + + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderForceExit", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderExit", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.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, 0x92, 0xb5, 0x99, 0xab, 0xa1, 0xc3, - 0xdd, 0x5a, 0x20, 0xf5, 0x58, 0xea, 0xe6, 0x80, 0x6a, 0x6c, 0x5e, 0x3d, 0x1a, 0xa0, 0xa1, 0x8f, - 0x9a, 0x81, 0xe4, 0x22, 0x09, 0xdf, 0xdd, 0x49, 0xfc, 0x7e, 0x6c, 0x35, 0x13, 0xc3, 0xba, 0xb6, - 0x86, 0x72, 0x28, 0x13, 0x3c, 0xfa, 0x97, 0xa0, 0xf5, 0x5f, 0x1c, 0x28, 0x77, 0x50, 0x07, 0x8a, - 0x87, 0x86, 0x4b, 0x41, 0x5c, 0x58, 0x1e, 0x4b, 0xc1,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03, 0xc9, 0x63, 0x28, 0xd1, 0xb1, 0x9c, 0x08, 0x13, 0x37, 0x74, 0xf9, - 0x68, 0xa7, 0x61, 0xe3, 0xa3, 0x2d, 0xd0, 0xb0, 0x5b, 0xa0, 0xd1, 0x96, 0x3c, 0x4d, 0xcc, 0x86, - 0xd7, 0x7f, 0xcb, 0xc3, 0x7a, 0x3f, 0xcc, 0x26, 0x87, 0x07, 0x48, 0x36, 0x61, 0x49, 0x87, 0x7e, - 0x36, 0x39, 0x45, 0x1d, 0xf6, 0x18, 0xd9, 0x87, 0xca, 0x24, 0x64, 0xd4, 0xa0, 0x6f, 0xf8, 0x18, - 0x7d, 0x8d, 0x41, 0x7c, 0x52, 0xc1, 0x5b, 0x4b, 0xe0, 0x33, 0x3e, 0xc6, 0x3e, 0x06, 0xe4, 0x3b, - 0x00, 0x85, 0x94, 0xf9, 0x61, 0x24, 0x65, 0x27, 0xe3, 0xff, 0x5c, 0x69, 0x07, 0x83, 0xb9, 0x2b, - 0xed, 0x60, 0xe0, 0xad, 0x44, 0x7a, 0x49, 0x66, 0xfb, 0x50, 0x39, 0x57, 0x88, 0x7e, 0x7c, 0xc2, - 0x8b, 0x89, 0x34, 0x34, 0x9e, 0x9d, 0xa2, 0xb7, 0x16, 0xc1, 0x1e, 0x52, 0xf6, 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, 0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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, 0x21, + 0x84, 0x4a, 0xb1, 0xd5, 0x70, 0xa8, 0x04, 0x5c, 0x1c, 0xdb, 0x8d, 0x16, 0xda, 0x50, 0xd6, 0x2e, + 0x42, 0x20, 0xb4, 0x1a, 0xef, 0xbe, 0x38, 0xa3, 0xd8, 0x33, 0xdb, 0x99, 0x71, 0x8a, 0xff, 0x01, + 0x17, 0x24, 0x7e, 0x01, 0x07, 0xf8, 0x05, 0x48, 0x3d, 0xf1, 0x0b, 0x7a, 0xac, 0x7a, 0x42, 0x1c, + 0x2a, 0x94, 0xfc, 0x0a, 0x6e, 0x68, 0x77, 0x67, 0xd7, 0x26, 0x1c, 0xac, 0x4a, 0x39, 0xd9, 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0x83, 0xf5, 0xa3, 0xed, + 0xc6, 0x7f, 0x46, 0xa5, 0xd1, 0x8b, 0x9d, 0xae, 0x09, 0x8a, 0xda, 0x17, 0x79, 0x10, 0x0a, 0xc6, + 0xb5, 0x0d, 0x49, 0xfb, 0xa6, 0x36, 0x39, 0x86, 0x72, 0x30, 0x9b, 0x01, 0xbb, 0xbc, 0x67, 0x1d, + 0x94, 0x8f, 0x76, 0x6f, 0xe8, 0xcd, 0x4d, 0xc9, 0x71, 0x31, 0x7a, 0x0e, 0x77, 0x9e, 0x44, 0xee, + 0xc2, 0xf2, 0x60, 0xa4, 0xbc, 0x0b, 0x9c, 0xda, 0xab, 0x7b, 0xd6, 0xc1, 0xaa, 0x5b, 0x1a, 0x8c, + 0xd4, 0x17, 0x38, 0xad, 0x4f, 0x01, 0x5c, 0x7c, 0x41, 0x65, 0xe0, 0xf0, 0x33, 0x41, 0x8e, 0x60, + 0x39, 0xad, 0xab, 0xb5, 0xa0, 0xae, 0x69, 0x20, 0x79, 0x08, 0x25, 0x3a, 0x16, 0x13, 0xae, 0xe3, + 0x86, 0x2e, 0x1f, 0xed, 0x34, 0x4c, 0x7c, 0xb4, 0x05, 0x1a, 0x66, 0x0b, 0x34, 0xda, 0x82, 0xa5, + 0x89, 0x99, 0xf0, 0xfa, 0xef, 0x79, 0x58, 0xef, 0x85, 0xd9, 0xe4, 0x30, 0x1f, 0xc9, 0x26, 0x2c, + 0xa9, 0xd0, 0xcb, 0x26, 0xa7, 0xa8, 0x42, 0x27, 0x20, 0xfb, 0x50, 0x99, 0x84, 0x01, 0xd5, 0xe8, + 0x69, 0x36, 0x46, 0x4f, 0xa1, 0x1f, 0x9f, 0x54, 0x70, 0xd7, 0x12, 0xb8, 0xcf, 0xc6, 0xd8, 0x43, + 0x9f, 0x7c, 0x07, 0x20, 0x91, 0x06, 0x5e, 0x18, 0x49, 0x99, 0xc9, 0x78, 0x97, 0x2b, 0xed, 0xa0, + 0x3f, 0x77, 0xa5, 0x1d,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x0b, + 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 2fb8f2323..94887eefe 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" @@ -377,6 +378,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 { @@ -1161,7 +1170,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, 0x76, 0xdf, 0xbc, 0x79, 0xef, 0x7d, 0x3e, 0xef, - 0x33, 0x6f, 0x06, 0xdc, 0x71, 0x28, 0x42, 0xde, 0x36, 0x46, 0x2e, 0x2c, 0xec, 0x61, 0xca, 0xeb, - 0x96, 0xeb, 0x50, 0x52, 0xf7, 0x0b, 0x68, 0x0f, 0x79, 0x9c, 0xe5, 0x7d, 0x4a, 0x38, 0xd1, 0x93, - 0xe7, 0x5e, 0xf9, 0x4e, 0xaf, 0xf9, 0x9b, 0x36, 0x61, 0x35, 0xc2, 0x4c, 0xe1, 0x56, 0x90, 0x1f, - 0x72, 0xcf, 0x7c, 0xc2, 0x21, 0x0e, 0x91, 0xf6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c, 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, 0x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xd1, 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, 0x5a, 0x2a, 0xb0, 0xe8, 0x12, 0x51, 0x91, 0x76, 0x48, 0xc2, 0x1f, 0x95, 0x5b, - 0x2e, 0x19, 0x60, 0x40, 0x88, 0xe9, 0x84, 0xa8, 0x2a, 0xa1, 0xea, 0x94, 0x93, 0x18, 0x58, 0x2c, - 0x27, 0x71, 0x5d, 0xeb, 0x62, 0x3b, 0xb2, 0x9d, 0x53, 0xae, 0x9f, 0x80, 0x91, 0x91, 0xb1, 0x1f, - 0x82, 0x0f, 0x71, 0xe3, 0x89, 0x09, 0x31, 0x9c, 0xd0, 0xdd, 0xc2, 0xc7, 0x40, 0x76, 0x22, 0x08, - 0x42, 0x9d, 0x92, 0xfc, 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0, 0x17, 0x83, 0xd1, 0x61, 0x16, - 0x73, 0xdc, 0xbe, 0xb7, 0xf0, 0x87, 0x8e, 0x3d, 0xb3, 0xe8, 0x45, 0xc3, 0xad, 0xd0, 0x71, 0x7e, - 0x06, 0x9f, 0x5b, 0x23, 0xad, 0x64, 0x7e, 0xab, 0xf2, 0x12, 0x73, 0x56, 0x2d, 0x83, 0x7d, 0xa7, - 0x7c, 0xcc, 0x71, 0x7b, 0xe6, 0xe8, 0xff, 0x9d, 0xef, 0x1c, 0xe8, 0xbf, 0x82, 0xc7, 0xd6, 0xa9, - 0x8d, 0x54, 0x04, 0x69, 0x76, 0x4d, 0x86, 0x96, 0xbb, 0x31, 0x18, 0xed, 0x67, 0x47, 0x1c, 0xb7, - 0x33, 0xfb, 0x7f, 0xc6, 0xae, 0xc9, 0x9f, 0x93, 0xaf, 0xef, 0x7d, 0xb9, 0x89, 0xbc, 0x5f, 0x37, - 0x11, 0x98, 0x5c, 0xac, 0xb6, 0x21, 0x58, 0x6f, 0x43, 0xf0, 0x73, 0x1b, 0x82, 0xcf, 0xbb, 0xd0, - 0x5b, 0xef, 0x42, 0xef, 0xfb, 0x2e, 0xf4, 0x3e, 0xbe, 0x1c, 0x4c, 0x33, 0x17, 0xf9, 0xb8, 0xb8, - 0xc2, 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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 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, 0xf4, 0x81, 0x1f, 0xe6, 0xfd, 0xd0, 0xb2, 0x49, 0x48, 0x45, 0x87, 0x55, - 0x9a, 0xb3, 0x69, 0x44, 0xe6, 0xac, 0x80, 0x30, 0xc7, 0x23, 0x91, 0xe3, 0x7b, 0x42, 0x44, 0x4b, - 0x32, 0x9f, 0xf9, 0xfc, 0xa7, 0x55, 0xf9, 0x25, 0x9f, 0x8e, 0x32, 0xdf, 0x67, 0x2e, 0xb5, 0x48, - 0xe0, 0x58, 0xc4, 0xf3, 0xfc, 0x88, 0xb7, 0x84, 0xf2, 0xed, 0xb8, 0xca, 0x5d, 0x40, 0x0a, 0x24, - 0x1f, 0x57, 0x29, 0x19, 0xa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 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, 0x9f, 0xdf, 0x8c, 0xe7, 0x19, 0x19, 0x66, 0xac, 0x8a, 0x69, 0xba, 0x25, 0xdb, 0x74, 0x8a, + 0x5a, 0xcd, 0xae, 0x04, 0x55, 0xe2, 0x58, 0x15, 0x5a, 0xf5, 0xb4, 0xf3, 0xaa, 0x59, 0xa9, 0xab, + 0x5e, 0x85, 0x06, 0x14, 0x4f, 0x34, 0x8b, 0xd4, 0xd6, 0x22, 0x69, 0xf1, 0x94, 0xfa, 0x65, 0xea, + 0x6b, 0x06, 0xf1, 0xcd, 0xb0, 0x43, 0xab, 0xad, 0x18, 0x66, 0x40, 0x56, 0x34, 0x8f, 0x58, 0xb6, + 0x4b, 0x02,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0xf0, 0xf7, 0x03, 0x99, 0x6b, 0x46, 0xa6, 0xb4, 0x3b, 0xb8, 0x00, 0xe7, 0xdb, 0x61, 0x7c, + 0x9b, 0x78, 0x63, 0x00, 0xbe, 0x06, 0xc2, 0x1b, 0x04, 0x33, 0x3d, 0xe4, 0x2d, 0xde, 0x17, 0x3a, + 0xed, 0xfd, 0x86, 0x90, 0x0e, 0xee, 0x27, 0xc2, 0x91, 0x7f, 0x64, 0xc8, 0x39, 0xbc, 0x2b, 0x44, + 0x26, 0x91, 0x9a, 0x9e, 0x0c, 0xff, 0x08, 0x01, 0x34, 0x93, 0x11, 0x6b, 0xc9, 0xbb, 0x11, 0xbb, + 0x1b, 0xa4, 0xaf, 0x7b, 0x6f, 0xe0, 0xde, 0x97, 0x99, 0xf7, 0x2c, 0x9e, 0x13, 0x7a, 0x6f, 0x8d, + 0xf5, 0xdc, 0x4f, 0xd7, 0xb7, 0x32, 0xba, 0xb9, 0x95, 0xd1, 0xcb, 0x5b, 0x19, 0xfd, 0x7b, 0x27, + 0xa7, 0x6e, 0xee, 0xe4, 0xd4, 0xb3, 0x3b, 0x39, 0xf5, 0xfb, 0x9a, 0x65, 0x07, 0x67, 0x55, 0x43, + 0x3d, 0xa5, 0x65, 0xcd, 0x70, 0x8d, 0xe5, 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, 0x38, 0x20, 0xfe, 0x02, 0x2e, 0xc8, 0xe3, 0xf1, 0xac, 0xb3, 0xbb, 0x9e, 0x6c, 0xab, - 0x40, 0xa5, 0x9c, 0x92, 0x9d, 0xf9, 0xde, 0x7b, 0xdf, 0xf7, 0xcd, 0xf8, 0xed, 0xf3, 0x42, 0xdd, - 0x4f, 0x31, 0x8e, 0xef, 0x07, 0x38, 0xf4, 0x9c, 0x5e, 0x90, 0xb2, 0x2e, 0x0a, 0xfd, 0x94, 0x74, - 0x13, 0x87, 0xed, 0xda, 0x49, 0x4a, 0x18, 0xd1, 0x97, 0xfa, 0x08, 0xbb, 0x8c, 0x30, 0x2d, 0x97, - 0xd0, 0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ac, 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, 0xeb, 0xb5, 0x77, 0x6c, + 0x47, 0x86, 0x4a, 0x39, 0x25, 0x9e, 0x79, 0xef, 0xcd, 0xef, 0xf7, 0x9b, 0x37, 0x6f, 0xe6, 0x2d, + 0xe4, 0x6c, 0x1f, 0x63, 0x77, 0xdf, 0xc1, 0x75, 0xcb, 0x6c, 0x39, 0x7e, 0xd0, 0x44, 0x75, 0xdb, + 0x27, 0x4d, 0xcf, 0x0c, 0x8e, 0x8a, 0x9e, 0x4f, 0x02, 0xa2, 0xaf, 0x74, 0x2c, 0x8a, 0x51, 0x0b, + 0x23, 0x5b, 0x23, 0xb4, 0x41, 0xa8, 0x59, 0x45, 0x14, 0x9b, 0xad, 0x8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13, 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, - 0x18, 0xc7, 0x9b, 0xae, 0xdb, 0xbb, 0xba, 0xeb, 0xf6, 0xe2, 0x6d, 0x5a, 0xd8, 0xa4, 0xae, 0xca, - 0xa4, 0xd1, 0x4b, 0xdb, 0x03, 0x20, 0x38, 0x70, 0xa1, 0x20, 0xaa, 0x70, 0x60, 0x55, 0x22, 0x86, - 0xc4, 0x25, 0x72, 0x62, 0x2f, 0xb3, 0x96, 0xda, 0x51, 0xec, 0x0c, 0xba, 0x4f, 0xc1, 0x85, 0x6f, - 0xb2, 0x0f, 0xb1, 0x13, 0x9a, 0x76, 0x02, 0x0e, 0x13, 0xda, 0xc4, 0xf7, 0x40, 0xb1, 0x4d, 0x3b, - 0x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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, 0x04, 0x57, 0x1c, 0xae, 0x4d, 0x48, 0x8d, 0x9b, 0xa4, 0xf5, + 0xbf, 0x43, 0x2e, 0x63, 0x2e, 0x03, 0x4d, 0x6b, 0x9a, 0x83, 0xc9, 0x59, 0x5f, 0x89, 0x78, 0xc4, + 0x0d, 0x9e, 0xfd, 0x19, 0xd4, 0xfb, 0x96, 0x07, 0xb0, 0x3d, 0xe0, 0x7d, 0x34, 0xd8, 0x37, 0x3a, + 0xed, 0x4c, 0x07, 0x2e, 0x82, 0x3c, 0xc5, 0xae, 0x53, 0x75, 0x6a, 0x65, 0x3f, 0x4f, 0x31, 0xdc, + 0x00, 0xc5, 0x03, 0x14, 0xd3, 0x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0x2a, 0x88, 0x86, 0x91, 0xcd, 0x2c, 0xe8, 0xcc, 0x7f, 0x34, 0xcf, 0x1f, 0xd3, 0xfc, 0x8c, 0xd5, + 0x1e, 0x46, 0x5a, 0xc7, 0x7b, 0x06, 0x4a, 0xbd, 0xb7, 0x28, 0xd9, 0x4b, 0x55, 0x87, 0x1d, 0x70, + 0xb8, 0x0c, 0x66, 0xcd, 0x98, 0x99, 0x32, 0x0a, 0x32, 0x9b, 0xaf, 0x6d, 0xb0, 0x24, 0xd3, 0x30, + 0x24, 0x52, 0x72, 0x71, 0x6b, 0x0a, 0xcb, 0x63, 0x38, 0x9b, 0x43, 0xef, 0x1d, 0x00, 0x99, 0x56, + 0x87, 0x69, 0xa9, 0x3b, 0xb2, 0x9c, 0x3b, 0xb2, 0x60, 0x15, 0x2c, 0x28, 0x24, 0x22, 0xa2, 0x6e, + 0x49, 0x03, 0x83, 0x69, 0xc6, 0x0e, 0x58, 0x22, 0xc7, 0x09, 0x15, 0x48, 0x51, 0xce, 0x02, 0x45, + 0x63, 0xa2, 0x4b, 0x2b, 0xf8, 0x8b, 0x13, 0xf8, 0x05, 0x8d, 0x49, 0xeb, 0xf9, 0xd9, 0x55, 0xc5, + 0x39, 0xbf, 0xaa, 0x38, 0x5f, 0xaf, 0x2a, 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 From c14218ae3080fa36340f67b2a58213a4bee15bdb Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 4 Dec 2023 10:01:42 +0800 Subject: [PATCH 02/27] add tests --- e2e/tests/virtualgroup_test.go | 27 +++++++++++++++++-- x/storage/keeper/keeper.go | 13 ++++++--- x/virtualgroup/keeper/grpc_query.go | 2 +- .../message_storage_provider_force_exit.go | 3 +-- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 8b4062366..dd9e192d4 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1001,6 +1001,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { func (s *VirtualGroupTestSuite) TestSPForceExit() { ctx := context.Background() + user := s.GenAndChargeAccounts(1, 1000000)[0] // 1. create SPs spx := s.BaseSuite.CreateNewStorageProvider() @@ -1008,7 +1009,16 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { // 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 + // User creates an object and sealed by the SP-x's GVG + bucketName := storagetestutil.GenRandomBucketName() + objectName := storagetestutil.GenRandomBucketName() + s.BaseSuite.CreateObject(user, spx, gvgID, bucketName, objectName) + objectResp, err := s.Client.HeadObject(context.Background(), &storagetypes.QueryHeadObjectRequest{ + BucketName: bucketName, ObjectName: objectName, + }) + s.Require().NoError(err) + + // 3. create a proposal that puts SP-x to FORCE_EXIT govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() msgForceExit := virtualgroupmoduletypes.NewMsgStorageProviderForceExit(govAddr, spx.OperatorKey.GetAddr()) @@ -1070,12 +1080,25 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) - // should be null + // object not found swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupId: gvgID, }) s.Require().Error(err) + // SP-y is able to discontinue the object as a successor Primary SP + msgDiscontinueObject := &storagetypes.MsgDiscontinueObject{ + Operator: spy.GcKey.GetAddr().String(), + BucketName: bucketName, + ObjectIds: []sdk.Uint{objectResp.ObjectInfo.Id}, + } + s.SendTxBlock(spy.GcKey, msgDiscontinueObject) + time.Sleep(2 * time.Second) + _, err = s.Client.HeadObject(context.Background(), &storagetypes.QueryHeadObjectRequest{ + BucketName: bucketName, ObjectName: objectName, + }) + s.Require().Error(err) + // 8. SP-y complete SwapIn msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 94887eefe..8332cf229 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -378,8 +378,8 @@ func (k Keeper) UpdateBucketInfo(ctx sdk.Context, operator sdk.AccAddress, bucke return types.ErrSourceTypeMismatch } - //TODO change name - if ctx.IsUpgraded(upgradetypes.Pampas) { + //TODO rename the harfork + if ctx.IsUpgraded(upgradetypes.Eddystone) { 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) @@ -905,6 +905,13 @@ func (k Keeper) DeleteObject( } spInState := k.MustGetPrimarySPForBucket(ctx, bucketInfo) + + if ctx.IsUpgraded(upgradetypes.Eddystone) { + if spInState.Status == sptypes.STATUS_GRACEFUL_EXITING || spInState.Status == sptypes.STATUS_FORCE_EXITING { + return types.ErrUpdateQuotaFailed.Wrapf("The SP is in %s, object can not be deleted", spInState.Status) + } + } + internalBucketInfo := k.MustGetInternalBucketInfo(ctx, bucketInfo.Id) err := k.UnChargeObjectStoreFee(ctx, spInState.Id, bucketInfo, internalBucketInfo, objectInfo) @@ -1175,7 +1182,7 @@ func (k Keeper) DiscontinueObject(ctx sdk.Context, operator sdk.AccAddress, buck if found { if swapInInfo.TargetSpId != spInState.Id || swapInInfo.SuccessorSpId != sp.Id || - uint64(ctx.BlockTime().Unix()) > swapInInfo.ExpirationTime { + uint64(ctx.BlockTime().Unix()) >= swapInInfo.ExpirationTime { return errors.Wrapf(types.ErrAccessDenied, "the sp is allowed to do discontinue objects, reserved swapInfo=%s", swapInInfo.String()) } } diff --git a/x/virtualgroup/keeper/grpc_query.go b/x/virtualgroup/keeper/grpc_query.go index 056163c49..88f0cdff4 100644 --- a/x/virtualgroup/keeper/grpc_query.go +++ b/x/virtualgroup/keeper/grpc_query.go @@ -129,7 +129,7 @@ func (k Keeper) SwapInInfo(goCtx context.Context, req *types.QuerySwapInInfoRequ if !found { return nil, types.ErrSwapInInfoNotExist } - if uint64(ctx.BlockTime().Unix()) > swapInInfo.ExpirationTime { + if uint64(ctx.BlockTime().Unix()) >= swapInInfo.ExpirationTime { return nil, types.ErrSwapInInfoExpired } return &types.QuerySwapInInfoResponse{ diff --git a/x/virtualgroup/types/message_storage_provider_force_exit.go b/x/virtualgroup/types/message_storage_provider_force_exit.go index 04940216f..7bec5eed2 100644 --- a/x/virtualgroup/types/message_storage_provider_force_exit.go +++ b/x/virtualgroup/types/message_storage_provider_force_exit.go @@ -38,8 +38,7 @@ 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 { + if _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider); err != nil { return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sp address (%s)", err) } return nil From 4d62bb60857200ac9ff837e1baa97c64651af00a Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 4 Dec 2023 10:29:23 +0800 Subject: [PATCH 03/27] add tests --- e2e/tests/virtualgroup_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index dd9e192d4..6e5d3f588 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1093,7 +1093,7 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { ObjectIds: []sdk.Uint{objectResp.ObjectInfo.Id}, } s.SendTxBlock(spy.GcKey, msgDiscontinueObject) - time.Sleep(2 * time.Second) + time.Sleep(5 * time.Second) _, err = s.Client.HeadObject(context.Background(), &storagetypes.QueryHeadObjectRequest{ BucketName: bucketName, ObjectName: objectName, }) From 44430c3aae643cbef7d7c5a69fe5ede32c45fadb Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 4 Dec 2023 11:08:48 +0800 Subject: [PATCH 04/27] fix proto format --- e2e/tests/virtualgroup_test.go | 17 +- proto/greenfield/virtualgroup/events.proto | 2 +- proto/greenfield/virtualgroup/params.proto | 2 +- proto/greenfield/virtualgroup/query.proto | 8 +- proto/greenfield/virtualgroup/tx.proto | 3 +- swagger/static/swagger.yaml | 1334 +++++++---------- x/storage/keeper/keeper.go | 1 + x/storage/types/expected_keepers_mocks.go | 15 + x/virtualgroup/keeper/msg_server.go | 2 +- .../types/expected_keepers_mocks.go | 14 + 10 files changed, 549 insertions(+), 849 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 6e5d3f588..3e6d49fbd 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -4,13 +4,14 @@ import ( "bytes" "context" "fmt" - sptypes "github.com/bnb-chain/greenfield/x/sp/types" "math" "reflect" "strconv" "testing" "time" + sptypes "github.com/bnb-chain/greenfield/x/sp/types" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" @@ -752,7 +753,7 @@ func (s *VirtualGroupTestSuite) TestSPExit() { s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) // 13. query the swapInInfo should be not found onChain. - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupFamilyId: familyID, }) s.Require().Error(err) @@ -794,7 +795,7 @@ func (s *VirtualGroupTestSuite) TestSPExit() { s.SendTxBlock(spy.OperatorKey, msgCancelSwapIn) // 18 query the swapInInfo not found - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupId: gvgID2, }) s.Require().Error(err) @@ -971,9 +972,9 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { 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 + // 7 waits for 6 seconds, the swapIno is expired time.Sleep(6 * time.Second) - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupFamilyId: familyID, }) s.Require().Error(err) @@ -1081,7 +1082,7 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) // object not found - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupId: gvgID, }) s.Require().Error(err) @@ -1090,7 +1091,7 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { msgDiscontinueObject := &storagetypes.MsgDiscontinueObject{ Operator: spy.GcKey.GetAddr().String(), BucketName: bucketName, - ObjectIds: []sdk.Uint{objectResp.ObjectInfo.Id}, + ObjectIds: []sdkmath.Uint{objectResp.ObjectInfo.Id}, } s.SendTxBlock(spy.GcKey, msgDiscontinueObject) time.Sleep(5 * time.Second) @@ -1104,7 +1105,7 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) // 9. query the swapInInfo should be not found - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupFamilyId: familyID, }) s.Require().Error(err) diff --git a/proto/greenfield/virtualgroup/events.proto b/proto/greenfield/virtualgroup/events.proto index 98b659869..20ae565fa 100644 --- a/proto/greenfield/virtualgroup/events.proto +++ b/proto/greenfield/virtualgroup/events.proto @@ -211,4 +211,4 @@ message EventCancelSwapIn { 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 77df1544f..8f75d8400 100644 --- a/proto/greenfield/virtualgroup/params.proto +++ b/proto/greenfield/virtualgroup/params.proto @@ -29,4 +29,4 @@ message Params { 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 402c40223..a78a4384b 100644 --- a/proto/greenfield/virtualgroup/query.proto +++ b/proto/greenfield/virtualgroup/query.proto @@ -99,10 +99,10 @@ message AvailableGlobalVirtualGroupFamiliesResponse { } message QuerySwapInInfoRequest { - uint32 global_virtual_group_family_id = 1; - uint32 global_virtual_group_id = 2; + 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 + SwapInInfo swap_in_info = 1; +} diff --git a/proto/greenfield/virtualgroup/tx.proto b/proto/greenfield/virtualgroup/tx.proto index 7b35b6c16..5c47b9b94 100644 --- a/proto/greenfield/virtualgroup/tx.proto +++ b/proto/greenfield/virtualgroup/tx.proto @@ -244,6 +244,7 @@ message MsgCancelSwapIn { } message MsgCancelSwapInResponse {} + // this line is used by starport scaffolding # proto/tx/message message MsgStorageProviderForceExit { option (cosmos.msg.v1.signer) = "authority"; @@ -255,4 +256,4 @@ message MsgStorageProviderForceExit { string storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -message MsgStorageProviderForceExitResponse {} \ No newline at end of file +message MsgStorageProviderForceExitResponse {} diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index 7139239f6..22cc139ea 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -1896,6 +1896,7 @@ paths: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -2096,6 +2097,7 @@ paths: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -2236,6 +2238,7 @@ paths: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -6110,6 +6113,18 @@ paths: title: >- if the store size reach the exceed, the family is not allowed to sever more buckets + swap_in_validity_period: + type: string + format: uint64 + title: >- + the validity period that a successor SP can reserve to + complete the swap for Global virtual group/family + sp_concurrent_exit_num: + type: integer + format: int64 + description: >- + sp_concurrent_exit_num defines the number of sp allowed + for exit concurrently. description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -6137,6 +6152,74 @@ paths: format: byte tags: - Query + /greenfield/virtualgroup/swap_in_info: + get: + summary: >- + AvailableGlobalVirtualGroupFamilies filters a list of + GlobalVirtualGroupFamilies ID which are qualified to create bucket on + operationId: SwapInInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + swap_in_info: + type: object + properties: + successor_sp_id: + type: integer + format: int64 + title: >- + successor_sp_id defines the id of sp who want to join the + family or GVG + target_sp_id: + type: integer + format: int64 + description: >- + target_sp_id is the id of SP in the family or GVG to be + swapped. + expiration_time: + type: string + format: uint64 + title: >- + expiration_time is the expiration of epoch time for the + swapInInfo + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: global_virtual_group_family_id + in: query + required: false + type: integer + format: int64 + - name: global_virtual_group_id + in: query + required: false + type: integer + format: int64 + tags: + - Query /cosmos/auth/v1beta1/account_info/{address}: get: summary: AccountInfo queries account info which is common to all account types. @@ -6208,10 +6291,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -6261,7 +6341,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6271,7 +6351,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6301,7 +6381,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -6416,10 +6495,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -6469,7 +6545,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6479,7 +6555,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6509,7 +6585,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -6628,10 +6703,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -6681,7 +6753,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6691,7 +6763,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6721,7 +6793,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -6852,10 +6923,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -6905,7 +6973,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6915,7 +6983,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6945,7 +7013,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7104,10 +7171,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7157,7 +7221,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7167,7 +7231,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7197,7 +7261,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7302,10 +7365,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7355,7 +7415,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7365,7 +7425,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7395,7 +7455,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7525,10 +7584,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7578,7 +7634,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7588,7 +7644,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7618,7 +7674,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7745,10 +7800,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7798,7 +7850,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7808,7 +7860,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7838,7 +7890,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7949,10 +8000,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8002,7 +8050,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8012,7 +8060,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8042,7 +8090,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8144,10 +8191,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8197,7 +8241,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8207,7 +8251,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8237,7 +8281,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8342,10 +8385,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8395,7 +8435,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8405,7 +8445,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8435,7 +8475,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8579,10 +8618,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8632,7 +8668,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8642,7 +8678,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8672,7 +8708,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8780,10 +8815,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -8833,7 +8865,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8843,7 +8875,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8873,7 +8905,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9019,10 +9050,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -9072,7 +9100,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9082,7 +9110,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9112,7 +9140,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9297,10 +9324,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -9350,7 +9374,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9360,7 +9384,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9390,7 +9414,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9528,10 +9551,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -9581,7 +9601,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9591,7 +9611,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9621,7 +9641,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9795,10 +9814,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -9848,7 +9864,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9858,7 +9874,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9888,7 +9904,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -10026,10 +10041,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -10079,7 +10091,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -10089,7 +10101,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -10119,7 +10131,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -11752,10 +11763,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -11805,7 +11813,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -11815,7 +11823,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -11845,7 +11853,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -13089,10 +13096,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -13142,7 +13146,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -13152,7 +13156,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -13182,7 +13186,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14407,10 +14410,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -14460,7 +14460,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14470,7 +14470,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14500,7 +14500,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14695,10 +14694,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -14748,7 +14744,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14758,7 +14754,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14788,7 +14784,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14910,10 +14905,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -14963,7 +14955,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14973,7 +14965,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15003,7 +14995,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15116,10 +15107,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -15169,7 +15157,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15179,7 +15167,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15209,7 +15197,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15345,10 +15332,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -15398,7 +15382,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15408,7 +15392,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15438,7 +15422,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15608,10 +15591,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -15661,7 +15641,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15671,7 +15651,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15701,7 +15681,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15837,10 +15816,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -15890,7 +15866,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15900,7 +15876,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15930,7 +15906,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17062,10 +17037,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17115,7 +17087,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17125,7 +17097,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17155,7 +17127,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17285,10 +17256,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17338,7 +17306,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17348,7 +17316,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17378,7 +17346,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17537,10 +17504,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17590,7 +17554,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17600,7 +17564,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17630,7 +17594,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17735,10 +17698,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17788,7 +17748,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17798,7 +17758,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17828,7 +17788,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17965,10 +17924,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -18055,10 +18011,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -18108,7 +18061,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18118,7 +18071,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18148,7 +18101,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18284,10 +18236,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -18394,10 +18343,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -18447,7 +18393,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18457,7 +18403,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18487,7 +18433,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18670,10 +18615,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -18783,10 +18725,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -18836,7 +18775,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18846,7 +18785,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18876,7 +18815,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19441,10 +19379,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -19494,7 +19429,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19504,7 +19439,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19534,7 +19469,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19658,10 +19592,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -19711,7 +19642,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19721,7 +19652,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19751,7 +19682,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19984,10 +19914,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -20037,7 +19964,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20047,7 +19974,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20077,7 +20004,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20282,10 +20208,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -20335,7 +20258,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20345,7 +20268,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20375,7 +20298,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20585,10 +20507,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -20638,7 +20557,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20648,7 +20567,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20678,7 +20597,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20863,10 +20781,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -20916,7 +20831,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20926,7 +20841,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20956,7 +20871,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21176,10 +21090,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21229,7 +21140,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21239,7 +21150,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21269,7 +21180,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21421,10 +21331,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21474,7 +21381,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21484,7 +21391,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21514,7 +21421,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21709,10 +21615,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21762,7 +21665,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21772,7 +21675,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21802,7 +21705,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -22031,10 +21933,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -22084,7 +21983,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22094,7 +21993,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -22124,7 +22023,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -22939,10 +22837,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -22992,7 +22887,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23002,7 +22897,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23032,7 +22927,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23377,10 +23271,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -23430,7 +23321,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23440,7 +23331,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23470,7 +23361,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23755,10 +23645,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -23808,7 +23695,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23818,7 +23705,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23848,7 +23735,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24030,10 +23916,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -24083,7 +23966,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24093,7 +23976,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24123,7 +24006,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24416,10 +24298,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -24469,7 +24348,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24479,7 +24358,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24509,7 +24388,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24684,10 +24562,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -24737,7 +24612,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24747,7 +24622,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24777,7 +24652,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25047,10 +24921,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -25100,7 +24971,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25110,7 +24981,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25140,7 +25011,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25345,10 +25215,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are - no widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -25399,7 +25266,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25409,7 +25276,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25439,7 +25306,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25715,10 +25581,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -25768,7 +25631,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25778,7 +25641,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25808,7 +25671,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25971,10 +25833,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -26024,7 +25883,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26034,7 +25893,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26064,7 +25923,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26190,10 +26048,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -26243,7 +26098,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26253,7 +26108,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26283,7 +26138,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26401,10 +26255,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -26454,7 +26305,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26464,7 +26315,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26494,7 +26345,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26787,10 +26637,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -26840,7 +26687,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26850,7 +26697,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26880,7 +26727,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27053,10 +26899,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -27106,7 +26949,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27116,7 +26959,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27146,7 +26989,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27416,10 +27258,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -27469,7 +27308,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27479,7 +27318,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27509,7 +27348,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27709,10 +27547,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -27762,7 +27597,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27772,7 +27607,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27802,7 +27637,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28032,10 +27866,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28085,7 +27916,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28095,7 +27926,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28125,7 +27956,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28317,10 +28147,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28370,7 +28197,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28380,7 +28207,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28410,7 +28237,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28632,10 +28458,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28685,7 +28508,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28695,7 +28518,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28725,7 +28548,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28904,10 +28726,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28957,7 +28776,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28967,7 +28786,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28997,7 +28816,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29141,10 +28959,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29194,7 +29009,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29204,7 +29019,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29234,7 +29049,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29379,10 +29193,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29432,7 +29243,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29442,7 +29253,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29472,7 +29283,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29607,10 +29417,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29660,7 +29467,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29670,7 +29477,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29700,7 +29507,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29900,10 +29706,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -29953,7 +29756,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29963,7 +29766,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29993,7 +29796,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30109,10 +29911,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -30162,7 +29961,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30172,7 +29971,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30202,7 +30001,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30324,10 +30122,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -30377,7 +30172,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30387,7 +30182,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30417,7 +30212,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30701,10 +30495,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -30754,7 +30545,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30764,7 +30555,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30794,7 +30585,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30961,10 +30751,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -31014,7 +30801,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31024,7 +30811,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31054,7 +30841,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -31207,10 +30993,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -31260,7 +31043,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31270,7 +31053,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31300,7 +31083,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -31479,10 +31261,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -31532,7 +31311,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31542,7 +31321,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31572,7 +31351,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -31931,10 +31709,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -31981,7 +31756,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31991,7 +31766,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -32017,7 +31792,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -32139,10 +31913,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -32192,7 +31963,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -32202,7 +31973,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -32228,7 +31999,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -33648,6 +33418,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33767,6 +33538,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33863,6 +33635,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33950,6 +33723,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. greenfield.sp.StorageProvider: @@ -34002,6 +33776,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE + - STATUS_FORCE_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -36625,6 +36400,18 @@ definitions: title: >- if the store size reach the exceed, the family is not allowed to sever more buckets + swap_in_validity_period: + type: string + format: uint64 + title: >- + the validity period that a successor SP can reserve to complete the + swap for Global virtual group/family + sp_concurrent_exit_num: + type: integer + format: int64 + description: >- + sp_concurrent_exit_num defines the number of sp allowed for exit + concurrently. description: Params defines the parameters for the module. greenfield.virtualgroup.QueryGlobalVirtualGroupByFamilyIDResponse: type: object @@ -36857,7 +36644,56 @@ definitions: title: >- if the store size reach the exceed, the family is not allowed to sever more buckets + swap_in_validity_period: + type: string + format: uint64 + title: >- + the validity period that a successor SP can reserve to complete + the swap for Global virtual group/family + sp_concurrent_exit_num: + type: integer + format: int64 + description: >- + sp_concurrent_exit_num defines the number of sp allowed for exit + concurrently. description: QueryParamsResponse is response type for the Query/Params RPC method. + greenfield.virtualgroup.QuerySwapInInfoResponse: + type: object + properties: + swap_in_info: + type: object + properties: + successor_sp_id: + type: integer + format: int64 + title: >- + successor_sp_id defines the id of sp who want to join the family + or GVG + target_sp_id: + type: integer + format: int64 + description: target_sp_id is the id of SP in the family or GVG to be swapped. + expiration_time: + type: string + format: uint64 + title: expiration_time is the expiration of epoch time for the swapInInfo + greenfield.virtualgroup.SwapInInfo: + type: object + properties: + successor_sp_id: + type: integer + format: int64 + title: >- + successor_sp_id defines the id of sp who want to join the family or + GVG + target_sp_id: + type: integer + format: int64 + description: target_sp_id is the id of SP in the family or GVG to be swapped. + expiration_time: + type: string + format: uint64 + title: expiration_time is the expiration of epoch time for the swapInInfo cosmos.auth.v1beta1.BaseAccount: type: object properties: @@ -36912,10 +36748,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -36963,7 +36796,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -36973,7 +36806,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -36999,7 +36832,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37133,10 +36965,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -37186,7 +37015,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37196,7 +37025,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37223,7 +37052,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37318,10 +37146,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37369,7 +37194,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37379,7 +37204,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37405,7 +37230,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37495,10 +37319,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -37548,7 +37369,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37558,7 +37379,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37584,7 +37405,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37694,10 +37514,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37745,7 +37562,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37755,7 +37572,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37781,7 +37598,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37871,10 +37687,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -37924,7 +37737,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37934,7 +37747,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37960,7 +37773,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38073,10 +37885,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38124,7 +37933,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38134,7 +37943,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38160,7 +37969,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38261,10 +38069,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38312,7 +38117,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38322,7 +38127,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38348,7 +38153,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38453,10 +38257,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -38506,7 +38307,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38516,7 +38317,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38545,7 +38346,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38674,10 +38474,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -38727,7 +38524,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38737,7 +38534,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38766,7 +38563,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38891,10 +38687,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -38944,7 +38737,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38954,7 +38747,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38983,7 +38776,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -42633,10 +42425,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -42686,7 +42475,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -42696,7 +42485,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -42725,7 +42514,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -42936,10 +42724,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -42989,7 +42774,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -42999,7 +42784,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43028,7 +42813,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -43298,10 +43082,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -43349,7 +43130,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43359,7 +43140,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43385,7 +43166,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46323,10 +46103,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -46376,7 +46153,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46386,7 +46163,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46412,7 +46189,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46521,10 +46297,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46572,7 +46345,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46582,7 +46355,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46608,7 +46381,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46706,10 +46478,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46791,10 +46560,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -46883,10 +46649,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -46998,10 +46761,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -47397,10 +47157,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -47450,7 +47207,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47460,7 +47217,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -47486,7 +47243,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -47925,10 +47681,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -47978,7 +47731,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47988,7 +47741,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -48017,7 +47770,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -48211,10 +47963,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -48264,7 +48013,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -48274,7 +48023,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -48304,7 +48053,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -49362,10 +49110,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -49415,7 +49160,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -49425,7 +49170,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -49454,7 +49199,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -49967,10 +49711,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -50020,7 +49761,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50030,7 +49771,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50057,7 +49798,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -50309,10 +50049,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -50362,7 +50099,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50372,7 +50109,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50401,7 +50138,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -50757,10 +50493,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -50810,7 +50543,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50820,7 +50553,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50850,7 +50583,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -51446,10 +51178,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -51499,7 +51228,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51509,7 +51238,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51536,7 +51265,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -51868,10 +51596,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -51921,7 +51646,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51931,7 +51656,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51960,7 +51685,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -52570,10 +52294,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -52621,7 +52342,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52631,7 +52352,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52657,7 +52378,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -53009,10 +52729,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -53062,7 +52779,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53072,7 +52789,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53098,7 +52815,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -53287,10 +53003,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -53338,7 +53051,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53348,7 +53061,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53374,7 +53087,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -53828,10 +53540,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -53881,7 +53590,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53891,7 +53600,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53918,7 +53627,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -54784,10 +54492,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -54837,7 +54542,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -54847,7 +54552,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -54874,7 +54579,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -55112,10 +54816,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -55165,7 +54866,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55175,7 +54876,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55204,7 +54905,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -55577,10 +55277,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -55628,7 +55325,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55638,7 +55335,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55664,7 +55361,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -55868,10 +55564,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -55921,7 +55614,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55931,7 +55624,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55960,7 +55653,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56089,10 +55781,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56142,7 +55831,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56152,7 +55841,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56181,7 +55870,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56304,10 +55992,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56357,7 +56042,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56367,7 +56052,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56396,7 +56081,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56492,10 +56176,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56545,7 +56226,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56555,7 +56236,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56584,7 +56265,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56700,10 +56380,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -56753,7 +56430,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56763,7 +56440,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56789,7 +56466,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56905,10 +56581,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -56958,7 +56631,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56968,7 +56641,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56994,7 +56667,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -57085,10 +56757,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -57138,7 +56807,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -57148,7 +56817,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -57174,7 +56843,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 8332cf229..2550ca993 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" diff --git a/x/storage/types/expected_keepers_mocks.go b/x/storage/types/expected_keepers_mocks.go index ebfffd9fb..ba7bf24cc 100644 --- a/x/storage/types/expected_keepers_mocks.go +++ b/x/storage/types/expected_keepers_mocks.go @@ -876,6 +876,21 @@ func (mr *MockVirtualGroupKeeperMockRecorder) SettleAndDistributeGVGFamily(ctx, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SettleAndDistributeGVGFamily", reflect.TypeOf((*MockVirtualGroupKeeper)(nil).SettleAndDistributeGVGFamily), ctx, sp, family) } +// GetSwapInInfo mocks base method. +func (m *MockVirtualGroupKeeper) GetSwapInInfo(ctx types3.Context, familyID, gvgID uint32) (*types2.SwapInInfo, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSwapInInfo", ctx, familyID, gvgID) + ret0, _ := ret[0].(*types2.SwapInInfo) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetSwapInInfo indicates an expected call of GetSwapInInfo. +func (mr *MockVirtualGroupKeeperMockRecorder) GetSwapInInfo(ctx, familyID, gvgID interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSwapInInfo", reflect.TypeOf((*MockVirtualGroupKeeper)(nil).GetSwapInInfo), ctx, familyID, gvgID) +} + // MockStorageKeeper is a mock of StorageKeeper interface. type MockStorageKeeper struct { ctrl *gomock.Controller diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index b9151eda0..d5dfdb58e 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -597,7 +597,7 @@ func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.Ms } maxSPExitingNum := k.SpConcurrentExitNum(ctx) if exittingSPNum >= maxSPExitingNum { - return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("%d SP exiting, allow %d sp exit concurrently, s: %s", exittingSPNum, maxSPExitingNum) + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("%d SP are exiting, allow %d sp exit concurrently", exittingSPNum, maxSPExitingNum) } // Governance can put an SP into force exiting status no matter what status it is in. diff --git a/x/virtualgroup/types/expected_keepers_mocks.go b/x/virtualgroup/types/expected_keepers_mocks.go index eacf13dd3..06f27e5e2 100644 --- a/x/virtualgroup/types/expected_keepers_mocks.go +++ b/x/virtualgroup/types/expected_keepers_mocks.go @@ -122,6 +122,20 @@ func (mr *MockSpKeeperMockRecorder) SetStorageProvider(ctx, sp any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStorageProvider", reflect.TypeOf((*MockSpKeeper)(nil).SetStorageProvider), ctx, sp) } +// GetAllStorageProviders mocks base method. +func (m *MockSpKeeper) GetAllStorageProviders(ctx types0.Context) (sps []types.StorageProvider) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllStorageProviders", ctx) + ret0, _ := ret[0].([]types.StorageProvider) + return ret0 +} + +// GetAllStorageProviders indicates an expected call of GetAllStorageProviders. +func (mr *MockSpKeeperMockRecorder) GetAllStorageProviders(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllStorageProviders", reflect.TypeOf((*MockSpKeeper)(nil).GetAllStorageProviders), ctx) +} + // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller From 0f55d6d0053e649a3e3b4a466df12b270a5b192f Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 4 Dec 2023 16:33:17 +0800 Subject: [PATCH 05/27] fix test --- e2e/tests/virtualgroup_test.go | 177 ++++++++++++++++------------- internal/sequence/sequence_test.go | 2 - x/virtualgroup/keeper/keeper.go | 11 +- 3 files changed, 103 insertions(+), 87 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 3e6d49fbd..daadfd5f5 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -922,84 +922,6 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { 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 6 seconds, the swapIno is expired - time.Sleep(6 * time.Second) - _, 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() user := s.GenAndChargeAccounts(1, 1000000)[0] @@ -1061,12 +983,12 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { 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) + s.Require().Equal(v1.ProposalStatus_PROPOSAL_STATUS_PASSED, proposalRes.Proposal.Status) // 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) + s.Require().Equal(sptypes.STATUS_FORCE_EXITING, resp.StorageProvider.Status) // 7. SP-x successor SP try swapIn family msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) @@ -1163,3 +1085,98 @@ func (s *VirtualGroupTestSuite) updateParams(params virtualgroupmoduletypes.Para s.Require().NoError(err) s.Require().Equal(proposalRes.Proposal.Status, v1.ProposalStatus_PROPOSAL_STATUS_PASSED) } + +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 = 10 // 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(10, 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 11 seconds, the swapIno is expired + time.Sleep(11 * time.Second) + _, 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) + + // SP-z completes the swapIn + msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spz.OperatorKey.GetAddr(), familyID, 0) + s.SendTxBlock(spz.OperatorKey, msgCompleteSwapIn) + + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().Error(err) + + // sp-x completes the exit + 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) +} diff --git a/internal/sequence/sequence_test.go b/internal/sequence/sequence_test.go index ea59bf579..1f806f6f5 100644 --- a/internal/sequence/sequence_test.go +++ b/internal/sequence/sequence_test.go @@ -61,8 +61,6 @@ func TestSequenceIncrementsUint256(t *testing.T) { i = i.Incr() assert.True(t, i.Equal(id)) assert.True(t, i.Equal(curId)) - fmt.Printf("bytes len %d\n", len(id.Bytes())) - fmt.Print("i= ", i.Uint64(), "id=", id.Uint64(), "curID", curId.Uint64()) } } diff --git a/x/virtualgroup/keeper/keeper.go b/x/virtualgroup/keeper/keeper.go index 22b04da8d..776142a3d 100644 --- a/x/virtualgroup/keeper/keeper.go +++ b/x/virtualgroup/keeper/keeper.go @@ -694,6 +694,7 @@ func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, succes for _, sspID := range gvg.GetSecondarySpIds() { if sspID == gvg.PrimarySpId { breakRedundancy = true + break } } if !breakRedundancy { @@ -713,13 +714,13 @@ func (k Keeper) setSwapInInfo(ctx sdk.Context, key []byte, successorSPID, target } 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) + curSwapInInfo := &types.SwapInInfo{} + k.cdc.MustUnmarshal(bz, curSwapInInfo) + if curTime < curSwapInInfo.ExpirationTime { + return types.ErrSwapInFailed.Wrapf("already exist SP(ID=%d) try to swap in", curSwapInInfo.SuccessorSpId) } // override the stale swapIn info of prev successor sp - if prevSwapInInfo.SuccessorSpId == successorSPID { + if curSwapInInfo.SuccessorSpId == successorSPID { return types.ErrSwapInFailed.Wrapf("already tried to swap in but expired") } swapInInfo := &types.SwapInInfo{ From 1d61fbd497c8c7afdda97417bc0cc339ea35e1c7 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Wed, 6 Dec 2023 11:07:04 +0800 Subject: [PATCH 06/27] expose the gvg statistic api for query --- proto/greenfield/virtualgroup/query.proto | 15 +- swagger/static/swagger.yaml | 174 +++++++- x/virtualgroup/keeper/grpc_query.go | 15 + x/virtualgroup/types/errors.go | 1 + x/virtualgroup/types/query.pb.go | 491 +++++++++++++++++++--- x/virtualgroup/types/query.pb.gw.go | 83 ++++ 6 files changed, 719 insertions(+), 60 deletions(-) diff --git a/proto/greenfield/virtualgroup/query.proto b/proto/greenfield/virtualgroup/query.proto index a78a4384b..9a0f289b0 100644 --- a/proto/greenfield/virtualgroup/query.proto +++ b/proto/greenfield/virtualgroup/query.proto @@ -42,10 +42,15 @@ service Query { 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 + // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group rpc SwapInInfo(QuerySwapInInfoRequest) returns (QuerySwapInInfoResponse) { option (google.api.http).get = "/greenfield/virtualgroup/swap_in_info"; } + + // GVGStatistics gets gvg statistics for a SP + rpc GVGStatistics(QuerySPGVGStatisticsRequest) returns (QuerySPGVGStatisticsResponse) { + option (google.api.http).get = "/greenfield/virtualgroup/sp_gvg_statistics"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -106,3 +111,11 @@ message QuerySwapInInfoRequest { message QuerySwapInInfoResponse { SwapInInfo swap_in_info = 1; } + +message QuerySPGVGStatisticsRequest { + uint32 sp_id = 1; +} + +message QuerySPGVGStatisticsResponse { + GVGStatisticsWithinSP gvg_stats = 1; +} diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index 22cc139ea..55260507f 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6152,11 +6152,97 @@ paths: format: byte tags: - Query + /greenfield/virtualgroup/sp_gvg_statistics: + get: + summary: >- + SwapInInfo gets reserved swapIn info for a specific global virtual group + family or global virtual group + operationId: GVGStatistics + responses: + '200': + description: A successful response. + schema: + type: object + properties: + gvg_stats: + type: object + properties: + storage_provider_id: + type: integer + format: int64 + title: >- + storage_provider_id defines the id of the sp which the + statistics associated to + primary_count: + type: integer + format: int64 + title: >- + primary_count defines the number of global virtual groups + (GVGs) which this sp serves as primary sp + secondary_count: + type: integer + format: int64 + description: >- + secondary_count defines the number of global virtual + groups (GVGs) in + + which this storage provider serves as a secondary storage + provider. + break_redundancy_reqmt_gvg_count: + type: integer + format: int64 + title: >- + 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 + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: sp_id + in: query + required: false + type: integer + format: int64 + tags: + - Query /greenfield/virtualgroup/swap_in_info: get: summary: >- - AvailableGlobalVirtualGroupFamilies filters a list of - GlobalVirtualGroupFamilies ID which are qualified to create bucket on + SwapInInfo gets reserved swapIn info for a specific global virtual group + family or global virtual group operationId: SwapInInfo responses: '200': @@ -36347,6 +36433,45 @@ definitions: items: type: integer format: int64 + greenfield.virtualgroup.GVGStatisticsWithinSP: + type: object + properties: + storage_provider_id: + type: integer + format: int64 + title: >- + storage_provider_id defines the id of the sp which the statistics + associated to + primary_count: + type: integer + format: int64 + title: >- + primary_count defines the number of global virtual groups (GVGs) which + this sp serves as primary sp + secondary_count: + type: integer + format: int64 + description: |- + secondary_count defines the number of global virtual groups (GVGs) in + which this storage provider serves as a secondary storage provider. + break_redundancy_reqmt_gvg_count: + type: integer + format: int64 + title: >- + 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 greenfield.virtualgroup.GlobalVirtualGroupFamily: type: object properties: @@ -36657,6 +36782,51 @@ definitions: sp_concurrent_exit_num defines the number of sp allowed for exit concurrently. description: QueryParamsResponse is response type for the Query/Params RPC method. + greenfield.virtualgroup.QuerySPGVGStatisticsResponse: + type: object + properties: + gvg_stats: + type: object + properties: + storage_provider_id: + type: integer + format: int64 + title: >- + storage_provider_id defines the id of the sp which the statistics + associated to + primary_count: + type: integer + format: int64 + title: >- + primary_count defines the number of global virtual groups (GVGs) + which this sp serves as primary sp + secondary_count: + type: integer + format: int64 + description: >- + secondary_count defines the number of global virtual groups (GVGs) + in + + which this storage provider serves as a secondary storage + provider. + break_redundancy_reqmt_gvg_count: + type: integer + format: int64 + title: >- + 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 greenfield.virtualgroup.QuerySwapInInfoResponse: type: object properties: diff --git a/x/virtualgroup/keeper/grpc_query.go b/x/virtualgroup/keeper/grpc_query.go index 88f0cdff4..7d0e744d2 100644 --- a/x/virtualgroup/keeper/grpc_query.go +++ b/x/virtualgroup/keeper/grpc_query.go @@ -153,3 +153,18 @@ func (k Keeper) GetSwapInInfo(ctx sdk.Context, globalVirtualGroupFamilyId, globa k.cdc.MustUnmarshal(bz, swapInInfo) return swapInInfo, true } + +func (k Keeper) GVGStatistics(goCtx context.Context, req *types.QuerySPGVGStatisticsRequest) (*types.QuerySPGVGStatisticsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + stats, found := k.GetGVGStatisticsWithinSP(ctx, req.GetSpId()) + if !found { + return nil, types.ErrGVGStatisticsNotExist + } + return &types.QuerySPGVGStatisticsResponse{ + GvgStats: stats, + }, nil +} diff --git a/x/virtualgroup/types/errors.go b/x/virtualgroup/types/errors.go index e54db1774..2db571b5b 100644 --- a/x/virtualgroup/types/errors.go +++ b/x/virtualgroup/types/errors.go @@ -25,6 +25,7 @@ var ( 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") + ErrGVGStatisticsNotExist = errors.Register(ModuleName, 1130, "gvg statistics not exist.") ErrInvalidDenom = errors.Register(ModuleName, 2000, "Invalid denom.") ) diff --git a/x/virtualgroup/types/query.pb.go b/x/virtualgroup/types/query.pb.go index ec691fa4c..2156efeb7 100644 --- a/x/virtualgroup/types/query.pb.go +++ b/x/virtualgroup/types/query.pb.go @@ -675,6 +675,94 @@ func (m *QuerySwapInInfoResponse) GetSwapInInfo() *SwapInInfo { return nil } +type QuerySPGVGStatisticsRequest struct { + SpId uint32 `protobuf:"varint,1,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` +} + +func (m *QuerySPGVGStatisticsRequest) Reset() { *m = QuerySPGVGStatisticsRequest{} } +func (m *QuerySPGVGStatisticsRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySPGVGStatisticsRequest) ProtoMessage() {} +func (*QuerySPGVGStatisticsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_83cd53fc415e00e7, []int{14} +} +func (m *QuerySPGVGStatisticsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySPGVGStatisticsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySPGVGStatisticsRequest.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 *QuerySPGVGStatisticsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySPGVGStatisticsRequest.Merge(m, src) +} +func (m *QuerySPGVGStatisticsRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySPGVGStatisticsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySPGVGStatisticsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySPGVGStatisticsRequest proto.InternalMessageInfo + +func (m *QuerySPGVGStatisticsRequest) GetSpId() uint32 { + if m != nil { + return m.SpId + } + return 0 +} + +type QuerySPGVGStatisticsResponse struct { + GvgStats *GVGStatisticsWithinSP `protobuf:"bytes,1,opt,name=gvg_stats,json=gvgStats,proto3" json:"gvg_stats,omitempty"` +} + +func (m *QuerySPGVGStatisticsResponse) Reset() { *m = QuerySPGVGStatisticsResponse{} } +func (m *QuerySPGVGStatisticsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySPGVGStatisticsResponse) ProtoMessage() {} +func (*QuerySPGVGStatisticsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_83cd53fc415e00e7, []int{15} +} +func (m *QuerySPGVGStatisticsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySPGVGStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySPGVGStatisticsResponse.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 *QuerySPGVGStatisticsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySPGVGStatisticsResponse.Merge(m, src) +} +func (m *QuerySPGVGStatisticsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySPGVGStatisticsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySPGVGStatisticsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySPGVGStatisticsResponse proto.InternalMessageInfo + +func (m *QuerySPGVGStatisticsResponse) GetGvgStats() *GVGStatisticsWithinSP { + if m != nil { + return m.GvgStats + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "greenfield.virtualgroup.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "greenfield.virtualgroup.QueryParamsResponse") @@ -690,6 +778,8 @@ func init() { proto.RegisterType((*AvailableGlobalVirtualGroupFamiliesResponse)(nil), "greenfield.virtualgroup.AvailableGlobalVirtualGroupFamiliesResponse") proto.RegisterType((*QuerySwapInInfoRequest)(nil), "greenfield.virtualgroup.QuerySwapInInfoRequest") proto.RegisterType((*QuerySwapInInfoResponse)(nil), "greenfield.virtualgroup.QuerySwapInInfoResponse") + proto.RegisterType((*QuerySPGVGStatisticsRequest)(nil), "greenfield.virtualgroup.QuerySPGVGStatisticsRequest") + proto.RegisterType((*QuerySPGVGStatisticsResponse)(nil), "greenfield.virtualgroup.QuerySPGVGStatisticsResponse") } func init() { @@ -697,61 +787,67 @@ func init() { } var fileDescriptor_83cd53fc415e00e7 = []byte{ - // 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, 0x9f, 0xdf, 0x8c, 0xe7, 0x19, 0x19, 0x66, 0xac, 0x8a, 0x69, 0xba, 0x25, 0xdb, 0x74, 0x8a, - 0x5a, 0xcd, 0xae, 0x04, 0x55, 0xe2, 0x58, 0x15, 0x5a, 0xf5, 0xb4, 0xf3, 0xaa, 0x59, 0xa9, 0xab, - 0x5e, 0x85, 0x06, 0x14, 0x4f, 0x34, 0x8b, 0xd4, 0xd6, 0x22, 0x69, 0xf1, 0x94, 0xfa, 0x65, 0xea, - 0x6b, 0x06, 0xf1, 0xcd, 0xb0, 0x43, 0xab, 0xad, 0x18, 0x66, 0x40, 0x56, 0x34, 0x8f, 0x58, 0xb6, - 0x4b, 0x02, 0x9b, 0xba, 0xa1, 0x88, 0x94, 0xb6, 0xa8, 0x45, 0xd9, 0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xb8, 0x00, 0xe7, 0xdb, 0x61, 0x7c, - 0x9b, 0x78, 0x63, 0x00, 0xbe, 0x06, 0xc2, 0x1b, 0x04, 0x33, 0x3d, 0xe4, 0x2d, 0xde, 0x17, 0x3a, - 0xed, 0xfd, 0x86, 0x90, 0x0e, 0xee, 0x27, 0xc2, 0x91, 0x7f, 0x64, 0xc8, 0x39, 0xbc, 0x2b, 0x44, - 0x26, 0x91, 0x9a, 0x9e, 0x0c, 0xff, 0x08, 0x01, 0x34, 0x93, 0x11, 0x6b, 0xc9, 0xbb, 0x11, 0xbb, - 0x1b, 0xa4, 0xaf, 0x7b, 0x6f, 0xe0, 0xde, 0x97, 0x99, 0xf7, 0x2c, 0x9e, 0x13, 0x7a, 0x6f, 0x8d, - 0xf5, 0xdc, 0x4f, 0xd7, 0xb7, 0x32, 0xba, 0xb9, 0x95, 0xd1, 0xcb, 0x5b, 0x19, 0xfd, 0x7b, 0x27, - 0xa7, 0x6e, 0xee, 0xe4, 0xd4, 0xb3, 0x3b, 0x39, 0xf5, 0xfb, 0x9a, 0x65, 0x07, 0x67, 0x55, 0x43, - 0x3d, 0xa5, 0x65, 0xcd, 0x70, 0x8d, 0xe5, 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, + // 954 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0xc7, 0x33, 0xa1, 0x8d, 0xda, 0xd7, 0xe4, 0x32, 0x09, 0x24, 0x72, 0xa2, 0x5d, 0x70, 0xda, + 0xa6, 0xa4, 0x8d, 0x4d, 0x42, 0x52, 0x2a, 0xd4, 0x96, 0x76, 0x1b, 0xba, 0x44, 0x48, 0x28, 0x6c, + 0xaa, 0x56, 0x42, 0x42, 0x66, 0x9c, 0x78, 0x27, 0x23, 0x36, 0x1e, 0x77, 0xc7, 0xbb, 0x65, 0x6f, + 0x88, 0x73, 0x0f, 0x48, 0x3d, 0x71, 0xe1, 0x6f, 0xe0, 0x2f, 0xe0, 0x9c, 0x63, 0x24, 0x0e, 0x70, + 0x02, 0x94, 0x70, 0xe1, 0x5f, 0xe0, 0x84, 0x3c, 0x33, 0xee, 0xee, 0xd6, 0x3b, 0xde, 0xf5, 0xb6, + 0x37, 0xcb, 0x7e, 0xef, 0xfb, 0xbe, 0x9f, 0xf9, 0xf1, 0x9e, 0x0c, 0xcb, 0xb4, 0x19, 0x04, 0x61, + 0x9d, 0x05, 0x8d, 0x03, 0xb7, 0xcd, 0x9a, 0x71, 0x8b, 0x34, 0x68, 0x93, 0xb7, 0x22, 0xf7, 0x69, + 0x2b, 0x68, 0x76, 0x9c, 0xa8, 0xc9, 0x63, 0x8e, 0xe7, 0xbb, 0x41, 0x4e, 0x6f, 0x90, 0xb5, 0xba, + 0xcf, 0xc5, 0x11, 0x17, 0xae, 0x4f, 0x44, 0xa0, 0x32, 0xdc, 0xf6, 0xba, 0x1f, 0xc4, 0x64, 0xdd, + 0x8d, 0x08, 0x65, 0x21, 0x89, 0x19, 0x0f, 0x95, 0x88, 0x35, 0x47, 0x39, 0xe5, 0xf2, 0xd1, 0x4d, + 0x9e, 0xf4, 0xdb, 0x25, 0xca, 0x39, 0x6d, 0x04, 0x2e, 0x89, 0x98, 0x4b, 0xc2, 0x90, 0xc7, 0x32, + 0x45, 0xe8, 0xaf, 0x97, 0x4d, 0xee, 0x22, 0xd2, 0x24, 0x47, 0x69, 0x94, 0x91, 0x21, 0xee, 0x44, + 0x81, 0x0e, 0xb2, 0xe7, 0x00, 0x7f, 0x99, 0x18, 0xdc, 0x95, 0x99, 0xb5, 0xe0, 0x69, 0x2b, 0x10, + 0xb1, 0xfd, 0x08, 0x66, 0xfb, 0xde, 0x8a, 0x88, 0x87, 0x22, 0xc0, 0x77, 0x60, 0x4a, 0x55, 0x58, + 0x40, 0xef, 0xa2, 0x6b, 0x97, 0x36, 0xca, 0x8e, 0x61, 0x05, 0x1c, 0x95, 0x58, 0x39, 0x77, 0xfc, + 0x67, 0x79, 0xa2, 0xa6, 0x93, 0xec, 0x27, 0x50, 0x92, 0xaa, 0xd5, 0x06, 0xf7, 0x49, 0xe3, 0xb1, + 0x8a, 0xaf, 0x26, 0xf1, 0xba, 0x2e, 0xde, 0x82, 0x79, 0x2a, 0x3f, 0x7a, 0x5a, 0xcd, 0x93, 0x72, + 0x1e, 0x3b, 0x90, 0x15, 0x67, 0x6a, 0x73, 0x34, 0x93, 0xbb, 0x73, 0x60, 0x7f, 0x8f, 0xa0, 0x6c, + 0x54, 0xd6, 0xde, 0xbf, 0x86, 0xb9, 0x41, 0xd2, 0x9a, 0xe4, 0xba, 0x91, 0x64, 0x80, 0x24, 0xce, + 0x9a, 0xb0, 0x43, 0xb8, 0x66, 0x70, 0x50, 0xe9, 0x3c, 0x24, 0x47, 0xac, 0xd1, 0xd9, 0xd9, 0x4e, + 0x29, 0x2b, 0x50, 0x1a, 0x48, 0x59, 0x97, 0x71, 0x5d, 0x58, 0x2b, 0x5b, 0x47, 0x4b, 0x1d, 0xd8, + 0xcf, 0x11, 0xbc, 0x3f, 0x42, 0x41, 0x0d, 0xef, 0xc1, 0xdb, 0x83, 0x2a, 0x26, 0xfb, 0xf8, 0x56, + 0x51, 0xfa, 0xd9, 0xac, 0x2b, 0x61, 0x3f, 0x80, 0xcb, 0x06, 0x37, 0xca, 0x4b, 0x8a, 0xbe, 0x08, + 0x17, 0x5f, 0xa5, 0xbc, 0x50, 0x4f, 0x99, 0x7e, 0x42, 0x70, 0x65, 0x88, 0x8a, 0xe6, 0x89, 0x60, + 0x31, 0x67, 0x05, 0xf5, 0x9e, 0xae, 0x17, 0xa0, 0xd2, 0xfa, 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0xb9, 0x6e, 0x4f, 0xb7, 0xee, 0x8d, 0x2f, 0xa0, 0xf9, + 0xee, 0x4a, 0xbe, 0x5b, 0xf8, 0xe6, 0x18, 0x7c, 0x09, 0xc2, 0x7f, 0x08, 0x96, 0x47, 0x18, 0x08, + 0xf8, 0x81, 0xd1, 0xe9, 0xe8, 0x23, 0xcc, 0xda, 0x7e, 0x3d, 0x11, 0x8d, 0xfc, 0x99, 0x44, 0xae, + 0xe0, 0x7b, 0x46, 0x64, 0x92, 0xaa, 0x79, 0xf9, 0xf0, 0x3f, 0x23, 0x80, 0x6e, 0xeb, 0xc6, 0x6e, + 0xfe, 0x6e, 0x64, 0x86, 0x97, 0xf5, 0xc1, 0xe8, 0x09, 0xda, 0xfb, 0x9a, 0xf4, 0xbe, 0x82, 0xaf, + 0x18, 0xbd, 0xf7, 0xce, 0x1d, 0xfc, 0x0b, 0x82, 0x99, 0xbe, 0x1e, 0x8e, 0x37, 0x87, 0x94, 0x1c, + 0x38, 0x69, 0xac, 0xad, 0x82, 0x59, 0xda, 0xed, 0x86, 0x74, 0x7b, 0x03, 0xaf, 0x9a, 0xdd, 0x46, + 0x5e, 0x3a, 0x8d, 0x54, 0x6e, 0xe5, 0x8b, 0xe3, 0xd3, 0x12, 0x3a, 0x39, 0x2d, 0xa1, 0xbf, 0x4f, + 0x4b, 0xe8, 0xc7, 0xb3, 0xd2, 0xc4, 0xc9, 0x59, 0x69, 0xe2, 0x8f, 0xb3, 0xd2, 0xc4, 0x57, 0x9b, + 0x94, 0xc5, 0x87, 0x2d, 0xdf, 0xd9, 0xe7, 0x47, 0xae, 0x1f, 0xfa, 0x6b, 0xfb, 0x87, 0x84, 0x85, + 0xbd, 0xca, 0xdf, 0x0d, 0xf8, 0x1f, 0xf3, 0xa7, 0xe4, 0x0f, 0xd9, 0x87, 0xff, 0x07, 0x00, 0x00, + 0xff, 0xff, 0x90, 0x43, 0xb6, 0xb4, 0x7b, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -778,8 +874,10 @@ 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 gets reserved swapIn info for a specific global virtual group family or global virtual group SwapInInfo(ctx context.Context, in *QuerySwapInInfoRequest, opts ...grpc.CallOption) (*QuerySwapInInfoResponse, error) + // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group + GVGStatistics(ctx context.Context, in *QuerySPGVGStatisticsRequest, opts ...grpc.CallOption) (*QuerySPGVGStatisticsResponse, error) } type queryClient struct { @@ -853,6 +951,15 @@ func (c *queryClient) SwapInInfo(ctx context.Context, in *QuerySwapInInfoRequest return out, nil } +func (c *queryClient) GVGStatistics(ctx context.Context, in *QuerySPGVGStatisticsRequest, opts ...grpc.CallOption) (*QuerySPGVGStatisticsResponse, error) { + out := new(QuerySPGVGStatisticsResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Query/GVGStatistics", 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. @@ -867,8 +974,10 @@ 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 gets reserved swapIn info for a specific global virtual group family or global virtual group SwapInInfo(context.Context, *QuerySwapInInfoRequest) (*QuerySwapInInfoResponse, error) + // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group + GVGStatistics(context.Context, *QuerySPGVGStatisticsRequest) (*QuerySPGVGStatisticsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -896,6 +1005,9 @@ func (*UnimplementedQueryServer) AvailableGlobalVirtualGroupFamilies(ctx context func (*UnimplementedQueryServer) SwapInInfo(ctx context.Context, req *QuerySwapInInfoRequest) (*QuerySwapInInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SwapInInfo not implemented") } +func (*UnimplementedQueryServer) GVGStatistics(ctx context.Context, req *QuerySPGVGStatisticsRequest) (*QuerySPGVGStatisticsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GVGStatistics not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1027,6 +1139,24 @@ func _Query_SwapInInfo_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Query_GVGStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySPGVGStatisticsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GVGStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/greenfield.virtualgroup.Query/GVGStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GVGStatistics(ctx, req.(*QuerySPGVGStatisticsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "greenfield.virtualgroup.Query", HandlerType: (*QueryServer)(nil), @@ -1059,6 +1189,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "SwapInInfo", Handler: _Query_SwapInInfo_Handler, }, + { + MethodName: "GVGStatistics", + Handler: _Query_GVGStatistics_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "greenfield/virtualgroup/query.proto", @@ -1545,6 +1679,69 @@ func (m *QuerySwapInInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QuerySPGVGStatisticsRequest) 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 *QuerySPGVGStatisticsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySPGVGStatisticsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SpId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.SpId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QuerySPGVGStatisticsResponse) 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 *QuerySPGVGStatisticsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySPGVGStatisticsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GvgStats != nil { + { + size, err := m.GvgStats.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 @@ -1745,6 +1942,31 @@ func (m *QuerySwapInInfoResponse) Size() (n int) { return n } +func (m *QuerySPGVGStatisticsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SpId != 0 { + n += 1 + sovQuery(uint64(m.SpId)) + } + return n +} + +func (m *QuerySPGVGStatisticsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GvgStats != nil { + l = m.GvgStats.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2979,6 +3201,161 @@ func (m *QuerySwapInInfoResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySPGVGStatisticsRequest) 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: QuerySPGVGStatisticsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySPGVGStatisticsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpId", wireType) + } + m.SpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpId |= 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 *QuerySPGVGStatisticsResponse) 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: QuerySPGVGStatisticsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySPGVGStatisticsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GvgStats", 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.GvgStats == nil { + m.GvgStats = &GVGStatisticsWithinSP{} + } + if err := m.GvgStats.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 e0f1f4686..f72c03634 100644 --- a/x/virtualgroup/types/query.pb.gw.go +++ b/x/virtualgroup/types/query.pb.gw.go @@ -267,6 +267,42 @@ func local_request_Query_SwapInInfo_0(ctx context.Context, marshaler runtime.Mar } +var ( + filter_Query_GVGStatistics_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GVGStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySPGVGStatisticsRequest + 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_GVGStatistics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GVGStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GVGStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySPGVGStatisticsRequest + 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_GVGStatistics_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GVGStatistics(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. @@ -434,6 +470,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GVGStatistics_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_GVGStatistics_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_GVGStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -615,6 +674,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GVGStatistics_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_GVGStatistics_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_GVGStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -632,6 +711,8 @@ var ( 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))) + + pattern_Query_GVGStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "virtualgroup", "sp_gvg_statistics"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -648,4 +729,6 @@ var ( forward_Query_AvailableGlobalVirtualGroupFamilies_0 = runtime.ForwardResponseMessage forward_Query_SwapInInfo_0 = runtime.ForwardResponseMessage + + forward_Query_GVGStatistics_0 = runtime.ForwardResponseMessage ) From 6ae197153623d5d18c97aa31c42b881c07d65974 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 12 Dec 2023 13:43:12 +0800 Subject: [PATCH 07/27] transfer deposit of forced exit SP to payment module when exit completed --- proto/greenfield/virtualgroup/events.proto | 8 +- proto/greenfield/virtualgroup/tx.proto | 11 +- swagger/static/swagger.yaml | 4 +- x/payment/types/expected_keepers_mocks.go | 14 ++ x/virtualgroup/keeper/msg_server.go | 51 +++-- x/virtualgroup/types/events.pb.go | 213 +++++++++++++------ x/virtualgroup/types/expected_keepers.go | 1 + x/virtualgroup/types/query.pb.go | 4 +- x/virtualgroup/types/tx.pb.go | 225 +++++++++++++-------- 9 files changed, 360 insertions(+), 171 deletions(-) diff --git a/proto/greenfield/virtualgroup/events.proto b/proto/greenfield/virtualgroup/events.proto index 20ae565fa..19d41329a 100644 --- a/proto/greenfield/virtualgroup/events.proto +++ b/proto/greenfield/virtualgroup/events.proto @@ -165,14 +165,18 @@ message EventStorageProviderExit { message EventCompleteStorageProviderExit { // The id of the storage provider who complete exit uint32 storage_provider_id = 1; - // The operator address which initial the complete exit transaction + // The operator address which initials the complete exit transaction string operator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // The storage address which completes exit transaction + string storage_provider_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_deposit defines the number of tokens deposited by this storage provider for staking. - string total_deposit = 3 [ + string total_deposit = 4 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + // forced_exit whether the exit is a forced exit + bool forced_exit = 5; } message EventSwapIn { diff --git a/proto/greenfield/virtualgroup/tx.proto b/proto/greenfield/virtualgroup/tx.proto index 5c47b9b94..36885185e 100644 --- a/proto/greenfield/virtualgroup/tx.proto +++ b/proto/greenfield/virtualgroup/tx.proto @@ -29,7 +29,7 @@ service Msg { rpc CompleteStorageProviderExit(MsgCompleteStorageProviderExit) returns (MsgCompleteStorageProviderExitResponse); rpc CompleteSwapOut(MsgCompleteSwapOut) returns (MsgCompleteSwapOutResponse); rpc CancelSwapOut(MsgCancelSwapOut) returns (MsgCancelSwapOutResponse); - rpc SwapIn(MsgReserveSwapIn) returns (MsgReserveSwapInResponse); + rpc ReserveSwapIn(MsgReserveSwapIn) returns (MsgReserveSwapInResponse); rpc CancelSwapIn(MsgCancelSwapIn) returns (MsgCancelSwapInResponse); rpc CompleteSwapIn(MsgCompleteSwapIn) returns (MsgCompleteSwapInResponse); @@ -185,10 +185,13 @@ message MsgStorageProviderExit { message MsgStorageProviderExitResponse {} message MsgCompleteStorageProviderExit { - option (cosmos.msg.v1.signer) = "storage_provider"; + option (cosmos.msg.v1.signer) = "operator"; - // storage_provider defines the operator account address of the storage provider who want to exit from the greenfield storage network. - string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // operator defines the operator address, other SPs can help complete the exit if the exiting SP does not send out the tx. + string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // storage_provider defines the address of the storage provider who is in exitting from the greenfield storage network. + string storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } message MsgCompleteStorageProviderExitResponse {} diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index 55260507f..ff3c39086 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6154,9 +6154,7 @@ paths: - Query /greenfield/virtualgroup/sp_gvg_statistics: get: - summary: >- - SwapInInfo gets reserved swapIn info for a specific global virtual group - family or global virtual group + summary: GVGStatistics gets gvg statistics for a SP operationId: GVGStatistics responses: '200': diff --git a/x/payment/types/expected_keepers_mocks.go b/x/payment/types/expected_keepers_mocks.go index 9450c3ce7..35cb18582 100644 --- a/x/payment/types/expected_keepers_mocks.go +++ b/x/payment/types/expected_keepers_mocks.go @@ -182,6 +182,20 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } +// SendCoinsFromModuleToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderModule string, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) +} + // SpendableCoins mocks base method. func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index d5dfdb58e..0c4377f9b 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" sdkerrors "cosmossdk.io/errors" "cosmossdk.io/math" @@ -479,45 +480,63 @@ func (k msgServer) StorageProviderExit(goCtx context.Context, msg *types.MsgStor func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types.MsgCompleteStorageProviderExit) (*types.MsgCompleteStorageProviderExitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - operatorAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + operatorAddr := sdk.MustAccAddressFromHex(msg.Operator) - sp, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) + operator, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) if !found { return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be operator address of sp.") } - if sp.Status != sptypes.STATUS_GRACEFUL_EXITING { - return nil, sptypes.ErrStorageProviderExitFailed.Wrapf( - "sp(id : %d, operator address: %s) not in the process of exiting", sp.Id, sp.OperatorAddress) + exitSPAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + + exitSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, exitSPAddr) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address of SP is not found") } - err := k.StorageProviderExitable(ctx, sp.Id) - if err != nil { - return nil, err + if exitSP.Status != sptypes.STATUS_GRACEFUL_EXITING && exitSP.Status != sptypes.STATUS_FORCE_EXITING { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf( + "sp(id : %d, operator address: %s) not in the process of exiting", exitSP.Id, exitSP.OperatorAddress) } - // send back the total deposit - coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), sp.TotalDeposit)) - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, sptypes.ModuleName, sdk.MustAccAddressFromHex(sp.FundingAddress), coins) + err := k.StorageProviderExitable(ctx, exitSP.Id) if err != nil { return nil, err } - err = k.spKeeper.Exit(ctx, sp) + var forcedExit bool + if exitSP.Status == sptypes.STATUS_GRACEFUL_EXITING { + // send back the total deposit + coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), exitSP.TotalDeposit)) + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, sptypes.ModuleName, sdk.MustAccAddressFromHex(exitSP.FundingAddress), coins) + if err != nil { + return nil, err + } + } else { + forcedExit = true + coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), exitSP.TotalDeposit)) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, sptypes.ModuleName, paymenttypes.ModuleName, coins) + if err != nil { + return nil, err + } + } + err = k.spKeeper.Exit(ctx, exitSP) if err != nil { return nil, err } if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ - StorageProviderId: sp.Id, - OperatorAddress: sp.OperatorAddress, - TotalDeposit: sp.TotalDeposit, + StorageProviderId: exitSP.Id, + OperatorAddress: operator.OperatorAddress, + StorageProviderAddress: exitSP.OperatorAddress, + TotalDeposit: exitSP.TotalDeposit, + ForcedExit: forcedExit, }); err != nil { return nil, err } return &types.MsgCompleteStorageProviderExitResponse{}, nil } -func (k msgServer) SwapIn(goCtx context.Context, msg *types.MsgReserveSwapIn) (*types.MsgReserveSwapInResponse, error) { +func (k msgServer) ReserveSwapIn(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) diff --git a/x/virtualgroup/types/events.pb.go b/x/virtualgroup/types/events.pb.go index 9915fc5d6..c67477e55 100644 --- a/x/virtualgroup/types/events.pb.go +++ b/x/virtualgroup/types/events.pb.go @@ -887,10 +887,14 @@ func (m *EventStorageProviderExit) GetOperatorAddress() string { type EventCompleteStorageProviderExit struct { // The id of the storage provider who complete exit StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` - // The operator address which initial the complete exit transaction + // The operator address which initials the complete exit transaction OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` + // The storage address which completes exit transaction + StorageProviderAddress string `protobuf:"bytes,3,opt,name=storage_provider_address,json=storageProviderAddress,proto3" json:"storage_provider_address,omitempty"` // total_deposit defines the number of tokens deposited by this storage provider for staking. - TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=total_deposit,json=totalDeposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_deposit"` + TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=total_deposit,json=totalDeposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_deposit"` + // forced_exit whether the exit is a forced exit + ForcedExit bool `protobuf:"varint,5,opt,name=forced_exit,json=forcedExit,proto3" json:"forced_exit,omitempty"` } func (m *EventCompleteStorageProviderExit) Reset() { *m = EventCompleteStorageProviderExit{} } @@ -940,6 +944,20 @@ func (m *EventCompleteStorageProviderExit) GetOperatorAddress() string { return "" } +func (m *EventCompleteStorageProviderExit) GetStorageProviderAddress() string { + if m != nil { + return m.StorageProviderAddress + } + return "" +} + +func (m *EventCompleteStorageProviderExit) GetForcedExit() bool { + if m != nil { + return m.ForcedExit + } + return false +} + 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"` @@ -1227,61 +1245,64 @@ func init() { } var fileDescriptor_ece39ea12016bd5b = []byte{ - // 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, 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e, 0x28, 0xbd, 0xff, 0x48, 0x66, 0xff, 0xc0, 0x7b, 0x8c, 0xf3, - 0x0a, 0x41, 0x71, 0x36, 0x5d, 0xba, 0xd1, 0xbf, 0xa2, 0xb9, 0x94, 0x33, 0xba, 0x0e, 0x3b, 0xd2, - 0xe3, 0x01, 0x91, 0x0b, 0x72, 0x03, 0x6d, 0x53, 0x5a, 0xfb, 0x1d, 0xc1, 0xd5, 0x95, 0xa1, 0x92, - 0x02, 0xe4, 0xa7, 0x50, 0x9d, 0x9e, 0xb4, 0x71, 0xac, 0x54, 0xcc, 0xb9, 0xa7, 0x32, 0x59, 0xb6, - 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, + // 898 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xac, 0xdd, 0x12, 0x3f, 0xc7, 0xfd, 0xb3,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x23, 0x28, 0x8f, 0x46, 0x5a, 0x27, 0xf9, 0x57, 0x84, 0x9e, 0xf3, 0x62, + 0x68, 0xc0, 0x86, 0x0c, 0x78, 0x44, 0xe4, 0x84, 0xc6, 0x41, 0xdb, 0x94, 0xc0, 0xff, 0x44, 0x70, + 0x65, 0x66, 0x92, 0xe5, 0x00, 0xf9, 0x19, 0x6c, 0x0e, 0x33, 0x2d, 0x9c, 0x65, 0x35, 0x93, 0xf7, + 0xad, 0x8c, 0xb3, 0x25, 0x0c, 0x15, 0x17, 0x33, 0xe4, 0xbe, 0x44, 0x70, 0x79, 0x6a, 0x98, 0x9d, + 0xb5, 0x16, 0xdf, 0x37, 0xcf, 0xf5, 0x29, 0xde, 0xef, 0x66, 0x0a, 0xcf, 0x33, 0x2d, 0x76, 0xbe, + 0x7a, 0x72, 0x5c, 0x47, 0x4f, 0x8f, 0xeb, 0xe8, 0xe5, 0x71, 0x1d, 0xfd, 0x70, 0x52, 0x5f, 0x7b, + 0x7a, 0x52, 0x5f, 0xfb, 0xf9, 0xa4, 0xbe, 0xf6, 0xed, 0xc7, 0x63, 0xe7, 0xb1, 0x97, 0xf4, 0xb6, + 0xc3, 0xfd, 0x80, 0x26, 0xed, 0xb1, 0x6f, 0xe2, 0xc3, 0xc9, 0xaf, 0x62, 0x75, 0x42, 0x7b, 0xe7, + 0xd5, 0xb7, 0xec, 0x47, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x45, 0xdf, 0xfc, 0xb5, 0x3d, 0x0f, + 0x00, 0x00, } func (m *EventCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -1960,6 +1981,16 @@ func (m *EventCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l + if m.ForcedExit { + i-- + if m.ForcedExit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } { size := m.TotalDeposit.Size() i -= size @@ -1969,7 +2000,14 @@ func (m *EventCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (in i = encodeVarintEvents(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 + if len(m.StorageProviderAddress) > 0 { + i -= len(m.StorageProviderAddress) + copy(dAtA[i:], m.StorageProviderAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.StorageProviderAddress))) + i-- + dAtA[i] = 0x1a + } if len(m.OperatorAddress) > 0 { i -= len(m.OperatorAddress) copy(dAtA[i:], m.OperatorAddress) @@ -2450,8 +2488,15 @@ func (m *EventCompleteStorageProviderExit) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.StorageProviderAddress) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } l = m.TotalDeposit.Size() n += 1 + l + sovEvents(uint64(l)) + if m.ForcedExit { + n += 2 + } return n } @@ -4673,6 +4718,38 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { m.OperatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageProviderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType) } @@ -4706,6 +4783,26 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForcedExit", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ForcedExit = bool(v != 0) default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/x/virtualgroup/types/expected_keepers.go b/x/virtualgroup/types/expected_keepers.go index c2f8a8ba4..42dabf933 100644 --- a/x/virtualgroup/types/expected_keepers.go +++ b/x/virtualgroup/types/expected_keepers.go @@ -37,6 +37,7 @@ type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error } diff --git a/x/virtualgroup/types/query.pb.go b/x/virtualgroup/types/query.pb.go index 2156efeb7..35d098dcc 100644 --- a/x/virtualgroup/types/query.pb.go +++ b/x/virtualgroup/types/query.pb.go @@ -876,7 +876,7 @@ type QueryClient interface { AvailableGlobalVirtualGroupFamilies(ctx context.Context, in *AvailableGlobalVirtualGroupFamiliesRequest, opts ...grpc.CallOption) (*AvailableGlobalVirtualGroupFamiliesResponse, error) // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group SwapInInfo(ctx context.Context, in *QuerySwapInInfoRequest, opts ...grpc.CallOption) (*QuerySwapInInfoResponse, error) - // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group + // GVGStatistics gets gvg statistics for a SP GVGStatistics(ctx context.Context, in *QuerySPGVGStatisticsRequest, opts ...grpc.CallOption) (*QuerySPGVGStatisticsResponse, error) } @@ -976,7 +976,7 @@ type QueryServer interface { AvailableGlobalVirtualGroupFamilies(context.Context, *AvailableGlobalVirtualGroupFamiliesRequest) (*AvailableGlobalVirtualGroupFamiliesResponse, error) // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group SwapInInfo(context.Context, *QuerySwapInInfoRequest) (*QuerySwapInInfoResponse, error) - // SwapInInfo gets reserved swapIn info for a specific global virtual group family or global virtual group + // GVGStatistics gets gvg statistics for a SP GVGStatistics(context.Context, *QuerySPGVGStatisticsRequest) (*QuerySPGVGStatisticsResponse, error) } diff --git a/x/virtualgroup/types/tx.pb.go b/x/virtualgroup/types/tx.pb.go index 41fe6a914..6edbe13fb 100644 --- a/x/virtualgroup/types/tx.pb.go +++ b/x/virtualgroup/types/tx.pb.go @@ -998,8 +998,10 @@ func (m *MsgStorageProviderExitResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStorageProviderExitResponse proto.InternalMessageInfo type MsgCompleteStorageProviderExit struct { - // storage_provider defines the operator account address of the storage provider who want to exit from the greenfield storage network. - StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` + // operator defines the operator address, other SPs can help complete the exit if the exiting SP does not send out the tx. + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // storage_provider defines the address of the storage provider who is in exitting from the greenfield storage network. + StorageProvider string `protobuf:"bytes,2,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` } func (m *MsgCompleteStorageProviderExit) Reset() { *m = MsgCompleteStorageProviderExit{} } @@ -1035,6 +1037,13 @@ func (m *MsgCompleteStorageProviderExit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCompleteStorageProviderExit proto.InternalMessageInfo +func (m *MsgCompleteStorageProviderExit) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + func (m *MsgCompleteStorageProviderExit) GetStorageProvider() string { if m != nil { return m.StorageProvider @@ -1558,80 +1567,81 @@ func init() { func init() { proto.RegisterFile("greenfield/virtualgroup/tx.proto", fileDescriptor_478f7001009bf3f2) } var fileDescriptor_478f7001009bf3f2 = []byte{ - // 1161 bytes of a gzipped FileDescriptorProto + // 1174 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, + 0x14, 0xcf, 0xc6, 0x21, 0x4d, 0x5e, 0xeb, 0x24, 0x6c, 0x12, 0xe2, 0xac, 0x91, 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, 0xeb, 0xb5, 0x77, 0x6c, - 0x47, 0x86, 0x4a, 0x39, 0x25, 0x9e, 0x79, 0xef, 0xcd, 0xef, 0xf7, 0x9b, 0x37, 0x6f, 0xe6, 0x2d, - 0xe4, 0x6c, 0x1f, 0x63, 0x77, 0xdf, 0xc1, 0x75, 0xcb, 0x6c, 0x39, 0x7e, 0xd0, 0x44, 0x75, 0xdb, - 0x27, 0x4d, 0xcf, 0x0c, 0x8e, 0x8a, 0x9e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0xd2, 0xdd, 0xed, 0xc2, 0xab, 0x4a, 0x2f, 0x71, 0xa8, 0xb1, 0x39, 0x32, 0x34, 0xbe, + 0x5c, 0xf7, 0x93, 0x48, 0xb9, 0x5c, 0x17, 0x54, 0xbd, 0xdc, 0xc0, 0xb7, 0x45, 0x90, 0xd9, 0x5d, + 0xb7, 0x69, 0x71, 0xb4, 0x88, 0xcb, 0xae, 0x3a, 0xb3, 0x07, 0xdd, 0x5b, 0xba, 0x07, 0x0b, 0x3d, + 0x6f, 0x98, 0x8d, 0x51, 0x37, 0xa4, 0xec, 0x1a, 0x5b, 0xa3, 0x63, 0xbb, 0x8a, 0x77, 0xe2, 0x35, + 0xb9, 0x3d, 0xc6, 0x01, 0x91, 0x56, 0xea, 0xe2, 0x3d, 0xec, 0x9a, 0xdb, 0xf9, 0xf0, 0xf1, 0x49, + 0x4e, 0x7b, 0x72, 0x92, 0xd3, 0x7e, 0x3f, 0xc9, 0x69, 0xdf, 0x9d, 0xe6, 0xa6, 0x9e, 0x9c, 0xe6, + 0xa6, 0x7e, 0x39, 0xcd, 0x4d, 0x7d, 0xb6, 0x6d, 0x3b, 0xec, 0xa0, 0x55, 0x0b, 0x7a, 0x7d, 0xb3, + 0xe6, 0xd6, 0x6e, 0xd4, 0x0f, 0x90, 0xe3, 0x9a, 0xb1, 0x4f, 0xbc, 0x47, 0x3d, 0xdf, 0xaa, 0x8f, + 0x3d, 0x4c, 0x6b, 0xb3, 0xfc, 0x23, 0xef, 0xcd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x4f, + 0x17, 0xcd, 0xd3, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1658,7 +1668,7 @@ type MsgClient interface { 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) + ReserveSwapIn(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 @@ -1773,9 +1783,9 @@ func (c *msgClient) CancelSwapOut(ctx context.Context, in *MsgCancelSwapOut, opt return out, nil } -func (c *msgClient) SwapIn(ctx context.Context, in *MsgReserveSwapIn, opts ...grpc.CallOption) (*MsgReserveSwapInResponse, error) { +func (c *msgClient) ReserveSwapIn(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...) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/ReserveSwapIn", in, out, opts...) if err != nil { return nil, err } @@ -1823,7 +1833,7 @@ type MsgServer interface { CompleteStorageProviderExit(context.Context, *MsgCompleteStorageProviderExit) (*MsgCompleteStorageProviderExitResponse, error) CompleteSwapOut(context.Context, *MsgCompleteSwapOut) (*MsgCompleteSwapOutResponse, error) CancelSwapOut(context.Context, *MsgCancelSwapOut) (*MsgCancelSwapOutResponse, error) - SwapIn(context.Context, *MsgReserveSwapIn) (*MsgReserveSwapInResponse, error) + ReserveSwapIn(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 @@ -1868,8 +1878,8 @@ func (*UnimplementedMsgServer) CompleteSwapOut(ctx context.Context, req *MsgComp 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) ReserveSwapIn(ctx context.Context, req *MsgReserveSwapIn) (*MsgReserveSwapInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReserveSwapIn not implemented") } func (*UnimplementedMsgServer) CancelSwapIn(ctx context.Context, req *MsgCancelSwapIn) (*MsgCancelSwapInResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelSwapIn not implemented") @@ -2083,20 +2093,20 @@ func _Msg_CancelSwapOut_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_SwapIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_ReserveSwapIn_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) + return srv.(MsgServer).ReserveSwapIn(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/SwapIn", + FullMethod: "/greenfield.virtualgroup.Msg/ReserveSwapIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SwapIn(ctx, req.(*MsgReserveSwapIn)) + return srv.(MsgServer).ReserveSwapIn(ctx, req.(*MsgReserveSwapIn)) } return interceptor(ctx, in, info, handler) } @@ -2204,8 +2214,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CancelSwapOut_Handler, }, { - MethodName: "SwapIn", - Handler: _Msg_SwapIn_Handler, + MethodName: "ReserveSwapIn", + Handler: _Msg_ReserveSwapIn_Handler, }, { MethodName: "CancelSwapIn", @@ -2943,6 +2953,13 @@ func (m *MsgCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, copy(dAtA[i:], m.StorageProvider) i = encodeVarintTx(dAtA, i, uint64(len(m.StorageProvider))) i-- + dAtA[i] = 0x12 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -3550,6 +3567,10 @@ func (m *MsgCompleteStorageProviderExit) Size() (n int) { } var l int _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.StorageProvider) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -5713,6 +5734,38 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", 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.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) } From 18998e18ca05f40e26d51b545518c0a1173c5d81 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 12 Dec 2023 13:57:19 +0800 Subject: [PATCH 08/27] fix test --- e2e/tests/virtualgroup_test.go | 26 +++++++++++++++---- .../message_complete_storage_provider_exit.go | 9 +++++-- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index daadfd5f5..b34ad636f 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -714,7 +714,9 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 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()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ + Operator: spx.OperatorKey.GetAddr().String(), + StorageProvider: spx.OperatorKey.GetAddr().String()}, spx.OperatorKey, "not swap out from all the family") @@ -772,7 +774,9 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 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()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ + Operator: spx.OperatorKey.GetAddr().String(), + StorageProvider: spx.OperatorKey.GetAddr().String()}, spx.OperatorKey, "not swap out from all the gvgs") @@ -870,7 +874,9 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { // 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()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ + Operator: spx.OperatorKey.GetAddr().String(), + StorageProvider: spx.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) @@ -913,10 +919,12 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { 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 + // 11 SP-y complete the exit by sp-z s.SendTxBlock( spy.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spy.OperatorKey.GetAddr().String()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ + Operator: spz.OperatorKey.GetAddr().String(), + StorageProvider: spy.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) s.Require().Error(err) @@ -1037,6 +1045,14 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { 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) + + // 11 SP-y help complete the exit + s.SendTxBlock( + spy.OperatorKey, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{Operator: spy.OperatorKey.GetAddr().String(), StorageProvider: spx.OperatorKey.GetAddr().String()}, + ) + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) + s.Require().Error(err) } func (s *VirtualGroupTestSuite) updateParams(params virtualgroupmoduletypes.Params) { diff --git a/x/virtualgroup/types/message_complete_storage_provider_exit.go b/x/virtualgroup/types/message_complete_storage_provider_exit.go index 9dc038f93..0ccfc625a 100644 --- a/x/virtualgroup/types/message_complete_storage_provider_exit.go +++ b/x/virtualgroup/types/message_complete_storage_provider_exit.go @@ -38,9 +38,14 @@ func (msg *MsgCompleteStorageProviderExit) GetSignBytes() []byte { } func (msg *MsgCompleteStorageProviderExit) ValidateBasic() error { - _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + + _, err := sdk.AccAddressFromHexUnsafe(msg.Operator) + if err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid operator address (%s)", err) + } + _, err = sdk.AccAddressFromHexUnsafe(msg.StorageProvider) if err != nil { - return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid storage provider address (%s)", err) } return nil } From 5f590adc72fb63d8a95bc656b4ae891a610c4927 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 14 Dec 2023 14:57:57 +0800 Subject: [PATCH 09/27] fix comments --- app/upgrade.go | 24 +- deployment/localup/localup.sh | 1 + e2e/core/basesuite.go | 1 - e2e/tests/virtualgroup_test.go | 2 +- go.mod | 2 +- go.sum | 4 +- proto/greenfield/sp/types.proto | 2 +- proto/greenfield/virtualgroup/events.proto | 6 +- proto/greenfield/virtualgroup/params.proto | 2 +- proto/greenfield/virtualgroup/tx.proto | 10 +- swagger/static/swagger.yaml | 16 +- x/challenge/abci.go | 5 +- x/challenge/keeper/msg_server_submit.go | 6 +- x/sp/keeper/msg_server.go | 2 +- x/sp/types/types.pb.go | 134 ++--- x/storage/keeper/keeper.go | 24 +- x/virtualgroup/keeper/keeper.go | 12 +- x/virtualgroup/keeper/migrations.go | 19 + x/virtualgroup/keeper/msg_server.go | 79 +-- x/virtualgroup/keeper/v1/params.pb.go | 534 ++++++++++++++++++ x/virtualgroup/keeper/v2/migrations.go | 28 + x/virtualgroup/module.go | 6 + x/virtualgroup/types/events.pb.go | 138 ++--- .../message_complete_storage_provider_exit.go | 7 +- x/virtualgroup/types/params.go | 2 +- x/virtualgroup/types/params.pb.go | 2 +- x/virtualgroup/types/tx.pb.go | 190 +++---- 27 files changed, 935 insertions(+), 323 deletions(-) create mode 100644 x/virtualgroup/keeper/migrations.go create mode 100644 x/virtualgroup/keeper/v1/params.pb.go create mode 100644 x/virtualgroup/keeper/v2/migrations.go diff --git a/app/upgrade.go b/app/upgrade.go index 5996b8244..40b668ad6 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -24,6 +24,8 @@ func (app *App) RegisterUpgradeHandlers(chainID string, serverCfg *serverconfig. app.registerNagquUpgradeHandler() app.registerPampasUpgradeHandler() app.registerEddystoneUpgradeHandler() + app.registerHulunbeierUpgradeHandler() + // app.register...() // ... return nil @@ -115,8 +117,24 @@ func (app *App) registerEddystoneUpgradeHandler() { typeUrl := sdk.MsgTypeURL(&storagemoduletypes.MsgSetTag{}) msgSetTagGasParams := gashubtypes.NewMsgGasParamsWithFixedGas(typeUrl, 1.2e3) app.GashubKeeper.SetMsgGasParams(ctx, *msgSetTagGasParams) + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + + // Register the upgrade initializer + app.UpgradeKeeper.SetUpgradeInitializer(upgradetypes.Eddystone, + func() error { + app.Logger().Info("Init Eddystone upgrade") + + return nil + }) +} + +func (app *App) registerHulunbeierUpgradeHandler() { + // Register the upgrade handler + app.UpgradeKeeper.SetUpgradeHandler(upgradetypes.Hulunbeier, + func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + app.Logger().Info("upgrade to ", plan.Name) - // TODO use a new harfork app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgReserveSwapIn", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCancelSwapIn", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteSwapIn", 1.2e3)) @@ -129,9 +147,9 @@ func (app *App) registerEddystoneUpgradeHandler() { }) // Register the upgrade initializer - app.UpgradeKeeper.SetUpgradeInitializer(upgradetypes.Eddystone, + app.UpgradeKeeper.SetUpgradeInitializer(upgradetypes.Hulunbeier, func() error { - app.Logger().Info("Init Eddystone upgrade") + app.Logger().Info("Init Hulunbeier upgrade") return nil }) diff --git a/deployment/localup/localup.sh b/deployment/localup/localup.sh index 43c88d42e..6a95386bf 100644 --- a/deployment/localup/localup.sh +++ b/deployment/localup/localup.sh @@ -174,6 +174,7 @@ function generate_genesis() { echo -e '[[upgrade]]\nname = "Nagqu"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Pampas"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Eddystone"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml + echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml done # enable swagger API for validator0 diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index b1d576d6e..0ba911dfb 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -277,7 +277,6 @@ 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)) } diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index b34ad636f..3210a27f2 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -996,7 +996,7 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { // 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(sptypes.STATUS_FORCE_EXITING, resp.StorageProvider.Status) + s.Require().Equal(sptypes.STATUS_FORCED_EXITING, resp.StorageProvider.Status) // 7. SP-x successor SP try swapIn family msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) diff --git a/go.mod b/go.mod index 944b0d825..134c77b15 100644 --- a/go.mod +++ b/go.mod @@ -180,7 +180,7 @@ replace ( github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-cometbft v1.1.0 github.com/cometbft/cometbft-db => github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1 github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v1.1.1 + github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v1.0.2-0.20231214052136-c20e9a5452b6 github.com/cosmos/iavl => github.com/bnb-chain/greenfield-iavl v0.20.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/wercker/journalhook => github.com/wercker/journalhook v0.0.0-20230927020745-64542ffa4117 diff --git a/go.sum b/go.sum index 810dc1072..4c0fde9f9 100644 --- a/go.sum +++ b/go.sum @@ -163,8 +163,8 @@ github.com/bnb-chain/greenfield-cometbft v1.1.0 h1:jqnkDWIZW6f/rUn5/pE26YZMT9xzp github.com/bnb-chain/greenfield-cometbft v1.1.0/go.mod h1:NZ2/ZJK2HYe3++0CsPiw4LTG6UrC6pH7fQ3VOz6pqJw= github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1 h1:XcWulGacHVRiSCx90Q8Y//ajOrLNBQWR/KDB89dy3cU= github.com/bnb-chain/greenfield-cometbft-db v0.8.1-alpha.1/go.mod h1:ey1CiK4bYo1RBNJLRiVbYr5CMdSxci9S/AZRINLtppI= -github.com/bnb-chain/greenfield-cosmos-sdk v1.1.1 h1:wAg2caLOe2hjQVKZVWv5+tDwPox8irme82Eomc220oY= -github.com/bnb-chain/greenfield-cosmos-sdk v1.1.1/go.mod h1:Yrvq+J1Lsm7OHFX+M/AZWBTGt1TRHUTC4VYOMlvW3fs= +github.com/bnb-chain/greenfield-cosmos-sdk v1.0.2-0.20231214052136-c20e9a5452b6 h1:XO3cnv1E2vCSPfKw9467y3/8FL4r2XOI/h0C9NrFKTA= +github.com/bnb-chain/greenfield-cosmos-sdk v1.0.2-0.20231214052136-c20e9a5452b6/go.mod h1:Yrvq+J1Lsm7OHFX+M/AZWBTGt1TRHUTC4VYOMlvW3fs= github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230816082903-b48770f5e210 h1:GHPbV2bC+gmuO6/sG0Tm8oGal3KKSRlyE+zPscDjlA8= github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230816082903-b48770f5e210/go.mod h1:vhsZxXE9tYJeYB5JR4hPhd6Pc/uPf7j1T8IJ7p9FdeM= github.com/bnb-chain/greenfield-cosmos-sdk/math v0.0.0-20230816082903-b48770f5e210 h1:FLVOn4+OVbsKi2+YJX5kmD27/4dRu4FW7xCXFhzDO5s= diff --git a/proto/greenfield/sp/types.proto b/proto/greenfield/sp/types.proto index d56a49332..62d8ad7f0 100644 --- a/proto/greenfield/sp/types.proto +++ b/proto/greenfield/sp/types.proto @@ -29,7 +29,7 @@ enum Status { STATUS_IN_JAILED = 1; STATUS_GRACEFUL_EXITING = 2; STATUS_IN_MAINTENANCE = 3; - STATUS_FORCE_EXITING = 4; + STATUS_FORCED_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 19d41329a..28512bb72 100644 --- a/proto/greenfield/virtualgroup/events.proto +++ b/proto/greenfield/virtualgroup/events.proto @@ -165,10 +165,10 @@ message EventStorageProviderExit { message EventCompleteStorageProviderExit { // The id of the storage provider who complete exit uint32 storage_provider_id = 1; - // The operator address which initials the complete exit transaction + // The operator address which initials the complete exit transaction, for itself or another SP string operator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // The storage address which completes exit transaction - string storage_provider_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // The storage address which completes the exit + string exit_storage_provider_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_deposit defines the number of tokens deposited by this storage provider for staking. string total_deposit = 4 [ (cosmos_proto.scalar) = "cosmos.Int", diff --git a/proto/greenfield/virtualgroup/params.proto b/proto/greenfield/virtualgroup/params.proto index 8f75d8400..4c57f4c2e 100644 --- a/proto/greenfield/virtualgroup/params.proto +++ b/proto/greenfield/virtualgroup/params.proto @@ -27,6 +27,6 @@ message Params { 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. + // the the number of sp allowed to exit concurrently. uint32 sp_concurrent_exit_num = 7; } diff --git a/proto/greenfield/virtualgroup/tx.proto b/proto/greenfield/virtualgroup/tx.proto index 36885185e..f4543d1d6 100644 --- a/proto/greenfield/virtualgroup/tx.proto +++ b/proto/greenfield/virtualgroup/tx.proto @@ -185,13 +185,13 @@ message MsgStorageProviderExit { message MsgStorageProviderExitResponse {} message MsgCompleteStorageProviderExit { - option (cosmos.msg.v1.signer) = "operator"; + option (cosmos.msg.v1.signer) = "storage_provider"; - // operator defines the operator address, other SPs can help complete the exit if the exiting SP does not send out the tx. - string operator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // storage_provider defines the operator account address of the storage provider who initials this transaction. + string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // storage_provider defines the address of the storage provider who is in exitting from the greenfield storage network. - string storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // exit_storage_provider defines the operator account address of the storage provider who need to be completed exit + string exit_storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } message MsgCompleteStorageProviderExitResponse {} diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index ff3c39086..d57891ade 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -1896,7 +1896,7 @@ paths: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -2097,7 +2097,7 @@ paths: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -2238,7 +2238,7 @@ paths: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33502,7 +33502,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33622,7 +33622,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33719,7 +33719,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: @@ -33807,7 +33807,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. greenfield.sp.StorageProvider: @@ -33860,7 +33860,7 @@ definitions: - STATUS_IN_JAILED - STATUS_GRACEFUL_EXITING - STATUS_IN_MAINTENANCE - - STATUS_FORCE_EXITING + - STATUS_FORCED_EXITING default: STATUS_IN_SERVICE description: Status is the status of a storage provider. endpoint: diff --git a/x/challenge/abci.go b/x/challenge/abci.go index 9f85939c5..990bed693 100644 --- a/x/challenge/abci.go +++ b/x/challenge/abci.go @@ -2,6 +2,7 @@ package challenge import ( "fmt" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" @@ -89,7 +90,9 @@ func EndBlocker(ctx sdk.Context, keeper k.Keeper) { continue } if sp.Status != sptypes.STATUS_IN_SERVICE && sp.Status != sptypes.STATUS_GRACEFUL_EXITING { - continue + if !ctx.IsUpgraded(upgradetypes.Hulunbeier) || sp.Status != sptypes.STATUS_FORCED_EXITING { + continue + } } mapKey := fmt.Sprintf("%d-%s", spOperatorId, objectInfo.Id.String()) diff --git a/x/challenge/keeper/msg_server_submit.go b/x/challenge/keeper/msg_server_submit.go index cd0849d21..d8b32de1a 100644 --- a/x/challenge/keeper/msg_server_submit.go +++ b/x/challenge/keeper/msg_server_submit.go @@ -2,6 +2,7 @@ package keeper import ( "context" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,8 +25,11 @@ func (k msgServer) Submit(goCtx context.Context, msg *types.MsgSubmit) (*types.M return nil, types.ErrUnknownBucketObject } sp := k.StorageKeeper.MustGetPrimarySPForBucket(ctx, bucketInfo) + if sp.Status != sptypes.STATUS_IN_SERVICE && sp.Status != sptypes.STATUS_GRACEFUL_EXITING { - return nil, types.ErrInvalidSpStatus + if !ctx.IsUpgraded(upgradetypes.Hulunbeier) || sp.Status != sptypes.STATUS_FORCED_EXITING { + return nil, types.ErrInvalidSpStatus + } } // check object & read needed data diff --git a/x/sp/keeper/msg_server.go b/x/sp/keeper/msg_server.go index f96b9310a..00194df1a 100644 --- a/x/sp/keeper/msg_server.go +++ b/x/sp/keeper/msg_server.go @@ -424,7 +424,7 @@ func (k msgServer) UpdateSpStatus(goCtx context.Context, msg *types.MsgUpdateSto return nil, types.ErrStorageProviderStatusUpdateNotAllow } k.UpdateToInService(ctx, sp) - case types.STATUS_IN_JAILED, types.STATUS_GRACEFUL_EXITING: + case types.STATUS_IN_JAILED, types.STATUS_GRACEFUL_EXITING, types.STATUS_FORCED_EXITING: return nil, types.ErrStorageProviderStatusUpdateNotAllow } k.SetStorageProvider(ctx, sp) diff --git a/x/sp/types/types.pb.go b/x/sp/types/types.pb.go index a0ea46c73..0d9d909af 100644 --- a/x/sp/types/types.pb.go +++ b/x/sp/types/types.pb.go @@ -34,7 +34,7 @@ const ( STATUS_IN_JAILED Status = 1 STATUS_GRACEFUL_EXITING Status = 2 STATUS_IN_MAINTENANCE Status = 3 - STATUS_FORCE_EXITING Status = 4 + STATUS_FORCED_EXITING Status = 4 ) var Status_name = map[int32]string{ @@ -42,7 +42,7 @@ var Status_name = map[int32]string{ 1: "STATUS_IN_JAILED", 2: "STATUS_GRACEFUL_EXITING", 3: "STATUS_IN_MAINTENANCE", - 4: "STATUS_FORCE_EXITING", + 4: "STATUS_FORCED_EXITING", } var Status_value = map[string]int32{ @@ -50,7 +50,7 @@ var Status_value = map[string]int32{ "STATUS_IN_JAILED": 1, "STATUS_GRACEFUL_EXITING": 2, "STATUS_IN_MAINTENANCE": 3, - "STATUS_FORCE_EXITING": 4, + "STATUS_FORCED_EXITING": 4, } func (x Status) String() string { @@ -585,70 +585,70 @@ func init() { proto.RegisterFile("greenfield/sp/types.proto", fileDescriptor_7a9 var fileDescriptor_7a9af9b5be8c2eeb = []byte{ // 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, 0x21, - 0x84, 0x4a, 0xb1, 0xd5, 0x70, 0xa8, 0x04, 0x5c, 0x1c, 0xdb, 0x8d, 0x16, 0xda, 0x50, 0xd6, 0x2e, - 0x42, 0x20, 0xb4, 0x1a, 0xef, 0xbe, 0x38, 0xa3, 0xd8, 0x33, 0xdb, 0x99, 0x71, 0x8a, 0xff, 0x01, - 0x17, 0x24, 0x7e, 0x01, 0x07, 0xf8, 0x05, 0x48, 0x3d, 0xf1, 0x0b, 0x7a, 0xac, 0x7a, 0x42, 0x1c, - 0x2a, 0x94, 0xfc, 0x0a, 0x6e, 0x68, 0x77, 0x67, 0xd7, 0x26, 0x1c, 0xac, 0x4a, 0x39, 0xd9, 0xef, - 0x7b, 0xef, 0xfb, 0xe6, 0xed, 0x9b, 0xf7, 0xde, 0x2e, 0xec, 0x0c, 0x25, 0x22, 0x3f, 0x63, 0x38, - 0x0a, 0x9a, 0x2a, 0x6c, 0xea, 0x69, 0x88, 0xaa, 0x11, 0x4a, 0xa1, 0x05, 0x59, 0x9b, 0xb9, 0x1a, - 0x2a, 0xdc, 0xad, 0xf9, 0x42, 0x8d, 0x85, 0x6a, 0x0e, 0xa8, 0xc2, 0xe6, 0xe5, 0x83, 0x01, 0x6a, - 0xfa, 0xa0, 0xe9, 0x0b, 0xc6, 0x93, 0xf0, 0xdd, 0x9d, 0xc4, 0xef, 0xc5, 0x56, 0x33, 0x31, 0x8c, - 0x6b, 0x6b, 0x28, 0x86, 0x22, 0xc1, 0xa3, 0x7f, 0x09, 0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c, 0x7c, 0x41, 0x65, 0xe0, 0xf0, 0x33, 0x41, 0x8e, 0x60, - 0x39, 0xad, 0xab, 0xb5, 0xa0, 0xae, 0x69, 0x20, 0x79, 0x08, 0x25, 0x3a, 0x16, 0x13, 0xae, 0xe3, - 0x86, 0x2e, 0x1f, 0xed, 0x34, 0x4c, 0x7c, 0xb4, 0x05, 0x1a, 0x66, 0x0b, 0x34, 0xda, 0x82, 0xa5, - 0x89, 0x99, 0xf0, 0xfa, 0xef, 0x79, 0x58, 0xef, 0x85, 0xd9, 0xe4, 0x30, 0x1f, 0xc9, 0x26, 0x2c, - 0xa9, 0xd0, 0xcb, 0x26, 0xa7, 0xa8, 0x42, 0x27, 0x20, 0xfb, 0x50, 0x99, 0x84, 0x01, 0xd5, 0xe8, - 0x69, 0x36, 0x46, 0x4f, 0xa1, 0x1f, 0x9f, 0x54, 0x70, 0xd7, 0x12, 0xb8, 0xcf, 0xc6, 0xd8, 0x43, - 0x9f, 0x7c, 0x07, 0x20, 0x91, 0x06, 0x5e, 0x18, 0x49, 0x99, 0xc9, 0x78, 0x97, 0x2b, 0xed, 0xa0, - 0x3f, 0x77, 0xa5, 0x1d, 0xf4, 0xdd, 0x95, 0x48, 0x2f, 0xc9, 0x6c, 0x1f, 0x2a, 0x67, 0x12, 0xd1, - 0x8b, 0x4f, 0x78, 0x3e, 0x11, 0x9a, 0xc6, 0xb3, 0x53, 0x74, 0xd7, 0x22, 0xd8, 0x45, 0x1a, 0x7c, - 0x15, 0x81, 0xe4, 0x7b, 0x28, 0x2b, 0x2d, 0x24, 0x9a, 0x2c, 0x96, 0x6e, 0x21, 0x0b, 0x88, 0x05, - 0xe3, 0x34, 0xea, 0xff, 0xe4, 0x81, 0x9c, 0x8c, 0xc4, 0x80, 0x8e, 0x92, 0xca, 0x61, 0x96, 0xdd, - 0xcd, 0x12, 0x59, 0x8b, 0x4b, 0x94, 0xbf, 0xdd, 0x12, 0x8d, 0x60, 0x33, 0x94, 0x6c, 0x4c, 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x3e, 0x3c, 0xf0, 0xcf, 0x29, 0xe3, 0xed, 0xdc, 0xa7, 0xcb, 0x77, 0xd9, 0xc7, + 0xcb, 0xb0, 0x12, 0x7f, 0x5d, 0x7c, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xc1, 0x3c, + 0xf4, 0xda, 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 2550ca993..04f0e7a9d 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -379,10 +379,9 @@ func (k Keeper) UpdateBucketInfo(ctx sdk.Context, operator sdk.AccAddress, bucke return types.ErrSourceTypeMismatch } - //TODO rename the harfork - if ctx.IsUpgraded(upgradetypes.Eddystone) { + if ctx.IsUpgraded(upgradetypes.Hulunbeier) { sp := k.MustGetPrimarySPForBucket(ctx, bucketInfo) - if sp.Status == sptypes.STATUS_GRACEFUL_EXITING || sp.Status == sptypes.STATUS_FORCE_EXITING { + if sp.Status == sptypes.STATUS_GRACEFUL_EXITING || sp.Status == sptypes.STATUS_FORCED_EXITING { return types.ErrUpdateQuotaFailed.Wrapf("The SP is in %s, bucket can not be updated", sp.Status) } } @@ -907,8 +906,8 @@ func (k Keeper) DeleteObject( spInState := k.MustGetPrimarySPForBucket(ctx, bucketInfo) - if ctx.IsUpgraded(upgradetypes.Eddystone) { - if spInState.Status == sptypes.STATUS_GRACEFUL_EXITING || spInState.Status == sptypes.STATUS_FORCE_EXITING { + if ctx.IsUpgraded(upgradetypes.Hulunbeier) { + if spInState.Status == sptypes.STATUS_GRACEFUL_EXITING || spInState.Status == sptypes.STATUS_FORCED_EXITING { return types.ErrUpdateQuotaFailed.Wrapf("The SP is in %s, object can not be deleted", spInState.Status) } } @@ -1178,18 +1177,13 @@ func (k Keeper) DiscontinueObject(ctx sdk.Context, operator sdk.AccAddress, buck spInState := k.MustGetPrimarySPForBucket(ctx, bucketInfo) if sp.Id != spInState.Id { - 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 { + if !ctx.IsUpgraded(upgradetypes.Hulunbeier) { return errors.Wrapf(types.ErrAccessDenied, "only primary sp is allowed to do discontinue objects") } + swapInInfo, found := k.virtualGroupKeeper.GetSwapInInfo(ctx, bucketInfo.GlobalVirtualGroupFamilyId, virtualgroupmoduletypes.NoSpecifiedGVGId) + if !found || 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") + } } count := k.GetDiscontinueObjectCount(ctx, operator) diff --git a/x/virtualgroup/keeper/keeper.go b/x/virtualgroup/keeper/keeper.go index 776142a3d..30b44052d 100644 --- a/x/virtualgroup/keeper/keeper.go +++ b/x/virtualgroup/keeper/keeper.go @@ -652,7 +652,7 @@ func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, succes 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 { + if targetSP.Status != sptypes.STATUS_GRACEFUL_EXITING && targetSP.Status != sptypes.STATUS_FORCED_EXITING { return sptypes.ErrStorageProviderWrongStatus.Wrapf("The target sp is not exiting, can not be swapped") } family, found := k.GetGVGFamily(ctx, gvgFamilyID) @@ -686,7 +686,7 @@ func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, succes } // swap into GVG when there is a secondary SP is exiting. - if targetSP.Status == sptypes.STATUS_GRACEFUL_EXITING || targetSP.Status == sptypes.STATUS_FORCE_EXITING { + if targetSP.Status == sptypes.STATUS_GRACEFUL_EXITING || targetSP.Status == sptypes.STATUS_FORCED_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] @@ -849,7 +849,7 @@ func (k Keeper) completeSwapInFamily(ctx sdk.Context, successorSP, targetPrimary // 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) + err := k.bankKeeper.SendCoins(ctx, sdk.MustAccAddressFromHex(successorSP.FundingAddress), sdk.MustAccAddressFromHex(targetPrimarySP.FundingAddress), coins) if err != nil { return err } @@ -872,16 +872,16 @@ func (k Keeper) completeSwapInFamily(ctx sdk.Context, successorSP, targetPrimary // settlement err := k.SettleAndDistributeGVGFamily(ctx, targetPrimarySP, family) if err != nil { - return types.ErrSwapOutFailed.Wrapf("fail to settle GVG family %d", familyID) + return types.ErrSwapInFailed.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) + return types.ErrSwapInFailed.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) + return types.ErrSwapInFailed.Wrapf("failed to set gvg and emit update event, err: %s", err) } } k.SetGVGStatisticsWithSP(ctx, srcStat) diff --git a/x/virtualgroup/keeper/migrations.go b/x/virtualgroup/keeper/migrations.go new file mode 100644 index 000000000..9788512dd --- /dev/null +++ b/x/virtualgroup/keeper/migrations.go @@ -0,0 +1,19 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + v2 "github.com/bnb-chain/greenfield/x/virtualgroup/keeper/v2" +) + +type Migrator struct { + keeper Keeper +} + +func NewMigrator(keeper Keeper) Migrator { + return Migrator{keeper: keeper} +} + +func (m Migrator) MigrateV1toV2(ctx sdk.Context) error { + return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) +} diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index 0c4377f9b..3547d5379 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -444,26 +444,27 @@ 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) - } + if ctx.IsUpgraded(upgradetypes.Hulunbeier) { + 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++ + // can only allow 1 sp exit at a time, a GVG can have only 1 SwapInInfo associated. + exitingSPNum := uint32(0) + sps := k.spKeeper.GetAllStorageProviders(ctx) + maxSPExitingNum := k.SpConcurrentExitNum(ctx) + + for _, curSP := range sps { + if curSP.Status == sptypes.STATUS_GRACEFUL_EXITING || + curSP.Status == sptypes.STATUS_FORCED_EXITING { + exitingSPNum++ + if exitingSPNum >= maxSPExitingNum { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("There are %d SP exiting, only allow %d sp exit concurrently", exitingSPNum, maxSPExitingNum) + } + } } } - 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) @@ -480,23 +481,33 @@ func (k msgServer) StorageProviderExit(goCtx context.Context, msg *types.MsgStor func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types.MsgCompleteStorageProviderExit) (*types.MsgCompleteStorageProviderExitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - operatorAddr := sdk.MustAccAddressFromHex(msg.Operator) + operatorAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) - operator, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) + sp, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) if !found { return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be operator address of sp.") } - exitSPAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + var exitSP *sptypes.StorageProvider - exitSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, exitSPAddr) - if !found { - return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address of SP is not found") - } + isHulunbeierUpgrade := ctx.IsUpgraded(upgradetypes.Hulunbeier) + if !isHulunbeierUpgrade { + exitSP = sp + } else { + exitSPAddr, err := sdk.AccAddressFromHexUnsafe(msg.ExitStorageProvider) + if err != nil { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("Invalid address of SP") + } + + exitSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, exitSPAddr) + if !found { + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address of SP is not found") + } - if exitSP.Status != sptypes.STATUS_GRACEFUL_EXITING && exitSP.Status != sptypes.STATUS_FORCE_EXITING { - return nil, sptypes.ErrStorageProviderExitFailed.Wrapf( - "sp(id : %d, operator address: %s) not in the process of exiting", exitSP.Id, exitSP.OperatorAddress) + if exitSP.Status != sptypes.STATUS_GRACEFUL_EXITING && exitSP.Status != sptypes.STATUS_FORCED_EXITING { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf( + "sp(id : %d, operator address: %s) is not exiting", exitSP.Id, exitSP.OperatorAddress) + } } err := k.StorageProviderExitable(ctx, exitSP.Id) @@ -525,11 +536,11 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types return nil, err } if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ - StorageProviderId: exitSP.Id, - OperatorAddress: operator.OperatorAddress, - StorageProviderAddress: exitSP.OperatorAddress, - TotalDeposit: exitSP.TotalDeposit, - ForcedExit: forcedExit, + StorageProviderId: exitSP.Id, + OperatorAddress: sp.OperatorAddress, + ExitStorageProviderAddress: exitSP.OperatorAddress, + TotalDeposit: exitSP.TotalDeposit, + ForcedExit: forcedExit, }); err != nil { return nil, err } @@ -610,7 +621,7 @@ func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.Ms sps := k.spKeeper.GetAllStorageProviders(ctx) for _, curSP := range sps { if curSP.Status == sptypes.STATUS_GRACEFUL_EXITING || - curSP.Status == sptypes.STATUS_FORCE_EXITING { + curSP.Status == sptypes.STATUS_FORCED_EXITING { exittingSPNum++ } } @@ -620,7 +631,7 @@ func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.Ms } // Governance can put an SP into force exiting status no matter what status it is in. - sp.Status = sptypes.STATUS_FORCE_EXITING + sp.Status = sptypes.STATUS_FORCED_EXITING k.spKeeper.SetStorageProvider(ctx, sp) if err := ctx.EventManager().EmitTypedEvents(&types.EventStorageProviderForceExit{ StorageProviderId: sp.Id, diff --git a/x/virtualgroup/keeper/v1/params.pb.go b/x/virtualgroup/keeper/v1/params.pb.go new file mode 100644 index 000000000..145ad035e --- /dev/null +++ b/x/virtualgroup/keeper/v1/params.pb.go @@ -0,0 +1,534 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: greenfield/virtualgroup/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + "gopkg.in/yaml.v2" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // deposit_denom defines the staking coin denomination. + DepositDenom string `protobuf:"bytes,1,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"` + // store price, in bnb wei per charge byte + GvgStakingPerBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=gvg_staking_per_bytes,json=gvgStakingPerBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gvg_staking_per_bytes"` + // the max number of lvg which allowed in a bucket + MaxLocalVirtualGroupNumPerBucket uint32 `protobuf:"varint,3,opt,name=max_local_virtual_group_num_per_bucket,json=maxLocalVirtualGroupNumPerBucket,proto3" json:"max_local_virtual_group_num_per_bucket,omitempty"` + // the max number of gvg which can exist in a family + 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"` +} + +func (m *Params) String() string { + out, _ := yaml.Marshal(m) + return string(out) +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_d8ecf89dd5128885, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetDepositDenom() string { + if m != nil { + return m.DepositDenom + } + return "" +} + +func (m *Params) GetMaxLocalVirtualGroupNumPerBucket() uint32 { + if m != nil { + return m.MaxLocalVirtualGroupNumPerBucket + } + return 0 +} + +func (m *Params) GetMaxGlobalVirtualGroupNumPerFamily() uint32 { + if m != nil { + return m.MaxGlobalVirtualGroupNumPerFamily + } + return 0 +} + +func (m *Params) GetMaxStoreSizePerFamily() uint64 { + if m != nil { + return m.MaxStoreSizePerFamily + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "greenfield.virtualgroup.Params") +} + +func init() { + proto.RegisterFile("greenfield/virtualgroup/params.proto", fileDescriptor_d8ecf89dd5128885) +} + +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, 0x5a, 0x2a, 0xb0, 0xe8, 0x12, 0x51, 0x91, 0x76, 0x48, 0xc2, 0x1f, 0x95, 0x5b, + 0x2e, 0x19, 0x60, 0x40, 0x88, 0xe9, 0x84, 0xa8, 0x2a, 0xa1, 0xea, 0x94, 0x93, 0x18, 0x58, 0x2c, + 0x27, 0x71, 0x5d, 0xeb, 0x62, 0x3b, 0xb2, 0x9d, 0x53, 0xae, 0x9f, 0x80, 0x91, 0x91, 0xb1, 0x1f, + 0x82, 0x0f, 0x71, 0xe3, 0x89, 0x09, 0x31, 0x9c, 0xd0, 0xdd, 0xc2, 0xc7, 0x40, 0x76, 0x22, 0x08, + 0x42, 0x9d, 0x92, 0xfc, 0xf2, 0xf8, 0xd1, 0xfb, 0xbe, 0x7e, 0xe1, 0x33, 0xaa, 0x08, 0x11, 0x97, + 0x8c, 0x54, 0x65, 0xba, 0x60, 0xca, 0x34, 0xb8, 0xa2, 0x4a, 0x36, 0x75, 0x5a, 0x63, 0x85, 0xb9, + 0x4e, 0x6a, 0x25, 0x8d, 0xf4, 0x1f, 0xfd, 0xa5, 0x92, 0x21, 0x75, 0x72, 0x5c, 0x48, 0xcd, 0xa5, + 0x46, 0x0e, 0x4b, 0xbb, 0x8f, 0xee, 0xcc, 0xc9, 0x43, 0x2a, 0xa9, 0xec, 0x72, 0xfb, 0xd6, 0xa5, + 0x4f, 0x3e, 0xed, 0xc1, 0x83, 0xa9, 0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, 0x1c, 0xb7, + 0x33, 0xfb, 0x7f, 0xc6, 0xae, 0xc9, 0x9f, 0x93, 0xaf, 0xef, 0x7d, 0xb9, 0x89, 0xbc, 0x5f, 0x37, + 0x11, 0x98, 0x5c, 0xac, 0xb6, 0x21, 0x58, 0x6f, 0x43, 0xf0, 0x73, 0x1b, 0x82, 0xcf, 0xbb, 0xd0, + 0x5b, 0xef, 0x42, 0xef, 0xfb, 0x2e, 0xf4, 0x3e, 0xbe, 0x1c, 0x4c, 0x33, 0x17, 0xf9, 0xb8, 0xb8, + 0xc2, 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, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DepositDenom != that1.DepositDenom { + return false + } + if !this.GvgStakingPerBytes.Equal(that1.GvgStakingPerBytes) { + return false + } + if this.MaxLocalVirtualGroupNumPerBucket != that1.MaxLocalVirtualGroupNumPerBucket { + return false + } + if this.MaxGlobalVirtualGroupNumPerFamily != that1.MaxGlobalVirtualGroupNumPerFamily { + return false + } + if this.MaxStoreSizePerFamily != that1.MaxStoreSizePerFamily { + return false + } + return true +} +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxStoreSizePerFamily != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxStoreSizePerFamily)) + i-- + dAtA[i] = 0x28 + } + if m.MaxGlobalVirtualGroupNumPerFamily != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxGlobalVirtualGroupNumPerFamily)) + i-- + dAtA[i] = 0x20 + } + if m.MaxLocalVirtualGroupNumPerBucket != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxLocalVirtualGroupNumPerBucket)) + i-- + dAtA[i] = 0x18 + } + { + size := m.GvgStakingPerBytes.Size() + i -= size + if _, err := m.GvgStakingPerBytes.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.DepositDenom) > 0 { + i -= len(m.DepositDenom) + copy(dAtA[i:], m.DepositDenom) + i = encodeVarintParams(dAtA, i, uint64(len(m.DepositDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DepositDenom) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = m.GvgStakingPerBytes.Size() + n += 1 + l + sovParams(uint64(l)) + if m.MaxLocalVirtualGroupNumPerBucket != 0 { + n += 1 + sovParams(uint64(m.MaxLocalVirtualGroupNumPerBucket)) + } + if m.MaxGlobalVirtualGroupNumPerFamily != 0 { + n += 1 + sovParams(uint64(m.MaxGlobalVirtualGroupNumPerFamily)) + } + if m.MaxStoreSizePerFamily != 0 { + n += 1 + sovParams(uint64(m.MaxStoreSizePerFamily)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DepositDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GvgStakingPerBytes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.GvgStakingPerBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxLocalVirtualGroupNumPerBucket", wireType) + } + m.MaxLocalVirtualGroupNumPerBucket = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxLocalVirtualGroupNumPerBucket |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxGlobalVirtualGroupNumPerFamily", wireType) + } + m.MaxGlobalVirtualGroupNumPerFamily = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxGlobalVirtualGroupNumPerFamily |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxStoreSizePerFamily", wireType) + } + m.MaxStoreSizePerFamily = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxStoreSizePerFamily |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/virtualgroup/keeper/v2/migrations.go b/x/virtualgroup/keeper/v2/migrations.go new file mode 100644 index 000000000..a4e9ab003 --- /dev/null +++ b/x/virtualgroup/keeper/v2/migrations.go @@ -0,0 +1,28 @@ +package v2 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + v1 "github.com/bnb-chain/greenfield/x/virtualgroup/keeper/v1" + "github.com/bnb-chain/greenfield/x/virtualgroup/types" +) + +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { + store := ctx.KVStore(storeKey) + bz := store.Get(types.ParamsKey) + oldParams := &v1.Params{} + cdc.MustUnmarshal(bz, oldParams) + + newParams := types.NewParams( + oldParams.DepositDenom, + oldParams.GvgStakingPerBytes, + oldParams.MaxGlobalVirtualGroupNumPerFamily, + oldParams.MaxStoreSizePerFamily, + types.DefaultSwapInValidityPeriod, + types.DefaultSPConcurrentExitNum) + store.Set(types.ParamsKey, cdc.MustMarshal(&newParams)) + + return nil +} diff --git a/x/virtualgroup/module.go b/x/virtualgroup/module.go index 8d05904be..29b3e65f1 100644 --- a/x/virtualgroup/module.go +++ b/x/virtualgroup/module.go @@ -114,6 +114,12 @@ func NewAppModule( func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + migrator := keeper.NewMigrator(am.keeper) + // register v1 -> v2 migration + if err := cfg.RegisterMigration(types.ModuleName, 1, migrator.MigrateV1toV2); err != nil { + panic(fmt.Errorf("failed to migrate %s to v2: %w", types.ModuleName, err)) + } } // RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) diff --git a/x/virtualgroup/types/events.pb.go b/x/virtualgroup/types/events.pb.go index c67477e55..a939c9c04 100644 --- a/x/virtualgroup/types/events.pb.go +++ b/x/virtualgroup/types/events.pb.go @@ -887,10 +887,10 @@ func (m *EventStorageProviderExit) GetOperatorAddress() string { type EventCompleteStorageProviderExit struct { // The id of the storage provider who complete exit StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` - // The operator address which initials the complete exit transaction + // The operator address which initials the complete exit transaction, for itself or another SP OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` - // The storage address which completes exit transaction - StorageProviderAddress string `protobuf:"bytes,3,opt,name=storage_provider_address,json=storageProviderAddress,proto3" json:"storage_provider_address,omitempty"` + // The storage address which completes the exit + ExitStorageProviderAddress string `protobuf:"bytes,3,opt,name=exit_storage_provider_address,json=exitStorageProviderAddress,proto3" json:"exit_storage_provider_address,omitempty"` // total_deposit defines the number of tokens deposited by this storage provider for staking. TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=total_deposit,json=totalDeposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_deposit"` // forced_exit whether the exit is a forced exit @@ -944,9 +944,9 @@ func (m *EventCompleteStorageProviderExit) GetOperatorAddress() string { return "" } -func (m *EventCompleteStorageProviderExit) GetStorageProviderAddress() string { +func (m *EventCompleteStorageProviderExit) GetExitStorageProviderAddress() string { if m != nil { - return m.StorageProviderAddress + return m.ExitStorageProviderAddress } return "" } @@ -1245,64 +1245,64 @@ func init() { } var fileDescriptor_ece39ea12016bd5b = []byte{ - // 898 bytes of a gzipped FileDescriptorProto + // 903 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xac, 0xdd, 0x12, 0x3f, 0xc7, 0xfd, 0xb3, 0x75, 0xf1, 0x92, 0x52, 0xc7, 0x5a, 0x50, - 0xe5, 0x4b, 0xec, 0x03, 0x54, 0x20, 0xc1, 0x85, 0xf4, 0x9f, 0x2c, 0x21, 0x1a, 0xad, 0x55, 0x24, - 0xb8, 0xac, 0xd6, 0x3b, 0x93, 0xcd, 0xa8, 0xeb, 0x9d, 0xd5, 0xcc, 0x38, 0x24, 0xfd, 0x12, 0x20, - 0x3e, 0x4b, 0x3f, 0x00, 0xc7, 0x1e, 0xab, 0x9e, 0x50, 0x0f, 0x55, 0x95, 0x70, 0xe1, 0x04, 0x67, - 0x24, 0x04, 0xda, 0x99, 0xb1, 0xeb, 0xff, 0x35, 0x9b, 0x56, 0x40, 0x4e, 0x89, 0xdf, 0xbc, 0x79, - 0xef, 0xfd, 0x7e, 0xef, 0x37, 0x6f, 0x66, 0xe1, 0xc3, 0x88, 0x13, 0x92, 0xec, 0x51, 0x12, 0xe3, - 0xf6, 0x01, 0xe5, 0x72, 0x10, 0xc4, 0x11, 0x67, 0x83, 0xb4, 0x4d, 0x0e, 0x48, 0x22, 0x45, 0x2b, - 0xe5, 0x4c, 0x32, 0xbb, 0xf6, 0xca, 0xab, 0x35, 0xee, 0xb5, 0xf9, 0x5e, 0xc8, 0x44, 0x9f, 0x09, - 0x5f, 0xb9, 0xb5, 0xf5, 0x0f, 0xbd, 0x67, 0xb3, 0x1a, 0xb1, 0x88, 0x69, 0x7b, 0xf6, 0x9f, 0xb6, - 0xba, 0xbf, 0x5b, 0x70, 0xfd, 0x4e, 0x16, 0xfa, 0x16, 0x27, 0x81, 0x24, 0xf7, 0x62, 0xd6, 0x0b, - 0xe2, 0xaf, 0x75, 0xc8, 0x7b, 0x59, 0x48, 0xfb, 0x02, 0x58, 0x14, 0x3b, 0xa8, 0x81, 0x9a, 0x15, - 0xcf, 0xa2, 0xd8, 0xbe, 0x06, 0xa5, 0xbd, 0xa0, 0x4f, 0xe3, 0x23, 0x9f, 0x62, 0xc7, 0x52, 0xe6, - 0x75, 0x6d, 0xe8, 0x60, 0xdb, 0x85, 0x4a, 0xca, 0x69, 0x3f, 0xe0, 0x47, 0xbe, 0x48, 0x33, 0x87, - 0x82, 0x72, 0x28, 0x1b, 0x63, 0x37, 0xed, 0x60, 0xbb, 0x09, 0x97, 0x04, 0x09, 0x59, 0x82, 0x47, - 0x5e, 0xc2, 0x29, 0x36, 0x0a, 0xcd, 0x8a, 0x77, 0x61, 0x64, 0xcf, 0x1c, 0x85, 0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x8a, 0x41, 0x18, 0x12, 0x21, 0x18, 0x9f, - 0x98, 0x94, 0x95, 0x91, 0x59, 0xa9, 0xfa, 0x0f, 0x04, 0x55, 0xad, 0x6a, 0xd6, 0x4f, 0x33, 0x4a, - 0xf3, 0xa2, 0xbd, 0x09, 0x35, 0xc1, 0x43, 0x7f, 0xde, 0x1e, 0x0d, 0xb3, 0x2a, 0x78, 0xd8, 0xcd, - 0x41, 0x52, 0xe1, 0x54, 0x24, 0x2d, 0x1d, 0x61, 0xbf, 0x22, 0xb0, 0x35, 0xf8, 0x20, 0x09, 0x49, - 0x7c, 0xa6, 0x1b, 0xfd, 0x3d, 0x02, 0x47, 0xcb, 0x79, 0xb2, 0xfe, 0x3b, 0x87, 0xf4, 0x9f, 0x23, - 0xbe, 0x05, 0x97, 0x58, 0x4a, 0x78, 0x20, 0x19, 0x1f, 0xdd, 0x3f, 0xd6, 0x6b, 0xee, 0x9f, 0x8b, - 0xc3, 0x1d, 0xc6, 0xec, 0xfe, 0x66, 0x41, 0x63, 0x52, 0x7a, 0xff, 0x91, 0xca, 0x6c, 0x0f, 0x9c, - 0x99, 0xa4, 0xab, 0x5e, 0xb3, 0xef, 0x4e, 0xd5, 0xb4, 0xf0, 0x3d, 0x57, 0x7c, 0xe3, 0x6f, 0xa3, - 0x2d, 0x28, 0xef, 0x31, 0x1e, 0x12, 0xec, 0x93, 0x43, 0x2a, 0xd5, 0x2b, 0x75, 0xdd, 0x03, 0x6d, - 0xca, 0xc8, 0x74, 0x9f, 0x23, 0x28, 0x8f, 0x46, 0x5a, 0x27, 0xf9, 0x57, 0x84, 0x9e, 0xf3, 0x62, - 0x68, 0xc0, 0x86, 0x0c, 0x78, 0x44, 0xe4, 0x84, 0xc6, 0x41, 0xdb, 0x94, 0xc0, 0xff, 0x44, 0x70, - 0x65, 0x66, 0x92, 0xe5, 0x00, 0xf9, 0x19, 0x6c, 0x0e, 0x33, 0x2d, 0x9c, 0x65, 0x35, 0x93, 0xf7, - 0xad, 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, 0x93, 0x2a, + 0x3c, 0xcb, 0xd8, 0xd8, 0xfb, 0xf2, 0xf1, 0x69, 0x0d, 0x3d, 0x39, 0xad, 0xa1, 0x17, 0xa7, 0x35, + 0xf4, 0xc3, 0xb0, 0xb6, 0xf1, 0x64, 0x58, 0xdb, 0xf8, 0x79, 0x58, 0xdb, 0xf8, 0xe6, 0xa3, 0x89, + 0xf3, 0xd8, 0x8b, 0x7b, 0xbb, 0xc1, 0xa1, 0x4f, 0xe3, 0xd6, 0xc4, 0xc7, 0xf1, 0xf1, 0xf4, 0xe7, + 0xb1, 0x3a, 0xa1, 0xbd, 0xf3, 0xea, 0xa3, 0xf6, 0xc3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x80, + 0xb3, 0x60, 0x56, 0x46, 0x0f, 0x00, 0x00, } func (m *EventCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -2001,10 +2001,10 @@ func (m *EventCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (in } i-- dAtA[i] = 0x22 - if len(m.StorageProviderAddress) > 0 { - i -= len(m.StorageProviderAddress) - copy(dAtA[i:], m.StorageProviderAddress) - i = encodeVarintEvents(dAtA, i, uint64(len(m.StorageProviderAddress))) + if len(m.ExitStorageProviderAddress) > 0 { + i -= len(m.ExitStorageProviderAddress) + copy(dAtA[i:], m.ExitStorageProviderAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.ExitStorageProviderAddress))) i-- dAtA[i] = 0x1a } @@ -2488,7 +2488,7 @@ func (m *EventCompleteStorageProviderExit) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.StorageProviderAddress) + l = len(m.ExitStorageProviderAddress) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } @@ -4719,7 +4719,7 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExitStorageProviderAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4747,7 +4747,7 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.StorageProviderAddress = string(dAtA[iNdEx:postIndex]) + m.ExitStorageProviderAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/x/virtualgroup/types/message_complete_storage_provider_exit.go b/x/virtualgroup/types/message_complete_storage_provider_exit.go index 0ccfc625a..1ed9b1c5d 100644 --- a/x/virtualgroup/types/message_complete_storage_provider_exit.go +++ b/x/virtualgroup/types/message_complete_storage_provider_exit.go @@ -38,14 +38,9 @@ func (msg *MsgCompleteStorageProviderExit) GetSignBytes() []byte { } func (msg *MsgCompleteStorageProviderExit) ValidateBasic() error { - - _, err := sdk.AccAddressFromHexUnsafe(msg.Operator) + _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) if err != nil { return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid operator address (%s)", err) } - _, err = sdk.AccAddressFromHexUnsafe(msg.StorageProvider) - if err != nil { - return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid storage provider address (%s)", err) - } return nil } diff --git a/x/virtualgroup/types/params.go b/x/virtualgroup/types/params.go index 8fcff1404..00aaf5ea8 100644 --- a/x/virtualgroup/types/params.go +++ b/x/virtualgroup/types/params.go @@ -91,7 +91,7 @@ func (p Params) Validate() error { if err := validateSwapInValidityPeriod(p.SwapInValidityPeriod); err != nil { return err } - if err := validateSwapInValidityPeriod(p.SwapInValidityPeriod); err != nil { + if err := validateSPConcurrentExitNum(p.SpConcurrentExitNum); err != nil { return err } diff --git a/x/virtualgroup/types/params.pb.go b/x/virtualgroup/types/params.pb.go index b2c2fadc0..cea4feb24 100644 --- a/x/virtualgroup/types/params.pb.go +++ b/x/virtualgroup/types/params.pb.go @@ -39,7 +39,7 @@ type Params struct { 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. + // the the number of sp allowed to exit concurrently. SpConcurrentExitNum uint32 `protobuf:"varint,7,opt,name=sp_concurrent_exit_num,json=spConcurrentExitNum,proto3" json:"sp_concurrent_exit_num,omitempty"` } diff --git a/x/virtualgroup/types/tx.pb.go b/x/virtualgroup/types/tx.pb.go index 6edbe13fb..fcce64420 100644 --- a/x/virtualgroup/types/tx.pb.go +++ b/x/virtualgroup/types/tx.pb.go @@ -998,10 +998,10 @@ func (m *MsgStorageProviderExitResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStorageProviderExitResponse proto.InternalMessageInfo type MsgCompleteStorageProviderExit struct { - // operator defines the operator address, other SPs can help complete the exit if the exiting SP does not send out the tx. - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` - // storage_provider defines the address of the storage provider who is in exitting from the greenfield storage network. - StorageProvider string `protobuf:"bytes,2,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` + // storage_provider defines the operator account address of the storage provider who initials this transaction. + StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` + // exit_storage_provider defines the operator account address of the storage provider who need to be completed exit + ExitStorageProvider string `protobuf:"bytes,2,opt,name=exit_storage_provider,json=exitStorageProvider,proto3" json:"exit_storage_provider,omitempty"` } func (m *MsgCompleteStorageProviderExit) Reset() { *m = MsgCompleteStorageProviderExit{} } @@ -1037,16 +1037,16 @@ func (m *MsgCompleteStorageProviderExit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCompleteStorageProviderExit proto.InternalMessageInfo -func (m *MsgCompleteStorageProviderExit) GetOperator() string { +func (m *MsgCompleteStorageProviderExit) GetStorageProvider() string { if m != nil { - return m.Operator + return m.StorageProvider } return "" } -func (m *MsgCompleteStorageProviderExit) GetStorageProvider() string { +func (m *MsgCompleteStorageProviderExit) GetExitStorageProvider() string { if m != nil { - return m.StorageProvider + return m.ExitStorageProvider } return "" } @@ -1567,81 +1567,81 @@ func init() { func init() { proto.RegisterFile("greenfield/virtualgroup/tx.proto", fileDescriptor_478f7001009bf3f2) } var fileDescriptor_478f7001009bf3f2 = []byte{ - // 1174 bytes of a gzipped FileDescriptorProto + // 1179 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, 0xac, 0x91, 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, 0x37, 0x8b, 0xec, 0x9d, 0xd5, 0xce, 0xd8, 0x49, 0x4e, 0x48, - 0x5c, 0x91, 0x10, 0x37, 0xf8, 0x0c, 0x9c, 0x7a, 0xe0, 0x43, 0xf4, 0x58, 0x71, 0x42, 0x48, 0x54, - 0x28, 0xa9, 0x04, 0x02, 0xf1, 0x09, 0xb8, 0xa0, 0x9d, 0x9d, 0x1d, 0xaf, 0xff, 0xec, 0xd8, 0x8e, - 0x8c, 0x2a, 0xe5, 0x94, 0x78, 0xe6, 0xf7, 0xde, 0xbc, 0xdf, 0x6f, 0xde, 0xbc, 0x99, 0xb7, 0x90, - 0xb7, 0x7d, 0x8c, 0xdd, 0x87, 0x0e, 0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xe4, 0x60, + 0x62, 0x79, 0xf9, 0x19, 0x2a, 0xcb, 0x5a, 0x95, 0xad, 0xef, 0x67, 0x49, 0x95, 0x65, 0x49, 0x75, + 0x07, 0x5b, 0x36, 0x13, 0x24, 0xc4, 0xdf, 0xcc, 0xf9, 0x8a, 0x0c, 0x30, 0x29, 0xbf, 0x02, 0x97, + 0x04, 0xe4, 0xb9, 0x48, 0x0f, 0x02, 0x91, 0xde, 0x47, 0x2d, 0xf4, 0xec, 0x44, 0x7a, 0x03, 0x56, + 0x4d, 0xea, 0xba, 0xc1, 0x36, 0xb8, 0x41, 0x77, 0xb8, 0x27, 0xd9, 0x8a, 0x39, 0xb0, 0x72, 0xcd, + 0x10, 0x33, 0x4b, 0x8a, 0x98, 0x33, 0xfb, 0x5d, 0x02, 0xa0, 0x38, 0x2a, 0xd3, 0xf3, 0x24, 0x12, + 0xdd, 0xdd, 0xcc, 0x64, 0x76, 0x77, 0x05, 0xe4, 0x1e, 0x37, 0x4e, 0xf9, 0x0f, 0x09, 0xce, 0xef, + 0x12, 0xf3, 0x53, 0xcb, 0xdb, 0x37, 0x5c, 0xed, 0xe0, 0xb9, 0x72, 0x7e, 0x1b, 0xe6, 0x0e, 0x58, + 0x1c, 0x69, 0x49, 0x73, 0x83, 0x24, 0xd6, 0x39, 0x58, 0x8e, 0xd0, 0xe3, 0xb4, 0x1f, 0x4f, 0xd3, + 0x9d, 0xde, 0x3b, 0xd0, 0x9c, 0xbb, 0x9d, 0x09, 0xed, 0xf4, 0x36, 0x14, 0x87, 0xb2, 0x8e, 0x1f, + 0x76, 0x65, 0x90, 0xfc, 0xed, 0xf0, 0xf8, 0xdf, 0x80, 0x7c, 0x82, 0x72, 0x61, 0x19, 0xc8, 0x0d, + 0x93, 0x8e, 0xc8, 0x57, 0x60, 0x91, 0x74, 0x74, 0x1d, 0x11, 0x82, 0xdd, 0xa0, 0x6e, 0xd0, 0xaa, + 0x90, 0xad, 0x67, 0xf9, 0xb0, 0x5f, 0x36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 0xc1, 0xdd, + 0x3b, 0x33, 0xfe, 0xc3, 0x29, 0x38, 0xca, 0x7d, 0x62, 0x70, 0xa5, 0xfe, 0x91, 0x68, 0x92, 0x47, + 0x6b, 0xde, 0xa4, 0xa4, 0x9a, 0xc4, 0x91, 0x16, 0x08, 0x91, 0x19, 0x5f, 0x88, 0x02, 0xac, 0x0d, + 0x70, 0xe5, 0x4a, 0xfc, 0x1d, 0x34, 0x3b, 0xbd, 0x8a, 0x77, 0x76, 0x75, 0x08, 0x9a, 0xa7, 0x28, + 0x53, 0xae, 0xc2, 0x4f, 0x41, 0x5f, 0x10, 0x3b, 0x72, 0xb7, 0xb1, 0xab, 0x23, 0x5a, 0x43, 0x4e, + 0xdb, 0xfe, 0x0d, 0x53, 0x72, 0x7a, 0xdc, 0xe2, 0x18, 0x6f, 0x02, 0x83, 0x8e, 0x20, 0x29, 0xd6, + 0x90, 0xd3, 0xe6, 0x93, 0x2c, 0x64, 0x76, 0x89, 0x29, 0x7f, 0x27, 0x41, 0x3e, 0xb1, 0x2b, 0xdc, + 0x4a, 0xec, 0x47, 0x05, 0xed, 0x94, 0xf2, 0xce, 0x69, 0xac, 0xc2, 0xc0, 0x68, 0x40, 0x89, 0x1d, + 0x98, 0x30, 0xa0, 0x24, 0x2b, 0x71, 0x40, 0xa3, 0x7a, 0x27, 0xf9, 0x0b, 0x38, 0x17, 0xf6, 0x4d, + 0x97, 0xc4, 0x8e, 0x28, 0x48, 0xb9, 0x9a, 0x02, 0xc4, 0x9d, 0x7f, 0x09, 0x73, 0xbc, 0x43, 0xb9, + 0x2c, 0x32, 0x0c, 0x51, 0xca, 0x6b, 0x69, 0x50, 0xd1, 0xe0, 0xc3, 0x57, 0x99, 0x30, 0x78, 0x06, + 0x12, 0x07, 0x1f, 0xbb, 0x51, 0xe4, 0xcf, 0x60, 0x96, 0x3d, 0x77, 0xca, 0x42, 0x33, 0x8a, 0x51, + 0xd6, 0x47, 0x63, 0xb8, 0xe7, 0xaf, 0xe0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, 0xcd, 0xb2, 0xd5, 0xc8, 0x27, 0xe0, + 0xc3, 0xd8, 0xb7, 0xec, 0x23, 0x07, 0x91, 0xe6, 0x2c, 0xfd, 0x08, 0x7c, 0xfd, 0x69, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xc0, 0x3e, 0x98, 0x79, 0xf3, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2948,18 +2948,18 @@ func (m *MsgCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if len(m.ExitStorageProvider) > 0 { + i -= len(m.ExitStorageProvider) + copy(dAtA[i:], m.ExitStorageProvider) + i = encodeVarintTx(dAtA, i, uint64(len(m.ExitStorageProvider))) + i-- + dAtA[i] = 0x12 + } 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.Operator) > 0 { - i -= len(m.Operator) - copy(dAtA[i:], m.Operator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -3567,11 +3567,11 @@ func (m *MsgCompleteStorageProviderExit) Size() (n int) { } var l int _ = l - l = len(m.Operator) + l = len(m.StorageProvider) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.StorageProvider) + l = len(m.ExitStorageProvider) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -5735,7 +5735,7 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5763,11 +5763,11 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operator = string(dAtA[iNdEx:postIndex]) + m.StorageProvider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageProvider", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExitStorageProvider", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5795,7 +5795,7 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.StorageProvider = string(dAtA[iNdEx:postIndex]) + m.ExitStorageProvider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex From 22e3b8d7c7dea63d80883e46911bd26b601d47f7 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 14 Dec 2023 20:19:25 +0800 Subject: [PATCH 10/27] fix comments --- e2e/tests/virtualgroup_test.go | 45 +++++++++----- x/challenge/abci.go | 1 + x/challenge/keeper/msg_server_submit.go | 1 + x/storage/keeper/keeper.go | 2 +- x/virtualgroup/keeper/keeper.go | 58 +++++++++---------- x/virtualgroup/keeper/msg_server.go | 19 +++--- x/virtualgroup/keeper/v1/params.pb.go | 19 +++--- x/virtualgroup/module.go | 2 +- .../types/expected_keepers_mocks.go | 5 ++ 9 files changed, 82 insertions(+), 70 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 188e4eebb..459eeabda 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -797,8 +797,8 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 7. SP-x complete exit, it would fail due to there are family and GVG binded to it. s.SendTxBlockWithExpectErrorString( &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ - Operator: spx.OperatorKey.GetAddr().String(), - StorageProvider: spx.OperatorKey.GetAddr().String()}, + StorageProvider: spx.OperatorKey.GetAddr().String(), + ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, spx.OperatorKey, "not swap out from all the family") @@ -857,8 +857,8 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 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{ - Operator: spx.OperatorKey.GetAddr().String(), - StorageProvider: spx.OperatorKey.GetAddr().String()}, + StorageProvider: spx.OperatorKey.GetAddr().String(), + ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, spx.OperatorKey, "not swap out from all the gvgs") @@ -908,7 +908,7 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 23. SP-x complete exit success s.SendTxBlock( spx.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, ) // 24 SP-x no longer found on chain @@ -957,8 +957,8 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { s.SendTxBlock( spx.OperatorKey, &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ - Operator: spx.OperatorKey.GetAddr().String(), - StorageProvider: spx.OperatorKey.GetAddr().String()}, + StorageProvider: spx.OperatorKey.GetAddr().String(), + ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) @@ -1001,24 +1001,32 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { 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 by sp-z + // 11 complete SPy's exit by sp-z s.SendTxBlock( - spy.OperatorKey, + spz.OperatorKey, &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ - Operator: spz.OperatorKey.GetAddr().String(), - StorageProvider: spy.OperatorKey.GetAddr().String()}, + StorageProvider: spz.OperatorKey.GetAddr().String(), + ExitStorageProvider: spy.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) s.Require().Error(err) } func (s *VirtualGroupTestSuite) TestSPForceExit() { + ctx := context.Background() user := s.GenAndChargeAccounts(1, 1000000)[0] // 1. create SPs spx := s.BaseSuite.CreateNewStorageProvider() spy := s.BaseSuite.CreateNewStorageProvider() + + // gov module balance + govModuleBalance, err := s.Client.Balance(context.Background(), &types2.QueryBalanceRequest{ + Denom: s.Config.Denom, + Address: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + }) + s.Require().NoError(err) // 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) @@ -1093,7 +1101,7 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) - // object not found + // swapin info not found _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupId: gvgID, }) @@ -1131,10 +1139,17 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { // 11 SP-y help complete the exit s.SendTxBlock( spy.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{Operator: spy.OperatorKey.GetAddr().String(), StorageProvider: spx.OperatorKey.GetAddr().String()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spy.OperatorKey.GetAddr().String(), ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, ) - _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) + + govModuleBalanceAfterSPForcedExit, err := s.Client.Balance(context.Background(), &types2.QueryBalanceRequest{ + Denom: s.Config.Denom, + Address: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + }) + s.Require().NoError(err) + s.Require().Equal(govModuleBalance.Balance.Amount.Add(types.NewIntFromInt64WithDecimal(10000, types.DecimalBNB)), govModuleBalanceAfterSPForcedExit.Balance.Amount) } func (s *VirtualGroupTestSuite) updateParams(params virtualgroupmoduletypes.Params) { @@ -1273,7 +1288,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { // sp-x completes the exit s.SendTxBlock( spx.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) diff --git a/x/challenge/abci.go b/x/challenge/abci.go index 990bed693..c6fc07360 100644 --- a/x/challenge/abci.go +++ b/x/challenge/abci.go @@ -2,6 +2,7 @@ package challenge import ( "fmt" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/challenge/keeper/msg_server_submit.go b/x/challenge/keeper/msg_server_submit.go index d8b32de1a..291824e48 100644 --- a/x/challenge/keeper/msg_server_submit.go +++ b/x/challenge/keeper/msg_server_submit.go @@ -2,6 +2,7 @@ package keeper import ( "context" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "cosmossdk.io/errors" diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 940d00983..25d25ad05 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -1182,7 +1182,7 @@ func (k Keeper) DiscontinueObject(ctx sdk.Context, operator sdk.AccAddress, buck } swapInInfo, found := k.virtualGroupKeeper.GetSwapInInfo(ctx, bucketInfo.GlobalVirtualGroupFamilyId, virtualgroupmoduletypes.NoSpecifiedGVGId) if !found || 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") + return errors.Wrapf(types.ErrAccessDenied, "the sp is not allowed to do discontinue objects") } } diff --git a/x/virtualgroup/keeper/keeper.go b/x/virtualgroup/keeper/keeper.go index dfccefcc8..a74b50091 100644 --- a/x/virtualgroup/keeper/keeper.go +++ b/x/virtualgroup/keeper/keeper.go @@ -708,31 +708,26 @@ func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, succes func (k Keeper) setSwapInInfo(ctx sdk.Context, key []byte, successorSPID, targetSPID uint32, curTime uint64) error { store := ctx.KVStore(k.storeKey) + swapInInfo := &types.SwapInInfo{ + SuccessorSpId: successorSPID, + TargetSpId: targetSPID, + ExpirationTime: curTime + k.SwapInValidityPeriod(ctx), + } 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 { - curSwapInInfo := &types.SwapInInfo{} - k.cdc.MustUnmarshal(bz, curSwapInInfo) - if curTime < curSwapInInfo.ExpirationTime { - return types.ErrSwapInFailed.Wrapf("already exist SP(ID=%d) try to swap in", curSwapInInfo.SuccessorSpId) - } - // override the stale swapIn info of prev successor sp - if curSwapInInfo.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 } + curSwapInInfo := &types.SwapInInfo{} + k.cdc.MustUnmarshal(bz, curSwapInInfo) + if curTime < curSwapInInfo.ExpirationTime { + return types.ErrSwapInFailed.Wrapf("already exist SP(ID=%d) try to swap in", curSwapInInfo.SuccessorSpId) + } + // override the stale swapIn info of prev successor sp + if curSwapInInfo.SuccessorSpId == successorSPID { + return types.ErrSwapInFailed.Wrapf("already tried to swap in but expired") + } + store.Set(key, k.cdc.MustMarshal(swapInInfo)) return nil } @@ -740,8 +735,7 @@ func (k Keeper) DeleteSwapInInfo(ctx sdk.Context, gvgFamilyID, gvgID uint32, suc store := ctx.KVStore(k.storeKey) swapInInfo := types.SwapInInfo{} - if gvgFamilyID != types.NoSpecifiedFamilyId { - key := types.GetSwapInFamilyKey(gvgFamilyID) + deleteSwapInfo := func(key []byte) error { bz := store.Get(key) if bz == nil { return types.ErrSwapInFailed.Wrapf("The swap info not found in blockchain.") @@ -751,17 +745,17 @@ func (k Keeper) DeleteSwapInInfo(ctx sdk.Context, gvgFamilyID, gvgID uint32, suc 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.") + return nil + } + + if gvgFamilyID != types.NoSpecifiedFamilyId { + if err := deleteSwapInfo(types.GetSwapInFamilyKey(gvgFamilyID)); err != nil { + return err } - 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) + } else { + if err := deleteSwapInfo(types.GetSwapInGVGKey(gvgID)); err != nil { + return err } - store.Delete(key) } if err := ctx.EventManager().EmitTypedEvents(&types.EventCancelSwapIn{ diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index 2f284fc90..eee3ae52a 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -2,7 +2,6 @@ package keeper import ( "context" - paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" sdkerrors "cosmossdk.io/errors" "cosmossdk.io/math" @@ -516,7 +515,7 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types return nil, sptypes.ErrStorageProviderNotFound.Wrapf("Invalid address of SP") } - exitSP, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, exitSPAddr) + exitSP, found = k.spKeeper.GetStorageProviderByOperatorAddr(ctx, exitSPAddr) if !found { return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address of SP is not found") } @@ -543,7 +542,7 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types } else { forcedExit = true coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), exitSP.TotalDeposit)) - err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, sptypes.ModuleName, paymenttypes.ModuleName, coins) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, sptypes.ModuleName, govtypes.ModuleName, coins) if err != nil { return nil, err } @@ -631,21 +630,21 @@ func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.Ms 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) + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The SP with operator address %s not found", msg.StorageProvider) } - exittingSPNum := uint32(0) + exitingSPNum := uint32(0) + maxSPExitingNum := k.SpConcurrentExitNum(ctx) sps := k.spKeeper.GetAllStorageProviders(ctx) for _, curSP := range sps { if curSP.Status == sptypes.STATUS_GRACEFUL_EXITING || curSP.Status == sptypes.STATUS_FORCED_EXITING { - exittingSPNum++ + exitingSPNum++ + if exitingSPNum >= maxSPExitingNum { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("%d SP are exiting, allow %d sp exit concurrently", exitingSPNum, maxSPExitingNum) + } } } - maxSPExitingNum := k.SpConcurrentExitNum(ctx) - if exittingSPNum >= maxSPExitingNum { - return nil, sptypes.ErrStorageProviderExitFailed.Wrapf("%d SP are exiting, allow %d sp exit concurrently", exittingSPNum, maxSPExitingNum) - } // Governance can put an SP into force exiting status no matter what status it is in. sp.Status = sptypes.STATUS_FORCED_EXITING diff --git a/x/virtualgroup/keeper/v1/params.pb.go b/x/virtualgroup/keeper/v1/params.pb.go index 145ad035e..14d83dfdc 100644 --- a/x/virtualgroup/keeper/v1/params.pb.go +++ b/x/virtualgroup/keeper/v1/params.pb.go @@ -1,7 +1,4 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: greenfield/virtualgroup/params.proto - -package types +package v1 import ( fmt "fmt" @@ -105,13 +102,13 @@ func (m *Params) GetMaxStoreSizePerFamily() uint64 { return 0 } -func init() { - proto.RegisterType((*Params)(nil), "greenfield.virtualgroup.Params") -} - -func init() { - proto.RegisterFile("greenfield/virtualgroup/params.proto", fileDescriptor_d8ecf89dd5128885) -} +//func init() { +// proto.RegisterType((*Params)(nil), "greenfield.virtualgroup.Params") +//} +// +//func init() { +// proto.RegisterFile("greenfield/virtualgroup/params.proto", fileDescriptor_d8ecf89dd5128885) +//} var fileDescriptor_d8ecf89dd5128885 = []byte{ // 414 bytes of a gzipped FileDescriptorProto diff --git a/x/virtualgroup/module.go b/x/virtualgroup/module.go index 29b3e65f1..f64b43438 100644 --- a/x/virtualgroup/module.go +++ b/x/virtualgroup/module.go @@ -143,7 +143,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return 2 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/virtualgroup/types/expected_keepers_mocks.go b/x/virtualgroup/types/expected_keepers_mocks.go index 06f27e5e2..3ea161160 100644 --- a/x/virtualgroup/types/expected_keepers_mocks.go +++ b/x/virtualgroup/types/expected_keepers_mocks.go @@ -231,6 +231,11 @@ type MockBankKeeper struct { recorder *MockBankKeeperMockRecorder } +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types0.Context, senderModule, recipientModule string, amt types0.Coins) error { + //TODO implement me + panic("implement me") +} + // MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. type MockBankKeeperMockRecorder struct { mock *MockBankKeeper From a107f1d50002468fdbedd16a02453702eda14219 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 15 Dec 2023 16:35:25 +0800 Subject: [PATCH 11/27] fix comment --- app/upgrade.go | 4 +- deployment/localup/localup.sh | 2 +- e2e/core/basesuite.go | 6 +- e2e/tests/virtualgroup_test.go | 52 ++- proto/greenfield/virtualgroup/events.proto | 2 +- proto/greenfield/virtualgroup/tx.proto | 10 +- x/virtualgroup/keeper/msg_server.go | 65 ++- x/virtualgroup/types/events.pb.go | 134 +++--- .../message_complete_storage_provider_exit.go | 24 +- x/virtualgroup/types/tx.pb.go | 430 +++++++++--------- 10 files changed, 382 insertions(+), 347 deletions(-) diff --git a/app/upgrade.go b/app/upgrade.go index f2f640455..77aa0c8c2 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -87,8 +87,8 @@ func (app *App) registerPampasUpgradeHandler() { app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgSwapOut") app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCompleteSwapOut") app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCancelSwapOut") - app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgStorageProviderExit") - app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCompleteStorageProviderExit") + //app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgStorageProviderExit") + //app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCompleteStorageProviderExit") // disable bucket migration. app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.storage.MsgMigrateBucket") diff --git a/deployment/localup/localup.sh b/deployment/localup/localup.sh index afae4a5d2..0bb5fb75f 100644 --- a/deployment/localup/localup.sh +++ b/deployment/localup/localup.sh @@ -174,7 +174,7 @@ function generate_genesis() { echo -e '[[upgrade]]\nname = "Nagqu"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Pampas"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Manchurian"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml - echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml +# echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml done # enable swagger API for validator0 diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index 0ba911dfb..0b41afab9 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -126,9 +126,9 @@ func (s *BaseSuite) InitChain() { func (s *BaseSuite) SetupSuite() { s.Config = InitConfig() - initValidatorOnce.Do(func() { - s.InitChain() - }) + //initValidatorOnce.Do(func() { + // s.InitChain() + //}) s.Client, _ = client.NewGreenfieldClient(s.Config.TendermintAddr, s.Config.ChainId) tmClient := client.NewTendermintClient(s.Config.TendermintAddr) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 459eeabda..4370bbe19 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -797,8 +797,8 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 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(), - ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, + StorageProvider: spx.OperatorKey.GetAddr().String(), + Operator: spx.OperatorKey.GetAddr().String()}, spx.OperatorKey, "not swap out from all the family") @@ -857,8 +857,8 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 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(), - ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, + StorageProvider: spx.OperatorKey.GetAddr().String(), + Operator: spx.OperatorKey.GetAddr().String()}, spx.OperatorKey, "not swap out from all the gvgs") @@ -908,7 +908,7 @@ func (s *VirtualGroupTestSuite) TestSPExit() { // 23. SP-x complete exit success s.SendTxBlock( spx.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), Operator: spx.OperatorKey.GetAddr().String()}, ) // 24 SP-x no longer found on chain @@ -957,8 +957,8 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { s.SendTxBlock( spx.OperatorKey, &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ - StorageProvider: spx.OperatorKey.GetAddr().String(), - ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, + StorageProvider: spx.OperatorKey.GetAddr().String(), + Operator: spx.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) @@ -1005,8 +1005,8 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { s.SendTxBlock( spz.OperatorKey, &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ - StorageProvider: spz.OperatorKey.GetAddr().String(), - ExitStorageProvider: spy.OperatorKey.GetAddr().String()}, + StorageProvider: spy.OperatorKey.GetAddr().String(), + Operator: spz.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) s.Require().Error(err) @@ -1136,10 +1136,11 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { s.Require().Equal(familyID, gvgAfterSwapIn.GlobalVirtualGroup.FamilyId) s.Require().Equal([]uint32{2, 3, 4, 5, 6, 7}, gvgAfterSwapIn.GlobalVirtualGroup.SecondarySpIds) - // 11 SP-y help complete the exit + // 11 User help complete the exit s.SendTxBlock( - spy.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spy.OperatorKey.GetAddr().String(), ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, + user, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), + Operator: user.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) @@ -1288,8 +1289,33 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { // sp-x completes the exit s.SendTxBlock( spx.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), ExitStorageProvider: spx.OperatorKey.GetAddr().String()}, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), + Operator: spx.OperatorKey.GetAddr().String()}, ) _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) } + +func (s *VirtualGroupTestSuite) TestSPExitBeforeHardFork() { + // 1. Create SP-x + spx := s.BaseSuite.CreateNewStorageProvider() + + // 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) + + // 11 complete SPy's exit by sp-z + 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) + +} diff --git a/proto/greenfield/virtualgroup/events.proto b/proto/greenfield/virtualgroup/events.proto index 28512bb72..6f37e22c2 100644 --- a/proto/greenfield/virtualgroup/events.proto +++ b/proto/greenfield/virtualgroup/events.proto @@ -168,7 +168,7 @@ message EventCompleteStorageProviderExit { // The operator address which initials the complete exit transaction, for itself or another SP string operator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The storage address which completes the exit - string exit_storage_provider_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string storage_provider_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_deposit defines the number of tokens deposited by this storage provider for staking. string total_deposit = 4 [ (cosmos_proto.scalar) = "cosmos.Int", diff --git a/proto/greenfield/virtualgroup/tx.proto b/proto/greenfield/virtualgroup/tx.proto index f4543d1d6..124ec557d 100644 --- a/proto/greenfield/virtualgroup/tx.proto +++ b/proto/greenfield/virtualgroup/tx.proto @@ -126,6 +126,8 @@ message MsgSwapOut { common.Approval successor_sp_approval = 5; } +message MsgSwapOutResponse {} + message MsgCompleteSwapOut { option (cosmos.msg.v1.signer) = "storage_provider"; @@ -187,17 +189,15 @@ message MsgStorageProviderExitResponse {} message MsgCompleteStorageProviderExit { option (cosmos.msg.v1.signer) = "storage_provider"; - // storage_provider defines the operator account address of the storage provider who initials this transaction. + // storage_provider defines the operator account address of the storage provider who will exit string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // exit_storage_provider defines the operator account address of the storage provider who need to be completed exit - string exit_storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // operator defines the operator account address of the storage provider who initials this transaction. + string operator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } message MsgCompleteStorageProviderExitResponse {} -message MsgSwapOutResponse {} - message MsgReserveSwapIn { option (cosmos.msg.v1.signer) = "storage_provider"; diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index eee3ae52a..591ffdbe5 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -497,68 +497,61 @@ func (k msgServer) StorageProviderExit(goCtx context.Context, msg *types.MsgStor func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types.MsgCompleteStorageProviderExit) (*types.MsgCompleteStorageProviderExitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - operatorAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) + spAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) - sp, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, operatorAddr) + sp, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, spAddr) if !found { return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be operator address of sp.") } - var exitSP *sptypes.StorageProvider - - isHulunbeierUpgrade := ctx.IsUpgraded(upgradetypes.Hulunbeier) - if !isHulunbeierUpgrade { - exitSP = sp - } else { - exitSPAddr, err := sdk.AccAddressFromHexUnsafe(msg.ExitStorageProvider) - if err != nil { - return nil, sptypes.ErrStorageProviderNotFound.Wrapf("Invalid address of SP") - } - - exitSP, found = k.spKeeper.GetStorageProviderByOperatorAddr(ctx, exitSPAddr) - if !found { - return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address of SP is not found") - } - - if exitSP.Status != sptypes.STATUS_GRACEFUL_EXITING && exitSP.Status != sptypes.STATUS_FORCED_EXITING { - return nil, sptypes.ErrStorageProviderExitFailed.Wrapf( - "sp(id : %d, operator address: %s) is not exiting", exitSP.Id, exitSP.OperatorAddress) - } + if sp.Status != sptypes.STATUS_GRACEFUL_EXITING && sp.Status != sptypes.STATUS_FORCED_EXITING { + return nil, sptypes.ErrStorageProviderExitFailed.Wrapf( + "sp(id : %d, operator address: %s) not in the process of exiting", sp.Id, sp.OperatorAddress) } - err := k.StorageProviderExitable(ctx, exitSP.Id) + err := k.StorageProviderExitable(ctx, sp.Id) if err != nil { return nil, err } var forcedExit bool - if exitSP.Status == sptypes.STATUS_GRACEFUL_EXITING { + if sp.Status == sptypes.STATUS_GRACEFUL_EXITING { // send back the total deposit - coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), exitSP.TotalDeposit)) - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, sptypes.ModuleName, sdk.MustAccAddressFromHex(exitSP.FundingAddress), coins) + coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), sp.TotalDeposit)) + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, sptypes.ModuleName, sdk.MustAccAddressFromHex(sp.FundingAddress), coins) if err != nil { return nil, err } } else { forcedExit = true - coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), exitSP.TotalDeposit)) + coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), sp.TotalDeposit)) err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, sptypes.ModuleName, govtypes.ModuleName, coins) if err != nil { return nil, err } } - err = k.spKeeper.Exit(ctx, exitSP) + err = k.spKeeper.Exit(ctx, sp) if err != nil { return nil, err } - if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ - StorageProviderId: exitSP.Id, - OperatorAddress: sp.OperatorAddress, - ExitStorageProviderAddress: exitSP.OperatorAddress, - TotalDeposit: exitSP.TotalDeposit, - ForcedExit: forcedExit, - }); err != nil { - return nil, err + if ctx.IsUpgraded(upgradetypes.Hulunbeier) { + if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ + StorageProviderId: sp.Id, + OperatorAddress: msg.Operator, + StorageProviderAddress: sp.OperatorAddress, + TotalDeposit: sp.TotalDeposit, + ForcedExit: forcedExit, + }); err != nil { + return nil, err + } + } else { + if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ + StorageProviderId: sp.Id, + OperatorAddress: sp.OperatorAddress, + TotalDeposit: sp.TotalDeposit, + }); err != nil { + return nil, err + } } return &types.MsgCompleteStorageProviderExitResponse{}, nil } diff --git a/x/virtualgroup/types/events.pb.go b/x/virtualgroup/types/events.pb.go index a939c9c04..00a988d89 100644 --- a/x/virtualgroup/types/events.pb.go +++ b/x/virtualgroup/types/events.pb.go @@ -890,7 +890,7 @@ type EventCompleteStorageProviderExit struct { // The operator address which initials the complete exit transaction, for itself or another SP OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` // The storage address which completes the exit - ExitStorageProviderAddress string `protobuf:"bytes,3,opt,name=exit_storage_provider_address,json=exitStorageProviderAddress,proto3" json:"exit_storage_provider_address,omitempty"` + StorageProviderAddress string `protobuf:"bytes,3,opt,name=storage_provider_address,json=storageProviderAddress,proto3" json:"storage_provider_address,omitempty"` // total_deposit defines the number of tokens deposited by this storage provider for staking. TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=total_deposit,json=totalDeposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_deposit"` // forced_exit whether the exit is a forced exit @@ -944,9 +944,9 @@ func (m *EventCompleteStorageProviderExit) GetOperatorAddress() string { return "" } -func (m *EventCompleteStorageProviderExit) GetExitStorageProviderAddress() string { +func (m *EventCompleteStorageProviderExit) GetStorageProviderAddress() string { if m != nil { - return m.ExitStorageProviderAddress + return m.StorageProviderAddress } return "" } @@ -1245,64 +1245,64 @@ func init() { } var fileDescriptor_ece39ea12016bd5b = []byte{ - // 903 bytes of a gzipped FileDescriptorProto + // 898 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xac, 0xdd, 0x12, 0x3f, 0xc7, 0xfd, 0xb3, 0x75, 0xe5, 0xc5, 0x25, 0x8e, 0xb5, 0xa0, - 0xca, 0x97, 0xd8, 0x07, 0xa8, 0x40, 0x82, 0x0b, 0xe9, 0x3f, 0x59, 0x42, 0x34, 0xb2, 0x55, 0x24, - 0xe0, 0xb0, 0x5a, 0xef, 0x4c, 0x36, 0xa3, 0xae, 0x77, 0x56, 0x33, 0xe3, 0x90, 0xf4, 0x4b, 0x80, - 0xf8, 0x2c, 0xfd, 0x00, 0x1c, 0x7b, 0xac, 0x7a, 0x42, 0x3d, 0x54, 0x55, 0xcc, 0x85, 0x1b, 0x47, - 0x84, 0x84, 0x40, 0x3b, 0x33, 0x76, 0xfd, 0xbf, 0x66, 0xd3, 0x0a, 0xe8, 0x29, 0xf1, 0x9b, 0x37, - 0xef, 0xbd, 0xdf, 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xa4, 0xbe, 0xf6, 0xed, 0xc7, 0x63, 0xe7, 0xb1, 0x97, 0xf4, 0xb6, + 0xc3, 0xfd, 0x80, 0x26, 0xed, 0xb1, 0x6f, 0xe2, 0xc3, 0xc9, 0xaf, 0x62, 0x75, 0x42, 0x7b, 0xe7, + 0xd5, 0xb7, 0xec, 0x47, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x45, 0xdf, 0xfc, 0xb5, 0x3d, 0x0f, + 0x00, 0x00, } func (m *EventCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -2001,10 +2001,10 @@ func (m *EventCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (in } i-- dAtA[i] = 0x22 - if len(m.ExitStorageProviderAddress) > 0 { - i -= len(m.ExitStorageProviderAddress) - copy(dAtA[i:], m.ExitStorageProviderAddress) - i = encodeVarintEvents(dAtA, i, uint64(len(m.ExitStorageProviderAddress))) + if len(m.StorageProviderAddress) > 0 { + i -= len(m.StorageProviderAddress) + copy(dAtA[i:], m.StorageProviderAddress) + i = encodeVarintEvents(dAtA, i, uint64(len(m.StorageProviderAddress))) i-- dAtA[i] = 0x1a } @@ -2488,7 +2488,7 @@ func (m *EventCompleteStorageProviderExit) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } - l = len(m.ExitStorageProviderAddress) + l = len(m.StorageProviderAddress) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } @@ -4719,7 +4719,7 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExitStorageProviderAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageProviderAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4747,7 +4747,7 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExitStorageProviderAddress = string(dAtA[iNdEx:postIndex]) + m.StorageProviderAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { diff --git a/x/virtualgroup/types/message_complete_storage_provider_exit.go b/x/virtualgroup/types/message_complete_storage_provider_exit.go index 1ed9b1c5d..1c57e44d8 100644 --- a/x/virtualgroup/types/message_complete_storage_provider_exit.go +++ b/x/virtualgroup/types/message_complete_storage_provider_exit.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) const TypeMsgCompleteStorageProviderExit = "complete_storage_provider_exit" @@ -25,11 +26,16 @@ func (msg *MsgCompleteStorageProviderExit) Type() string { } func (msg *MsgCompleteStorageProviderExit) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + operator, err := sdk.AccAddressFromHexUnsafe(msg.Operator) if err != nil { - panic(err) + spAddr, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) + if err != nil { + panic(err) + } + return []sdk.AccAddress{spAddr} } - return []sdk.AccAddress{creator} + // the operator address will be validated in runtime after harfork and treated as signer + return []sdk.AccAddress{operator} } func (msg *MsgCompleteStorageProviderExit) GetSignBytes() []byte { @@ -40,7 +46,17 @@ func (msg *MsgCompleteStorageProviderExit) GetSignBytes() []byte { func (msg *MsgCompleteStorageProviderExit) ValidateBasic() error { _, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) if err != nil { - return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid operator address (%s)", err) + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid storage provider address (%s)", err) + } + return nil +} + +func (msg *MsgCompleteStorageProviderExit) ValidateRuntime(ctx sdk.Context) error { + if ctx.IsUpgraded(upgradetypes.Hulunbeier) { + _, err := sdk.AccAddressFromHexUnsafe(msg.Operator) + if err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid operator address (%s)", err) + } } return nil } diff --git a/x/virtualgroup/types/tx.pb.go b/x/virtualgroup/types/tx.pb.go index fcce64420..e073d5f7c 100644 --- a/x/virtualgroup/types/tx.pb.go +++ b/x/virtualgroup/types/tx.pb.go @@ -609,6 +609,42 @@ 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"` @@ -625,7 +661,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{11} + return fileDescriptor_478f7001009bf3f2, []int{12} } func (m *MsgCompleteSwapOut) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -682,7 +718,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{12} + return fileDescriptor_478f7001009bf3f2, []int{13} } func (m *MsgCompleteSwapOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -727,7 +763,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{13} + return fileDescriptor_478f7001009bf3f2, []int{14} } func (m *MsgCancelSwapOut) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -784,7 +820,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{14} + return fileDescriptor_478f7001009bf3f2, []int{15} } func (m *MsgCancelSwapOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -830,7 +866,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{15} + return fileDescriptor_478f7001009bf3f2, []int{16} } func (m *MsgSettle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -887,7 +923,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{16} + return fileDescriptor_478f7001009bf3f2, []int{17} } func (m *MsgSettleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -925,7 +961,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{17} + return fileDescriptor_478f7001009bf3f2, []int{18} } func (m *MsgStorageProviderExit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -968,7 +1004,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{18} + return fileDescriptor_478f7001009bf3f2, []int{19} } func (m *MsgStorageProviderExitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -998,17 +1034,17 @@ func (m *MsgStorageProviderExitResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgStorageProviderExitResponse proto.InternalMessageInfo type MsgCompleteStorageProviderExit struct { - // storage_provider defines the operator account address of the storage provider who initials this transaction. + // storage_provider defines the operator account address of the storage provider who will exit StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` - // exit_storage_provider defines the operator account address of the storage provider who need to be completed exit - ExitStorageProvider string `protobuf:"bytes,2,opt,name=exit_storage_provider,json=exitStorageProvider,proto3" json:"exit_storage_provider,omitempty"` + // operator defines the operator account address of the storage provider who initials this transaction. + Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` } func (m *MsgCompleteStorageProviderExit) Reset() { *m = MsgCompleteStorageProviderExit{} } func (m *MsgCompleteStorageProviderExit) String() string { return proto.CompactTextString(m) } func (*MsgCompleteStorageProviderExit) ProtoMessage() {} func (*MsgCompleteStorageProviderExit) Descriptor() ([]byte, []int) { - return fileDescriptor_478f7001009bf3f2, []int{19} + return fileDescriptor_478f7001009bf3f2, []int{20} } func (m *MsgCompleteStorageProviderExit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1044,9 +1080,9 @@ func (m *MsgCompleteStorageProviderExit) GetStorageProvider() string { return "" } -func (m *MsgCompleteStorageProviderExit) GetExitStorageProvider() string { +func (m *MsgCompleteStorageProviderExit) GetOperator() string { if m != nil { - return m.ExitStorageProvider + return m.Operator } return "" } @@ -1060,7 +1096,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{20} + return fileDescriptor_478f7001009bf3f2, []int{21} } func (m *MsgCompleteStorageProviderExitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1089,42 +1125,6 @@ func (m *MsgCompleteStorageProviderExitResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCompleteStorageProviderExitResponse proto.InternalMessageInfo -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{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) -} - -var xxx_messageInfo_MsgSwapOutResponse proto.InternalMessageInfo - 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"` @@ -1543,6 +1543,7 @@ func init() { 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") @@ -1553,7 +1554,6 @@ func init() { 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") @@ -1567,81 +1567,81 @@ func init() { func init() { proto.RegisterFile("greenfield/virtualgroup/tx.proto", fileDescriptor_478f7001009bf3f2) } var fileDescriptor_478f7001009bf3f2 = []byte{ - // 1179 bytes of a gzipped FileDescriptorProto + // 1173 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, 0x62, 0xe2, 0xac, 0x91, 0x6b, 0xb9, 0xa5, - 0x32, 0x29, 0xf5, 0x92, 0x34, 0x50, 0x51, 0x40, 0xa8, 0x09, 0xb4, 0xb2, 0x44, 0x68, 0xe5, 0x88, - 0x3f, 0x02, 0x09, 0x6b, 0xbd, 0x3b, 0xdd, 0x2c, 0xb2, 0x77, 0x56, 0x3b, 0x6b, 0x27, 0x39, 0x21, - 0x71, 0x45, 0x42, 0xdc, 0xe0, 0x33, 0x70, 0xea, 0x81, 0x0f, 0x51, 0x71, 0xaa, 0x38, 0x21, 0x24, - 0x2a, 0x94, 0x54, 0x02, 0x81, 0xf8, 0x04, 0x5c, 0xaa, 0x9d, 0x9d, 0x1d,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1d, 0x34, 0x3b, 0xbd, 0x8a, 0x77, 0x76, 0x75, 0x08, 0x9a, 0xa7, 0x28, - 0x53, 0xae, 0xc2, 0x4f, 0x41, 0x5f, 0x10, 0x3b, 0x72, 0xb7, 0xb1, 0xab, 0x23, 0x5a, 0x43, 0x4e, - 0xdb, 0xfe, 0x0d, 0x53, 0x72, 0x7a, 0xdc, 0xe2, 0x18, 0x6f, 0x02, 0x83, 0x8e, 0x20, 0x29, 0xd6, - 0x90, 0xd3, 0xe6, 0x93, 0x2c, 0x64, 0x76, 0x89, 0x29, 0x7f, 0x27, 0x41, 0x3e, 0xb1, 0x2b, 0xdc, - 0x4a, 0xec, 0x47, 0x05, 0xed, 0x94, 0xf2, 0xce, 0x69, 0xac, 0xc2, 0xc0, 0x68, 0x40, 0x89, 0x1d, - 0x98, 0x30, 0xa0, 0x24, 0x2b, 0x71, 0x40, 0xa3, 0x7a, 0x27, 0xf9, 0x0b, 0x38, 0x17, 0xf6, 0x4d, - 0x97, 0xc4, 0x8e, 0x28, 0x48, 0xb9, 0x9a, 0x02, 0xc4, 0x9d, 0x7f, 0x09, 0x73, 0xbc, 0x43, 0xb9, - 0x2c, 0x32, 0x0c, 0x51, 0xca, 0x6b, 0x69, 0x50, 0xd1, 0xe0, 0xc3, 0x57, 0x99, 0x30, 0x78, 0x06, - 0x12, 0x07, 0x1f, 0xbb, 0x51, 0xe4, 0xcf, 0x60, 0x96, 0x3d, 0x77, 0xca, 0x42, 0x33, 0x8a, 0x51, - 0xd6, 0x47, 0x63, 0xb8, 0xe7, 0xaf, 0xe0, 0x42, 0xdf, 0x07, 0x96, 0x8a, 0xc8, 0x36, 0x8a, 0x54, - 0x5e, 0x4f, 0x8b, 0xe4, 0x6b, 0x7d, 0x0d, 0xcb, 0xc3, 0x1e, 0x06, 0xaa, 0x30, 0xdc, 0x41, 0x03, - 0xe5, 0xc6, 0x98, 0x06, 0x3c, 0x80, 0x1f, 0x24, 0x28, 0x88, 0x9e, 0x28, 0x42,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0xf1, 0x49, 0x6e, 0xea, + 0xd7, 0x93, 0xdc, 0xd4, 0x67, 0x5b, 0xb6, 0xe3, 0xef, 0xb7, 0x6a, 0x41, 0xcf, 0x6f, 0xd6, 0xdc, + 0xda, 0xf5, 0xfa, 0x3e, 0x72, 0x5c, 0x33, 0xf6, 0xa9, 0xf7, 0xb0, 0xe7, 0x9b, 0xf5, 0x91, 0x87, + 0x59, 0x6d, 0x86, 0x7f, 0xec, 0xbd, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x95, 0x96, + 0xd9, 0xdb, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2647,6 +2647,29 @@ func (m *MsgSwapOut) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 *MsgCompleteSwapOut) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2948,10 +2971,10 @@ func (m *MsgCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if len(m.ExitStorageProvider) > 0 { - i -= len(m.ExitStorageProvider) - copy(dAtA[i:], m.ExitStorageProvider) - i = encodeVarintTx(dAtA, i, uint64(len(m.ExitStorageProvider))) + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) i-- dAtA[i] = 0x12 } @@ -2988,29 +3011,6 @@ func (m *MsgCompleteStorageProviderExitResponse) MarshalToSizedBuffer(dAtA []byt 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) @@ -3443,6 +3443,15 @@ func (m *MsgSwapOut) Size() (n int) { return n } +func (m *MsgSwapOutResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgCompleteSwapOut) Size() (n int) { if m == nil { return 0 @@ -3571,7 +3580,7 @@ func (m *MsgCompleteStorageProviderExit) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.ExitStorageProvider) + l = len(m.Operator) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3587,15 +3596,6 @@ func (m *MsgCompleteStorageProviderExitResponse) Size() (n int) { 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 @@ -4891,6 +4891,56 @@ func (m *MsgSwapOut) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgSwapOutResponse) 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: MsgSwapOutResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSwapOutResponse: 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 *MsgCompleteSwapOut) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5767,7 +5817,7 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExitStorageProvider", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5795,7 +5845,7 @@ func (m *MsgCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExitStorageProvider = string(dAtA[iNdEx:postIndex]) + m.Operator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5868,56 +5918,6 @@ func (m *MsgCompleteStorageProviderExitResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSwapOutResponse) 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: MsgSwapOutResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSwapOutResponse: 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 *MsgReserveSwapIn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 3ad7c09dd4e9403cf132aef5ec29e48da4fcb44a Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 10:32:46 +0800 Subject: [PATCH 12/27] fix comment --- deployment/localup/localup.sh | 2 +- e2e/core/basesuite.go | 6 +++--- e2e/tests/virtualgroup_test.go | 24 ----------------------- proto/greenfield/virtualgroup/types.proto | 2 +- x/challenge/abci.go | 8 ++------ x/challenge/keeper/msg_server_submit.go | 8 ++------ x/virtualgroup/keeper/v1/params.pb.go | 10 +++++++--- x/virtualgroup/types/types.pb.go | 10 +++++----- 8 files changed, 21 insertions(+), 49 deletions(-) diff --git a/deployment/localup/localup.sh b/deployment/localup/localup.sh index 0bb5fb75f..afae4a5d2 100644 --- a/deployment/localup/localup.sh +++ b/deployment/localup/localup.sh @@ -174,7 +174,7 @@ function generate_genesis() { echo -e '[[upgrade]]\nname = "Nagqu"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Pampas"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Manchurian"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml -# echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml + echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml done # enable swagger API for validator0 diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index 0b41afab9..0ba911dfb 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -126,9 +126,9 @@ func (s *BaseSuite) InitChain() { func (s *BaseSuite) SetupSuite() { s.Config = InitConfig() - //initValidatorOnce.Do(func() { - // s.InitChain() - //}) + initValidatorOnce.Do(func() { + s.InitChain() + }) s.Client, _ = client.NewGreenfieldClient(s.Config.TendermintAddr, s.Config.ChainId) tmClient := client.NewTendermintClient(s.Config.TendermintAddr) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 4370bbe19..354137e07 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1295,27 +1295,3 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) } - -func (s *VirtualGroupTestSuite) TestSPExitBeforeHardFork() { - // 1. Create SP-x - spx := s.BaseSuite.CreateNewStorageProvider() - - // 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) - - // 11 complete SPy's exit by sp-z - 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) - -} diff --git a/proto/greenfield/virtualgroup/types.proto b/proto/greenfield/virtualgroup/types.proto index 317f045db..83f2a7e62 100644 --- a/proto/greenfield/virtualgroup/types.proto +++ b/proto/greenfield/virtualgroup/types.proto @@ -86,5 +86,5 @@ message SwapInInfo { // 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; + uint64 expiration_time = 3; } diff --git a/x/challenge/abci.go b/x/challenge/abci.go index c6fc07360..240234e6d 100644 --- a/x/challenge/abci.go +++ b/x/challenge/abci.go @@ -3,8 +3,6 @@ package challenge import ( "fmt" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" @@ -90,10 +88,8 @@ func EndBlocker(ctx sdk.Context, keeper k.Keeper) { if !found { continue } - if sp.Status != sptypes.STATUS_IN_SERVICE && sp.Status != sptypes.STATUS_GRACEFUL_EXITING { - if !ctx.IsUpgraded(upgradetypes.Hulunbeier) || sp.Status != sptypes.STATUS_FORCED_EXITING { - continue - } + if sp.Status != sptypes.STATUS_IN_SERVICE && sp.Status != sptypes.STATUS_GRACEFUL_EXITING && sp.Status != sptypes.STATUS_FORCED_EXITING { + continue } mapKey := fmt.Sprintf("%d-%s", spOperatorId, objectInfo.Id.String()) diff --git a/x/challenge/keeper/msg_server_submit.go b/x/challenge/keeper/msg_server_submit.go index 291824e48..549794adc 100644 --- a/x/challenge/keeper/msg_server_submit.go +++ b/x/challenge/keeper/msg_server_submit.go @@ -3,8 +3,6 @@ package keeper import ( "context" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -27,10 +25,8 @@ func (k msgServer) Submit(goCtx context.Context, msg *types.MsgSubmit) (*types.M } sp := k.StorageKeeper.MustGetPrimarySPForBucket(ctx, bucketInfo) - if sp.Status != sptypes.STATUS_IN_SERVICE && sp.Status != sptypes.STATUS_GRACEFUL_EXITING { - if !ctx.IsUpgraded(upgradetypes.Hulunbeier) || sp.Status != sptypes.STATUS_FORCED_EXITING { - return nil, types.ErrInvalidSpStatus - } + if sp.Status != sptypes.STATUS_IN_SERVICE && sp.Status != sptypes.STATUS_GRACEFUL_EXITING && sp.Status != sptypes.STATUS_FORCED_EXITING { + return nil, types.ErrInvalidSpStatus } // check object & read needed data diff --git a/x/virtualgroup/keeper/v1/params.pb.go b/x/virtualgroup/keeper/v1/params.pb.go index 14d83dfdc..1e51d4fb3 100644 --- a/x/virtualgroup/keeper/v1/params.pb.go +++ b/x/virtualgroup/keeper/v1/params.pb.go @@ -2,14 +2,15 @@ package v1 import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" "gopkg.in/yaml.v2" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -28,6 +29,7 @@ type Params struct { // deposit_denom defines the staking coin denomination. DepositDenom string `protobuf:"bytes,1,opt,name=deposit_denom,json=depositDenom,proto3" json:"deposit_denom,omitempty"` // store price, in bnb wei per charge byte + //nolint GvgStakingPerBytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=gvg_staking_per_bytes,json=gvgStakingPerBytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gvg_staking_per_bytes"` // the max number of lvg which allowed in a bucket MaxLocalVirtualGroupNumPerBucket uint32 `protobuf:"varint,3,opt,name=max_local_virtual_group_num_per_bucket,json=maxLocalVirtualGroupNumPerBucket,proto3" json:"max_local_virtual_group_num_per_bucket,omitempty"` @@ -269,6 +271,8 @@ func (m *Params) Size() (n int) { func sovParams(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + +//lint:ignore U1000 Ignore unused function for it is auto generated ealier func sozParams(x uint64) (n int) { return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } diff --git a/x/virtualgroup/types/types.pb.go b/x/virtualgroup/types/types.pb.go index 67bb4be82..a7fcc4390 100644 --- a/x/virtualgroup/types/types.pb.go +++ b/x/virtualgroup/types/types.pb.go @@ -388,7 +388,7 @@ type SwapInInfo struct { // 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"` + ExpirationTime uint64 `protobuf:"varint,3,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` } func (m *SwapInInfo) Reset() { *m = SwapInInfo{} } @@ -500,11 +500,11 @@ var fileDescriptor_1fe6fc664532d0c3 = []byte{ 0x24, 0x52, 0x72, 0x71, 0x6b, 0x0a, 0xcb, 0x63, 0x38, 0x9b, 0x43, 0xef, 0x1d, 0x00, 0x99, 0x56, 0x87, 0x69, 0xa9, 0x3b, 0xb2, 0x9c, 0x3b, 0xb2, 0x60, 0x15, 0x2c, 0x28, 0x24, 0x22, 0xa2, 0x6e, 0x49, 0x03, 0x83, 0x69, 0xc6, 0x0e, 0x58, 0x22, 0xc7, 0x09, 0x15, 0x48, 0x51, 0xce, 0x02, 0x45, - 0x63, 0xa2, 0x4b, 0x2b, 0xf8, 0x8b, 0x13, 0xf8, 0x05, 0x8d, 0x49, 0xeb, 0xf9, 0xd9, 0x55, 0xc5, + 0x63, 0xa2, 0x4d, 0x29, 0xf8, 0x8b, 0x13, 0xf8, 0x05, 0x8d, 0x49, 0xeb, 0xf9, 0xd9, 0x55, 0xc5, 0x39, 0xbf, 0xaa, 0x38, 0x5f, 0xaf, 0x2a, 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, + 0xff, 0xff, 0xa6, 0x34, 0xd1, 0x03, 0x89, 0x05, 0x00, 0x00, } func (m *GlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -811,7 +811,7 @@ func (m *SwapInInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.ExpirationTime != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ExpirationTime)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x18 } if m.TargetSpId != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.TargetSpId)) @@ -1963,7 +1963,7 @@ func (m *SwapInInfo) Unmarshal(dAtA []byte) error { break } } - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", wireType) } From 32cb871d0d2a37e31361489295d8145218c848e8 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 11:36:06 +0800 Subject: [PATCH 13/27] format code --- swagger/static/swagger.yaml | 12 +++--------- x/storage/keeper/cross_app_bucket.go | 3 +-- x/storage/keeper/keeper.go | 3 +-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index d57891ade..813ffc834 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6122,9 +6122,7 @@ paths: sp_concurrent_exit_num: type: integer format: int64 - description: >- - sp_concurrent_exit_num defines the number of sp allowed - for exit concurrently. + description: the the number of sp allowed to exit concurrently. description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -36532,9 +36530,7 @@ definitions: sp_concurrent_exit_num: type: integer format: int64 - description: >- - sp_concurrent_exit_num defines the number of sp allowed for exit - concurrently. + description: the the number of sp allowed to exit concurrently. description: Params defines the parameters for the module. greenfield.virtualgroup.QueryGlobalVirtualGroupByFamilyIDResponse: type: object @@ -36776,9 +36772,7 @@ definitions: sp_concurrent_exit_num: type: integer format: int64 - description: >- - sp_concurrent_exit_num defines the number of sp allowed for exit - concurrently. + description: the the number of sp allowed to exit concurrently. description: QueryParamsResponse is response type for the Query/Params RPC method. greenfield.virtualgroup.QuerySPGVGStatisticsResponse: type: object diff --git a/x/storage/keeper/cross_app_bucket.go b/x/storage/keeper/cross_app_bucket.go index b2f510924..3b9b84870 100644 --- a/x/storage/keeper/cross_app_bucket.go +++ b/x/storage/keeper/cross_app_bucket.go @@ -4,12 +4,11 @@ import ( "encoding/hex" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/bnb-chain/greenfield/types/common" "github.com/bnb-chain/greenfield/x/storage/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) var _ sdk.CrossChainApplication = &BucketApp{} diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index 25d25ad05..c38021f2b 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -4,8 +4,6 @@ import ( "encoding/binary" "fmt" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" "github.com/cometbft/cometbft/libs/log" @@ -13,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/cosmos/gogoproto/proto" "github.com/bnb-chain/greenfield/internal/sequence" From 2828906abfc468de6244af8ae6eeed6e71eff7a5 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 13:15:12 +0800 Subject: [PATCH 14/27] fix swagger yaml due to outdated buf version --- swagger/static/swagger.yaml | 1185 ++++++++++++++++++++++++----------- 1 file changed, 833 insertions(+), 352 deletions(-) diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index 813ffc834..e166f62df 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6373,7 +6373,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -6423,7 +6426,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6433,7 +6436,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6463,6 +6466,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -6577,7 +6581,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -6627,7 +6634,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6637,7 +6644,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6667,6 +6674,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -6785,7 +6793,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -6835,7 +6846,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6845,7 +6856,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6875,6 +6886,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7005,7 +7017,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7055,7 +7070,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7065,7 +7080,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7095,6 +7110,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7253,7 +7269,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7303,7 +7322,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7313,7 +7332,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7343,6 +7362,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7447,7 +7467,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7497,7 +7520,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7507,7 +7530,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7537,6 +7560,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7666,7 +7690,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7716,7 +7743,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7726,7 +7753,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7756,6 +7783,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7882,7 +7910,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7932,7 +7963,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7942,7 +7973,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7972,6 +8003,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8082,7 +8114,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8132,7 +8167,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8142,7 +8177,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8172,6 +8207,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8273,7 +8309,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8323,7 +8362,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8333,7 +8372,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8363,6 +8402,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8467,7 +8507,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8517,7 +8560,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8527,7 +8570,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8557,6 +8600,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8700,7 +8744,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8750,7 +8797,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8760,7 +8807,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8790,6 +8837,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8897,7 +8945,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -8947,7 +8998,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8957,7 +9008,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8987,6 +9038,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9132,7 +9184,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -9182,7 +9237,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9192,7 +9247,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9222,6 +9277,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9406,7 +9462,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -9456,7 +9515,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9466,7 +9525,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9496,6 +9555,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9633,7 +9693,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -9683,7 +9746,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9693,7 +9756,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9723,6 +9786,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9896,7 +9960,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -9946,7 +10013,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9956,7 +10023,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9986,6 +10053,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -10123,7 +10191,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -10173,7 +10244,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -10183,7 +10254,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -10213,6 +10284,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -11845,7 +11917,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -11895,7 +11970,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -11905,7 +11980,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -11935,6 +12010,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -13178,7 +13254,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -13228,7 +13307,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -13238,7 +13317,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -13268,6 +13347,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -14492,7 +14572,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -14542,7 +14625,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14552,7 +14635,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14582,6 +14665,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -14776,7 +14860,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -14826,7 +14913,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14836,7 +14923,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14866,6 +14953,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -14987,7 +15075,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -15037,7 +15128,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15047,7 +15138,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15077,6 +15168,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15189,7 +15281,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -15239,7 +15334,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15249,7 +15344,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15279,6 +15374,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15414,7 +15510,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -15464,7 +15563,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15474,7 +15573,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15504,6 +15603,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15673,7 +15773,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -15723,7 +15826,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15733,7 +15836,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15763,6 +15866,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15898,7 +16002,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -15948,7 +16055,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15958,7 +16065,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15988,6 +16095,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17119,7 +17227,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17169,7 +17280,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17179,7 +17290,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17209,6 +17320,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17338,7 +17450,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17388,7 +17503,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17398,7 +17513,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17428,6 +17543,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17586,7 +17702,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17636,7 +17755,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17646,7 +17765,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17676,6 +17795,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17780,7 +17900,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17830,7 +17953,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17840,7 +17963,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17870,6 +17993,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -18006,7 +18130,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -18093,7 +18220,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -18143,7 +18273,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18153,7 +18283,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18183,6 +18313,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -18318,7 +18449,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -18425,7 +18559,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -18475,7 +18612,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18485,7 +18622,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18515,6 +18652,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -18697,7 +18835,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -18807,7 +18948,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -18857,7 +19001,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18867,7 +19011,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18897,6 +19041,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -19461,7 +19606,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -19511,7 +19659,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19521,7 +19669,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19551,6 +19699,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -19674,7 +19823,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -19724,7 +19876,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19734,7 +19886,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19764,6 +19916,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -19996,7 +20149,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -20046,7 +20202,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20056,7 +20212,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20086,6 +20242,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -20290,7 +20447,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -20340,7 +20500,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20350,7 +20510,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20380,6 +20540,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -20589,7 +20750,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -20639,7 +20803,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20649,7 +20813,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20679,6 +20843,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -20863,7 +21028,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -20913,7 +21081,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20923,7 +21091,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20953,6 +21121,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -21172,7 +21341,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -21222,7 +21394,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21232,7 +21404,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21262,6 +21434,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -21413,7 +21586,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -21463,7 +21639,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21473,7 +21649,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21503,6 +21679,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -21697,7 +21874,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -21747,7 +21927,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21757,7 +21937,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21787,6 +21967,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -22015,7 +22196,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -22065,7 +22249,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22075,7 +22259,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -22105,6 +22289,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -22919,7 +23104,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -22969,7 +23157,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22979,7 +23167,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23009,6 +23197,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -23353,7 +23542,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -23403,7 +23595,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23413,7 +23605,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23443,6 +23635,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -23727,7 +23920,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -23777,7 +23973,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23787,7 +23983,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23817,6 +24013,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -23998,7 +24195,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -24048,7 +24248,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24058,7 +24258,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24088,6 +24288,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -24380,7 +24581,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -24430,7 +24634,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24440,7 +24644,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24470,6 +24674,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -24644,7 +24849,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -24694,7 +24902,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24704,7 +24912,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24734,6 +24942,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25003,7 +25212,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -25053,7 +25265,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25063,7 +25275,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25093,6 +25305,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25297,7 +25510,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are + no widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -25348,7 +25564,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25358,7 +25574,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25388,6 +25604,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25663,7 +25880,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -25713,7 +25933,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25723,7 +25943,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25753,6 +25973,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25915,7 +26136,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -25965,7 +26189,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25975,7 +26199,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26005,6 +26229,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26130,7 +26355,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -26180,7 +26408,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26190,7 +26418,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26220,6 +26448,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26337,7 +26566,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -26387,7 +26619,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26397,7 +26629,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26427,6 +26659,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26719,7 +26952,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -26769,7 +27005,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26779,7 +27015,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26809,6 +27045,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26981,7 +27218,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -27031,7 +27271,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27041,7 +27281,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27071,6 +27311,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -27340,7 +27581,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -27390,7 +27634,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27400,7 +27644,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27430,6 +27674,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -27629,7 +27874,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -27679,7 +27927,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27689,7 +27937,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27719,6 +27967,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -27948,7 +28197,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -27998,7 +28250,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28008,7 +28260,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28038,6 +28290,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -28229,7 +28482,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -28279,7 +28535,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28289,7 +28545,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28319,6 +28575,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -28540,7 +28797,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -28590,7 +28850,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28600,7 +28860,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28630,6 +28890,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -28808,7 +29069,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -28858,7 +29122,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28868,7 +29132,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28898,6 +29162,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29041,7 +29306,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -29091,7 +29359,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29101,7 +29369,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29131,6 +29399,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29275,7 +29544,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -29325,7 +29597,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29335,7 +29607,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29365,6 +29637,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29499,7 +29772,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -29549,7 +29825,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29559,7 +29835,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29589,6 +29865,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29788,7 +30065,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -29838,7 +30118,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29848,7 +30128,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29878,6 +30158,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29993,7 +30274,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -30043,7 +30327,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30053,7 +30337,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30083,6 +30367,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -30204,7 +30489,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -30254,7 +30542,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30264,7 +30552,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30294,6 +30582,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -30577,7 +30866,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -30627,7 +30919,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30637,7 +30929,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30667,6 +30959,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -30833,7 +31126,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -30883,7 +31179,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30893,7 +31189,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30923,6 +31219,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31075,7 +31372,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -31125,7 +31425,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31135,7 +31435,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31165,6 +31465,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31343,7 +31644,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -31393,7 +31697,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31403,7 +31707,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31433,6 +31737,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31791,7 +32096,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -31838,7 +32146,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31848,7 +32156,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31874,6 +32182,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31995,7 +32304,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -32045,7 +32357,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -32055,7 +32367,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -32081,6 +32393,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -36910,7 +37223,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -36958,7 +37274,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -36968,7 +37284,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -36994,6 +37310,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37127,7 +37444,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -37177,7 +37497,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37187,7 +37507,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37214,6 +37534,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37308,7 +37629,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37356,7 +37680,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37366,7 +37690,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37392,6 +37716,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37481,7 +37806,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -37531,7 +37859,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37541,7 +37869,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37567,6 +37895,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37676,7 +38005,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37724,7 +38056,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37734,7 +38066,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37760,6 +38092,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37849,7 +38182,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -37899,7 +38235,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37909,7 +38245,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37935,6 +38271,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38047,7 +38384,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38095,7 +38435,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38105,7 +38445,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38131,6 +38471,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38231,7 +38572,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38279,7 +38623,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38289,7 +38633,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38315,6 +38659,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38419,7 +38764,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -38469,7 +38817,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38479,7 +38827,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38508,6 +38856,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38636,7 +38985,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -38686,7 +39038,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38696,7 +39048,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38725,6 +39077,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38849,7 +39202,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -38899,7 +39255,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38909,7 +39265,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38938,6 +39294,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -42587,7 +42944,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -42637,7 +42997,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -42647,7 +43007,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -42676,6 +43036,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -42886,7 +43247,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -42936,7 +43300,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -42946,7 +43310,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -42975,6 +43339,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -43244,7 +43609,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -43292,7 +43660,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43302,7 +43670,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43328,6 +43696,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -46265,7 +46634,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -46315,7 +46687,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46325,7 +46697,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46351,6 +46723,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -46459,7 +46832,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46507,7 +46883,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46517,7 +46893,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46543,6 +46919,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -46640,7 +47017,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46722,7 +47102,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -46811,7 +47194,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -46923,7 +47309,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -47319,7 +47708,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -47369,7 +47761,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47379,7 +47771,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -47405,6 +47797,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -47843,7 +48236,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -47893,7 +48289,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47903,7 +48299,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -47932,6 +48328,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -48125,7 +48522,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -48175,7 +48575,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -48185,7 +48585,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -48215,6 +48615,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -49272,7 +49673,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -49322,7 +49726,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -49332,7 +49736,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -49361,6 +49765,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -49873,7 +50278,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -49923,7 +50331,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -49933,7 +50341,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -49960,6 +50368,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -50211,7 +50620,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -50261,7 +50673,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50271,7 +50683,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50300,6 +50712,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -50655,7 +51068,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -50705,7 +51121,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50715,7 +51131,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50745,6 +51161,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -51340,7 +51757,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -51390,7 +51810,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51400,7 +51820,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51427,6 +51847,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -51758,7 +52179,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -51808,7 +52232,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51818,7 +52242,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51847,6 +52271,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -52456,7 +52881,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -52504,7 +52932,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52514,7 +52942,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52540,6 +52968,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -52891,7 +53320,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -52941,7 +53373,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52951,7 +53383,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52977,6 +53409,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -53165,7 +53598,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -53213,7 +53649,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53223,7 +53659,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53249,6 +53685,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -53702,7 +54139,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -53752,7 +54192,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53762,7 +54202,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53789,6 +54229,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -54654,7 +55095,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -54704,7 +55148,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -54714,7 +55158,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -54741,6 +55185,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -54978,7 +55423,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -55028,7 +55476,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55038,7 +55486,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55067,6 +55515,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -55439,7 +55888,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -55487,7 +55939,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55497,7 +55949,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55523,6 +55975,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -55726,7 +56179,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -55776,7 +56232,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55786,7 +56242,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55815,6 +56271,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -55943,7 +56400,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -55993,7 +56453,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56003,7 +56463,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56032,6 +56492,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56154,7 +56615,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -56204,7 +56668,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56214,7 +56678,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56243,6 +56707,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56338,7 +56803,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -56388,7 +56856,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56398,7 +56866,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56427,6 +56895,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56542,7 +57011,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -56592,7 +57064,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56602,7 +57074,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56628,6 +57100,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56743,7 +57216,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -56793,7 +57269,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56803,7 +57279,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56829,6 +57305,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56919,7 +57396,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -56969,7 +57449,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56979,7 +57459,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -57005,6 +57485,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular From 260c500465fd52d622b70d8388c626e9e2cdb3f5 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 14:35:44 +0800 Subject: [PATCH 15/27] refine the code --- app/upgrade.go | 15 +- e2e/tests/virtualgroup_test.go | 6 +- proto/greenfield/virtualgroup/events.proto | 10 +- proto/greenfield/virtualgroup/tx.proto | 20 +- proto/greenfield/virtualgroup/types.proto | 2 +- swagger/static/swagger.yaml | 6 +- x/storage/keeper/keeper.go | 7 - x/virtualgroup/keeper/keeper.go | 121 +++----- x/virtualgroup/keeper/msg_server.go | 19 +- x/virtualgroup/module.go | 6 +- x/virtualgroup/types/events.pb.go | 253 +++++++++------- x/virtualgroup/types/message.go | 2 +- .../message_storage_provider_force_exit.go | 20 +- x/virtualgroup/types/tx.pb.go | 284 +++++++++--------- x/virtualgroup/types/types.pb.go | 2 +- 15 files changed, 386 insertions(+), 387 deletions(-) diff --git a/app/upgrade.go b/app/upgrade.go index 77aa0c8c2..325f543a3 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -1,6 +1,8 @@ package app import ( + virtualgroupmodule "github.com/bnb-chain/greenfield/x/virtualgroup" + virtualgrouptypes "github.com/bnb-chain/greenfield/x/virtualgroup/types" serverconfig "github.com/cosmos/cosmos-sdk/server/config" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -87,8 +89,8 @@ func (app *App) registerPampasUpgradeHandler() { app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgSwapOut") app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCompleteSwapOut") app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCancelSwapOut") - //app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgStorageProviderExit") - //app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCompleteStorageProviderExit") + app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgStorageProviderExit") + app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.virtualgroup.MsgCompleteStorageProviderExit") // disable bucket migration. app.GashubKeeper.DeleteMsgGasParams(ctx, "/greenfield.storage.MsgMigrateBucket") @@ -126,7 +128,6 @@ func (app *App) registerManchurianUpgradeHandler() { app.UpgradeKeeper.SetUpgradeInitializer(upgradetypes.Manchurian, func() error { app.Logger().Info("Init Manchurian upgrade") - return nil }) } @@ -141,7 +142,7 @@ func (app *App) registerHulunbeierUpgradeHandler() { app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCancelSwapIn", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteSwapIn", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderForceExit", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderForcedExit", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderExit", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteStorageProviderExit", 1.2e3)) @@ -152,7 +153,11 @@ func (app *App) registerHulunbeierUpgradeHandler() { app.UpgradeKeeper.SetUpgradeInitializer(upgradetypes.Hulunbeier, func() error { app.Logger().Info("Init Hulunbeier upgrade") - + mm, ok := app.mm.Modules[virtualgrouptypes.ModuleName].(*virtualgroupmodule.AppModule) + if !ok { + panic("*virtualgroupmodule.AppModule not found") + } + mm.SetConsensusVersion(2) return nil }) } diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 354137e07..7b8938841 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1012,7 +1012,7 @@ func (s *VirtualGroupTestSuite) TestSPExit2() { s.Require().Error(err) } -func (s *VirtualGroupTestSuite) TestSPForceExit() { +func (s *VirtualGroupTestSuite) TestSPForcedExit() { ctx := context.Background() user := s.GenAndChargeAccounts(1, 1000000)[0] @@ -1041,9 +1041,9 @@ func (s *VirtualGroupTestSuite) TestSPForceExit() { // 3. create a proposal that puts SP-x to FORCE_EXIT govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - msgForceExit := virtualgroupmoduletypes.NewMsgStorageProviderForceExit(govAddr, spx.OperatorKey.GetAddr()) + msgForcedExit := virtualgroupmoduletypes.NewMsgStorageProviderForcedExit(govAddr, spx.OperatorKey.GetAddr()) - proposal, err := v1.NewMsgSubmitProposal([]sdk.Msg{msgForceExit}, sdk.NewCoins(sdk.NewCoin("BNB", sdk.NewInt(1000000000000000000))), + proposal, err := v1.NewMsgSubmitProposal([]sdk.Msg{msgForcedExit}, 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) diff --git a/proto/greenfield/virtualgroup/events.proto b/proto/greenfield/virtualgroup/events.proto index 6f37e22c2..5c3068d31 100644 --- a/proto/greenfield/virtualgroup/events.proto +++ b/proto/greenfield/virtualgroup/events.proto @@ -165,9 +165,9 @@ message EventStorageProviderExit { message EventCompleteStorageProviderExit { // The id of the storage provider who complete exit uint32 storage_provider_id = 1; - // The operator address which initials the complete exit transaction, for itself or another SP + // The operator address which initials the complete exit transaction. string operator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // The storage address which completes the exit + // The storage provider address which completes the exit string storage_provider_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // total_deposit defines the number of tokens deposited by this storage provider for staking. string total_deposit = 4 [ @@ -179,7 +179,7 @@ message EventCompleteStorageProviderExit { bool forced_exit = 5; } -message EventSwapIn { +message EventReserveSwapIn { // 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 @@ -188,6 +188,8 @@ message EventSwapIn { uint32 global_virtual_group_id = 3; // The id of the target sp who will be swapped uint32 target_sp_id = 4; + // the expiration time of this reserved swapIn + uint64 expiration_time = 5; } message EventCompleteSwapIn { @@ -212,7 +214,7 @@ message EventCancelSwapIn { uint32 target_sp_id = 4; } -message EventStorageProviderForceExit { +message EventStorageProviderForcedExit { // The id of the storage provider who wants to exit uint32 storage_provider_id = 1; } diff --git a/proto/greenfield/virtualgroup/tx.proto b/proto/greenfield/virtualgroup/tx.proto index 124ec557d..63e045c49 100644 --- a/proto/greenfield/virtualgroup/tx.proto +++ b/proto/greenfield/virtualgroup/tx.proto @@ -33,9 +33,9 @@ service Msg { rpc CancelSwapIn(MsgCancelSwapIn) returns (MsgCancelSwapInResponse); rpc CompleteSwapIn(MsgCompleteSwapIn) returns (MsgCompleteSwapInResponse); - // StorageProviderForceExit defines a governance operation for a SP force exit + // StorageProviderForcedExit defines a governance operation for a SP to be forced to exit // The authority is defined in the keeper. - rpc StorageProviderForceExit(MsgStorageProviderForceExit) returns (MsgStorageProviderForceExitResponse); + rpc StorageProviderForcedExit(MsgStorageProviderForcedExit) returns (MsgStorageProviderForcedExitResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -192,7 +192,7 @@ message MsgCompleteStorageProviderExit { // storage_provider defines the operator account address of the storage provider who will exit string storage_provider = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // operator defines the operator account address of the storage provider who initials this transaction. + // operator defines the operator account address who initials this transaction. string operator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } @@ -210,7 +210,7 @@ message MsgReserveSwapIn { // 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. + // It allows to be empty only when the operator wants to be the successor primary storage provider in a family. uint32 global_virtual_group_id = 4; } @@ -219,14 +219,14 @@ 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. + // storage_provider defines the operator account address of the storage provider who wants 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. + // It allows to be empty only when the operator wants to be the successor primary storage provider in a family. uint32 global_virtual_group_id = 3; } @@ -242,21 +242,21 @@ message MsgCancelSwapIn { // 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. + // It allows to be empty only when the operator wants to be the successor primary storage provider in a family. uint32 global_virtual_group_id = 3; } message MsgCancelSwapInResponse {} // this line is used by starport scaffolding # proto/tx/message -message MsgStorageProviderForceExit { +message MsgStorageProviderForcedExit { 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 + // storage_provider defines the account address of the storage provider forced to exit string storage_provider = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -message MsgStorageProviderForceExitResponse {} +message MsgStorageProviderForcedExitResponse {} diff --git a/proto/greenfield/virtualgroup/types.proto b/proto/greenfield/virtualgroup/types.proto index 83f2a7e62..0104d1890 100644 --- a/proto/greenfield/virtualgroup/types.proto +++ b/proto/greenfield/virtualgroup/types.proto @@ -81,7 +81,7 @@ message SwapOutInfo { } message SwapInInfo { - // successor_sp_id defines the id of sp who want to join the family or GVG + // successor_sp_id defines the id of SP who wants 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; diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index e166f62df..64d6bc878 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6253,7 +6253,7 @@ paths: type: integer format: int64 title: >- - successor_sp_id defines the id of sp who want to join the + successor_sp_id defines the id of SP who wants to join the family or GVG target_sp_id: type: integer @@ -37142,7 +37142,7 @@ definitions: type: integer format: int64 title: >- - successor_sp_id defines the id of sp who want to join the family + successor_sp_id defines the id of SP who wants to join the family or GVG target_sp_id: type: integer @@ -37159,7 +37159,7 @@ definitions: type: integer format: int64 title: >- - successor_sp_id defines the id of sp who want to join the family or + successor_sp_id defines the id of SP who wants to join the family or GVG target_sp_id: type: integer diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index c38021f2b..c66101235 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -904,13 +904,6 @@ func (k Keeper) DeleteObject( } spInState := k.MustGetPrimarySPForBucket(ctx, bucketInfo) - - if ctx.IsUpgraded(upgradetypes.Hulunbeier) { - if spInState.Status == sptypes.STATUS_GRACEFUL_EXITING || spInState.Status == sptypes.STATUS_FORCED_EXITING { - return types.ErrUpdateQuotaFailed.Wrapf("The SP is in %s, object can not be deleted", spInState.Status) - } - } - internalBucketInfo := k.MustGetInternalBucketInfo(ctx, bucketInfo.Id) err := k.UnChargeObjectStoreFee(ctx, spInState.Id, bucketInfo, internalBucketInfo, objectInfo) diff --git a/x/virtualgroup/keeper/keeper.go b/x/virtualgroup/keeper/keeper.go index a74b50091..d05a8d20e 100644 --- a/x/virtualgroup/keeper/keeper.go +++ b/x/virtualgroup/keeper/keeper.go @@ -278,8 +278,7 @@ func (k Keeper) GetAvailableStakingTokens(ctx sdk.Context, gvg *types.GlobalVirt return gvg.TotalDeposit.Sub(mustStakingTokens) } -func (k Keeper) SwapOutAsPrimarySP(ctx sdk.Context, primarySP, successorSP *sptypes.StorageProvider, familyID uint32) error { - +func (k Keeper) SwapAsPrimarySP(ctx sdk.Context, primarySP, successorSP *sptypes.StorageProvider, familyID uint32, swapIn bool) error { family, found := k.GetGVGFamily(ctx, familyID) if !found { return types.ErrGVGFamilyNotExist @@ -298,11 +297,20 @@ func (k Keeper) SwapOutAsPrimarySP(ctx sdk.Context, primarySP, successorSP *spty return types.ErrGVGNotExist } if gvg.PrimarySpId != primarySP.Id { + if swapIn { + return types.ErrSwapInFailed.Wrapf( + "the primary id (%d) in global virtual group does not match the target primary sp id (%d)", gvg.PrimarySpId, primarySP.Id) + } return types.ErrSwapOutFailed.Wrapf( "the primary id (%d) in global virtual group is not match the primary sp id (%d)", gvg.PrimarySpId, primarySP.Id) } - for _, spID := range gvg.SecondarySpIds { - if spID == successorSP.Id { + for _, secondarySPID := range gvg.SecondarySpIds { + if secondarySPID == successorSP.Id { + // the successor SP might have played as secondary SP already in this GVG + if swapIn { + dstStat.BreakRedundancyReqmtGvgCount++ + break + } return types.ErrSwapOutFailed.Wrapf("the successor primary sp(ID: %d) can not be the secondary sp of gvg(%s).", successorSP.Id, gvg.String()) } } @@ -327,15 +335,24 @@ func (k Keeper) SwapOutAsPrimarySP(ctx sdk.Context, primarySP, successorSP *spty // settlement err := k.SettleAndDistributeGVGFamily(ctx, primarySP, family) if err != nil { + if swapIn { + return types.ErrSwapInFailed.Wrapf("fail to settle GVG family %d", familyID) + } return types.ErrSwapOutFailed.Wrapf("fail to settle GVG family %d", familyID) } if err := k.SetGVGFamilyAndEmitUpdateEvent(ctx, family); err != nil { + if swapIn { + return types.ErrSwapInFailed.Wrapf("failed to set gvg family and emit update event, err: %s", err) + } 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 { + if swapIn { + return types.ErrSwapInFailed.Wrapf("failed to set gvg and emit update event, err: %s", err) + } return types.ErrSwapOutFailed.Wrapf("failed to set gvg and emit update event, err: %s", err) } } @@ -610,7 +627,7 @@ func (k Keeper) CompleteSwapOut(ctx sdk.Context, gvgFamilyID uint32, gvgIDs []ui return sptypes.ErrStorageProviderNotFound.Wrapf("The storage provider(ID: %d) not found when complete swap out.", swapOutInfo.SpId) } - err := k.SwapOutAsPrimarySP(ctx, sp, successorSP, gvgFamilyID) + err := k.SwapAsPrimarySP(ctx, sp, successorSP, gvgFamilyID, false) if err != nil { return err } @@ -651,9 +668,8 @@ 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. +func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, successorSPID uint32, targetSP *sptypes.StorageProvider, expirationTime int64) error { + // when swapIn a family as primary SP., the target sp needs to be exiting status. if gvgFamilyID != types.NoSpecifiedFamilyId { if targetSP.Status != sptypes.STATUS_GRACEFUL_EXITING && targetSP.Status != sptypes.STATUS_FORCED_EXITING { return sptypes.ErrStorageProviderWrongStatus.Wrapf("The target sp is not exiting, can not be swapped") @@ -665,9 +681,10 @@ func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, succes 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) + return k.setSwapInInfo(ctx, types.GetSwapInFamilyKey(gvgFamilyID), successorSPID, targetSP.Id, expirationTime) } + // swapIn GVG as secondary SP when there is secondary SP exiting gvg, found := k.GetGVG(ctx, gvgID) if !found { return types.ErrGVGNotExist @@ -687,31 +704,30 @@ func (k Keeper) SwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32, succes 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_FORCED_EXITING { - return k.setSwapInInfo(ctx, types.GetSwapInGVGKey(gvgID), successorSPID, targetSP.Id, curTime) + return k.setSwapInInfo(ctx, types.GetSwapInGVGKey(gvgID), successorSPID, targetSP.Id, expirationTime) } - // swap into GVG that not fulfil redundancy requirement. e.g. [1|2,3,4,5,6,1] - breakRedundancy := false + + // swap into GVG that no SP exiting but not fulfil redundancy requirement. e.g. [1|2,3,4,5,6,1] + breakRedundancyReqmt := false for _, sspID := range gvg.GetSecondarySpIds() { if sspID == gvg.PrimarySpId { - breakRedundancy = true + breakRedundancyReqmt = true break } } - if !breakRedundancy { + if !breakRedundancyReqmt { 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) + return k.setSwapInInfo(ctx, types.GetSwapInGVGKey(gvgID), successorSPID, targetSP.Id, expirationTime) } -func (k Keeper) setSwapInInfo(ctx sdk.Context, key []byte, successorSPID, targetSPID uint32, curTime uint64) error { +func (k Keeper) setSwapInInfo(ctx sdk.Context, key []byte, successorSPID, targetSPID uint32, expirationTime int64) error { store := ctx.KVStore(k.storeKey) swapInInfo := &types.SwapInInfo{ SuccessorSpId: successorSPID, TargetSpId: targetSPID, - ExpirationTime: curTime + k.SwapInValidityPeriod(ctx), + ExpirationTime: uint64(expirationTime), } bz := store.Get(key) if bz == nil { @@ -720,8 +736,8 @@ func (k Keeper) setSwapInInfo(ctx sdk.Context, key []byte, successorSPID, target } curSwapInInfo := &types.SwapInInfo{} k.cdc.MustUnmarshal(bz, curSwapInInfo) - if curTime < curSwapInInfo.ExpirationTime { - return types.ErrSwapInFailed.Wrapf("already exist SP(ID=%d) try to swap in", curSwapInInfo.SuccessorSpId) + if uint64(ctx.BlockTime().Unix()) < curSwapInInfo.ExpirationTime { + return types.ErrSwapInFailed.Wrapf("already exist SP(ID=%d) reserved the swap, please re-check the GVG after timestamp %d.", curSwapInInfo.SuccessorSpId, curSwapInInfo.ExpirationTime) } // override the stale swapIn info of prev successor sp if curSwapInInfo.SuccessorSpId == successorSPID { @@ -791,7 +807,7 @@ func (k Keeper) CompleteSwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32 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 { + if err := k.SwapAsPrimarySP(ctx, targetPrimarySP, successorSP, gvgFamilyID, true); err != nil { return err } store.Delete(key) @@ -825,67 +841,6 @@ func (k Keeper) CompleteSwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32 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(successorSP.FundingAddress), sdk.MustAccAddressFromHex(targetPrimarySP.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.ErrSwapInFailed.Wrapf("fail to settle GVG family %d", familyID) - } - - if err := k.SetGVGFamilyAndEmitUpdateEvent(ctx, family); err != nil { - return types.ErrSwapInFailed.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.ErrSwapInFailed.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 { diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index 591ffdbe5..ebd9ef2ac 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -501,7 +501,7 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types sp, found := k.spKeeper.GetStorageProviderByOperatorAddr(ctx, spAddr) if !found { - return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be operator address of sp.") + return nil, sptypes.ErrStorageProviderNotFound.Wrapf("The address must be the operator address of sp.") } if sp.Status != sptypes.STATUS_GRACEFUL_EXITING && sp.Status != sptypes.STATUS_FORCED_EXITING { @@ -535,7 +535,7 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types return nil, err } if ctx.IsUpgraded(upgradetypes.Hulunbeier) { - if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ + if err = ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ StorageProviderId: sp.Id, OperatorAddress: msg.Operator, StorageProviderAddress: sp.OperatorAddress, @@ -545,7 +545,7 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types return nil, err } } else { - if err := ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ + if err = ctx.EventManager().EmitTypedEvents(&types.EventCompleteStorageProviderExit{ StorageProviderId: sp.Id, OperatorAddress: sp.OperatorAddress, TotalDeposit: sp.TotalDeposit, @@ -570,14 +570,17 @@ func (k msgServer) ReserveSwapIn(goCtx context.Context, msg *types.MsgReserveSwa 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 { + expirationTime := ctx.BlockTime().Unix() + int64(k.SwapInValidityPeriod(ctx)) + + if err := k.Keeper.SwapIn(ctx, msg.GlobalVirtualGroupFamilyId, msg.GlobalVirtualGroupId, successorSP.Id, targetSP, expirationTime); err != nil { return nil, err } - if err := ctx.EventManager().EmitTypedEvents(&types.EventSwapIn{ + if err := ctx.EventManager().EmitTypedEvents(&types.EventReserveSwapIn{ StorageProviderId: successorSP.Id, GlobalVirtualGroupFamilyId: msg.GlobalVirtualGroupFamilyId, GlobalVirtualGroupId: msg.GlobalVirtualGroupId, TargetSpId: msg.TargetSpId, + ExpirationTime: uint64(expirationTime), }); err != nil { return nil, err } @@ -613,7 +616,7 @@ func (k msgServer) CompleteSwapIn(goCtx context.Context, msg *types.MsgCompleteS } return &types.MsgCompleteSwapInResponse{}, nil } -func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.MsgStorageProviderForceExit) (*types.MsgStorageProviderForceExitResponse, error) { +func (k msgServer) StorageProviderForcedExit(goCtx context.Context, msg *types.MsgStorageProviderForcedExit) (*types.MsgStorageProviderForcedExitResponse, 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) @@ -642,10 +645,10 @@ func (k msgServer) StorageProviderForceExit(goCtx context.Context, msg *types.Ms // Governance can put an SP into force exiting status no matter what status it is in. sp.Status = sptypes.STATUS_FORCED_EXITING k.spKeeper.SetStorageProvider(ctx, sp) - if err := ctx.EventManager().EmitTypedEvents(&types.EventStorageProviderForceExit{ + if err := ctx.EventManager().EmitTypedEvents(&types.EventStorageProviderForcedExit{ StorageProviderId: sp.Id, }); err != nil { return nil, err } - return &types.MsgStorageProviderForceExitResponse{}, nil + return &types.MsgStorageProviderForcedExitResponse{}, nil } diff --git a/x/virtualgroup/module.go b/x/virtualgroup/module.go index f64b43438..c1050ace8 100644 --- a/x/virtualgroup/module.go +++ b/x/virtualgroup/module.go @@ -96,6 +96,7 @@ type AppModule struct { bankKeeper types.BankKeeper accountKeeper types.AccountKeeper spKeeper types.SpKeeper + version uint64 } func NewAppModule( @@ -107,6 +108,7 @@ func NewAppModule( AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, spKeeper: spKeeper, + version: 1, } } @@ -143,7 +145,9 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 2 } +func (am AppModule) ConsensusVersion() uint64 { return am.version } + +func (am *AppModule) SetConsensusVersion(version uint64) { am.version = version } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/virtualgroup/types/events.pb.go b/x/virtualgroup/types/events.pb.go index 00a988d89..ed1e7a9e8 100644 --- a/x/virtualgroup/types/events.pb.go +++ b/x/virtualgroup/types/events.pb.go @@ -887,9 +887,9 @@ func (m *EventStorageProviderExit) GetOperatorAddress() string { type EventCompleteStorageProviderExit struct { // The id of the storage provider who complete exit StorageProviderId uint32 `protobuf:"varint,1,opt,name=storage_provider_id,json=storageProviderId,proto3" json:"storage_provider_id,omitempty"` - // The operator address which initials the complete exit transaction, for itself or another SP + // The operator address which initials the complete exit transaction. OperatorAddress string `protobuf:"bytes,2,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` - // The storage address which completes the exit + // The storage provider address which completes the exit StorageProviderAddress string `protobuf:"bytes,3,opt,name=storage_provider_address,json=storageProviderAddress,proto3" json:"storage_provider_address,omitempty"` // total_deposit defines the number of tokens deposited by this storage provider for staking. TotalDeposit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=total_deposit,json=totalDeposit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_deposit"` @@ -958,7 +958,7 @@ func (m *EventCompleteStorageProviderExit) GetForcedExit() bool { return false } -type EventSwapIn struct { +type EventReserveSwapIn 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 @@ -967,20 +967,22 @@ type EventSwapIn struct { 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"` + // the expiration time of this reserved swapIn + ExpirationTime uint64 `protobuf:"varint,5,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` } -func (m *EventSwapIn) Reset() { *m = EventSwapIn{} } -func (m *EventSwapIn) String() string { return proto.CompactTextString(m) } -func (*EventSwapIn) ProtoMessage() {} -func (*EventSwapIn) Descriptor() ([]byte, []int) { +func (m *EventReserveSwapIn) Reset() { *m = EventReserveSwapIn{} } +func (m *EventReserveSwapIn) String() string { return proto.CompactTextString(m) } +func (*EventReserveSwapIn) ProtoMessage() {} +func (*EventReserveSwapIn) Descriptor() ([]byte, []int) { return fileDescriptor_ece39ea12016bd5b, []int{14} } -func (m *EventSwapIn) XXX_Unmarshal(b []byte) error { +func (m *EventReserveSwapIn) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventReserveSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventSwapIn.Marshal(b, m, deterministic) + return xxx_messageInfo_EventReserveSwapIn.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -990,46 +992,53 @@ func (m *EventSwapIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *EventSwapIn) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSwapIn.Merge(m, src) +func (m *EventReserveSwapIn) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventReserveSwapIn.Merge(m, src) } -func (m *EventSwapIn) XXX_Size() int { +func (m *EventReserveSwapIn) XXX_Size() int { return m.Size() } -func (m *EventSwapIn) XXX_DiscardUnknown() { - xxx_messageInfo_EventSwapIn.DiscardUnknown(m) +func (m *EventReserveSwapIn) XXX_DiscardUnknown() { + xxx_messageInfo_EventReserveSwapIn.DiscardUnknown(m) } -var xxx_messageInfo_EventSwapIn proto.InternalMessageInfo +var xxx_messageInfo_EventReserveSwapIn proto.InternalMessageInfo -func (m *EventSwapIn) GetStorageProviderId() uint32 { +func (m *EventReserveSwapIn) GetStorageProviderId() uint32 { if m != nil { return m.StorageProviderId } return 0 } -func (m *EventSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { +func (m *EventReserveSwapIn) GetGlobalVirtualGroupFamilyId() uint32 { if m != nil { return m.GlobalVirtualGroupFamilyId } return 0 } -func (m *EventSwapIn) GetGlobalVirtualGroupId() uint32 { +func (m *EventReserveSwapIn) GetGlobalVirtualGroupId() uint32 { if m != nil { return m.GlobalVirtualGroupId } return 0 } -func (m *EventSwapIn) GetTargetSpId() uint32 { +func (m *EventReserveSwapIn) GetTargetSpId() uint32 { if m != nil { return m.TargetSpId } return 0 } +func (m *EventReserveSwapIn) GetExpirationTime() uint64 { + if m != nil { + return m.ExpirationTime + } + 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"` @@ -1174,23 +1183,23 @@ func (m *EventCancelSwapIn) GetTargetSpId() uint32 { return 0 } -type EventStorageProviderForceExit struct { +type EventStorageProviderForcedExit 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) { +func (m *EventStorageProviderForcedExit) Reset() { *m = EventStorageProviderForcedExit{} } +func (m *EventStorageProviderForcedExit) String() string { return proto.CompactTextString(m) } +func (*EventStorageProviderForcedExit) ProtoMessage() {} +func (*EventStorageProviderForcedExit) Descriptor() ([]byte, []int) { return fileDescriptor_ece39ea12016bd5b, []int{17} } -func (m *EventStorageProviderForceExit) XXX_Unmarshal(b []byte) error { +func (m *EventStorageProviderForcedExit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventStorageProviderForceExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventStorageProviderForcedExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventStorageProviderForceExit.Marshal(b, m, deterministic) + return xxx_messageInfo_EventStorageProviderForcedExit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1200,19 +1209,19 @@ func (m *EventStorageProviderForceExit) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *EventStorageProviderForceExit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventStorageProviderForceExit.Merge(m, src) +func (m *EventStorageProviderForcedExit) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventStorageProviderForcedExit.Merge(m, src) } -func (m *EventStorageProviderForceExit) XXX_Size() int { +func (m *EventStorageProviderForcedExit) XXX_Size() int { return m.Size() } -func (m *EventStorageProviderForceExit) XXX_DiscardUnknown() { - xxx_messageInfo_EventStorageProviderForceExit.DiscardUnknown(m) +func (m *EventStorageProviderForcedExit) XXX_DiscardUnknown() { + xxx_messageInfo_EventStorageProviderForcedExit.DiscardUnknown(m) } -var xxx_messageInfo_EventStorageProviderForceExit proto.InternalMessageInfo +var xxx_messageInfo_EventStorageProviderForcedExit proto.InternalMessageInfo -func (m *EventStorageProviderForceExit) GetStorageProviderId() uint32 { +func (m *EventStorageProviderForcedExit) GetStorageProviderId() uint32 { if m != nil { return m.StorageProviderId } @@ -1234,10 +1243,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((*EventReserveSwapIn)(nil), "greenfield.virtualgroup.EventReserveSwapIn") proto.RegisterType((*EventCompleteSwapIn)(nil), "greenfield.virtualgroup.EventCompleteSwapIn") proto.RegisterType((*EventCancelSwapIn)(nil), "greenfield.virtualgroup.EventCancelSwapIn") - proto.RegisterType((*EventStorageProviderForceExit)(nil), "greenfield.virtualgroup.EventStorageProviderForceExit") + proto.RegisterType((*EventStorageProviderForcedExit)(nil), "greenfield.virtualgroup.EventStorageProviderForcedExit") } func init() { @@ -1245,64 +1254,65 @@ func init() { } var fileDescriptor_ece39ea12016bd5b = []byte{ - // 898 bytes of a gzipped FileDescriptorProto + // 927 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xac, 0xdd, 0x12, 0x3f, 0xc7, 0xfd, 0xb3, 0x75, 0xf1, 0x92, 0x52, 0xc7, 0x5a, 0x50, - 0xe5, 0x4b, 0xec, 0x03, 0x54, 0x20, 0xc1, 0x85, 0xf4, 0x9f, 0x2c, 0x21, 0x1a, 0xad, 0x55, 0x24, - 0xb8, 0xac, 0xd6, 0x3b, 0x93, 0xcd, 0xa8, 0xeb, 0x9d, 0xd5, 0xcc, 0x38, 0x24, 0xfd, 0x12, 0x20, - 0x3e, 0x4b, 0x3f, 0x00, 0xc7, 0x1e, 0xab, 0x9e, 0x50, 0x0f, 0x55, 0x95, 0x70, 0xe1, 0x04, 0x67, - 0x24, 0x04, 0xda, 0x99, 0xb1, 0xeb, 0xff, 0x35, 0x9b, 0x56, 0x40, 0x4e, 0x89, 0xdf, 0xbc, 0x79, - 0xef, 0xfd, 0x7e, 0xef, 0x37, 0x6f, 0x66, 0xe1, 0xc3, 0x88, 0x13, 0x92, 0xec, 0x51, 0x12, 0xe3, - 0xf6, 0x01, 0xe5, 0x72, 0x10, 0xc4, 0x11, 0x67, 0x83, 0xb4, 0x4d, 0x0e, 0x48, 0x22, 0x45, 0x2b, - 0xe5, 0x4c, 0x32, 0xbb, 0xf6, 0xca, 0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b, 0x98, + 0x25, 0x8d, 0xa1, 0x8f, 0xe8, 0x83, 0xd1, 0xcf, 0x68, 0xdd, 0xd2, 0xed, 0x8b, 0xfa, 0xe3, 0xf7, + 0xfd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xb9, 0x16, 0x32, 0x6e, 0x0f, 0x00, 0x00, } func (m *EventCreateGlobalVirtualGroup) Marshal() (dAtA []byte, err error) { @@ -2023,7 +2033,7 @@ func (m *EventCompleteStorageProviderExit) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *EventSwapIn) Marshal() (dAtA []byte, err error) { +func (m *EventReserveSwapIn) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2033,16 +2043,21 @@ func (m *EventSwapIn) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventSwapIn) MarshalTo(dAtA []byte) (int, error) { +func (m *EventReserveSwapIn) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventReserveSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.ExpirationTime != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.ExpirationTime)) + i-- + dAtA[i] = 0x28 + } if m.TargetSpId != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.TargetSpId)) i-- @@ -2152,7 +2167,7 @@ func (m *EventCancelSwapIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventStorageProviderForceExit) Marshal() (dAtA []byte, err error) { +func (m *EventStorageProviderForcedExit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2162,12 +2177,12 @@ func (m *EventStorageProviderForceExit) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventStorageProviderForceExit) MarshalTo(dAtA []byte) (int, error) { +func (m *EventStorageProviderForcedExit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventStorageProviderForceExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventStorageProviderForcedExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2500,7 +2515,7 @@ func (m *EventCompleteStorageProviderExit) Size() (n int) { return n } -func (m *EventSwapIn) Size() (n int) { +func (m *EventReserveSwapIn) Size() (n int) { if m == nil { return 0 } @@ -2518,6 +2533,9 @@ func (m *EventSwapIn) Size() (n int) { if m.TargetSpId != 0 { n += 1 + sovEvents(uint64(m.TargetSpId)) } + if m.ExpirationTime != 0 { + n += 1 + sovEvents(uint64(m.ExpirationTime)) + } return n } @@ -2563,7 +2581,7 @@ func (m *EventCancelSwapIn) Size() (n int) { return n } -func (m *EventStorageProviderForceExit) Size() (n int) { +func (m *EventStorageProviderForcedExit) Size() (n int) { if m == nil { return 0 } @@ -4824,7 +4842,7 @@ func (m *EventCompleteStorageProviderExit) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventSwapIn) Unmarshal(dAtA []byte) error { +func (m *EventReserveSwapIn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4847,10 +4865,10 @@ func (m *EventSwapIn) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventSwapIn: wiretype end group for non-group") + return fmt.Errorf("proto: EventReserveSwapIn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventReserveSwapIn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4929,6 +4947,25 @@ func (m *EventSwapIn) Unmarshal(dAtA []byte) error { break } } + case 5: + 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 ErrIntOverflowEvents + } + 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 := skipEvents(dAtA[iNdEx:]) @@ -5202,7 +5239,7 @@ func (m *EventCancelSwapIn) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventStorageProviderForceExit) Unmarshal(dAtA []byte) error { +func (m *EventStorageProviderForcedExit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5225,10 +5262,10 @@ func (m *EventStorageProviderForceExit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventStorageProviderForceExit: wiretype end group for non-group") + return fmt.Errorf("proto: EventStorageProviderForcedExit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventStorageProviderForceExit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventStorageProviderForcedExit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/virtualgroup/types/message.go b/x/virtualgroup/types/message.go index b023dd30c..a0b936b50 100644 --- a/x/virtualgroup/types/message.go +++ b/x/virtualgroup/types/message.go @@ -17,7 +17,7 @@ const ( TypeMsgSwapOut = "swap_out" TypeMsgUpdateParams = "update_params" TypeMsgSettle = "settle" - TypeMsgReserveSwapIn = "swap_in" + TypeMsgReserveSwapIn = "reserve_swap_in" TypeMsgCancelSwapIn = "cancel_swap_in" TypeMsgCompleteSwapIn = "complete_swap_in" ) diff --git a/x/virtualgroup/types/message_storage_provider_force_exit.go b/x/virtualgroup/types/message_storage_provider_force_exit.go index 7bec5eed2..c9e953026 100644 --- a/x/virtualgroup/types/message_storage_provider_force_exit.go +++ b/x/virtualgroup/types/message_storage_provider_force_exit.go @@ -6,35 +6,35 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -const TypeMsgStorageProviderForceExit = "storage_provider_force_exit" +const TypeMsgStorageProviderForcedExit = "storage_provider_force_exit" -var _ sdk.Msg = &MsgStorageProviderForceExit{} +var _ sdk.Msg = &MsgStorageProviderForcedExit{} -func NewMsgStorageProviderForceExit(authority string, spAddress sdk.AccAddress) *MsgStorageProviderForceExit { - return &MsgStorageProviderForceExit{ +func NewMsgStorageProviderForcedExit(authority string, spAddress sdk.AccAddress) *MsgStorageProviderForcedExit { + return &MsgStorageProviderForcedExit{ Authority: authority, StorageProvider: spAddress.String(), } } -func (msg *MsgStorageProviderForceExit) Route() string { +func (msg *MsgStorageProviderForcedExit) Route() string { return RouterKey } -func (msg *MsgStorageProviderForceExit) Type() string { - return TypeMsgStorageProviderForceExit +func (msg *MsgStorageProviderForcedExit) Type() string { + return TypeMsgStorageProviderForcedExit } -func (msg *MsgStorageProviderForceExit) GetSigners() []sdk.AccAddress { +func (msg *MsgStorageProviderForcedExit) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromHexUnsafe(msg.Authority) return []sdk.AccAddress{addr} } -func (msg *MsgStorageProviderForceExit) GetSignBytes() []byte { +func (msg *MsgStorageProviderForcedExit) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) } -func (msg *MsgStorageProviderForceExit) ValidateBasic() error { +func (msg *MsgStorageProviderForcedExit) ValidateBasic() error { if _, err := sdk.AccAddressFromHexUnsafe(msg.Authority); err != nil { return errors.Wrap(err, "invalid authority address") } diff --git a/x/virtualgroup/types/tx.pb.go b/x/virtualgroup/types/tx.pb.go index e073d5f7c..be0ef18b4 100644 --- a/x/virtualgroup/types/tx.pb.go +++ b/x/virtualgroup/types/tx.pb.go @@ -1036,7 +1036,7 @@ var xxx_messageInfo_MsgStorageProviderExitResponse proto.InternalMessageInfo type MsgCompleteStorageProviderExit struct { // storage_provider defines the operator account address of the storage provider who will exit StorageProvider string `protobuf:"bytes,1,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` - // operator defines the operator account address of the storage provider who initials this transaction. + // operator defines the operator account address who initials this transaction. Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` } @@ -1135,7 +1135,7 @@ type MsgReserveSwapIn struct { // 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. + // It allows to be empty only when the operator wants to be the successor primary storage provider in a family. GlobalVirtualGroupId uint32 `protobuf:"varint,4,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` } @@ -1237,14 +1237,14 @@ func (m *MsgReserveSwapInResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgReserveSwapInResponse proto.InternalMessageInfo 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. + // storage_provider defines the operator account address of the storage provider who wants 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. + // It allows to be empty only when the operator wants to be the successor primary storage provider in a family. GlobalVirtualGroupId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` } @@ -1346,7 +1346,7 @@ type MsgCancelSwapIn struct { // 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. + // It allows to be empty only when the operator wants to be the successor primary storage provider in a family. GlobalVirtualGroupId uint32 `protobuf:"varint,3,opt,name=global_virtual_group_id,json=globalVirtualGroupId,proto3" json:"global_virtual_group_id,omitempty"` } @@ -1441,25 +1441,25 @@ func (m *MsgCancelSwapInResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelSwapInResponse proto.InternalMessageInfo // this line is used by starport scaffolding # proto/tx/message -type MsgStorageProviderForceExit struct { +type MsgStorageProviderForcedExit 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 + // storage_provider defines the account address of the storage provider forced to exit StorageProvider string `protobuf:"bytes,2,opt,name=storage_provider,json=storageProvider,proto3" json:"storage_provider,omitempty"` } -func (m *MsgStorageProviderForceExit) Reset() { *m = MsgStorageProviderForceExit{} } -func (m *MsgStorageProviderForceExit) String() string { return proto.CompactTextString(m) } -func (*MsgStorageProviderForceExit) ProtoMessage() {} -func (*MsgStorageProviderForceExit) Descriptor() ([]byte, []int) { +func (m *MsgStorageProviderForcedExit) Reset() { *m = MsgStorageProviderForcedExit{} } +func (m *MsgStorageProviderForcedExit) String() string { return proto.CompactTextString(m) } +func (*MsgStorageProviderForcedExit) ProtoMessage() {} +func (*MsgStorageProviderForcedExit) Descriptor() ([]byte, []int) { return fileDescriptor_478f7001009bf3f2, []int{28} } -func (m *MsgStorageProviderForceExit) XXX_Unmarshal(b []byte) error { +func (m *MsgStorageProviderForcedExit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgStorageProviderForceExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgStorageProviderForcedExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgStorageProviderForceExit.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgStorageProviderForcedExit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1469,47 +1469,47 @@ func (m *MsgStorageProviderForceExit) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgStorageProviderForceExit) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStorageProviderForceExit.Merge(m, src) +func (m *MsgStorageProviderForcedExit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStorageProviderForcedExit.Merge(m, src) } -func (m *MsgStorageProviderForceExit) XXX_Size() int { +func (m *MsgStorageProviderForcedExit) XXX_Size() int { return m.Size() } -func (m *MsgStorageProviderForceExit) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStorageProviderForceExit.DiscardUnknown(m) +func (m *MsgStorageProviderForcedExit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStorageProviderForcedExit.DiscardUnknown(m) } -var xxx_messageInfo_MsgStorageProviderForceExit proto.InternalMessageInfo +var xxx_messageInfo_MsgStorageProviderForcedExit proto.InternalMessageInfo -func (m *MsgStorageProviderForceExit) GetAuthority() string { +func (m *MsgStorageProviderForcedExit) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgStorageProviderForceExit) GetStorageProvider() string { +func (m *MsgStorageProviderForcedExit) GetStorageProvider() string { if m != nil { return m.StorageProvider } return "" } -type MsgStorageProviderForceExitResponse struct { +type MsgStorageProviderForcedExitResponse struct { } -func (m *MsgStorageProviderForceExitResponse) Reset() { *m = MsgStorageProviderForceExitResponse{} } -func (m *MsgStorageProviderForceExitResponse) String() string { return proto.CompactTextString(m) } -func (*MsgStorageProviderForceExitResponse) ProtoMessage() {} -func (*MsgStorageProviderForceExitResponse) Descriptor() ([]byte, []int) { +func (m *MsgStorageProviderForcedExitResponse) Reset() { *m = MsgStorageProviderForcedExitResponse{} } +func (m *MsgStorageProviderForcedExitResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStorageProviderForcedExitResponse) ProtoMessage() {} +func (*MsgStorageProviderForcedExitResponse) Descriptor() ([]byte, []int) { return fileDescriptor_478f7001009bf3f2, []int{29} } -func (m *MsgStorageProviderForceExitResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgStorageProviderForcedExitResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgStorageProviderForceExitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgStorageProviderForcedExitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgStorageProviderForceExitResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgStorageProviderForcedExitResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1519,17 +1519,17 @@ func (m *MsgStorageProviderForceExitResponse) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (m *MsgStorageProviderForceExitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStorageProviderForceExitResponse.Merge(m, src) +func (m *MsgStorageProviderForcedExitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStorageProviderForcedExitResponse.Merge(m, src) } -func (m *MsgStorageProviderForceExitResponse) XXX_Size() int { +func (m *MsgStorageProviderForcedExitResponse) XXX_Size() int { return m.Size() } -func (m *MsgStorageProviderForceExitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStorageProviderForceExitResponse.DiscardUnknown(m) +func (m *MsgStorageProviderForcedExitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStorageProviderForcedExitResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgStorageProviderForceExitResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgStorageProviderForcedExitResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgUpdateParams)(nil), "greenfield.virtualgroup.MsgUpdateParams") @@ -1560,88 +1560,88 @@ func init() { 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") + proto.RegisterType((*MsgStorageProviderForcedExit)(nil), "greenfield.virtualgroup.MsgStorageProviderForcedExit") + proto.RegisterType((*MsgStorageProviderForcedExitResponse)(nil), "greenfield.virtualgroup.MsgStorageProviderForcedExitResponse") } func init() { proto.RegisterFile("greenfield/virtualgroup/tx.proto", fileDescriptor_478f7001009bf3f2) } var fileDescriptor_478f7001009bf3f2 = []byte{ - // 1173 bytes of a gzipped FileDescriptorProto + // 1178 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xc6, 0x25, 0x4d, 0x5e, 0xeb, 0x24, 0x6c, 0x12, 0xe2, 0xac, 0x91, 0x6b, 0xb9, 0xa5, - 0x32, 0x29, 0xf5, 0x92, 0x34, 0x50, 0x51, 0x40, 0xa8, 0x09, 0xb4, 0xf2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, 0xfa, 0x3e, 0x72, 0x5c, 0x33, 0xf6, 0xa9, 0xf7, 0xb0, 0xe7, 0x9b, 0xf5, 0x91, 0x87, - 0x59, 0x6d, 0x86, 0x7f, 0xec, 0xbd, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x95, 0x96, - 0xd9, 0xdb, 0x16, 0x00, 0x00, + 0x14, 0xcf, 0xc6, 0x25, 0x4d, 0x5e, 0xeb, 0x24, 0x6c, 0x12, 0xe2, 0x6c, 0x2a, 0xd7, 0x4a, 0x43, + 0x64, 0x52, 0xea, 0x25, 0x69, 0x4a, 0x45, 0xa1, 0x42, 0x4d, 0xa0, 0x95, 0x0f, 0xa1, 0x95, 0x23, + 0xfe, 0x08, 0x24, 0xac, 0xb1, 0x77, 0xba, 0x59, 0x64, 0xef, 0xac, 0x66, 0xd6, 0x4e, 0x72, 0x42, + 0xe2, 0x8a, 0x84, 0xe0, 0x04, 0xdf, 0x81, 0x4b, 0x85, 0xf8, 0x10, 0x3d, 0x56, 0x9c, 0x10, 0x12, + 0x15, 0x4a, 0x90, 0x8a, 0x40, 0x7c, 0x02, 0x2e, 0x68, 0x67, 0x67, 0xc7, 0xeb, 0x3f, 0x3b, 0xb6, + 0x23, 0x57, 0x95, 0x72, 0x4a, 0x3c, 0xf3, 0x7b, 0x6f, 0xde, 0xef, 0x37, 0x6f, 0xde, 0xcc, 0x5b, + 0xc8, 0xd9, 0x14, 0x63, 0xf7, 0xa1, 0x83, 0x6b, 0x96, 0xd9, 0x74, 0xa8, 0xdf, 0x40, 0x35, 0x9b, + 0x92, 0x86, 0x67, 0xfa, 0x87, 0x05, 0x8f, 0x12, 0x9f, 0xe8, 0x8b, 0x2d, 0x44, 0x21, 0x8e, 0x30, + 0xb2, 0x55, 0xc2, 0xea, 0x84, 0x99, 0x15, 0xc4, 0xb0, 0xd9, 0xdc, 0xa8, 0x60, 0x1f, 0x6d, 0x98, + 0x55, 0xe2, 0xb8, 0xa1, 0xa1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, 0xd0, 0x0d, 0x29, 0xba, 0xc6, 0xe6, 0xe0, 0x58, 0xb9, 0xe2, 0x77, 0x1a, 0x2c, + 0x25, 0x5f, 0x94, 0x37, 0x86, 0x38, 0x21, 0x2d, 0x33, 0xe3, 0xf6, 0xa9, 0xcc, 0xa2, 0x98, 0xb6, + 0x3f, 0x78, 0x7c, 0x9c, 0xd5, 0x9e, 0x1c, 0x67, 0xb5, 0x3f, 0x8e, 0xb3, 0xda, 0xb7, 0x27, 0xd9, + 0xb1, 0x27, 0x27, 0xd9, 0xb1, 0x5f, 0x4f, 0xb2, 0x63, 0x9f, 0x6e, 0xd9, 0x8e, 0xbf, 0xdf, 0xa8, + 0x04, 0x8d, 0xbf, 0x59, 0x71, 0x2b, 0xd7, 0xaa, 0xfb, 0xc8, 0x71, 0xcd, 0xd8, 0xf7, 0xde, 0xc3, + 0x8e, 0x0f, 0xd7, 0x47, 0x1e, 0x66, 0x95, 0x09, 0xfe, 0xc5, 0xf7, 0xfa, 0xff, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xa9, 0xb5, 0xca, 0xe4, 0xe0, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1671,9 +1671,9 @@ type MsgClient interface { ReserveSwapIn(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 + // StorageProviderForcedExit defines a governance operation for a SP to be forced to exit // The authority is defined in the keeper. - StorageProviderForceExit(ctx context.Context, in *MsgStorageProviderForceExit, opts ...grpc.CallOption) (*MsgStorageProviderForceExitResponse, error) + StorageProviderForcedExit(ctx context.Context, in *MsgStorageProviderForcedExit, opts ...grpc.CallOption) (*MsgStorageProviderForcedExitResponse, error) } type msgClient struct { @@ -1810,9 +1810,9 @@ func (c *msgClient) CompleteSwapIn(ctx context.Context, in *MsgCompleteSwapIn, o return out, nil } -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...) +func (c *msgClient) StorageProviderForcedExit(ctx context.Context, in *MsgStorageProviderForcedExit, opts ...grpc.CallOption) (*MsgStorageProviderForcedExitResponse, error) { + out := new(MsgStorageProviderForcedExitResponse) + err := c.cc.Invoke(ctx, "/greenfield.virtualgroup.Msg/StorageProviderForcedExit", in, out, opts...) if err != nil { return nil, err } @@ -1836,9 +1836,9 @@ type MsgServer interface { ReserveSwapIn(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 + // StorageProviderForcedExit defines a governance operation for a SP to be forced to exit // The authority is defined in the keeper. - StorageProviderForceExit(context.Context, *MsgStorageProviderForceExit) (*MsgStorageProviderForceExitResponse, error) + StorageProviderForcedExit(context.Context, *MsgStorageProviderForcedExit) (*MsgStorageProviderForcedExitResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1887,8 +1887,8 @@ func (*UnimplementedMsgServer) CancelSwapIn(ctx context.Context, req *MsgCancelS 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 (*UnimplementedMsgServer) StorageProviderForcedExit(ctx context.Context, req *MsgStorageProviderForcedExit) (*MsgStorageProviderForcedExitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StorageProviderForcedExit not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -2147,20 +2147,20 @@ func _Msg_CompleteSwapIn_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Msg_StorageProviderForceExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgStorageProviderForceExit) +func _Msg_StorageProviderForcedExit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStorageProviderForcedExit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).StorageProviderForceExit(ctx, in) + return srv.(MsgServer).StorageProviderForcedExit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/greenfield.virtualgroup.Msg/StorageProviderForceExit", + FullMethod: "/greenfield.virtualgroup.Msg/StorageProviderForcedExit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).StorageProviderForceExit(ctx, req.(*MsgStorageProviderForceExit)) + return srv.(MsgServer).StorageProviderForcedExit(ctx, req.(*MsgStorageProviderForcedExit)) } return interceptor(ctx, in, info, handler) } @@ -2226,8 +2226,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CompleteSwapIn_Handler, }, { - MethodName: "StorageProviderForceExit", - Handler: _Msg_StorageProviderForceExit_Handler, + MethodName: "StorageProviderForcedExit", + Handler: _Msg_StorageProviderForcedExit_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -3205,7 +3205,7 @@ func (m *MsgCancelSwapInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgStorageProviderForceExit) Marshal() (dAtA []byte, err error) { +func (m *MsgStorageProviderForcedExit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3215,12 +3215,12 @@ func (m *MsgStorageProviderForceExit) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgStorageProviderForceExit) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgStorageProviderForcedExit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgStorageProviderForceExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgStorageProviderForcedExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3242,7 +3242,7 @@ func (m *MsgStorageProviderForceExit) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *MsgStorageProviderForceExitResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgStorageProviderForcedExitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3252,12 +3252,12 @@ func (m *MsgStorageProviderForceExitResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *MsgStorageProviderForceExitResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgStorageProviderForcedExitResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgStorageProviderForceExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgStorageProviderForcedExitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3683,7 +3683,7 @@ func (m *MsgCancelSwapInResponse) Size() (n int) { return n } -func (m *MsgStorageProviderForceExit) Size() (n int) { +func (m *MsgStorageProviderForcedExit) Size() (n int) { if m == nil { return 0 } @@ -3700,7 +3700,7 @@ func (m *MsgStorageProviderForceExit) Size() (n int) { return n } -func (m *MsgStorageProviderForceExitResponse) Size() (n int) { +func (m *MsgStorageProviderForcedExitResponse) Size() (n int) { if m == nil { return 0 } @@ -6447,7 +6447,7 @@ func (m *MsgCancelSwapInResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgStorageProviderForceExit) Unmarshal(dAtA []byte) error { +func (m *MsgStorageProviderForcedExit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6470,10 +6470,10 @@ func (m *MsgStorageProviderForceExit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgStorageProviderForceExit: wiretype end group for non-group") + return fmt.Errorf("proto: MsgStorageProviderForcedExit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStorageProviderForceExit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgStorageProviderForcedExit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6561,7 +6561,7 @@ func (m *MsgStorageProviderForceExit) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgStorageProviderForceExitResponse) Unmarshal(dAtA []byte) error { +func (m *MsgStorageProviderForcedExitResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6584,10 +6584,10 @@ func (m *MsgStorageProviderForceExitResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgStorageProviderForceExitResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgStorageProviderForcedExitResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStorageProviderForceExitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgStorageProviderForcedExitResponse: 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 a7fcc4390..7b408d6ee 100644 --- a/x/virtualgroup/types/types.pb.go +++ b/x/virtualgroup/types/types.pb.go @@ -383,7 +383,7 @@ func (m *SwapOutInfo) GetSuccessorSpId() uint32 { } type SwapInInfo struct { - // successor_sp_id defines the id of sp who want to join the family or GVG + // successor_sp_id defines the id of SP who wants 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"` From 91611a9263026d525f5474348bcb1166bbd4f166 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 15:28:14 +0800 Subject: [PATCH 16/27] fix SetUpgradeInitializer --- x/virtualgroup/module.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/virtualgroup/module.go b/x/virtualgroup/module.go index c1050ace8..e0665f038 100644 --- a/x/virtualgroup/module.go +++ b/x/virtualgroup/module.go @@ -103,8 +103,8 @@ func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, spKeeper types.SpKeeper, -) AppModule { - return AppModule{ +) *AppModule { + return &AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, spKeeper: spKeeper, From 142bf7b1d4dab10638d3daf946008b6b033023e1 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 15:28:14 +0800 Subject: [PATCH 17/27] fix SetUpgradeInitializer --- app/upgrade.go | 4 ++-- x/virtualgroup/module.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/upgrade.go b/app/upgrade.go index 325f543a3..87557a7e6 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -1,8 +1,6 @@ package app import ( - virtualgroupmodule "github.com/bnb-chain/greenfield/x/virtualgroup" - virtualgrouptypes "github.com/bnb-chain/greenfield/x/virtualgroup/types" serverconfig "github.com/cosmos/cosmos-sdk/server/config" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -13,6 +11,8 @@ import ( paymentmodule "github.com/bnb-chain/greenfield/x/payment" paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" storagemoduletypes "github.com/bnb-chain/greenfield/x/storage/types" + virtualgroupmodule "github.com/bnb-chain/greenfield/x/virtualgroup" + virtualgrouptypes "github.com/bnb-chain/greenfield/x/virtualgroup/types" ) func (app *App) RegisterUpgradeHandlers(chainID string, serverCfg *serverconfig.Config) error { diff --git a/x/virtualgroup/module.go b/x/virtualgroup/module.go index c1050ace8..e0665f038 100644 --- a/x/virtualgroup/module.go +++ b/x/virtualgroup/module.go @@ -103,8 +103,8 @@ func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, spKeeper types.SpKeeper, -) AppModule { - return AppModule{ +) *AppModule { + return &AppModule{ AppModuleBasic: NewAppModuleBasic(cdc), keeper: keeper, spKeeper: spKeeper, From 629afa3cb15a39ff692ff4956e749bf3516b4f4a Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 15:55:20 +0800 Subject: [PATCH 18/27] use queried SP deposit in test --- e2e/tests/virtualgroup_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 7b8938841..4c1633115 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1150,7 +1150,7 @@ func (s *VirtualGroupTestSuite) TestSPForcedExit() { Address: authtypes.NewModuleAddress(govtypes.ModuleName).String(), }) s.Require().NoError(err) - s.Require().Equal(govModuleBalance.Balance.Amount.Add(types.NewIntFromInt64WithDecimal(10000, types.DecimalBNB)), govModuleBalanceAfterSPForcedExit.Balance.Amount) + s.Require().Equal(govModuleBalance.Balance.Amount.Add(resp.StorageProvider.TotalDeposit), govModuleBalanceAfterSPForcedExit.Balance.Amount) } func (s *VirtualGroupTestSuite) updateParams(params virtualgroupmoduletypes.Params) { From df63086426b42035afacc8c61666b3c3a8c80809 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 16:32:10 +0800 Subject: [PATCH 19/27] enable bucket migration --- app/upgrade.go | 8 +- e2e/tests/sp_test.go | 68 ++-- e2e/tests/storage_bill_test.go | 632 ++++++++++++++++----------------- e2e/tests/storage_test.go | 287 +++++++-------- 4 files changed, 502 insertions(+), 493 deletions(-) diff --git a/app/upgrade.go b/app/upgrade.go index 87557a7e6..72d2ce8b3 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -138,14 +138,20 @@ func (app *App) registerHulunbeierUpgradeHandler() { func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { app.Logger().Info("upgrade to ", plan.Name) + // enable SP exit app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgReserveSwapIn", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCancelSwapIn", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteSwapIn", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderForcedExit", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderExit", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteStorageProviderExit", 1.2e3)) + // enable bucket migration + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgMigrateBucket", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgCancelMigrateBucket", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgCompleteMigrateBucket", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgRejectMigrateBucket", 1.2e3)) + return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) diff --git a/e2e/tests/sp_test.go b/e2e/tests/sp_test.go index 9d2cca354..84233e5ef 100644 --- a/e2e/tests/sp_test.go +++ b/e2e/tests/sp_test.go @@ -22,6 +22,7 @@ import ( "github.com/bnb-chain/greenfield/sdk/types" "github.com/bnb-chain/greenfield/testutil/sample" sptypes "github.com/bnb-chain/greenfield/x/sp/types" + virtualgroupmoduletypes "github.com/bnb-chain/greenfield/x/virtualgroup/types" ) type StorageProviderTestSuite struct { @@ -37,39 +38,40 @@ func (s *StorageProviderTestSuite) SetupSuite() { func (s *StorageProviderTestSuite) SetupTest() { } -//func (s *StorageProviderTestSuite) TestCreateStorageProvider() { -// // Create a New SP -// sp := s.BaseSuite.CreateNewStorageProvider() -// -// // query sp by id -// querySPResp, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{ -// Id: sp.Info.Id, -// }) -// s.Require().NoError(err) -// s.Require().Equal(querySPResp.StorageProvider, querySPResp.StorageProvider) -// -// // sp exit -// msgSPExit := virtualgroupmoduletypes.MsgStorageProviderExit{ -// StorageProvider: sp.OperatorKey.GetAddr().String(), -// } -// s.SendTxBlock(sp.OperatorKey, &msgSPExit) -// -// // 9 query sp status -// querySPResp2, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: sp.Info.Id}) -// s.Require().NoError(err) -// s.Require().Equal(querySPResp2.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) -// -// // 10 complete sp exit -// msgCompleteSPExit := virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ -// StorageProvider: sp.OperatorKey.GetAddr().String(), -// } -// -// s.SendTxBlock(sp.OperatorKey, &msgCompleteSPExit) -// -// // 10 query sp -// _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: sp.Info.Id}) -// s.Require().Error(err) -//} +func (s *StorageProviderTestSuite) TestCreateStorageProvider() { + // Create a New SP + sp := s.BaseSuite.CreateNewStorageProvider() + + // query sp by id + querySPResp, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{ + Id: sp.Info.Id, + }) + s.Require().NoError(err) + s.Require().Equal(querySPResp.StorageProvider, querySPResp.StorageProvider) + + // sp exit + msgSPExit := virtualgroupmoduletypes.MsgStorageProviderExit{ + StorageProvider: sp.OperatorKey.GetAddr().String(), + } + s.SendTxBlock(sp.OperatorKey, &msgSPExit) + + // 9 query sp status + querySPResp2, err := s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: sp.Info.Id}) + s.Require().NoError(err) + s.Require().Equal(querySPResp2.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) + + // 10 complete sp exit + msgCompleteSPExit := virtualgroupmoduletypes.MsgCompleteStorageProviderExit{ + StorageProvider: sp.OperatorKey.GetAddr().String(), + Operator: sp.OperatorKey.GetAddr().String(), + } + + s.SendTxBlock(sp.OperatorKey, &msgCompleteSPExit) + + // 10 query sp + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: sp.Info.Id}) + s.Require().Error(err) +} func (s *StorageProviderTestSuite) TestEditStorageProvider() { ctx := context.Background() diff --git a/e2e/tests/storage_bill_test.go b/e2e/tests/storage_bill_test.go index 056eac7b4..d51be343c 100644 --- a/e2e/tests/storage_bill_test.go +++ b/e2e/tests/storage_bill_test.go @@ -1746,317 +1746,317 @@ func (s *PaymentTestSuite) TestStorageBill_UpdatePaymentAddress() { s.SendTxBlockWithExpectErrorString(msgUpdateBucketInfo, user, "apply user flows list failed") } -//func (s *PaymentTestSuite) TestStorageBill_MigrateBucket() { -// var err error -// ctx := context.Background() -// primarySP := s.PickStorageProvider() -// gvg, found := primarySP.GetFirstGlobalVirtualGroup() -// s.Require().True(found) -// queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ -// FamilyId: gvg.FamilyId, -// }) -// s.Require().NoError(err) -// family := queryFamilyResponse.GlobalVirtualGroupFamily -// user := s.GenAndChargeAccounts(1, 10)[0] -// -// streamAddresses := []string{ -// user.GetAddr().String(), -// family.VirtualPaymentAddress, -// gvg.VirtualPaymentAddress, -// paymenttypes.ValidatorTaxPoolAddress.String(), -// } -// -// streamAddresses0 := streamAddresses -// paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) -// s.T().Logf("paymentParams %s, err: %v", paymentParams, err) -// s.Require().NoError(err) -// -// bucketName := s.createBucket(primarySP, gvg, user, 0) -// bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ -// BucketName: bucketName, -// }) -// s.Require().NoError(err) -// -// // create object with none zero payload size -// streamRecordsBefore := s.getStreamRecords(streamAddresses) -// _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) -// -// // assertions -// streamRecordsAfter := s.getStreamRecords(streamAddresses) -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) -// s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) -// -// // case: seal object without price change -// s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) -// -// // assertions -// streamRecordsAfter = s.getStreamRecords(streamAddresses) -// gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) -// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) -// taxRate0 := taxRate -// -// dstPrimarySP := s.CreateNewStorageProvider() -// -// // update price -// priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ -// Timestamp: 0, -// }) -// s.Require().NoError(err) -// s.T().Log("price", priceRes.GlobalSpStorePrice) -// -// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(2), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) -// defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) -// -// _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) -// gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) -// gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ -// GlobalVirtualGroupId: gvgID, -// }) -// s.Require().NoError(err) -// dstGVG := gvgResp.GlobalVirtualGroup -// s.Require().True(found) -// -// queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ -// FamilyId: dstGVG.FamilyId, -// }) -// s.Require().NoError(err) -// family = queryFamilyResponse.GlobalVirtualGroupFamily -// streamAddresses = []string{ -// user.GetAddr().String(), -// family.VirtualPaymentAddress, -// dstGVG.VirtualPaymentAddress, -// paymenttypes.ValidatorTaxPoolAddress.String(), -// } -// fundAddress := primarySP.FundingKey.GetAddr() -// streamRecordsBefore = s.getStreamRecords(streamAddresses) -// -// queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} -// fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) -// s.Require().NoError(err) -// -// // MigrationBucket -// msgMigrationBucket, msgCompleteMigrationBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) -// s.SendTxBlock(user, msgMigrationBucket) -// s.Require().NoError(err) -// -// // complete MigrationBucket -// s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) -// streamRecordsAfter = s.getStreamRecords(streamAddresses) -// fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) -// s.Require().NoError(err) -// s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) -// s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") -// gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) -// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) -// s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) -// -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) -// // tax rate diff -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) -// -// // set price -// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(120), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(5000)) -// -// queryBalanceRequest.Address = dstPrimarySP.FundingKey.GetAddr().String() -// fundBalanceBefore, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) -// s.Require().NoError(err) -// streamRecordsBefore = s.getStreamRecords(streamAddresses0) -// // send msgMigrationBucket -// msgMigrationBucket, msgCompleteMigrationBucket = s.NewMigrateBucket(dstPrimarySP, primarySP, user, bucketName, dstGVG.FamilyId, gvg.FamilyId, bucketInfo.BucketInfo.Id) -// -// s.SendTxBlock(user, msgMigrationBucket) -// s.Require().NoError(err) -// s.reduceBNBBalance(user, s.Validator, sdkmath.NewIntWithDecimal(1, 1)) -// -// s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, primarySP.OperatorKey, "apply stream record changes for user failed") -// -// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(10), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) -// readPrice, primaryPrice, secondaryPrice := s.getPrices(time.Now().Unix()) -// s.T().Logf("readPrice: %v, primaryPrice: %v,secondaryPrice: %v", readPrice, primaryPrice, secondaryPrice) -// -// s.transferBNB(s.Validator, user, sdkmath.NewIntWithDecimal(10000, 18)) -// -// s.SendTxBlock(primarySP.OperatorKey, msgCompleteMigrationBucket) -// streamRecordsAfter = s.getStreamRecords(streamAddresses0) -// fundBalanceAfter, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) -// s.Require().NoError(err) -// s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) -// s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") -// taxRate1 := taxRate -// gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) -// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) -// s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) -// -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) -// // tax rate diff -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate1)) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) -//} +func (s *PaymentTestSuite) TestStorageBill_MigrateBucket() { + var err error + ctx := context.Background() + primarySP := s.PickStorageProvider() + gvg, found := primarySP.GetFirstGlobalVirtualGroup() + s.Require().True(found) + queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ + FamilyId: gvg.FamilyId, + }) + s.Require().NoError(err) + family := queryFamilyResponse.GlobalVirtualGroupFamily + user := s.GenAndChargeAccounts(1, 10)[0] -//func (s *PaymentTestSuite) TestStorageBill_MigrateBucket_LockedFee_ThenDiscontinueBucket() { -// var err error -// ctx := context.Background() -// primarySP := s.PickStorageProvider() -// gvg, found := primarySP.GetFirstGlobalVirtualGroup() -// s.Require().True(found) -// queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ -// FamilyId: gvg.FamilyId, -// }) -// s.Require().NoError(err) -// family := queryFamilyResponse.GlobalVirtualGroupFamily -// user := s.GenAndChargeAccounts(1, 10)[0] -// -// streamAddresses := []string{ -// user.GetAddr().String(), -// family.VirtualPaymentAddress, -// gvg.VirtualPaymentAddress, -// paymenttypes.ValidatorTaxPoolAddress.String(), -// } -// -// paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) -// s.T().Logf("paymentParams %s, err: %v", paymentParams, err) -// s.Require().NoError(err) -// -// bucketName := s.createBucket(primarySP, gvg, user, 0) -// bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ -// BucketName: bucketName, -// }) -// s.Require().NoError(err) -// -// // create object with none zero payload size -// streamRecordsBefore := s.getStreamRecords(streamAddresses) -// _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) -// -// // assertions -// streamRecordsAfter := s.getStreamRecords(streamAddresses) -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) -// s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) -// -// // case: seal object -// s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) -// -// // assertions -// streamRecordsAfter = s.getStreamRecords(streamAddresses) -// gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) -// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) -// taxRate0 := taxRate -// dstPrimarySP := s.CreateNewStorageProvider() -// -// // create a new object without seal -// s.createObject(user, bucketName, false) -// -// // update price after lock -// priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ -// Timestamp: 0, -// }) -// s.Require().NoError(err) -// s.T().Log("price", priceRes.GlobalSpStorePrice) -// -// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10000)) -// defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) -// -// _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) -// gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) -// gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ -// GlobalVirtualGroupId: gvgID, -// }) -// s.Require().NoError(err) -// dstGVG := gvgResp.GlobalVirtualGroup -// s.Require().True(found) -// -// queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ -// FamilyId: dstGVG.FamilyId, -// }) -// s.Require().NoError(err) -// family = queryFamilyResponse.GlobalVirtualGroupFamily -// streamAddresses = []string{ -// user.GetAddr().String(), -// family.VirtualPaymentAddress, -// dstGVG.VirtualPaymentAddress, -// paymenttypes.ValidatorTaxPoolAddress.String(), -// } -// fundAddress := primarySP.FundingKey.GetAddr() -// streamRecordsBefore = s.getStreamRecords(streamAddresses) -// -// queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} -// fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) -// s.Require().NoError(err) -// -// // MigrateBucket -// msgMigrateBucket, msgCompleteMigrateBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) -// s.SendTxBlock(user, msgMigrateBucket) -// s.Require().NoError(err) -// -// // complete MigrateBucket -// s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrateBucket) -// streamRecordsAfter = s.getStreamRecords(streamAddresses) -// fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) -// s.Require().NoError(err) -// s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) -// s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") -// gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) -// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) -// s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) -// -// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) -// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) -// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) -// // tax rate diff -// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) -// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) -// -// // force delete bucket -// headBucketResp, _ := s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) -// s.T().Log("headBucketResp", core.YamlString(headBucketResp)) -// msgDiscontinueBucket := storagetypes.NewMsgDiscontinueBucket(dstPrimarySP.GcKey.GetAddr(), bucketName, "test") -// txRes := s.SendTxBlock(dstPrimarySP.GcKey, msgDiscontinueBucket) -// deleteAt := filterDiscontinueBucketEventFromTx(txRes).DeleteAt -// -// for { -// time.Sleep(200 * time.Millisecond) -// statusRes, err := s.TmClient.TmClient.Status(context.Background()) -// s.Require().NoError(err) -// blockTime := statusRes.SyncInfo.LatestBlockTime.Unix() -// -// s.T().Logf("current blockTime: %d, delete blockTime: %d", blockTime, deleteAt) -// -// if blockTime > deleteAt { -// break -// } -// } -// -// _, err = s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) -// s.Require().ErrorContains(err, "No such bucket") -//} + streamAddresses := []string{ + user.GetAddr().String(), + family.VirtualPaymentAddress, + gvg.VirtualPaymentAddress, + paymenttypes.ValidatorTaxPoolAddress.String(), + } + + streamAddresses0 := streamAddresses + paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) + s.T().Logf("paymentParams %s, err: %v", paymentParams, err) + s.Require().NoError(err) + + bucketName := s.createBucket(primarySP, gvg, user, 0) + bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ + BucketName: bucketName, + }) + s.Require().NoError(err) + + // create object with none zero payload size + streamRecordsBefore := s.getStreamRecords(streamAddresses) + _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) + + // assertions + streamRecordsAfter := s.getStreamRecords(streamAddresses) + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) + s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) + + // case: seal object without price change + s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) + + // assertions + streamRecordsAfter = s.getStreamRecords(streamAddresses) + gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) + s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) + taxRate0 := taxRate + + dstPrimarySP := s.CreateNewStorageProvider() + + // update price + priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ + Timestamp: 0, + }) + s.Require().NoError(err) + s.T().Log("price", priceRes.GlobalSpStorePrice) + + s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(2), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) + defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) + + _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) + gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) + gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ + GlobalVirtualGroupId: gvgID, + }) + s.Require().NoError(err) + dstGVG := gvgResp.GlobalVirtualGroup + s.Require().True(found) + + queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ + FamilyId: dstGVG.FamilyId, + }) + s.Require().NoError(err) + family = queryFamilyResponse.GlobalVirtualGroupFamily + streamAddresses = []string{ + user.GetAddr().String(), + family.VirtualPaymentAddress, + dstGVG.VirtualPaymentAddress, + paymenttypes.ValidatorTaxPoolAddress.String(), + } + fundAddress := primarySP.FundingKey.GetAddr() + streamRecordsBefore = s.getStreamRecords(streamAddresses) + + queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} + fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) + s.Require().NoError(err) + + // MigrationBucket + msgMigrationBucket, msgCompleteMigrationBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) + s.SendTxBlock(user, msgMigrationBucket) + s.Require().NoError(err) + + // complete MigrationBucket + s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) + streamRecordsAfter = s.getStreamRecords(streamAddresses) + fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) + s.Require().NoError(err) + s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) + s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") + gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) + s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) + s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) + + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) + // tax rate diff + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) + + // set price + s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(120), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(5000)) + + queryBalanceRequest.Address = dstPrimarySP.FundingKey.GetAddr().String() + fundBalanceBefore, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) + s.Require().NoError(err) + streamRecordsBefore = s.getStreamRecords(streamAddresses0) + // send msgMigrationBucket + msgMigrationBucket, msgCompleteMigrationBucket = s.NewMigrateBucket(dstPrimarySP, primarySP, user, bucketName, dstGVG.FamilyId, gvg.FamilyId, bucketInfo.BucketInfo.Id) + + s.SendTxBlock(user, msgMigrationBucket) + s.Require().NoError(err) + s.reduceBNBBalance(user, s.Validator, sdkmath.NewIntWithDecimal(1, 1)) + + s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, primarySP.OperatorKey, "apply stream record changes for user failed") + + s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(10), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) + readPrice, primaryPrice, secondaryPrice := s.getPrices(time.Now().Unix()) + s.T().Logf("readPrice: %v, primaryPrice: %v,secondaryPrice: %v", readPrice, primaryPrice, secondaryPrice) + + s.transferBNB(s.Validator, user, sdkmath.NewIntWithDecimal(10000, 18)) + + s.SendTxBlock(primarySP.OperatorKey, msgCompleteMigrationBucket) + streamRecordsAfter = s.getStreamRecords(streamAddresses0) + fundBalanceAfter, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) + s.Require().NoError(err) + s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) + s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") + taxRate1 := taxRate + gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) + s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) + s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) + + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) + // tax rate diff + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate1)) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) +} + +func (s *PaymentTestSuite) TestStorageBill_MigrateBucket_LockedFee_ThenDiscontinueBucket() { + var err error + ctx := context.Background() + primarySP := s.PickStorageProvider() + gvg, found := primarySP.GetFirstGlobalVirtualGroup() + s.Require().True(found) + queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ + FamilyId: gvg.FamilyId, + }) + s.Require().NoError(err) + family := queryFamilyResponse.GlobalVirtualGroupFamily + user := s.GenAndChargeAccounts(1, 10)[0] + + streamAddresses := []string{ + user.GetAddr().String(), + family.VirtualPaymentAddress, + gvg.VirtualPaymentAddress, + paymenttypes.ValidatorTaxPoolAddress.String(), + } + + paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) + s.T().Logf("paymentParams %s, err: %v", paymentParams, err) + s.Require().NoError(err) + + bucketName := s.createBucket(primarySP, gvg, user, 0) + bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ + BucketName: bucketName, + }) + s.Require().NoError(err) + + // create object with none zero payload size + streamRecordsBefore := s.getStreamRecords(streamAddresses) + _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) + + // assertions + streamRecordsAfter := s.getStreamRecords(streamAddresses) + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) + s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) + + // case: seal object + s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) + + // assertions + streamRecordsAfter = s.getStreamRecords(streamAddresses) + gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) + s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) + taxRate0 := taxRate + dstPrimarySP := s.CreateNewStorageProvider() + + // create a new object without seal + s.createObject(user, bucketName, false) + + // update price after lock + priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ + Timestamp: 0, + }) + s.Require().NoError(err) + s.T().Log("price", priceRes.GlobalSpStorePrice) + + s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10000)) + defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) + + _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) + gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) + gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ + GlobalVirtualGroupId: gvgID, + }) + s.Require().NoError(err) + dstGVG := gvgResp.GlobalVirtualGroup + s.Require().True(found) + + queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ + FamilyId: dstGVG.FamilyId, + }) + s.Require().NoError(err) + family = queryFamilyResponse.GlobalVirtualGroupFamily + streamAddresses = []string{ + user.GetAddr().String(), + family.VirtualPaymentAddress, + dstGVG.VirtualPaymentAddress, + paymenttypes.ValidatorTaxPoolAddress.String(), + } + fundAddress := primarySP.FundingKey.GetAddr() + streamRecordsBefore = s.getStreamRecords(streamAddresses) + + queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} + fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) + s.Require().NoError(err) + + // MigrateBucket + msgMigrateBucket, msgCompleteMigrateBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) + s.SendTxBlock(user, msgMigrateBucket) + s.Require().NoError(err) + + // complete MigrateBucket + s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrateBucket) + streamRecordsAfter = s.getStreamRecords(streamAddresses) + fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) + s.Require().NoError(err) + s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) + s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") + gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) + s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) + s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) + + s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) + s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) + s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) + // tax rate diff + s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) + s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) + + // force delete bucket + headBucketResp, _ := s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) + s.T().Log("headBucketResp", core.YamlString(headBucketResp)) + msgDiscontinueBucket := storagetypes.NewMsgDiscontinueBucket(dstPrimarySP.GcKey.GetAddr(), bucketName, "test") + txRes := s.SendTxBlock(dstPrimarySP.GcKey, msgDiscontinueBucket) + deleteAt := filterDiscontinueBucketEventFromTx(txRes).DeleteAt + + for { + time.Sleep(200 * time.Millisecond) + statusRes, err := s.TmClient.TmClient.Status(context.Background()) + s.Require().NoError(err) + blockTime := statusRes.SyncInfo.LatestBlockTime.Unix() + + s.T().Logf("current blockTime: %d, delete blockTime: %d", blockTime, deleteAt) + + if blockTime > deleteAt { + break + } + } + + _, err = s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) + s.Require().ErrorContains(err, "No such bucket") +} //func (s *PaymentTestSuite) TestStorageBill_MigrateBucket_FrozenAccount_NotAllowed() { // var err error @@ -2296,9 +2296,9 @@ func (s *PaymentTestSuite) reduceBNBBalance(user, to keys.KeyManager, leftBalanc s.T().Logf("balance: %v", queryBalanceResponse.Balance.Amount) } -//func (s *PaymentTestSuite) transferBNB(from, to keys.KeyManager, amount sdkmath.Int) { -// msgSend := banktypes.NewMsgSend(from.GetAddr(), to.GetAddr(), sdk.NewCoins( -// sdk.NewCoin(s.Config.Denom, amount), -// )) -// s.SendTxBlock(from, msgSend) -//} +func (s *PaymentTestSuite) transferBNB(from, to keys.KeyManager, amount sdkmath.Int) { + msgSend := banktypes.NewMsgSend(from.GetAddr(), to.GetAddr(), sdk.NewCoins( + sdk.NewCoin(s.Config.Denom, amount), + )) + s.SendTxBlock(from, msgSend) +} diff --git a/e2e/tests/storage_test.go b/e2e/tests/storage_test.go index f9d90d6ec..43a46a67e 100644 --- a/e2e/tests/storage_test.go +++ b/e2e/tests/storage_test.go @@ -30,6 +30,7 @@ import ( types2 "github.com/bnb-chain/greenfield/types" sptypes "github.com/bnb-chain/greenfield/x/sp/types" storagetypes "github.com/bnb-chain/greenfield/x/storage/types" + types3 "github.com/bnb-chain/greenfield/x/virtualgroup/types" ) type StorageTestSuite struct { @@ -1666,86 +1667,86 @@ func (s *StorageTestSuite) TestRejectSealObject() { s.Require().True(strings.Contains(err.Error(), storagetypes.ErrNoSuchObject.Error())) } -//func (s *StorageTestSuite) TestMigrationBucket() { -// // construct bucket and object -// primarySP := s.BaseSuite.PickStorageProvider() -// gvg, found := primarySP.GetFirstGlobalVirtualGroup() -// s.Require().True(found) -// user := s.GenAndChargeAccounts(1, 1000000)[0] -// bucketName := storageutils.GenRandomBucketName() -// objectName := storageutils.GenRandomObjectName() -// _, _, _, bucketInfo := s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) -// -// var err error -// dstPrimarySP := s.CreateNewStorageProvider() -// -// // migrate bucket -// msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) -// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt -// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) -// s.SendTxBlock(user, msgMigrationBucket) -// s.Require().NoError(err) -// -// // cancel migration bucket -// msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) -// s.SendTxBlock(user, msgCancelMigrationBucket) -// s.Require().NoError(err) -// -// // complete migration bucket -// var secondarySPIDs []uint32 -// var secondarySPs []*core.StorageProvider -// -// for _, ssp := range s.StorageProviders { -// if ssp.Info.Id != primarySP.Info.Id { -// secondarySPIDs = append(secondarySPIDs, ssp.Info.Id) -// secondarySPs = append(secondarySPs, ssp) -// } -// if len(secondarySPIDs) == 6 { -// break -// } -// } -// gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) -// gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &types2.QueryGlobalVirtualGroupRequest{ -// GlobalVirtualGroupId: gvgID, -// }) -// s.Require().NoError(err) -// dstGVG := gvgResp.GlobalVirtualGroup -// s.Require().True(found) -// -// // construct the signatures -// var gvgMappings []*storagetypes.GVGMapping -// gvgMappings = append(gvgMappings, &storagetypes.GVGMapping{SrcGlobalVirtualGroupId: gvg.Id, DstGlobalVirtualGroupId: dstGVG.Id}) -// for _, gvgMapping := range gvgMappings { -// migrationBucketSignHash := storagetypes.NewSecondarySpMigrationBucketSignDoc(s.GetChainID(), bucketInfo.Id, dstPrimarySP.Info.Id, gvgMapping.SrcGlobalVirtualGroupId, gvgMapping.DstGlobalVirtualGroupId).GetBlsSignHash() -// secondarySigs := make([][]byte, 0) -// secondarySPBlsPubKeys := make([]bls.PublicKey, 0) -// for _, ssp := range secondarySPs { -// sig, err := core.BlsSignAndVerify(ssp, migrationBucketSignHash) -// s.Require().NoError(err) -// secondarySigs = append(secondarySigs, sig) -// pk, err := bls.PublicKeyFromBytes(ssp.BlsKey.PubKey().Bytes()) -// s.Require().NoError(err) -// secondarySPBlsPubKeys = append(secondarySPBlsPubKeys, pk) -// } -// aggBlsSig, err := core.BlsAggregateAndVerify(secondarySPBlsPubKeys, migrationBucketSignHash, secondarySigs) -// s.Require().NoError(err) -// gvgMapping.SecondarySpBlsSignature = aggBlsSig -// } -// -// msgCompleteMigrationBucket := storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) -// s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, dstPrimarySP.OperatorKey, "The bucket is not been migrating") -// -// // send again -// msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) -// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt -// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) -// s.SendTxBlock(user, msgMigrationBucket) -// s.Require().NoError(err) -// -// // complete again -// msgCompleteMigrationBucket = storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) -// s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) -//} +func (s *StorageTestSuite) TestMigrationBucket() { + // construct bucket and object + primarySP := s.BaseSuite.PickStorageProvider() + gvg, found := primarySP.GetFirstGlobalVirtualGroup() + s.Require().True(found) + user := s.GenAndChargeAccounts(1, 1000000)[0] + bucketName := storageutils.GenRandomBucketName() + objectName := storageutils.GenRandomObjectName() + _, _, _, bucketInfo := s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) + + var err error + dstPrimarySP := s.CreateNewStorageProvider() + + // migrate bucket + msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) + msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt + msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) + s.SendTxBlock(user, msgMigrationBucket) + s.Require().NoError(err) + + // cancel migration bucket + msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) + s.SendTxBlock(user, msgCancelMigrationBucket) + s.Require().NoError(err) + + // complete migration bucket + var secondarySPIDs []uint32 + var secondarySPs []*core.StorageProvider + + for _, ssp := range s.StorageProviders { + if ssp.Info.Id != primarySP.Info.Id { + secondarySPIDs = append(secondarySPIDs, ssp.Info.Id) + secondarySPs = append(secondarySPs, ssp) + } + if len(secondarySPIDs) == 6 { + break + } + } + gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) + gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &types3.QueryGlobalVirtualGroupRequest{ + GlobalVirtualGroupId: gvgID, + }) + s.Require().NoError(err) + dstGVG := gvgResp.GlobalVirtualGroup + s.Require().True(found) + + // construct the signatures + var gvgMappings []*storagetypes.GVGMapping + gvgMappings = append(gvgMappings, &storagetypes.GVGMapping{SrcGlobalVirtualGroupId: gvg.Id, DstGlobalVirtualGroupId: dstGVG.Id}) + for _, gvgMapping := range gvgMappings { + migrationBucketSignHash := storagetypes.NewSecondarySpMigrationBucketSignDoc(s.GetChainID(), bucketInfo.Id, dstPrimarySP.Info.Id, gvgMapping.SrcGlobalVirtualGroupId, gvgMapping.DstGlobalVirtualGroupId).GetBlsSignHash() + secondarySigs := make([][]byte, 0) + secondarySPBlsPubKeys := make([]bls.PublicKey, 0) + for _, ssp := range secondarySPs { + sig, err := core.BlsSignAndVerify(ssp, migrationBucketSignHash) + s.Require().NoError(err) + secondarySigs = append(secondarySigs, sig) + pk, err := bls.PublicKeyFromBytes(ssp.BlsKey.PubKey().Bytes()) + s.Require().NoError(err) + secondarySPBlsPubKeys = append(secondarySPBlsPubKeys, pk) + } + aggBlsSig, err := core.BlsAggregateAndVerify(secondarySPBlsPubKeys, migrationBucketSignHash, secondarySigs) + s.Require().NoError(err) + gvgMapping.SecondarySpBlsSignature = aggBlsSig + } + + msgCompleteMigrationBucket := storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) + s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, dstPrimarySP.OperatorKey, "The bucket is not been migrating") + + // send again + msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) + msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt + msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) + s.SendTxBlock(user, msgMigrationBucket) + s.Require().NoError(err) + + // complete again + msgCompleteMigrationBucket = storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) + s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) +} func (s *StorageTestSuite) TestUpdateStorageParams() { // 1. create proposal @@ -2011,69 +2012,69 @@ func (s *StorageTestSuite) TestMaintenanceSPCreateBucketAndObject() { s.Require().Equal(sptypes.STATUS_IN_SERVICE, spResp.StorageProvider.Status) } -//func (s *StorageTestSuite) TestRejectMigrateBucket() { -// // construct bucket and object -// primarySP := s.BaseSuite.PickStorageProvider() -// gvg, found := primarySP.GetFirstGlobalVirtualGroup() -// s.Require().True(found) -// user := s.GenAndChargeAccounts(1, 1000000)[0] -// bucketName := storageutils.GenRandomBucketName() -// objectName := storageutils.GenRandomObjectName() -// s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) -// -// var err error -// dstPrimarySP := s.CreateNewStorageProvider() -// -// // migrate bucket -// msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) -// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt -// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) -// s.SendTxBlock(user, msgMigrationBucket) -// s.Require().NoError(err) -// -// ctx := context.Background() -// queryHeadBucketRequest := storagetypes.QueryHeadBucketRequest{ -// BucketName: bucketName, -// } -// queryHeadBucketResponse, err := s.Client.HeadBucket(ctx, &queryHeadBucketRequest) -// s.Require().NoError(err) -// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketName, bucketName) -// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_MIGRATING) -// -// // Dest SP reject the migration -// rejectMigration := storagetypes.NewMsgRejectMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName) -// s.SendTxBlock(dstPrimarySP.OperatorKey, rejectMigration) -// s.Require().NoError(err) -// -// queryHeadBucketRequest = storagetypes.QueryHeadBucketRequest{ -// BucketName: bucketName, -// } -// queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) -// s.Require().NoError(err) -// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) -// -// // migrate bucket again -// msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) -// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt -// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) -// s.SendTxBlock(user, msgMigrationBucket) -// s.Require().NoError(err) -// -// // cancel migration by user -// msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) -// s.SendTxBlock(user, msgCancelMigrationBucket) -// s.Require().NoError(err) -// -// queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) -// s.Require().NoError(err) -// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) -// -// // dest SP should fail to reject -// s.Client.SetKeyManager(dstPrimarySP.OperatorKey) -// _, err = s.Client.BroadcastTx(context.Background(), []sdk.Msg{rejectMigration}, nil) -// s.Require().Error(err) -// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) -//} +func (s *StorageTestSuite) TestRejectMigrateBucket() { + // construct bucket and object + primarySP := s.BaseSuite.PickStorageProvider() + gvg, found := primarySP.GetFirstGlobalVirtualGroup() + s.Require().True(found) + user := s.GenAndChargeAccounts(1, 1000000)[0] + bucketName := storageutils.GenRandomBucketName() + objectName := storageutils.GenRandomObjectName() + s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) + + var err error + dstPrimarySP := s.CreateNewStorageProvider() + + // migrate bucket + msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) + msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt + msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) + s.SendTxBlock(user, msgMigrationBucket) + s.Require().NoError(err) + + ctx := context.Background() + queryHeadBucketRequest := storagetypes.QueryHeadBucketRequest{ + BucketName: bucketName, + } + queryHeadBucketResponse, err := s.Client.HeadBucket(ctx, &queryHeadBucketRequest) + s.Require().NoError(err) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketName, bucketName) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_MIGRATING) + + // Dest SP reject the migration + rejectMigration := storagetypes.NewMsgRejectMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName) + s.SendTxBlock(dstPrimarySP.OperatorKey, rejectMigration) + s.Require().NoError(err) + + queryHeadBucketRequest = storagetypes.QueryHeadBucketRequest{ + BucketName: bucketName, + } + queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) + s.Require().NoError(err) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) + + // migrate bucket again + msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) + msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt + msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) + s.SendTxBlock(user, msgMigrationBucket) + s.Require().NoError(err) + + // cancel migration by user + msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) + s.SendTxBlock(user, msgCancelMigrationBucket) + s.Require().NoError(err) + + queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) + s.Require().NoError(err) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) + + // dest SP should fail to reject + s.Client.SetKeyManager(dstPrimarySP.OperatorKey) + _, err = s.Client.BroadcastTx(context.Background(), []sdk.Msg{rejectMigration}, nil) + s.Require().Error(err) + s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) +} func (s *StorageTestSuite) TestSetTag() { var err error From 1c66afe96c4c4aae620b289847e7c5cb211bb03e Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 18 Dec 2023 18:54:06 +0800 Subject: [PATCH 20/27] fix duplicate gvgs in test --- e2e/core/basesuite.go | 13 +++++++++++++ go.mod | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index 0ba911dfb..989b443ab 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -12,6 +12,8 @@ import ( "sync" "time" + "golang.org/x/exp/slices" + sdkmath "cosmossdk.io/math" "github.com/cometbft/cometbft/crypto/tmhash" tmlog "github.com/cometbft/cometbft/libs/log" @@ -682,6 +684,17 @@ func (s *BaseSuite) CreateObject(user keys.KeyManager, primarySP *StorageProvide } func (s *BaseSuite) CreateGlobalVirtualGroup(sp *StorageProvider, familyID uint32, secondarySPIDs []uint32, depositAmount int64) (uint32, uint32) { + + // check if the GVG already exits + if familyID != 0 { + resp, _ := s.Client.GlobalVirtualGroupByFamilyID(context.Background(), &virtualgroupmoduletypes.QueryGlobalVirtualGroupByFamilyIDRequest{GlobalVirtualGroupFamilyId: familyID}) + for _, gvg := range resp.GlobalVirtualGroups { + if slices.Equal(secondarySPIDs, gvg.SecondarySpIds) { + return gvg.Id, familyID + } + } + } + // Create a GVG for each sp by default deposit := sdk.Coin{ Denom: s.Config.Denom, diff --git a/go.mod b/go.mod index 134c77b15..bed9cbb5b 100644 --- a/go.mod +++ b/go.mod @@ -27,6 +27,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.4 + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 google.golang.org/grpc v1.58.3 google.golang.org/protobuf v1.31.0 @@ -159,7 +160,6 @@ require ( github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect From 3443fd451dd16cc3042388342aaa7ff178b83fa4 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 19 Dec 2023 10:44:39 +0800 Subject: [PATCH 21/27] allow reserved swapin expired SP to continue acquire data if no other SP reserve. --- app/upgrade.go | 6 -- deployment/localup/localup.sh | 2 +- e2e/core/basesuite.go | 3 +- e2e/tests/virtualgroup_test.go | 76 ++++++++++++------- x/storage/keeper/keeper.go | 2 +- x/virtualgroup/keeper/grpc_query.go | 3 - x/virtualgroup/keeper/keeper.go | 6 +- x/virtualgroup/types/errors.go | 3 +- .../message_complete_storage_provider_exit.go | 12 +-- 9 files changed, 56 insertions(+), 57 deletions(-) diff --git a/app/upgrade.go b/app/upgrade.go index 72d2ce8b3..97420354a 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -146,12 +146,6 @@ func (app *App) registerHulunbeierUpgradeHandler() { app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderExit", 1.2e3)) app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteStorageProviderExit", 1.2e3)) - // enable bucket migration - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgMigrateBucket", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgCancelMigrateBucket", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgCompleteMigrateBucket", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.storage.MsgRejectMigrateBucket", 1.2e3)) - return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) diff --git a/deployment/localup/localup.sh b/deployment/localup/localup.sh index afae4a5d2..7cfad3ed1 100644 --- a/deployment/localup/localup.sh +++ b/deployment/localup/localup.sh @@ -174,7 +174,7 @@ function generate_genesis() { echo -e '[[upgrade]]\nname = "Nagqu"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Pampas"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml echo -e '[[upgrade]]\nname = "Manchurian"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml - echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 20\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml + echo -e '[[upgrade]]\nname = "Hulunbeier"\nheight = 21\ninfo = ""' >> ${workspace}/.local/validator${i}/config/app.toml done # enable swagger API for validator0 diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go index 989b443ab..bde8bab85 100644 --- a/e2e/core/basesuite.go +++ b/e2e/core/basesuite.go @@ -12,8 +12,6 @@ import ( "sync" "time" - "golang.org/x/exp/slices" - sdkmath "cosmossdk.io/math" "github.com/cometbft/cometbft/crypto/tmhash" tmlog "github.com/cometbft/cometbft/libs/log" @@ -30,6 +28,7 @@ import ( "github.com/prysmaticlabs/prysm/crypto/bls" "github.com/spf13/cobra" "github.com/stretchr/testify/suite" + "golang.org/x/exp/slices" "github.com/bnb-chain/greenfield/cmd/gnfd/cmd" "github.com/bnb-chain/greenfield/sdk/client" diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 4c1633115..2a8e95c51 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1215,13 +1215,13 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { // 1. create an SP-x that wants to exit spx := s.BaseSuite.CreateNewStorageProvider() - s.T().Logf("new SP(successor) Info: %s", spx.Info.String()) + s.T().Logf("new SPx(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()) + s.T().Logf("new SPy(successor) Info: %s", spy.Info.String()) spz := s.BaseSuite.CreateNewStorageProvider() - s.T().Logf("new SP(successor) Info: %s", spz.Info.String()) + s.T().Logf("new SPz(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) @@ -1234,7 +1234,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { s.Require().NoError(err) s.Require().Equal(resp.StorageProvider.Status, sptypes.STATUS_GRACEFUL_EXITING) - // 5 SP-y reserves the swap + // 5 SP-y reserves the swapIn family msgReserveSwapIn := virtualgroupmoduletypes.NewMsgReserveSwapIn(spy.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) s.SendTxBlock(spy.OperatorKey, msgReserveSwapIn) @@ -1246,52 +1246,70 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { s.Require().Equal(swapInInfo.SwapInInfo.SuccessorSpId, spy.Info.Id) s.Require().Equal(swapInInfo.SwapInInfo.TargetSpId, spx.Info.Id) - // SP-z try swapIn, failes + // 7. SP-z try to swapIn family, it would fail msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) s.SendTxBlockWithExpectErrorString(msgReserveSwapIn, spz.OperatorKey, "already exist SP") - // 7 waits for 11 seconds, the swapIno is expired + // 8 waits for swapIno is expired, it can still be queried but with expired info time.Sleep(11 * time.Second) _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupFamilyId: familyID, }) - s.Require().Error(err) - s.Require().ErrorContains(err, "swap in info expired") + s.Require().NoError(err) + s.Require().True(swapInInfo.SwapInInfo.ExpirationTime < uint64(time.Now().Unix())) - // SP-y try to complete + // 9 SP-y try to complete swapIn family, it is allowed, since no other SP apply swapIn, and swapIn info will be gone after completion msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) - s.SendTxBlockWithExpectErrorString(msgCompleteSwapIn, spy.OperatorKey, "reserved swap expired") + s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) - // 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") + swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + GlobalVirtualGroupFamilyId: familyID, + }) + s.Require().Error(err) - // SP-z can reserve the swap since the previous one is expired - msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spx.Info.Id, familyID, 0) + // 10 sp-x completes the exit + s.SendTxBlock( + spx.OperatorKey, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), + Operator: spx.OperatorKey.GetAddr().String()}, + ) + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + s.Require().Error(err) + + // 11. SP-y 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) + + // 12 SP-z reserves the swapIn family but not complete it + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spz.OperatorKey.GetAddr(), spy.Info.Id, familyID, 0) s.SendTxBlock(spz.OperatorKey, msgReserveSwapIn) + // 13 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(spz.Info.Id, swapInInfo.SwapInInfo.SuccessorSpId) - s.Require().Equal(spx.Info.Id, swapInInfo.SwapInInfo.TargetSpId) + // 14. wait for swapIn info expired + time.Sleep(11 * time.Second) - // SP-z completes the swapIn - msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spz.OperatorKey.GetAddr(), familyID, 0) - s.SendTxBlock(spz.OperatorKey, msgCompleteSwapIn) + // 15 a new SP can reserve since the prev one is expired + spn := s.BaseSuite.CreateNewStorageProvider() + msgReserveSwapIn = virtualgroupmoduletypes.NewMsgReserveSwapIn(spn.OperatorKey.GetAddr(), spy.Info.Id, familyID, 0) + s.SendTxBlock(spn.OperatorKey, msgReserveSwapIn) - _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ - GlobalVirtualGroupFamilyId: familyID, - }) - s.Require().Error(err) + msgCompleteSwapIn = virtualgroupmoduletypes.NewMsgCompleteSwapIn(spn.OperatorKey.GetAddr(), familyID, 0) + s.SendTxBlock(spn.OperatorKey, msgCompleteSwapIn) - // sp-x completes the exit + // 16 spy complete exit s.SendTxBlock( - spx.OperatorKey, - &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spx.OperatorKey.GetAddr().String(), - Operator: spx.OperatorKey.GetAddr().String()}, + spy.OperatorKey, + &virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: spy.OperatorKey.GetAddr().String(), + Operator: spy.OperatorKey.GetAddr().String()}, ) - _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) + _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spy.Info.Id}) s.Require().Error(err) } diff --git a/x/storage/keeper/keeper.go b/x/storage/keeper/keeper.go index c66101235..ad8b50eeb 100644 --- a/x/storage/keeper/keeper.go +++ b/x/storage/keeper/keeper.go @@ -1173,7 +1173,7 @@ func (k Keeper) DiscontinueObject(ctx sdk.Context, operator sdk.AccAddress, buck return errors.Wrapf(types.ErrAccessDenied, "only primary sp is allowed to do discontinue objects") } swapInInfo, found := k.virtualGroupKeeper.GetSwapInInfo(ctx, bucketInfo.GlobalVirtualGroupFamilyId, virtualgroupmoduletypes.NoSpecifiedGVGId) - if !found || swapInInfo.TargetSpId != spInState.Id || swapInInfo.SuccessorSpId != sp.Id || uint64(ctx.BlockTime().Unix()) >= swapInInfo.ExpirationTime { + if !found || swapInInfo.TargetSpId != spInState.Id || swapInInfo.SuccessorSpId != sp.Id { return errors.Wrapf(types.ErrAccessDenied, "the sp is not allowed to do discontinue objects") } } diff --git a/x/virtualgroup/keeper/grpc_query.go b/x/virtualgroup/keeper/grpc_query.go index 7d0e744d2..fe8c994d9 100644 --- a/x/virtualgroup/keeper/grpc_query.go +++ b/x/virtualgroup/keeper/grpc_query.go @@ -129,9 +129,6 @@ func (k Keeper) SwapInInfo(goCtx context.Context, req *types.QuerySwapInInfoRequ if !found { return nil, types.ErrSwapInInfoNotExist } - if uint64(ctx.BlockTime().Unix()) >= swapInInfo.ExpirationTime { - return nil, types.ErrSwapInInfoExpired - } return &types.QuerySwapInInfoResponse{ SwapInInfo: swapInInfo, }, nil diff --git a/x/virtualgroup/keeper/keeper.go b/x/virtualgroup/keeper/keeper.go index d05a8d20e..a3c9d6dfc 100644 --- a/x/virtualgroup/keeper/keeper.go +++ b/x/virtualgroup/keeper/keeper.go @@ -799,10 +799,6 @@ func (k Keeper) CompleteSwapIn(ctx sdk.Context, gvgFamilyID uint32, gvgID uint32 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) @@ -853,7 +849,7 @@ func (k Keeper) completeSwapInGVG(ctx sdk.Context, successorSPID, targetSecondar // settlement err := k.SettleAndDistributeGVG(ctx, gvg) if err != nil { - return types.ErrSwapOutFailed.Wrapf("fail to settle GVG %d", gvgID) + return types.ErrSwapInFailed.Wrapf("fail to settle GVG %d", gvgID) } secondarySPIndex := -1 for i, sspID := range gvg.GetSecondarySpIds() { diff --git a/x/virtualgroup/types/errors.go b/x/virtualgroup/types/errors.go index a0b1188df..15e8c84d5 100644 --- a/x/virtualgroup/types/errors.go +++ b/x/virtualgroup/types/errors.go @@ -25,8 +25,7 @@ var ( ErrDuplicateGVG = errors.Register(ModuleName, 1126, "global virtual group is duplicate") 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") - ErrGVGStatisticsNotExist = errors.Register(ModuleName, 1130, "gvg statistics not exist.") + ErrGVGStatisticsNotExist = errors.Register(ModuleName, 1129, "gvg statistics not exist.") ErrInvalidDenom = errors.Register(ModuleName, 2000, "Invalid denom.") ) diff --git a/x/virtualgroup/types/message_complete_storage_provider_exit.go b/x/virtualgroup/types/message_complete_storage_provider_exit.go index 1c57e44d8..e860f4c82 100644 --- a/x/virtualgroup/types/message_complete_storage_provider_exit.go +++ b/x/virtualgroup/types/message_complete_storage_provider_exit.go @@ -26,16 +26,12 @@ func (msg *MsgCompleteStorageProviderExit) Type() string { } func (msg *MsgCompleteStorageProviderExit) GetSigners() []sdk.AccAddress { + spAddr := sdk.MustAccAddressFromHex(msg.StorageProvider) operator, err := sdk.AccAddressFromHexUnsafe(msg.Operator) - if err != nil { - spAddr, err := sdk.AccAddressFromHexUnsafe(msg.StorageProvider) - if err != nil { - panic(err) - } - return []sdk.AccAddress{spAddr} + if err == nil { + return []sdk.AccAddress{operator} } - // the operator address will be validated in runtime after harfork and treated as signer - return []sdk.AccAddress{operator} + return []sdk.AccAddress{spAddr} } func (msg *MsgCompleteStorageProviderExit) GetSignBytes() []byte { From b0c9b5373e86d9f354f1c35a7903d3e91f996218 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 19 Dec 2023 12:15:53 +0800 Subject: [PATCH 22/27] forced exit SP staked BNB transfer to payment module gov stream record related bank account --- e2e/tests/storage_bill_test.go | 632 +++++++++--------- e2e/tests/storage_test.go | 287 ++++---- e2e/tests/virtualgroup_test.go | 22 +- x/virtualgroup/keeper/msg_server.go | 5 +- x/virtualgroup/types/expected_keepers.go | 1 - .../types/expected_keepers_mocks.go | 5 - 6 files changed, 475 insertions(+), 477 deletions(-) diff --git a/e2e/tests/storage_bill_test.go b/e2e/tests/storage_bill_test.go index d51be343c..056eac7b4 100644 --- a/e2e/tests/storage_bill_test.go +++ b/e2e/tests/storage_bill_test.go @@ -1746,317 +1746,317 @@ func (s *PaymentTestSuite) TestStorageBill_UpdatePaymentAddress() { s.SendTxBlockWithExpectErrorString(msgUpdateBucketInfo, user, "apply user flows list failed") } -func (s *PaymentTestSuite) TestStorageBill_MigrateBucket() { - var err error - ctx := context.Background() - primarySP := s.PickStorageProvider() - gvg, found := primarySP.GetFirstGlobalVirtualGroup() - s.Require().True(found) - queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ - FamilyId: gvg.FamilyId, - }) - s.Require().NoError(err) - family := queryFamilyResponse.GlobalVirtualGroupFamily - user := s.GenAndChargeAccounts(1, 10)[0] - - streamAddresses := []string{ - user.GetAddr().String(), - family.VirtualPaymentAddress, - gvg.VirtualPaymentAddress, - paymenttypes.ValidatorTaxPoolAddress.String(), - } - - streamAddresses0 := streamAddresses - paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) - s.T().Logf("paymentParams %s, err: %v", paymentParams, err) - s.Require().NoError(err) - - bucketName := s.createBucket(primarySP, gvg, user, 0) - bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ - BucketName: bucketName, - }) - s.Require().NoError(err) - - // create object with none zero payload size - streamRecordsBefore := s.getStreamRecords(streamAddresses) - _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) - - // assertions - streamRecordsAfter := s.getStreamRecords(streamAddresses) - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) - s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) - - // case: seal object without price change - s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) - - // assertions - streamRecordsAfter = s.getStreamRecords(streamAddresses) - gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) - s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) - taxRate0 := taxRate - - dstPrimarySP := s.CreateNewStorageProvider() - - // update price - priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ - Timestamp: 0, - }) - s.Require().NoError(err) - s.T().Log("price", priceRes.GlobalSpStorePrice) - - s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(2), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) - defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) - - _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) - gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) - gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ - GlobalVirtualGroupId: gvgID, - }) - s.Require().NoError(err) - dstGVG := gvgResp.GlobalVirtualGroup - s.Require().True(found) - - queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ - FamilyId: dstGVG.FamilyId, - }) - s.Require().NoError(err) - family = queryFamilyResponse.GlobalVirtualGroupFamily - streamAddresses = []string{ - user.GetAddr().String(), - family.VirtualPaymentAddress, - dstGVG.VirtualPaymentAddress, - paymenttypes.ValidatorTaxPoolAddress.String(), - } - fundAddress := primarySP.FundingKey.GetAddr() - streamRecordsBefore = s.getStreamRecords(streamAddresses) - - queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} - fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) - s.Require().NoError(err) - - // MigrationBucket - msgMigrationBucket, msgCompleteMigrationBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) - s.SendTxBlock(user, msgMigrationBucket) - s.Require().NoError(err) - - // complete MigrationBucket - s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) - streamRecordsAfter = s.getStreamRecords(streamAddresses) - fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) - s.Require().NoError(err) - s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) - s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") - gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) - s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) - s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) - - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) - // tax rate diff - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) - - // set price - s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(120), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(5000)) - - queryBalanceRequest.Address = dstPrimarySP.FundingKey.GetAddr().String() - fundBalanceBefore, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) - s.Require().NoError(err) - streamRecordsBefore = s.getStreamRecords(streamAddresses0) - // send msgMigrationBucket - msgMigrationBucket, msgCompleteMigrationBucket = s.NewMigrateBucket(dstPrimarySP, primarySP, user, bucketName, dstGVG.FamilyId, gvg.FamilyId, bucketInfo.BucketInfo.Id) - - s.SendTxBlock(user, msgMigrationBucket) - s.Require().NoError(err) - s.reduceBNBBalance(user, s.Validator, sdkmath.NewIntWithDecimal(1, 1)) - - s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, primarySP.OperatorKey, "apply stream record changes for user failed") - - s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(10), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) - readPrice, primaryPrice, secondaryPrice := s.getPrices(time.Now().Unix()) - s.T().Logf("readPrice: %v, primaryPrice: %v,secondaryPrice: %v", readPrice, primaryPrice, secondaryPrice) - - s.transferBNB(s.Validator, user, sdkmath.NewIntWithDecimal(10000, 18)) - - s.SendTxBlock(primarySP.OperatorKey, msgCompleteMigrationBucket) - streamRecordsAfter = s.getStreamRecords(streamAddresses0) - fundBalanceAfter, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) - s.Require().NoError(err) - s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) - s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") - taxRate1 := taxRate - gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) - s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) - s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) - - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) - // tax rate diff - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate1)) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) -} - -func (s *PaymentTestSuite) TestStorageBill_MigrateBucket_LockedFee_ThenDiscontinueBucket() { - var err error - ctx := context.Background() - primarySP := s.PickStorageProvider() - gvg, found := primarySP.GetFirstGlobalVirtualGroup() - s.Require().True(found) - queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ - FamilyId: gvg.FamilyId, - }) - s.Require().NoError(err) - family := queryFamilyResponse.GlobalVirtualGroupFamily - user := s.GenAndChargeAccounts(1, 10)[0] - - streamAddresses := []string{ - user.GetAddr().String(), - family.VirtualPaymentAddress, - gvg.VirtualPaymentAddress, - paymenttypes.ValidatorTaxPoolAddress.String(), - } - - paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) - s.T().Logf("paymentParams %s, err: %v", paymentParams, err) - s.Require().NoError(err) - - bucketName := s.createBucket(primarySP, gvg, user, 0) - bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ - BucketName: bucketName, - }) - s.Require().NoError(err) - - // create object with none zero payload size - streamRecordsBefore := s.getStreamRecords(streamAddresses) - _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) - - // assertions - streamRecordsAfter := s.getStreamRecords(streamAddresses) - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) - s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) - - // case: seal object - s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) - - // assertions - streamRecordsAfter = s.getStreamRecords(streamAddresses) - gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) - s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) - taxRate0 := taxRate - dstPrimarySP := s.CreateNewStorageProvider() - - // create a new object without seal - s.createObject(user, bucketName, false) - - // update price after lock - priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ - Timestamp: 0, - }) - s.Require().NoError(err) - s.T().Log("price", priceRes.GlobalSpStorePrice) - - s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10000)) - defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) - - _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) - gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) - gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ - GlobalVirtualGroupId: gvgID, - }) - s.Require().NoError(err) - dstGVG := gvgResp.GlobalVirtualGroup - s.Require().True(found) - - queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ - FamilyId: dstGVG.FamilyId, - }) - s.Require().NoError(err) - family = queryFamilyResponse.GlobalVirtualGroupFamily - streamAddresses = []string{ - user.GetAddr().String(), - family.VirtualPaymentAddress, - dstGVG.VirtualPaymentAddress, - paymenttypes.ValidatorTaxPoolAddress.String(), - } - fundAddress := primarySP.FundingKey.GetAddr() - streamRecordsBefore = s.getStreamRecords(streamAddresses) - - queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} - fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) - s.Require().NoError(err) - - // MigrateBucket - msgMigrateBucket, msgCompleteMigrateBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) - s.SendTxBlock(user, msgMigrateBucket) - s.Require().NoError(err) - - // complete MigrateBucket - s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrateBucket) - streamRecordsAfter = s.getStreamRecords(streamAddresses) - fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) - s.Require().NoError(err) - s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) - s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") - gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) - s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) - s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) - - s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) - s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) - s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) - // tax rate diff - s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) - s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) - - // force delete bucket - headBucketResp, _ := s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) - s.T().Log("headBucketResp", core.YamlString(headBucketResp)) - msgDiscontinueBucket := storagetypes.NewMsgDiscontinueBucket(dstPrimarySP.GcKey.GetAddr(), bucketName, "test") - txRes := s.SendTxBlock(dstPrimarySP.GcKey, msgDiscontinueBucket) - deleteAt := filterDiscontinueBucketEventFromTx(txRes).DeleteAt - - for { - time.Sleep(200 * time.Millisecond) - statusRes, err := s.TmClient.TmClient.Status(context.Background()) - s.Require().NoError(err) - blockTime := statusRes.SyncInfo.LatestBlockTime.Unix() - - s.T().Logf("current blockTime: %d, delete blockTime: %d", blockTime, deleteAt) - - if blockTime > deleteAt { - break - } - } +//func (s *PaymentTestSuite) TestStorageBill_MigrateBucket() { +// var err error +// ctx := context.Background() +// primarySP := s.PickStorageProvider() +// gvg, found := primarySP.GetFirstGlobalVirtualGroup() +// s.Require().True(found) +// queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ +// FamilyId: gvg.FamilyId, +// }) +// s.Require().NoError(err) +// family := queryFamilyResponse.GlobalVirtualGroupFamily +// user := s.GenAndChargeAccounts(1, 10)[0] +// +// streamAddresses := []string{ +// user.GetAddr().String(), +// family.VirtualPaymentAddress, +// gvg.VirtualPaymentAddress, +// paymenttypes.ValidatorTaxPoolAddress.String(), +// } +// +// streamAddresses0 := streamAddresses +// paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) +// s.T().Logf("paymentParams %s, err: %v", paymentParams, err) +// s.Require().NoError(err) +// +// bucketName := s.createBucket(primarySP, gvg, user, 0) +// bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ +// BucketName: bucketName, +// }) +// s.Require().NoError(err) +// +// // create object with none zero payload size +// streamRecordsBefore := s.getStreamRecords(streamAddresses) +// _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) +// +// // assertions +// streamRecordsAfter := s.getStreamRecords(streamAddresses) +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) +// s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) +// +// // case: seal object without price change +// s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) +// +// // assertions +// streamRecordsAfter = s.getStreamRecords(streamAddresses) +// gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) +// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) +// taxRate0 := taxRate +// +// dstPrimarySP := s.CreateNewStorageProvider() +// +// // update price +// priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ +// Timestamp: 0, +// }) +// s.Require().NoError(err) +// s.T().Log("price", priceRes.GlobalSpStorePrice) +// +// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(2), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) +// defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) +// +// _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) +// gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) +// gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ +// GlobalVirtualGroupId: gvgID, +// }) +// s.Require().NoError(err) +// dstGVG := gvgResp.GlobalVirtualGroup +// s.Require().True(found) +// +// queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ +// FamilyId: dstGVG.FamilyId, +// }) +// s.Require().NoError(err) +// family = queryFamilyResponse.GlobalVirtualGroupFamily +// streamAddresses = []string{ +// user.GetAddr().String(), +// family.VirtualPaymentAddress, +// dstGVG.VirtualPaymentAddress, +// paymenttypes.ValidatorTaxPoolAddress.String(), +// } +// fundAddress := primarySP.FundingKey.GetAddr() +// streamRecordsBefore = s.getStreamRecords(streamAddresses) +// +// queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} +// fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) +// s.Require().NoError(err) +// +// // MigrationBucket +// msgMigrationBucket, msgCompleteMigrationBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) +// s.SendTxBlock(user, msgMigrationBucket) +// s.Require().NoError(err) +// +// // complete MigrationBucket +// s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) +// streamRecordsAfter = s.getStreamRecords(streamAddresses) +// fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) +// s.Require().NoError(err) +// s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) +// s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") +// gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) +// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) +// s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) +// +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) +// // tax rate diff +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) +// +// // set price +// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(120), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(5000)) +// +// queryBalanceRequest.Address = dstPrimarySP.FundingKey.GetAddr().String() +// fundBalanceBefore, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) +// s.Require().NoError(err) +// streamRecordsBefore = s.getStreamRecords(streamAddresses0) +// // send msgMigrationBucket +// msgMigrationBucket, msgCompleteMigrationBucket = s.NewMigrateBucket(dstPrimarySP, primarySP, user, bucketName, dstGVG.FamilyId, gvg.FamilyId, bucketInfo.BucketInfo.Id) +// +// s.SendTxBlock(user, msgMigrationBucket) +// s.Require().NoError(err) +// s.reduceBNBBalance(user, s.Validator, sdkmath.NewIntWithDecimal(1, 1)) +// +// s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, primarySP.OperatorKey, "apply stream record changes for user failed") +// +// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice.MulInt64(10), priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10)) +// readPrice, primaryPrice, secondaryPrice := s.getPrices(time.Now().Unix()) +// s.T().Logf("readPrice: %v, primaryPrice: %v,secondaryPrice: %v", readPrice, primaryPrice, secondaryPrice) +// +// s.transferBNB(s.Validator, user, sdkmath.NewIntWithDecimal(10000, 18)) +// +// s.SendTxBlock(primarySP.OperatorKey, msgCompleteMigrationBucket) +// streamRecordsAfter = s.getStreamRecords(streamAddresses0) +// fundBalanceAfter, err = s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) +// s.Require().NoError(err) +// s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) +// s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") +// taxRate1 := taxRate +// gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) +// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) +// s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) +// +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) +// // tax rate diff +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate1)) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) +//} - _, err = s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) - s.Require().ErrorContains(err, "No such bucket") -} +//func (s *PaymentTestSuite) TestStorageBill_MigrateBucket_LockedFee_ThenDiscontinueBucket() { +// var err error +// ctx := context.Background() +// primarySP := s.PickStorageProvider() +// gvg, found := primarySP.GetFirstGlobalVirtualGroup() +// s.Require().True(found) +// queryFamilyResponse, err := s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ +// FamilyId: gvg.FamilyId, +// }) +// s.Require().NoError(err) +// family := queryFamilyResponse.GlobalVirtualGroupFamily +// user := s.GenAndChargeAccounts(1, 10)[0] +// +// streamAddresses := []string{ +// user.GetAddr().String(), +// family.VirtualPaymentAddress, +// gvg.VirtualPaymentAddress, +// paymenttypes.ValidatorTaxPoolAddress.String(), +// } +// +// paymentParams, err := s.Client.PaymentQueryClient.Params(ctx, &paymenttypes.QueryParamsRequest{}) +// s.T().Logf("paymentParams %s, err: %v", paymentParams, err) +// s.Require().NoError(err) +// +// bucketName := s.createBucket(primarySP, gvg, user, 0) +// bucketInfo, err := s.Client.HeadBucket(context.Background(), &storagetypes.QueryHeadBucketRequest{ +// BucketName: bucketName, +// }) +// s.Require().NoError(err) +// +// // create object with none zero payload size +// streamRecordsBefore := s.getStreamRecords(streamAddresses) +// _, _, objectName, objectId, checksums, payloadSize := s.createObject(user, bucketName, false) +// +// // assertions +// streamRecordsAfter := s.getStreamRecords(streamAddresses) +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// lockFee := s.calculateLockFee(bucketName, objectName, payloadSize) +// s.Require().Equal(streamRecordsAfter.User.LockBalance.Sub(streamRecordsBefore.User.LockBalance), lockFee) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate).Int64(), int64(0)) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate).Int64(), int64(0)) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate).Int64(), int64(0)) +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate).Int64(), int64(0)) +// +// // case: seal object +// s.sealObject(primarySP, gvg, bucketName, objectName, objectId, checksums) +// +// // assertions +// streamRecordsAfter = s.getStreamRecords(streamAddresses) +// gvgFamilyRate, gvgRate, taxRate, userTotalRate := s.calculateStorageRates(bucketName, objectName, payloadSize, 0) +// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.User.LockBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate), userTotalRate.Neg()) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate) +// taxRate0 := taxRate +// dstPrimarySP := s.CreateNewStorageProvider() +// +// // create a new object without seal +// s.createObject(user, bucketName, false) +// +// // update price after lock +// priceRes, err := s.Client.QueryGlobalSpStorePriceByTime(ctx, &sptypes.QueryGlobalSpStorePriceByTimeRequest{ +// Timestamp: 0, +// }) +// s.Require().NoError(err) +// s.T().Log("price", priceRes.GlobalSpStorePrice) +// +// s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice.MulInt64(10000)) +// defer s.updateGlobalSpPrice(priceRes.GlobalSpStorePrice.ReadPrice, priceRes.GlobalSpStorePrice.PrimaryStorePrice) +// +// _, secondarySPIDs := s.GetSecondarySP(dstPrimarySP, primarySP) +// gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) +// gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &virtualgrouptypes.QueryGlobalVirtualGroupRequest{ +// GlobalVirtualGroupId: gvgID, +// }) +// s.Require().NoError(err) +// dstGVG := gvgResp.GlobalVirtualGroup +// s.Require().True(found) +// +// queryFamilyResponse, err = s.Client.GlobalVirtualGroupFamily(ctx, &virtualgrouptypes.QueryGlobalVirtualGroupFamilyRequest{ +// FamilyId: dstGVG.FamilyId, +// }) +// s.Require().NoError(err) +// family = queryFamilyResponse.GlobalVirtualGroupFamily +// streamAddresses = []string{ +// user.GetAddr().String(), +// family.VirtualPaymentAddress, +// dstGVG.VirtualPaymentAddress, +// paymenttypes.ValidatorTaxPoolAddress.String(), +// } +// fundAddress := primarySP.FundingKey.GetAddr() +// streamRecordsBefore = s.getStreamRecords(streamAddresses) +// +// queryBalanceRequest := banktypes.QueryBalanceRequest{Denom: s.Config.Denom, Address: fundAddress.String()} +// fundBalanceBefore, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) +// s.Require().NoError(err) +// +// // MigrateBucket +// msgMigrateBucket, msgCompleteMigrateBucket := s.NewMigrateBucket(primarySP, dstPrimarySP, user, bucketName, gvg.FamilyId, dstGVG.FamilyId, bucketInfo.BucketInfo.Id) +// s.SendTxBlock(user, msgMigrateBucket) +// s.Require().NoError(err) +// +// // complete MigrateBucket +// s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrateBucket) +// streamRecordsAfter = s.getStreamRecords(streamAddresses) +// fundBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &queryBalanceRequest) +// s.Require().NoError(err) +// s.T().Logf("fundBalanceBefore: %v, fundBalanceAfter: %v, diff: %v", fundBalanceBefore, fundBalanceAfter, fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount)) +// s.Require().True(fundBalanceAfter.Balance.Amount.Sub(fundBalanceBefore.Balance.Amount).GT(sdkmath.NewInt(0)), "migrate sp fund address need settle") +// gvgFamilyRate, gvgRate, taxRate, userTotalRate = s.calculateStorageRates(bucketName, objectName, payloadSize, time.Now().Unix()) +// s.T().Logf("gvgFamilyRate: %v, gvgRate: %v, taxRate: %v, userTotalRate: %v", gvgFamilyRate, gvgRate, taxRate, userTotalRate) +// s.T().Logf("NetflowRate: %v, userTotalRate: %v, actual taxRate diff: %v, expect taxRate diff: %v", streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Neg(), streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) +// +// s.Require().Equal(streamRecordsAfter.User.StaticBalance, sdkmath.ZeroInt()) +// s.Require().Equal(streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate), gvgFamilyRate) +// s.Require().Equal(streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate), gvgRate) +// // tax rate diff +// s.Require().Equal(streamRecordsAfter.Tax.NetflowRate.Sub(streamRecordsBefore.Tax.NetflowRate), taxRate.Sub(taxRate0)) +// s.Require().Equal(streamRecordsAfter.User.NetflowRate.Neg(), userTotalRate.Abs()) +// +// // force delete bucket +// headBucketResp, _ := s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) +// s.T().Log("headBucketResp", core.YamlString(headBucketResp)) +// msgDiscontinueBucket := storagetypes.NewMsgDiscontinueBucket(dstPrimarySP.GcKey.GetAddr(), bucketName, "test") +// txRes := s.SendTxBlock(dstPrimarySP.GcKey, msgDiscontinueBucket) +// deleteAt := filterDiscontinueBucketEventFromTx(txRes).DeleteAt +// +// for { +// time.Sleep(200 * time.Millisecond) +// statusRes, err := s.TmClient.TmClient.Status(context.Background()) +// s.Require().NoError(err) +// blockTime := statusRes.SyncInfo.LatestBlockTime.Unix() +// +// s.T().Logf("current blockTime: %d, delete blockTime: %d", blockTime, deleteAt) +// +// if blockTime > deleteAt { +// break +// } +// } +// +// _, err = s.Client.HeadBucket(ctx, &storagetypes.QueryHeadBucketRequest{BucketName: bucketName}) +// s.Require().ErrorContains(err, "No such bucket") +//} //func (s *PaymentTestSuite) TestStorageBill_MigrateBucket_FrozenAccount_NotAllowed() { // var err error @@ -2296,9 +2296,9 @@ func (s *PaymentTestSuite) reduceBNBBalance(user, to keys.KeyManager, leftBalanc s.T().Logf("balance: %v", queryBalanceResponse.Balance.Amount) } -func (s *PaymentTestSuite) transferBNB(from, to keys.KeyManager, amount sdkmath.Int) { - msgSend := banktypes.NewMsgSend(from.GetAddr(), to.GetAddr(), sdk.NewCoins( - sdk.NewCoin(s.Config.Denom, amount), - )) - s.SendTxBlock(from, msgSend) -} +//func (s *PaymentTestSuite) transferBNB(from, to keys.KeyManager, amount sdkmath.Int) { +// msgSend := banktypes.NewMsgSend(from.GetAddr(), to.GetAddr(), sdk.NewCoins( +// sdk.NewCoin(s.Config.Denom, amount), +// )) +// s.SendTxBlock(from, msgSend) +//} diff --git a/e2e/tests/storage_test.go b/e2e/tests/storage_test.go index 43a46a67e..f9d90d6ec 100644 --- a/e2e/tests/storage_test.go +++ b/e2e/tests/storage_test.go @@ -30,7 +30,6 @@ import ( types2 "github.com/bnb-chain/greenfield/types" sptypes "github.com/bnb-chain/greenfield/x/sp/types" storagetypes "github.com/bnb-chain/greenfield/x/storage/types" - types3 "github.com/bnb-chain/greenfield/x/virtualgroup/types" ) type StorageTestSuite struct { @@ -1667,86 +1666,86 @@ func (s *StorageTestSuite) TestRejectSealObject() { s.Require().True(strings.Contains(err.Error(), storagetypes.ErrNoSuchObject.Error())) } -func (s *StorageTestSuite) TestMigrationBucket() { - // construct bucket and object - primarySP := s.BaseSuite.PickStorageProvider() - gvg, found := primarySP.GetFirstGlobalVirtualGroup() - s.Require().True(found) - user := s.GenAndChargeAccounts(1, 1000000)[0] - bucketName := storageutils.GenRandomBucketName() - objectName := storageutils.GenRandomObjectName() - _, _, _, bucketInfo := s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) - - var err error - dstPrimarySP := s.CreateNewStorageProvider() - - // migrate bucket - msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) - msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt - msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) - s.SendTxBlock(user, msgMigrationBucket) - s.Require().NoError(err) - - // cancel migration bucket - msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) - s.SendTxBlock(user, msgCancelMigrationBucket) - s.Require().NoError(err) - - // complete migration bucket - var secondarySPIDs []uint32 - var secondarySPs []*core.StorageProvider - - for _, ssp := range s.StorageProviders { - if ssp.Info.Id != primarySP.Info.Id { - secondarySPIDs = append(secondarySPIDs, ssp.Info.Id) - secondarySPs = append(secondarySPs, ssp) - } - if len(secondarySPIDs) == 6 { - break - } - } - gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) - gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &types3.QueryGlobalVirtualGroupRequest{ - GlobalVirtualGroupId: gvgID, - }) - s.Require().NoError(err) - dstGVG := gvgResp.GlobalVirtualGroup - s.Require().True(found) - - // construct the signatures - var gvgMappings []*storagetypes.GVGMapping - gvgMappings = append(gvgMappings, &storagetypes.GVGMapping{SrcGlobalVirtualGroupId: gvg.Id, DstGlobalVirtualGroupId: dstGVG.Id}) - for _, gvgMapping := range gvgMappings { - migrationBucketSignHash := storagetypes.NewSecondarySpMigrationBucketSignDoc(s.GetChainID(), bucketInfo.Id, dstPrimarySP.Info.Id, gvgMapping.SrcGlobalVirtualGroupId, gvgMapping.DstGlobalVirtualGroupId).GetBlsSignHash() - secondarySigs := make([][]byte, 0) - secondarySPBlsPubKeys := make([]bls.PublicKey, 0) - for _, ssp := range secondarySPs { - sig, err := core.BlsSignAndVerify(ssp, migrationBucketSignHash) - s.Require().NoError(err) - secondarySigs = append(secondarySigs, sig) - pk, err := bls.PublicKeyFromBytes(ssp.BlsKey.PubKey().Bytes()) - s.Require().NoError(err) - secondarySPBlsPubKeys = append(secondarySPBlsPubKeys, pk) - } - aggBlsSig, err := core.BlsAggregateAndVerify(secondarySPBlsPubKeys, migrationBucketSignHash, secondarySigs) - s.Require().NoError(err) - gvgMapping.SecondarySpBlsSignature = aggBlsSig - } - - msgCompleteMigrationBucket := storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) - s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, dstPrimarySP.OperatorKey, "The bucket is not been migrating") - - // send again - msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) - msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt - msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) - s.SendTxBlock(user, msgMigrationBucket) - s.Require().NoError(err) - - // complete again - msgCompleteMigrationBucket = storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) - s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) -} +//func (s *StorageTestSuite) TestMigrationBucket() { +// // construct bucket and object +// primarySP := s.BaseSuite.PickStorageProvider() +// gvg, found := primarySP.GetFirstGlobalVirtualGroup() +// s.Require().True(found) +// user := s.GenAndChargeAccounts(1, 1000000)[0] +// bucketName := storageutils.GenRandomBucketName() +// objectName := storageutils.GenRandomObjectName() +// _, _, _, bucketInfo := s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) +// +// var err error +// dstPrimarySP := s.CreateNewStorageProvider() +// +// // migrate bucket +// msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) +// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt +// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) +// s.SendTxBlock(user, msgMigrationBucket) +// s.Require().NoError(err) +// +// // cancel migration bucket +// msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) +// s.SendTxBlock(user, msgCancelMigrationBucket) +// s.Require().NoError(err) +// +// // complete migration bucket +// var secondarySPIDs []uint32 +// var secondarySPs []*core.StorageProvider +// +// for _, ssp := range s.StorageProviders { +// if ssp.Info.Id != primarySP.Info.Id { +// secondarySPIDs = append(secondarySPIDs, ssp.Info.Id) +// secondarySPs = append(secondarySPs, ssp) +// } +// if len(secondarySPIDs) == 6 { +// break +// } +// } +// gvgID, _ := s.BaseSuite.CreateGlobalVirtualGroup(dstPrimarySP, 0, secondarySPIDs, 1) +// gvgResp, err := s.Client.VirtualGroupQueryClient.GlobalVirtualGroup(context.Background(), &types2.QueryGlobalVirtualGroupRequest{ +// GlobalVirtualGroupId: gvgID, +// }) +// s.Require().NoError(err) +// dstGVG := gvgResp.GlobalVirtualGroup +// s.Require().True(found) +// +// // construct the signatures +// var gvgMappings []*storagetypes.GVGMapping +// gvgMappings = append(gvgMappings, &storagetypes.GVGMapping{SrcGlobalVirtualGroupId: gvg.Id, DstGlobalVirtualGroupId: dstGVG.Id}) +// for _, gvgMapping := range gvgMappings { +// migrationBucketSignHash := storagetypes.NewSecondarySpMigrationBucketSignDoc(s.GetChainID(), bucketInfo.Id, dstPrimarySP.Info.Id, gvgMapping.SrcGlobalVirtualGroupId, gvgMapping.DstGlobalVirtualGroupId).GetBlsSignHash() +// secondarySigs := make([][]byte, 0) +// secondarySPBlsPubKeys := make([]bls.PublicKey, 0) +// for _, ssp := range secondarySPs { +// sig, err := core.BlsSignAndVerify(ssp, migrationBucketSignHash) +// s.Require().NoError(err) +// secondarySigs = append(secondarySigs, sig) +// pk, err := bls.PublicKeyFromBytes(ssp.BlsKey.PubKey().Bytes()) +// s.Require().NoError(err) +// secondarySPBlsPubKeys = append(secondarySPBlsPubKeys, pk) +// } +// aggBlsSig, err := core.BlsAggregateAndVerify(secondarySPBlsPubKeys, migrationBucketSignHash, secondarySigs) +// s.Require().NoError(err) +// gvgMapping.SecondarySpBlsSignature = aggBlsSig +// } +// +// msgCompleteMigrationBucket := storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) +// s.SendTxBlockWithExpectErrorString(msgCompleteMigrationBucket, dstPrimarySP.OperatorKey, "The bucket is not been migrating") +// +// // send again +// msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) +// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt +// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) +// s.SendTxBlock(user, msgMigrationBucket) +// s.Require().NoError(err) +// +// // complete again +// msgCompleteMigrationBucket = storagetypes.NewMsgCompleteMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName, dstGVG.FamilyId, gvgMappings) +// s.SendTxBlock(dstPrimarySP.OperatorKey, msgCompleteMigrationBucket) +//} func (s *StorageTestSuite) TestUpdateStorageParams() { // 1. create proposal @@ -2012,69 +2011,69 @@ func (s *StorageTestSuite) TestMaintenanceSPCreateBucketAndObject() { s.Require().Equal(sptypes.STATUS_IN_SERVICE, spResp.StorageProvider.Status) } -func (s *StorageTestSuite) TestRejectMigrateBucket() { - // construct bucket and object - primarySP := s.BaseSuite.PickStorageProvider() - gvg, found := primarySP.GetFirstGlobalVirtualGroup() - s.Require().True(found) - user := s.GenAndChargeAccounts(1, 1000000)[0] - bucketName := storageutils.GenRandomBucketName() - objectName := storageutils.GenRandomObjectName() - s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) - - var err error - dstPrimarySP := s.CreateNewStorageProvider() - - // migrate bucket - msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) - msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt - msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) - s.SendTxBlock(user, msgMigrationBucket) - s.Require().NoError(err) - - ctx := context.Background() - queryHeadBucketRequest := storagetypes.QueryHeadBucketRequest{ - BucketName: bucketName, - } - queryHeadBucketResponse, err := s.Client.HeadBucket(ctx, &queryHeadBucketRequest) - s.Require().NoError(err) - s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketName, bucketName) - s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_MIGRATING) - - // Dest SP reject the migration - rejectMigration := storagetypes.NewMsgRejectMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName) - s.SendTxBlock(dstPrimarySP.OperatorKey, rejectMigration) - s.Require().NoError(err) - - queryHeadBucketRequest = storagetypes.QueryHeadBucketRequest{ - BucketName: bucketName, - } - queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) - s.Require().NoError(err) - s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) - - // migrate bucket again - msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) - msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt - msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) - s.SendTxBlock(user, msgMigrationBucket) - s.Require().NoError(err) - - // cancel migration by user - msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) - s.SendTxBlock(user, msgCancelMigrationBucket) - s.Require().NoError(err) - - queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) - s.Require().NoError(err) - s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) - - // dest SP should fail to reject - s.Client.SetKeyManager(dstPrimarySP.OperatorKey) - _, err = s.Client.BroadcastTx(context.Background(), []sdk.Msg{rejectMigration}, nil) - s.Require().Error(err) - s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) -} +//func (s *StorageTestSuite) TestRejectMigrateBucket() { +// // construct bucket and object +// primarySP := s.BaseSuite.PickStorageProvider() +// gvg, found := primarySP.GetFirstGlobalVirtualGroup() +// s.Require().True(found) +// user := s.GenAndChargeAccounts(1, 1000000)[0] +// bucketName := storageutils.GenRandomBucketName() +// objectName := storageutils.GenRandomObjectName() +// s.BaseSuite.CreateObject(user, primarySP, gvg.Id, bucketName, objectName) +// +// var err error +// dstPrimarySP := s.CreateNewStorageProvider() +// +// // migrate bucket +// msgMigrationBucket := storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) +// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt +// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) +// s.SendTxBlock(user, msgMigrationBucket) +// s.Require().NoError(err) +// +// ctx := context.Background() +// queryHeadBucketRequest := storagetypes.QueryHeadBucketRequest{ +// BucketName: bucketName, +// } +// queryHeadBucketResponse, err := s.Client.HeadBucket(ctx, &queryHeadBucketRequest) +// s.Require().NoError(err) +// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketName, bucketName) +// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_MIGRATING) +// +// // Dest SP reject the migration +// rejectMigration := storagetypes.NewMsgRejectMigrateBucket(dstPrimarySP.OperatorKey.GetAddr(), bucketName) +// s.SendTxBlock(dstPrimarySP.OperatorKey, rejectMigration) +// s.Require().NoError(err) +// +// queryHeadBucketRequest = storagetypes.QueryHeadBucketRequest{ +// BucketName: bucketName, +// } +// queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) +// s.Require().NoError(err) +// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) +// +// // migrate bucket again +// msgMigrationBucket = storagetypes.NewMsgMigrateBucket(user.GetAddr(), bucketName, dstPrimarySP.Info.Id) +// msgMigrationBucket.DstPrimarySpApproval.ExpiredHeight = math.MaxInt +// msgMigrationBucket.DstPrimarySpApproval.Sig, err = dstPrimarySP.ApprovalKey.Sign(msgMigrationBucket.GetApprovalBytes()) +// s.SendTxBlock(user, msgMigrationBucket) +// s.Require().NoError(err) +// +// // cancel migration by user +// msgCancelMigrationBucket := storagetypes.NewMsgCancelMigrateBucket(user.GetAddr(), bucketName) +// s.SendTxBlock(user, msgCancelMigrationBucket) +// s.Require().NoError(err) +// +// queryHeadBucketResponse, err = s.Client.HeadBucket(ctx, &queryHeadBucketRequest) +// s.Require().NoError(err) +// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) +// +// // dest SP should fail to reject +// s.Client.SetKeyManager(dstPrimarySP.OperatorKey) +// _, err = s.Client.BroadcastTx(context.Background(), []sdk.Msg{rejectMigration}, nil) +// s.Require().Error(err) +// s.Require().Equal(queryHeadBucketResponse.BucketInfo.BucketStatus, storagetypes.BUCKET_STATUS_CREATED) +//} func (s *StorageTestSuite) TestSetTag() { var err error diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 2a8e95c51..c47a23e07 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -23,6 +23,7 @@ import ( "github.com/bnb-chain/greenfield/e2e/core" "github.com/bnb-chain/greenfield/sdk/types" storagetestutil "github.com/bnb-chain/greenfield/testutil/storage" + types3 "github.com/bnb-chain/greenfield/x/payment/types" sptypes "github.com/bnb-chain/greenfield/x/sp/types" storagetypes "github.com/bnb-chain/greenfield/x/storage/types" virtualgroupmoduletypes "github.com/bnb-chain/greenfield/x/virtualgroup/types" @@ -1021,12 +1022,13 @@ func (s *VirtualGroupTestSuite) TestSPForcedExit() { spx := s.BaseSuite.CreateNewStorageProvider() spy := s.BaseSuite.CreateNewStorageProvider() - // gov module balance - govModuleBalance, err := s.Client.Balance(context.Background(), &types2.QueryBalanceRequest{ - Denom: s.Config.Denom, - Address: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + // get the dynamic balance of gov address account i payment module + govAddrInPaymentBalance, err := s.Client.DynamicBalance(context.Background(), &types3.QueryDynamicBalanceRequest{ + Account: types3.GovernanceAddress.String(), }) s.Require().NoError(err) + s.T().Logf("payment module gov stream record balance is %s", core.YamlString(govAddrInPaymentBalance)) + // 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) @@ -1145,12 +1147,12 @@ func (s *VirtualGroupTestSuite) TestSPForcedExit() { _, err = s.Client.StorageProvider(context.Background(), &sptypes.QueryStorageProviderRequest{Id: spx.Info.Id}) s.Require().Error(err) - govModuleBalanceAfterSPForcedExit, err := s.Client.Balance(context.Background(), &types2.QueryBalanceRequest{ - Denom: s.Config.Denom, - Address: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + govAddrInPaymentBalanceAfter, err := s.Client.DynamicBalance(context.Background(), &types3.QueryDynamicBalanceRequest{ + Account: types3.GovernanceAddress.String(), }) s.Require().NoError(err) - s.Require().Equal(govModuleBalance.Balance.Amount.Add(resp.StorageProvider.TotalDeposit), govModuleBalanceAfterSPForcedExit.Balance.Amount) + s.T().Logf("payment module gov stream record balance is %s", core.YamlString(govAddrInPaymentBalanceAfter)) + s.Require().Equal(govAddrInPaymentBalance.BankBalance.Add(resp.StorageProvider.TotalDeposit), govAddrInPaymentBalanceAfter.BankBalance) } func (s *VirtualGroupTestSuite) updateParams(params virtualgroupmoduletypes.Params) { @@ -1262,7 +1264,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { msgCompleteSwapIn := virtualgroupmoduletypes.NewMsgCompleteSwapIn(spy.OperatorKey.GetAddr(), familyID, 0) s.SendTxBlock(spy.OperatorKey, msgCompleteSwapIn) - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupFamilyId: familyID, }) s.Require().Error(err) @@ -1289,7 +1291,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { s.SendTxBlock(spz.OperatorKey, msgReserveSwapIn) // 13 query the swapInInfo onchain, show reservation is recorded onchain - swapInInfo, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ + _, err = s.Client.SwapInInfo(context.Background(), &virtualgroupmoduletypes.QuerySwapInInfoRequest{ GlobalVirtualGroupFamilyId: familyID, }) s.Require().NoError(err) diff --git a/x/virtualgroup/keeper/msg_server.go b/x/virtualgroup/keeper/msg_server.go index ebd9ef2ac..b089493d9 100644 --- a/x/virtualgroup/keeper/msg_server.go +++ b/x/virtualgroup/keeper/msg_server.go @@ -11,6 +11,7 @@ import ( gnfdtypes "github.com/bnb-chain/greenfield/types" "github.com/bnb-chain/greenfield/types/errors" + paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" sptypes "github.com/bnb-chain/greenfield/x/sp/types" "github.com/bnb-chain/greenfield/x/virtualgroup/types" ) @@ -525,7 +526,9 @@ func (k msgServer) CompleteStorageProviderExit(goCtx context.Context, msg *types } else { forcedExit = true coins := sdk.NewCoins(sdk.NewCoin(k.spKeeper.DepositDenomForSP(ctx), sp.TotalDeposit)) - err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, sptypes.ModuleName, govtypes.ModuleName, coins) + // the deposit will be transfer to the payment module gov addr stream record related bank account, when a stream record lack of + // static balance, it will check for its related bank account + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, sptypes.ModuleName, paymenttypes.GovernanceAddress, coins) if err != nil { return nil, err } diff --git a/x/virtualgroup/types/expected_keepers.go b/x/virtualgroup/types/expected_keepers.go index 42dabf933..c2f8a8ba4 100644 --- a/x/virtualgroup/types/expected_keepers.go +++ b/x/virtualgroup/types/expected_keepers.go @@ -37,7 +37,6 @@ type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error } diff --git a/x/virtualgroup/types/expected_keepers_mocks.go b/x/virtualgroup/types/expected_keepers_mocks.go index 3ea161160..06f27e5e2 100644 --- a/x/virtualgroup/types/expected_keepers_mocks.go +++ b/x/virtualgroup/types/expected_keepers_mocks.go @@ -231,11 +231,6 @@ type MockBankKeeper struct { recorder *MockBankKeeperMockRecorder } -func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types0.Context, senderModule, recipientModule string, amt types0.Coins) error { - //TODO implement me - panic("implement me") -} - // MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. type MockBankKeeperMockRecorder struct { mock *MockBankKeeper From f504e9076ab54ed2aa59f506aeec6f0049f4d1e9 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 19 Dec 2023 20:15:01 +0800 Subject: [PATCH 23/27] add test --- x/virtualgroup/types/message.go | 3 + .../message_complete_storage_provider_exit.go | 5 +- ...age_complete_storage_provider_exit_test.go | 12 +- ...> message_storage_provider_forced_exit.go} | 0 ...ssage_storage_provider_forced_exit_test.go | 49 +++++ x/virtualgroup/types/message_test.go | 201 ++++++++++++++++++ 6 files changed, 266 insertions(+), 4 deletions(-) rename x/virtualgroup/types/{message_storage_provider_force_exit.go => message_storage_provider_forced_exit.go} (100%) create mode 100644 x/virtualgroup/types/message_storage_provider_forced_exit_test.go diff --git a/x/virtualgroup/types/message.go b/x/virtualgroup/types/message.go index a0b936b50..5db2fcc01 100644 --- a/x/virtualgroup/types/message.go +++ b/x/virtualgroup/types/message.go @@ -363,6 +363,9 @@ func (msg *MsgReserveSwapIn) ValidateBasic() error { return gnfderrors.ErrInvalidMessage.Wrap("The gvg id need to be empty(0) when familyID is specified.") } } + if msg.TargetSpId == 0 { + return gnfderrors.ErrInvalidMessage.Wrap("The target sp id is not specified.") + } return nil } diff --git a/x/virtualgroup/types/message_complete_storage_provider_exit.go b/x/virtualgroup/types/message_complete_storage_provider_exit.go index e860f4c82..42d775f9b 100644 --- a/x/virtualgroup/types/message_complete_storage_provider_exit.go +++ b/x/virtualgroup/types/message_complete_storage_provider_exit.go @@ -11,9 +11,10 @@ const TypeMsgCompleteStorageProviderExit = "complete_storage_provider_exit" var _ sdk.Msg = &MsgCompleteStorageProviderExit{} -func NewMsgCompleteStorageProviderExit(operator sdk.AccAddress) *MsgCompleteStorageProviderExit { +func NewMsgCompleteStorageProviderExit(operator, storageProvider sdk.AccAddress) *MsgCompleteStorageProviderExit { return &MsgCompleteStorageProviderExit{ - StorageProvider: operator.String(), + Operator: operator.String(), + StorageProvider: storageProvider.String(), } } diff --git a/x/virtualgroup/types/message_complete_storage_provider_exit_test.go b/x/virtualgroup/types/message_complete_storage_provider_exit_test.go index b9948939f..a7ba8cf46 100644 --- a/x/virtualgroup/types/message_complete_storage_provider_exit_test.go +++ b/x/virtualgroup/types/message_complete_storage_provider_exit_test.go @@ -21,9 +21,17 @@ func TestMsgCompleteStorageProviderExit_ValidateBasic(t *testing.T) { StorageProvider: "invalid_address", }, err: sdkerrors.ErrInvalidAddress, - }, { + }, + { + name: "invalid operator", + msg: MsgCompleteStorageProviderExit{ + Operator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, + { name: "valid address", - msg: *NewMsgCompleteStorageProviderExit(sample.RandAccAddress()), + msg: *NewMsgCompleteStorageProviderExit(sample.RandAccAddress(), sample.RandAccAddress()), }, } for _, tt := range tests { diff --git a/x/virtualgroup/types/message_storage_provider_force_exit.go b/x/virtualgroup/types/message_storage_provider_forced_exit.go similarity index 100% rename from x/virtualgroup/types/message_storage_provider_force_exit.go rename to x/virtualgroup/types/message_storage_provider_forced_exit.go diff --git a/x/virtualgroup/types/message_storage_provider_forced_exit_test.go b/x/virtualgroup/types/message_storage_provider_forced_exit_test.go new file mode 100644 index 000000000..97dca8cbe --- /dev/null +++ b/x/virtualgroup/types/message_storage_provider_forced_exit_test.go @@ -0,0 +1,49 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bnb-chain/greenfield/testutil/sample" +) + +func TestMsgStorageProviderForcedExit_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgStorageProviderForcedExit + expErr bool + expErrMsg string + }{ + { + name: "invalid authority", + msg: MsgStorageProviderForcedExit{ + Authority: "invalid authority address", + }, + expErr: true, + expErrMsg: "invalid authority address", + }, + { + name: "invalid address", + msg: MsgStorageProviderForcedExit{ + Authority: "0xaE4F00015B40eE402a7f05E46757c18Df86E49E1", + StorageProvider: "invalid_address", + }, + expErr: true, + expErrMsg: "invalid address", + }, { + name: "valid address", + msg: *NewMsgStorageProviderForcedExit(sample.RandAccAddress().String(), sample.RandAccAddress()), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.expErr { + require.Contains(t, err.Error(), tt.expErrMsg) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/virtualgroup/types/message_test.go b/x/virtualgroup/types/message_test.go index 8e77991dc..2ee993e3c 100644 --- a/x/virtualgroup/types/message_test.go +++ b/x/virtualgroup/types/message_test.go @@ -379,3 +379,204 @@ func TestMsgSettle_ValidateBasic(t *testing.T) { }) } } + +func TestMsgReserveSwapIn_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgReserveSwapIn + err error + }{ + { + name: "valid case", + msg: MsgReserveSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + TargetSpId: 1, + GlobalVirtualGroupId: 0, + }, + }, + { + name: "valid case", + msg: MsgReserveSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 0, + TargetSpId: 1, + GlobalVirtualGroupId: 1, + }, + }, + { + name: "invalid address", + msg: MsgReserveSwapIn{ + StorageProvider: "invalid_address", + GlobalVirtualGroupFamilyId: 0, + TargetSpId: 1, + GlobalVirtualGroupId: 1, + }, + err: sdkerrors.ErrInvalidAddress, + }, + { + name: "invalid virtual group family", + msg: MsgReserveSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 0, + TargetSpId: 1, + GlobalVirtualGroupId: 0, + }, + err: gnfderrors.ErrInvalidMessage, + }, + { + name: "invalid virtual group", + msg: MsgReserveSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + TargetSpId: 1, + GlobalVirtualGroupId: 1, + }, + err: gnfderrors.ErrInvalidMessage, + }, + { + name: "invalid successor sp id", + msg: MsgReserveSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + GlobalVirtualGroupId: 0, + TargetSpId: 0, + }, + err: gnfderrors.ErrInvalidMessage, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMsgCompleteSwapIn_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgCompleteSwapIn + err error + }{ + { + name: "valid case", + msg: MsgCompleteSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + GlobalVirtualGroupId: 0, + }, + }, + { + name: "valid case", + msg: MsgCompleteSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 0, + GlobalVirtualGroupId: 1, + }, + }, + { + name: "invalid address", + msg: MsgCompleteSwapIn{ + StorageProvider: "invalid_address", + GlobalVirtualGroupFamilyId: 0, + GlobalVirtualGroupId: 1, + }, + err: sdkerrors.ErrInvalidAddress, + }, + { + name: "invalid virtual group family", + msg: MsgCompleteSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 0, + GlobalVirtualGroupId: 0, + }, + err: gnfderrors.ErrInvalidMessage, + }, + { + name: "invalid virtual group", + msg: MsgCompleteSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + GlobalVirtualGroupId: 1, + }, + err: gnfderrors.ErrInvalidMessage, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMsgCancelSwapIn_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgCancelSwapIn + err error + }{ + { + name: "valid case", + msg: MsgCancelSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + GlobalVirtualGroupId: 0, + }, + }, + { + name: "valid case", + msg: MsgCancelSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 0, + GlobalVirtualGroupId: 1, + }, + }, + { + name: "invalid address", + msg: MsgCancelSwapIn{ + StorageProvider: "invalid_address", + GlobalVirtualGroupFamilyId: 0, + GlobalVirtualGroupId: 1, + }, + err: sdkerrors.ErrInvalidAddress, + }, + { + name: "invalid virtual group family", + msg: MsgCancelSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 0, + GlobalVirtualGroupId: 0, + }, + err: gnfderrors.ErrInvalidMessage, + }, + { + name: "invalid virtual group", + msg: MsgCancelSwapIn{ + StorageProvider: sample.RandAccAddressHex(), + GlobalVirtualGroupFamilyId: 1, + GlobalVirtualGroupId: 1, + }, + err: gnfderrors.ErrInvalidMessage, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} From 28c6e327abb8d9e06427b9215856c19889991da7 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Wed, 20 Dec 2023 11:17:30 +0800 Subject: [PATCH 24/27] fix test assertion due to duplicate GVG not allowed --- app/upgrade.go | 12 ++++++------ e2e/tests/virtualgroup_test.go | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/upgrade.go b/app/upgrade.go index 97420354a..92cbbcbb9 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -139,12 +139,12 @@ func (app *App) registerHulunbeierUpgradeHandler() { app.Logger().Info("upgrade to ", plan.Name) // enable SP exit - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgReserveSwapIn", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCancelSwapIn", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteSwapIn", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderForcedExit", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgStorageProviderExit", 1.2e3)) - app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas("/greenfield.virtualgroup.MsgCompleteStorageProviderExit", 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas(sdk.MsgTypeURL(&virtualgrouptypes.MsgReserveSwapIn{}), 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas(sdk.MsgTypeURL(&virtualgrouptypes.MsgCancelSwapIn{}), 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas(sdk.MsgTypeURL(&virtualgrouptypes.MsgCompleteSwapIn{}), 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas(sdk.MsgTypeURL(&virtualgrouptypes.MsgStorageProviderForcedExit{}), 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas(sdk.MsgTypeURL(&virtualgrouptypes.MsgStorageProviderExit{}), 1.2e3)) + app.GashubKeeper.SetMsgGasParams(ctx, *gashubtypes.NewMsgGasParamsWithFixedGas(sdk.MsgTypeURL(&virtualgrouptypes.MsgCompleteStorageProviderExit{}), 1.2e3)) return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index c47a23e07..a2c819160 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -114,7 +114,6 @@ func (s *VirtualGroupTestSuite) TestBasic() { s.BaseSuite.CreateGlobalVirtualGroup(primarySP, gvg.FamilyId, secondarySPIDs, 1) gvgs = s.queryGlobalVirtualGroupsByFamily(gvg.FamilyId) - s.Require().Equal(len(gvgs), len(srcGVGs)+1) oldGVGIDs := make(map[uint32]bool) for _, gvg := range srcGVGs { From ba19800b40362a356c5732ff94cf5d8d61424721 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 21 Dec 2023 16:20:51 +0800 Subject: [PATCH 25/27] fix the new params validation failed when init genesis --- e2e/tests/virtualgroup_test.go | 6 +- proto/greenfield/virtualgroup/params.proto | 10 +- swagger/static/swagger.yaml | 1197 ++++++-------------- x/virtualgroup/keeper/params.go | 4 +- x/virtualgroup/types/params.go | 27 +- x/virtualgroup/types/params.pb.go | 175 +-- 6 files changed, 494 insertions(+), 925 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index a2c819160..6782e4a94 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1207,12 +1207,14 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { queryParamsResp, err := s.Client.VirtualGroupQueryClient.Params(context.Background(), &virtualgroupmoduletypes.QueryParamsRequest{}) s.Require().NoError(err) updatedParams := queryParamsResp.Params - updatedParams.SwapInValidityPeriod = 10 // the swapInInfo will expire in 10 seconds + + swapInValidityPeriod := sdk.NewInt(1) + updatedParams.SwapInValidityPeriod = &swapInValidityPeriod // 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(10, int(queryParamsResp.Params.SwapInValidityPeriod)) + s.Require().Equal(10, queryParamsResp.Params.SwapInValidityPeriod.Uint64()) // 1. create an SP-x that wants to exit spx := s.BaseSuite.CreateNewStorageProvider() diff --git a/proto/greenfield/virtualgroup/params.proto b/proto/greenfield/virtualgroup/params.proto index 4c57f4c2e..5551902e4 100644 --- a/proto/greenfield/virtualgroup/params.proto +++ b/proto/greenfield/virtualgroup/params.proto @@ -26,7 +26,13 @@ message Params { // 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; + string swap_in_validity_period = 6 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; // the the number of sp allowed to exit concurrently. - uint32 sp_concurrent_exit_num = 7; + string sp_concurrent_exit_num = 7 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; } diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index 64d6bc878..4e49e1254 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6115,13 +6115,11 @@ paths: allowed to sever more buckets swap_in_validity_period: type: string - format: uint64 title: >- the validity period that a successor SP can reserve to complete the swap for Global virtual group/family sp_concurrent_exit_num: - type: integer - format: int64 + type: string description: the the number of sp allowed to exit concurrently. description: >- QueryParamsResponse is response type for the Query/Params RPC @@ -6373,10 +6371,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -6426,7 +6421,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6436,7 +6431,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6466,7 +6461,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -6581,10 +6575,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -6634,7 +6625,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6644,7 +6635,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6674,7 +6665,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -6793,10 +6783,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -6846,7 +6833,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6856,7 +6843,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6886,7 +6873,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7017,10 +7003,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7070,7 +7053,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7080,7 +7063,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7110,7 +7093,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7269,10 +7251,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7322,7 +7301,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7332,7 +7311,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7362,7 +7341,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7467,10 +7445,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7520,7 +7495,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7530,7 +7505,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7560,7 +7535,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7690,10 +7664,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7743,7 +7714,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7753,7 +7724,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7783,7 +7754,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -7910,10 +7880,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -7963,7 +7930,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7973,7 +7940,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8003,7 +7970,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8114,10 +8080,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8167,7 +8130,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8177,7 +8140,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8207,7 +8170,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8309,10 +8271,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8362,7 +8321,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8372,7 +8331,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8402,7 +8361,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8507,10 +8465,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8560,7 +8515,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8570,7 +8525,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8600,7 +8555,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8744,10 +8698,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -8797,7 +8748,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8807,7 +8758,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8837,7 +8788,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -8945,10 +8895,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -8998,7 +8945,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9008,7 +8955,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9038,7 +8985,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9184,10 +9130,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -9237,7 +9180,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9247,7 +9190,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9277,7 +9220,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9462,10 +9404,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -9515,7 +9454,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9525,7 +9464,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9555,7 +9494,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9693,10 +9631,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -9746,7 +9681,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9756,7 +9691,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9786,7 +9721,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -9960,10 +9894,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -10013,7 +9944,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -10023,7 +9954,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -10053,7 +9984,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -10191,10 +10121,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -10244,7 +10171,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -10254,7 +10181,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -10284,7 +10211,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -11917,10 +11843,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -11970,7 +11893,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -11980,7 +11903,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -12010,7 +11933,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -13254,10 +13176,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -13307,7 +13226,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -13317,7 +13236,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -13347,7 +13266,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14572,10 +14490,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -14625,7 +14540,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14635,7 +14550,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14665,7 +14580,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -14860,10 +14774,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -14913,7 +14824,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14923,7 +14834,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14953,7 +14864,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15075,10 +14985,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -15128,7 +15035,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15138,7 +15045,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15168,7 +15075,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15281,10 +15187,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -15334,7 +15237,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15344,7 +15247,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15374,7 +15277,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15510,10 +15412,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -15563,7 +15462,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15573,7 +15472,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15603,7 +15502,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -15773,10 +15671,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -15826,7 +15721,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15836,7 +15731,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15866,7 +15761,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -16002,10 +15896,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -16055,7 +15946,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -16065,7 +15956,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -16095,7 +15986,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17227,10 +17117,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17280,7 +17167,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17290,7 +17177,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17320,7 +17207,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17450,10 +17336,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17503,7 +17386,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17513,7 +17396,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17543,7 +17426,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17702,10 +17584,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17755,7 +17634,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17765,7 +17644,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17795,7 +17674,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -17900,10 +17778,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -17953,7 +17828,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17963,7 +17838,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17993,7 +17868,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18130,10 +18004,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -18220,10 +18091,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -18273,7 +18141,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18283,7 +18151,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18313,7 +18181,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18449,10 +18316,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -18559,10 +18423,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -18612,7 +18473,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18622,7 +18483,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18652,7 +18513,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -18835,10 +18695,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -18948,10 +18805,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -19001,7 +18855,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19011,7 +18865,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19041,7 +18895,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19606,10 +19459,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -19659,7 +19509,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19669,7 +19519,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19699,7 +19549,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -19823,10 +19672,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -19876,7 +19722,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19886,7 +19732,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19916,7 +19762,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20149,10 +19994,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -20202,7 +20044,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20212,7 +20054,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20242,7 +20084,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20447,10 +20288,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -20500,7 +20338,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20510,7 +20348,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20540,7 +20378,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -20750,10 +20587,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -20803,7 +20637,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20813,7 +20647,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20843,7 +20677,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21028,10 +20861,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21081,7 +20911,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21091,7 +20921,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21121,7 +20951,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21341,10 +21170,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21394,7 +21220,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21404,7 +21230,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21434,7 +21260,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21586,10 +21411,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21639,7 +21461,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21649,7 +21471,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21679,7 +21501,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -21874,10 +21695,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -21927,7 +21745,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21937,7 +21755,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21967,7 +21785,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -22196,10 +22013,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -22249,7 +22063,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22259,7 +22073,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -22289,7 +22103,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23104,10 +22917,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -23157,7 +22967,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23167,7 +22977,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23197,7 +23007,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23542,10 +23351,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -23595,7 +23401,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23605,7 +23411,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23635,7 +23441,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -23920,10 +23725,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -23973,7 +23775,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23983,7 +23785,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24013,7 +23815,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24195,10 +23996,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -24248,7 +24046,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24258,7 +24056,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24288,7 +24086,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24581,10 +24378,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -24634,7 +24428,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24644,7 +24438,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24674,7 +24468,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -24849,10 +24642,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -24902,7 +24692,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24912,7 +24702,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24942,7 +24732,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25212,10 +25001,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -25265,7 +25051,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25275,7 +25061,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25305,7 +25091,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25510,10 +25295,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are - no widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -25564,7 +25346,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25574,7 +25356,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25604,7 +25386,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -25880,10 +25661,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -25933,7 +25711,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25943,7 +25721,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25973,7 +25751,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26136,10 +25913,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -26189,7 +25963,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26199,7 +25973,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26229,7 +26003,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26355,10 +26128,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -26408,7 +26178,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26418,7 +26188,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26448,7 +26218,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26566,10 +26335,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -26619,7 +26385,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26629,7 +26395,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26659,7 +26425,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -26952,10 +26717,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -27005,7 +26767,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27015,7 +26777,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27045,7 +26807,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27218,10 +26979,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -27271,7 +27029,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27281,7 +27039,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27311,7 +27069,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27581,10 +27338,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -27634,7 +27388,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27644,7 +27398,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27674,7 +27428,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -27874,10 +27627,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -27927,7 +27677,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27937,7 +27687,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27967,7 +27717,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28197,10 +27946,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28250,7 +27996,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28260,7 +28006,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28290,7 +28036,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28482,10 +28227,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28535,7 +28277,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28545,7 +28287,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28575,7 +28317,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -28797,10 +28538,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -28850,7 +28588,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28860,7 +28598,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28890,7 +28628,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29069,10 +28806,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29122,7 +28856,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29132,7 +28866,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29162,7 +28896,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29306,10 +29039,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29359,7 +29089,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29369,7 +29099,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29399,7 +29129,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29544,10 +29273,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29597,7 +29323,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29607,7 +29333,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29637,7 +29363,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -29772,10 +29497,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -29825,7 +29547,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29835,7 +29557,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29865,7 +29587,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30065,10 +29786,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -30118,7 +29836,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30128,7 +29846,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30158,7 +29876,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30274,10 +29991,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -30327,7 +30041,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30337,7 +30051,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30367,7 +30081,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30489,10 +30202,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -30542,7 +30252,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30552,7 +30262,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30582,7 +30292,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -30866,10 +30575,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no - widely used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty @@ -30919,7 +30625,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30929,7 +30635,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30959,7 +30665,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -31126,10 +30831,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -31179,7 +30881,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31189,7 +30891,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31219,7 +30921,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -31372,10 +31073,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -31425,7 +31123,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31435,7 +31133,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31465,7 +31163,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -31644,10 +31341,7 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -31697,7 +31391,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31707,7 +31401,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31737,7 +31431,6 @@ paths: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -32096,10 +31789,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -32146,7 +31836,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -32156,7 +31846,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -32182,7 +31872,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -32304,10 +31993,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -32357,7 +32043,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -32367,7 +32053,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -32393,7 +32079,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -36836,13 +36521,11 @@ definitions: more buckets swap_in_validity_period: type: string - format: uint64 title: >- the validity period that a successor SP can reserve to complete the swap for Global virtual group/family sp_concurrent_exit_num: - type: integer - format: int64 + type: string description: the the number of sp allowed to exit concurrently. description: Params defines the parameters for the module. greenfield.virtualgroup.QueryGlobalVirtualGroupByFamilyIDResponse: @@ -37078,13 +36761,11 @@ definitions: sever more buckets swap_in_validity_period: type: string - format: uint64 title: >- the validity period that a successor SP can reserve to complete the swap for Global virtual group/family sp_concurrent_exit_num: - type: integer - format: int64 + type: string description: the the number of sp allowed to exit concurrently. description: QueryParamsResponse is response type for the Query/Params RPC method. greenfield.virtualgroup.QuerySPGVGStatisticsResponse: @@ -37223,10 +36904,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37274,7 +36952,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37284,7 +36962,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37310,7 +36988,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37444,10 +37121,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -37497,7 +37171,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37507,7 +37181,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37534,7 +37208,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37629,10 +37302,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37680,7 +37350,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37690,7 +37360,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37716,7 +37386,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -37806,10 +37475,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -37859,7 +37525,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37869,7 +37535,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37895,7 +37561,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38005,10 +37670,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38056,7 +37718,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38066,7 +37728,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38092,7 +37754,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38182,10 +37843,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -38235,7 +37893,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38245,7 +37903,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38271,7 +37929,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38384,10 +38041,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38435,7 +38089,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38445,7 +38099,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38471,7 +38125,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38572,10 +38225,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38623,7 +38273,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38633,7 +38283,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38659,7 +38309,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38764,10 +38413,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -38817,7 +38463,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38827,7 +38473,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38856,7 +38502,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -38985,10 +38630,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -39038,7 +38680,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -39048,7 +38690,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -39077,7 +38719,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -39202,10 +38843,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -39255,7 +38893,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -39265,7 +38903,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -39294,7 +38932,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -42944,10 +42581,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -42997,7 +42631,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43007,7 +42641,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43036,7 +42670,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -43247,10 +42880,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -43300,7 +42930,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43310,7 +42940,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43339,7 +42969,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -43609,10 +43238,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -43660,7 +43286,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43670,7 +43296,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43696,7 +43322,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46634,10 +46259,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -46687,7 +46309,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46697,7 +46319,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46723,7 +46345,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -46832,10 +46453,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46883,7 +46501,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46893,7 +46511,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46919,7 +46537,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -47017,10 +46634,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -47102,10 +46716,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -47194,10 +46805,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -47309,10 +46917,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -47708,10 +47313,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -47761,7 +47363,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47771,7 +47373,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -47797,7 +47399,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -48236,10 +47837,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -48289,7 +47887,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -48299,7 +47897,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -48328,7 +47926,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -48522,10 +48119,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -48575,7 +48169,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -48585,7 +48179,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -48615,7 +48209,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -49673,10 +49266,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -49726,7 +49316,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -49736,7 +49326,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -49765,7 +49355,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -50278,10 +49867,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -50331,7 +49917,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50341,7 +49927,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50368,7 +49954,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -50620,10 +50205,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -50673,7 +50255,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50683,7 +50265,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50712,7 +50294,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -51068,10 +50649,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -51121,7 +50699,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51131,7 +50709,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51161,7 +50739,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -51757,10 +51334,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -51810,7 +51384,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51820,7 +51394,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51847,7 +51421,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -52179,10 +51752,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -52232,7 +51802,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52242,7 +51812,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52271,7 +51841,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -52881,10 +52450,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -52932,7 +52498,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52942,7 +52508,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52968,7 +52534,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -53320,10 +52885,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -53373,7 +52935,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53383,7 +52945,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53409,7 +52971,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -53598,10 +53159,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -53649,7 +53207,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53659,7 +53217,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53685,7 +53243,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -54139,10 +53696,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -54192,7 +53746,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -54202,7 +53756,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -54229,7 +53783,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -55095,10 +54648,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -55148,7 +54698,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55158,7 +54708,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55185,7 +54735,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -55423,10 +54972,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -55476,7 +55022,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55486,7 +55032,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55515,7 +55061,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -55888,10 +55433,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type - server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be @@ -55939,7 +55481,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55949,7 +55491,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55975,7 +55517,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56179,10 +55720,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56232,7 +55770,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56242,7 +55780,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56271,7 +55809,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56400,10 +55937,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56453,7 +55987,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56463,7 +55997,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56492,7 +56026,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56615,10 +56148,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56668,7 +56198,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56678,7 +56208,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56707,7 +56237,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -56803,10 +56332,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely - used type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) @@ -56856,7 +56382,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56866,7 +56392,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56895,7 +56421,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -57011,10 +56536,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -57064,7 +56586,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -57074,7 +56596,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -57100,7 +56622,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -57216,10 +56737,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -57269,7 +56787,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -57279,7 +56797,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -57305,7 +56823,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular @@ -57396,10 +56913,7 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used - type server - - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might @@ -57449,7 +56963,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -57459,7 +56973,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -57485,7 +56999,6 @@ definitions: JSON - ==== The JSON representation of an `Any` value uses the regular diff --git a/x/virtualgroup/keeper/params.go b/x/virtualgroup/keeper/params.go index cba92d4a5..9c3cd0d2c 100644 --- a/x/virtualgroup/keeper/params.go +++ b/x/virtualgroup/keeper/params.go @@ -29,12 +29,12 @@ func (k Keeper) MaxStoreSizePerFamily(ctx sdk.Context) (res uint64) { func (k Keeper) SwapInValidityPeriod(ctx sdk.Context) (res uint64) { params := k.GetParams(ctx) - return params.SwapInValidityPeriod + return params.SwapInValidityPeriod.Uint64() } func (k Keeper) SpConcurrentExitNum(ctx sdk.Context) (res uint32) { params := k.GetParams(ctx) - return params.SpConcurrentExitNum + return uint32(params.SpConcurrentExitNum.Uint64()) } // GetParams returns the current sp module parameters. diff --git a/x/virtualgroup/types/params.go b/x/virtualgroup/types/params.go index 00aaf5ea8..746a78cd5 100644 --- a/x/virtualgroup/types/params.go +++ b/x/virtualgroup/types/params.go @@ -21,8 +21,8 @@ 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) + DefaultSwapInValidityPeriod = math.NewInt(60 * 60 * 24 * 7) // 7 days + DefaultSPConcurrentExitNum = math.NewInt(1) KeyDepositDenom = []byte("DepositDenom") KeyGVGStakingPerBytes = []byte("GVGStakingPerBytes") @@ -41,14 +41,14 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params instance func NewParams(depositDenom string, gvgStakingPerBytes math.Int, maxGlobalVirtualGroupPerFamily uint32, - maxStoreSizePerFamily, swapInValidityPeriod uint64, spConcurrentExitNum uint32) Params { + maxStoreSizePerFamily uint64, swapInValidityPeriod, spConcurrentExitNum math.Int) Params { return Params{ DepositDenom: depositDenom, GvgStakingPerBytes: gvgStakingPerBytes, MaxGlobalVirtualGroupNumPerFamily: maxGlobalVirtualGroupPerFamily, MaxStoreSizePerFamily: maxStoreSizePerFamily, - SwapInValidityPeriod: swapInValidityPeriod, - SpConcurrentExitNum: spConcurrentExitNum, + SwapInValidityPeriod: &swapInValidityPeriod, + SpConcurrentExitNum: &spConcurrentExitNum, } } @@ -159,25 +159,28 @@ func validateMaxStoreSizePerFamily(i interface{}) error { } func validateSwapInValidityPeriod(i interface{}) error { - v, ok := i.(uint64) + v, ok := i.(*math.Int) 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) + if v != nil && !v.IsNil() { + if !v.IsPositive() { + return fmt.Errorf("swapIn info validity period must be positive: %s", v) + } } return nil } func validateSPConcurrentExitNum(i interface{}) error { - v, ok := i.(uint32) + v, ok := i.(*math.Int) 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) + if v != nil && !v.IsNil() { + if !v.IsPositive() { + return fmt.Errorf("number of sp concurrent exit must be positive: %s", v) + } } - return nil } diff --git a/x/virtualgroup/types/params.pb.go b/x/virtualgroup/types/params.pb.go index cea4feb24..957e54b9b 100644 --- a/x/virtualgroup/types/params.pb.go +++ b/x/virtualgroup/types/params.pb.go @@ -38,9 +38,9 @@ type Params struct { // 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"` + SwapInValidityPeriod *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=swap_in_validity_period,json=swapInValidityPeriod,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"swap_in_validity_period,omitempty"` // the the number of sp allowed to exit concurrently. - SpConcurrentExitNum uint32 `protobuf:"varint,7,opt,name=sp_concurrent_exit_num,json=spConcurrentExitNum,proto3" json:"sp_concurrent_exit_num,omitempty"` + SpConcurrentExitNum *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=sp_concurrent_exit_num,json=spConcurrentExitNum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"sp_concurrent_exit_num,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -103,20 +103,6 @@ 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") } @@ -126,37 +112,38 @@ func init() { } var fileDescriptor_d8ecf89dd5128885 = []byte{ - // 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, 0xc1, 0x13, 0xb0, 0x95, 0x63, 0x29, 0x34, 0x35, - 0x30, 0xc7, 0x5c, 0xb0, 0xd0, 0xef, 0xf9, 0xfd, 0x7b, 0xc9, 0xfd, 0xa6, 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 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, + // 481 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xc7, 0x6d, 0x08, 0x01, 0x4e, 0x74, 0x31, 0x2d, 0x75, 0x3b, 0x38, 0xe1, 0x45, 0x25, 0x4b, + 0xe2, 0x01, 0x86, 0x0a, 0x31, 0x85, 0x97, 0x2a, 0x12, 0x8a, 0x22, 0x47, 0xea, 0xc0, 0x72, 0x3a, + 0xdb, 0xd7, 0xeb, 0x29, 0xbe, 0x17, 0xdd, 0x9d, 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, 0xe3, 0x8b, 0x65, 0xe4, 0x5f, 0x2e, 0x23, 0xff, 0xe7, 0x32, 0xf2, + 0x3f, 0xaf, 0x22, 0xef, 0x72, 0x15, 0x79, 0xdf, 0x57, 0x91, 0xf7, 0xf1, 0xe5, 0xc6, 0x72, 0x29, + 0x4f, 0xfb, 0xd9, 0x29, 0xa2, 0x3c, 0xde, 0xb8, 0x09, 0xd5, 0x9f, 0x77, 0xc1, 0x05, 0x48, 0xdb, + 0xee, 0x04, 0xbf, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0x54, 0x16, 0x3f, 0x9d, 0x33, 0x03, 0x00, + 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -193,10 +180,18 @@ func (this *Params) Equal(that interface{}) bool { if this.MaxStoreSizePerFamily != that1.MaxStoreSizePerFamily { return false } - if this.SwapInValidityPeriod != that1.SwapInValidityPeriod { + if that1.SwapInValidityPeriod == nil { + if this.SwapInValidityPeriod != nil { + return false + } + } else if !this.SwapInValidityPeriod.Equal(*that1.SwapInValidityPeriod) { return false } - if this.SpConcurrentExitNum != that1.SpConcurrentExitNum { + if that1.SpConcurrentExitNum == nil { + if this.SpConcurrentExitNum != nil { + return false + } + } else if !this.SpConcurrentExitNum.Equal(*that1.SpConcurrentExitNum) { return false } return true @@ -221,15 +216,29 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.SpConcurrentExitNum != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.SpConcurrentExitNum)) + if m.SpConcurrentExitNum != nil { + { + size := m.SpConcurrentExitNum.Size() + i -= size + if _, err := m.SpConcurrentExitNum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x38 + dAtA[i] = 0x3a } - if m.SwapInValidityPeriod != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.SwapInValidityPeriod)) + if m.SwapInValidityPeriod != nil { + { + size := m.SwapInValidityPeriod.Size() + i -= size + if _, err := m.SwapInValidityPeriod.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x32 } if m.MaxStoreSizePerFamily != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxStoreSizePerFamily)) @@ -298,11 +307,13 @@ 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.SwapInValidityPeriod != nil { + l = m.SwapInValidityPeriod.Size() + n += 1 + l + sovParams(uint64(l)) } - if m.SpConcurrentExitNum != 0 { - n += 1 + sovParams(uint64(m.SpConcurrentExitNum)) + if m.SpConcurrentExitNum != nil { + l = m.SpConcurrentExitNum.Size() + n += 1 + l + sovParams(uint64(l)) } return n } @@ -466,10 +477,10 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } case 6: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SwapInValidityPeriod", wireType) } - m.SwapInValidityPeriod = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -479,16 +490,33 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SwapInValidityPeriod |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.SwapInValidityPeriod = &v + if err := m.SwapInValidityPeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpConcurrentExitNum", wireType) } - m.SpConcurrentExitNum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -498,11 +526,28 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SpConcurrentExitNum |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.SpConcurrentExitNum = &v + if err := m.SpConcurrentExitNum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) From 0b4d1f0ee19daaa9924c39d38d711c78e41b705e Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 21 Dec 2023 17:02:18 +0800 Subject: [PATCH 26/27] fix swagger --- e2e/tests/virtualgroup_test.go | 2 +- swagger/static/swagger.yaml | 1185 ++++++++++++++++++++++---------- 2 files changed, 834 insertions(+), 353 deletions(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 6782e4a94..2dfaa32fe 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1208,7 +1208,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { s.Require().NoError(err) updatedParams := queryParamsResp.Params - swapInValidityPeriod := sdk.NewInt(1) + swapInValidityPeriod := sdk.NewInt(10) updatedParams.SwapInValidityPeriod = &swapInValidityPeriod // the swapInInfo will expire in 10 seconds s.updateParams(updatedParams) diff --git a/swagger/static/swagger.yaml b/swagger/static/swagger.yaml index 4e49e1254..a694c0dc5 100644 --- a/swagger/static/swagger.yaml +++ b/swagger/static/swagger.yaml @@ -6371,7 +6371,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -6421,7 +6424,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6431,7 +6434,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6461,6 +6464,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -6575,7 +6579,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -6625,7 +6632,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6635,7 +6642,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6665,6 +6672,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -6783,7 +6791,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -6833,7 +6844,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -6843,7 +6854,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -6873,6 +6884,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7003,7 +7015,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7053,7 +7068,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7063,7 +7078,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7093,6 +7108,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7251,7 +7267,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7301,7 +7320,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7311,7 +7330,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7341,6 +7360,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7445,7 +7465,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7495,7 +7518,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7505,7 +7528,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7535,6 +7558,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7664,7 +7688,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7714,7 +7741,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7724,7 +7751,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7754,6 +7781,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -7880,7 +7908,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -7930,7 +7961,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -7940,7 +7971,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -7970,6 +8001,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8080,7 +8112,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8130,7 +8165,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8140,7 +8175,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8170,6 +8205,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8271,7 +8307,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8321,7 +8360,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8331,7 +8370,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8361,6 +8400,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8465,7 +8505,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8515,7 +8558,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8525,7 +8568,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8555,6 +8598,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8698,7 +8742,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -8748,7 +8795,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8758,7 +8805,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8788,6 +8835,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -8895,7 +8943,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -8945,7 +8996,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -8955,7 +9006,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -8985,6 +9036,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9130,7 +9182,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -9180,7 +9235,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9190,7 +9245,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9220,6 +9275,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9404,7 +9460,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -9454,7 +9513,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9464,7 +9523,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9494,6 +9553,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9631,7 +9691,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -9681,7 +9744,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9691,7 +9754,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9721,6 +9784,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -9894,7 +9958,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -9944,7 +10011,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -9954,7 +10021,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -9984,6 +10051,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -10121,7 +10189,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -10171,7 +10242,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -10181,7 +10252,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -10211,6 +10282,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -11843,7 +11915,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -11893,7 +11968,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -11903,7 +11978,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -11933,6 +12008,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -13176,7 +13252,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -13226,7 +13305,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -13236,7 +13315,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -13266,6 +13345,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -14490,7 +14570,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -14540,7 +14623,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14550,7 +14633,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14580,6 +14663,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -14774,7 +14858,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -14824,7 +14911,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -14834,7 +14921,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -14864,6 +14951,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -14985,7 +15073,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -15035,7 +15126,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15045,7 +15136,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15075,6 +15166,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15187,7 +15279,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -15237,7 +15332,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15247,7 +15342,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15277,6 +15372,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15412,7 +15508,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -15462,7 +15561,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15472,7 +15571,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15502,6 +15601,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15671,7 +15771,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -15721,7 +15824,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15731,7 +15834,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15761,6 +15864,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -15896,7 +16000,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -15946,7 +16053,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -15956,7 +16063,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -15986,6 +16093,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17117,7 +17225,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17167,7 +17278,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17177,7 +17288,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17207,6 +17318,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17336,7 +17448,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17386,7 +17501,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17396,7 +17511,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17426,6 +17541,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17584,7 +17700,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17634,7 +17753,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17644,7 +17763,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17674,6 +17793,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -17778,7 +17898,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -17828,7 +17951,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -17838,7 +17961,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -17868,6 +17991,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -18004,7 +18128,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -18091,7 +18218,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -18141,7 +18271,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18151,7 +18281,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18181,6 +18311,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -18316,7 +18447,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -18423,7 +18557,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -18473,7 +18610,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18483,7 +18620,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18513,6 +18650,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -18695,7 +18833,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -18805,7 +18946,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -18855,7 +18999,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -18865,7 +19009,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -18895,6 +19039,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -19459,7 +19604,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -19509,7 +19657,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19519,7 +19667,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19549,6 +19697,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -19672,7 +19821,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -19722,7 +19874,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -19732,7 +19884,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -19762,6 +19914,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -19994,7 +20147,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -20044,7 +20200,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20054,7 +20210,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20084,6 +20240,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -20288,7 +20445,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -20338,7 +20498,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20348,7 +20508,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20378,6 +20538,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -20587,7 +20748,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -20637,7 +20801,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20647,7 +20811,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20677,6 +20841,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -20861,7 +21026,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -20911,7 +21079,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -20921,7 +21089,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -20951,6 +21119,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -21170,7 +21339,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -21220,7 +21392,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21230,7 +21402,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21260,6 +21432,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -21411,7 +21584,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -21461,7 +21637,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21471,7 +21647,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21501,6 +21677,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -21695,7 +21872,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -21745,7 +21925,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -21755,7 +21935,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -21785,6 +21965,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -22013,7 +22194,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -22063,7 +22247,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22073,7 +22257,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -22103,6 +22287,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -22917,7 +23102,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -22967,7 +23155,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -22977,7 +23165,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23007,6 +23195,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -23351,7 +23540,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -23401,7 +23593,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23411,7 +23603,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23441,6 +23633,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -23725,7 +23918,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -23775,7 +23971,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -23785,7 +23981,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -23815,6 +24011,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -23996,7 +24193,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -24046,7 +24246,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24056,7 +24256,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24086,6 +24286,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -24378,7 +24579,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -24428,7 +24632,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24438,7 +24642,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24468,6 +24672,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -24642,7 +24847,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -24692,7 +24900,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -24702,7 +24910,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -24732,6 +24940,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25001,7 +25210,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -25051,7 +25263,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25061,7 +25273,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25091,6 +25303,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25295,7 +25508,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are + no widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -25346,7 +25562,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25356,7 +25572,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25386,6 +25602,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25661,7 +25878,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -25711,7 +25931,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25721,7 +25941,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -25751,6 +25971,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -25913,7 +26134,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -25963,7 +26187,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -25973,7 +26197,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26003,6 +26227,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26128,7 +26353,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -26178,7 +26406,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26188,7 +26416,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26218,6 +26446,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26335,7 +26564,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -26385,7 +26617,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26395,7 +26627,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26425,6 +26657,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26717,7 +26950,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -26767,7 +27003,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -26777,7 +27013,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -26807,6 +27043,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -26979,7 +27216,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -27029,7 +27269,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27039,7 +27279,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27069,6 +27309,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -27338,7 +27579,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -27388,7 +27632,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27398,7 +27642,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27428,6 +27672,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -27627,7 +27872,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -27677,7 +27925,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -27687,7 +27935,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -27717,6 +27965,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -27946,7 +28195,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -27996,7 +28248,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28006,7 +28258,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28036,6 +28288,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -28227,7 +28480,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -28277,7 +28533,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28287,7 +28543,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28317,6 +28573,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -28538,7 +28795,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -28588,7 +28848,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28598,7 +28858,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28628,6 +28888,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -28806,7 +29067,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -28856,7 +29120,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -28866,7 +29130,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -28896,6 +29160,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29039,7 +29304,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -29089,7 +29357,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29099,7 +29367,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29129,6 +29397,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29273,7 +29542,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -29323,7 +29595,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29333,7 +29605,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29363,6 +29635,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29497,7 +29770,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -29547,7 +29823,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29557,7 +29833,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29587,6 +29863,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29786,7 +30063,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -29836,7 +30116,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -29846,7 +30126,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -29876,6 +30156,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -29991,7 +30272,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -30041,7 +30325,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30051,7 +30335,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30081,6 +30365,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -30202,7 +30487,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -30252,7 +30540,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30262,7 +30550,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30292,6 +30580,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -30575,7 +30864,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no + widely used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty @@ -30625,7 +30917,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30635,7 +30927,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30665,6 +30957,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -30831,7 +31124,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -30881,7 +31177,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -30891,7 +31187,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -30921,6 +31217,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31073,7 +31370,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -31123,7 +31423,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31133,7 +31433,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31163,6 +31463,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31341,7 +31642,10 @@ paths: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -31391,7 +31695,7 @@ paths: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31401,7 +31705,7 @@ paths: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31431,6 +31735,7 @@ paths: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31789,7 +32094,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -31836,7 +32144,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -31846,7 +32154,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -31872,6 +32180,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -31993,7 +32302,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -32043,7 +32355,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -32053,7 +32365,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -32079,6 +32391,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -36904,7 +37217,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -36952,7 +37268,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -36962,7 +37278,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -36988,6 +37304,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37121,7 +37438,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -37171,7 +37491,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37181,7 +37501,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37208,6 +37528,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37302,7 +37623,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37350,7 +37674,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37360,7 +37684,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37386,6 +37710,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37475,7 +37800,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -37525,7 +37853,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37535,7 +37863,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37561,6 +37889,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37670,7 +37999,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -37718,7 +38050,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37728,7 +38060,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37754,6 +38086,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -37843,7 +38176,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -37893,7 +38229,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -37903,7 +38239,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -37929,6 +38265,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38041,7 +38378,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38089,7 +38429,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38099,7 +38439,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38125,6 +38465,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38225,7 +38566,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -38273,7 +38617,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38283,7 +38627,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38309,6 +38653,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38413,7 +38758,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -38463,7 +38811,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38473,7 +38821,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38502,6 +38850,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38630,7 +38979,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -38680,7 +39032,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38690,7 +39042,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38719,6 +39071,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -38843,7 +39196,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -38893,7 +39249,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -38903,7 +39259,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -38932,6 +39288,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -42581,7 +42938,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -42631,7 +42991,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -42641,7 +43001,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -42670,6 +43030,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -42880,7 +43241,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -42930,7 +43294,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -42940,7 +43304,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -42969,6 +43333,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -43238,7 +43603,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -43286,7 +43654,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -43296,7 +43664,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -43322,6 +43690,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -46259,7 +46628,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -46309,7 +46681,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46319,7 +46691,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46345,6 +46717,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -46453,7 +46826,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46501,7 +46877,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -46511,7 +46887,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -46537,6 +46913,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -46634,7 +47011,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -46716,7 +47096,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -46805,7 +47188,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -46917,7 +47303,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -47313,7 +47702,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -47363,7 +47755,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47373,7 +47765,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -47399,6 +47791,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -47837,7 +48230,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -47887,7 +48283,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -47897,7 +48293,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -47926,6 +48322,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -48119,7 +48516,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -48169,7 +48569,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -48179,7 +48579,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -48209,6 +48609,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -49266,7 +49667,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -49316,7 +49720,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -49326,7 +49730,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -49355,6 +49759,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -49867,7 +50272,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -49917,7 +50325,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -49927,7 +50335,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -49954,6 +50362,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -50205,7 +50614,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -50255,7 +50667,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50265,7 +50677,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50294,6 +50706,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -50649,7 +51062,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -50699,7 +51115,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -50709,7 +51125,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -50739,6 +51155,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -51334,7 +51751,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -51384,7 +51804,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51394,7 +51814,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51421,6 +51841,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -51752,7 +52173,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -51802,7 +52226,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -51812,7 +52236,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -51841,6 +52265,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -52450,7 +52875,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -52498,7 +52926,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52508,7 +52936,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52534,6 +52962,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -52885,7 +53314,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -52935,7 +53367,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -52945,7 +53377,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -52971,6 +53403,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -53159,7 +53592,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -53207,7 +53643,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53217,7 +53653,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53243,6 +53679,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -53696,7 +54133,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -53746,7 +54186,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -53756,7 +54196,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -53783,6 +54223,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -54648,7 +55089,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -54698,7 +55142,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -54708,7 +55152,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -54735,6 +55179,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -54972,7 +55417,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -55022,7 +55470,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55032,7 +55480,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55061,6 +55509,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -55433,7 +55882,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be @@ -55481,7 +55933,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55491,7 +55943,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55517,6 +55969,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -55720,7 +56173,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -55770,7 +56226,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55780,7 +56236,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -55809,6 +56265,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -55937,7 +56394,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -55987,7 +56447,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -55997,7 +56457,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56026,6 +56486,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56148,7 +56609,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -56198,7 +56662,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56208,7 +56672,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56237,6 +56701,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56332,7 +56797,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely + used type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) @@ -56382,7 +56850,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56392,7 +56860,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56421,6 +56889,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56536,7 +57005,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -56586,7 +57058,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56596,7 +57068,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56622,6 +57094,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56737,7 +57210,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -56787,7 +57263,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56797,7 +57273,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56823,6 +57299,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular @@ -56913,7 +57390,10 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might @@ -56963,7 +57443,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -56973,7 +57453,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -56999,6 +57479,7 @@ definitions: JSON + ==== The JSON representation of an `Any` value uses the regular From 510b91c8af1738c027295a19bd3975a297d83134 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 21 Dec 2023 18:09:35 +0800 Subject: [PATCH 27/27] fix test --- e2e/tests/virtualgroup_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests/virtualgroup_test.go b/e2e/tests/virtualgroup_test.go index 2dfaa32fe..3647bbe7b 100644 --- a/e2e/tests/virtualgroup_test.go +++ b/e2e/tests/virtualgroup_test.go @@ -1214,7 +1214,7 @@ func (s *VirtualGroupTestSuite) TestSPExit_SwapInfo_Expired() { queryParamsResp, err = s.Client.VirtualGroupQueryClient.Params(context.Background(), &virtualgroupmoduletypes.QueryParamsRequest{}) s.Require().NoError(err) - s.Require().Equal(10, queryParamsResp.Params.SwapInValidityPeriod.Uint64()) + s.Require().Equal(uint64(10), queryParamsResp.Params.SwapInValidityPeriod.Uint64()) // 1. create an SP-x that wants to exit spx := s.BaseSuite.CreateNewStorageProvider()