Skip to content

Commit

Permalink
feat: add RemoveExpiredPolicies
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Aug 14, 2023
1 parent 7869d8e commit 019c81f
Show file tree
Hide file tree
Showing 33 changed files with 1,040 additions and 546 deletions.
6 changes: 4 additions & 2 deletions e2e/core/basesuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,10 @@ func (s *BaseSuite) NewSpAcc() *StorageProvider {
maintenanceAcc := userAccs[5]

blsKm := s.GenRandomBlsKeyManager()
return &StorageProvider{OperatorKey: operatorAcc, SealKey: fundingAcc,
FundingKey: approvalAcc, ApprovalKey: sealAcc, GcKey: gcAcc, MaintenanceKey: maintenanceAcc, BlsKey: blsKm}
return &StorageProvider{
OperatorKey: operatorAcc, SealKey: fundingAcc,
FundingKey: approvalAcc, ApprovalKey: sealAcc, GcKey: gcAcc, MaintenanceKey: maintenanceAcc, BlsKey: blsKm,
}
}

func (s *BaseSuite) CreateNewStorageProvider() *StorageProvider {
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/payment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ type PaymentTestSuite struct {
func (s *PaymentTestSuite) SetupSuite() {
s.BaseSuite.SetupSuite()
s.defaultParams = s.queryParams()

}

func (s *PaymentTestSuite) SetupTest() {
Expand Down Expand Up @@ -2111,8 +2110,9 @@ func (s *PaymentTestSuite) getStreamRecords(addrs []string) (streamRecords Strea
return
}

func (s *PaymentTestSuite) checkStreamRecordsBeforeAndAfter(streamRecordsBefore StreamRecords, streamRecordsAfter StreamRecords, readPrice sdk.Dec,
readChargeRate sdkmath.Int, primaryStorePrice sdk.Dec, secondaryStorePrice sdk.Dec, chargeSize uint64, payloadSize uint64) {
func (s *PaymentTestSuite) checkStreamRecordsBeforeAndAfter(streamRecordsBefore, streamRecordsAfter StreamRecords, readPrice sdk.Dec,
readChargeRate sdkmath.Int, primaryStorePrice, secondaryStorePrice sdk.Dec, chargeSize, payloadSize uint64,
) {
userRateDiff := streamRecordsAfter.User.NetflowRate.Sub(streamRecordsBefore.User.NetflowRate)
gvgFamilyRateDiff := streamRecordsAfter.GVGFamily.NetflowRate.Sub(streamRecordsBefore.GVGFamily.NetflowRate)
gvgRateDiff := streamRecordsAfter.GVG.NetflowRate.Sub(streamRecordsBefore.GVG.NetflowRate)
Expand Down
133 changes: 82 additions & 51 deletions e2e/tests/permission_test.go

Large diffs are not rendered by default.

35 changes: 13 additions & 22 deletions e2e/tests/storage_bill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithoutPriceChange
// create bucket
bucketName := s.createBucket(sp, user, 256)

//simulate delete bucket gas
// simulate delete bucket gas
msgDeleteBucket := storagetypes.NewMsgDeleteBucket(user.GetAddr(), bucketName)
simulateResponse := s.SimulateTx(msgDeleteBucket, user)
gasLimit := simulateResponse.GasInfo.GetGasUsed()
Expand All @@ -320,7 +320,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithoutPriceChange
// for payment
time.Sleep(2 * time.Second)

//transfer gas
// transfer gas
msgSend := banktypes.NewMsgSend(user.GetAddr(), core.GenRandomAddr(), sdk.NewCoins(
sdk.NewCoin(s.Config.Denom, sdkmath.NewInt(5*types.DecimalGwei)),
))
Expand All @@ -332,7 +332,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithoutPriceChange
gas = gas.Add(gasPrice.Amount.Mul(sdk.NewInt(int64(gasLimit))))
s.T().Log("total gas", "gas", gas)

//delete object gas
// delete object gas
msgDeleteObject := storagetypes.NewMsgDeleteObject(user.GetAddr(), bucketName, objectName1)
simulateResponse = s.SimulateTx(msgDeleteObject, user)
gasLimit = simulateResponse.GasInfo.GetGasUsed()
Expand Down Expand Up @@ -390,7 +390,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithPriceChange()
// create bucket
bucketName := s.createBucket(sp, user, 256)

//simulate delete bucket gas
// simulate delete bucket gas
msgDeleteBucket := storagetypes.NewMsgDeleteBucket(user.GetAddr(), bucketName)
simulateResponse := s.SimulateTx(msgDeleteBucket, user)
gasLimit := simulateResponse.GasInfo.GetGasUsed()
Expand All @@ -407,7 +407,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithPriceChange()
// for payment
time.Sleep(2 * time.Second)

//transfer gas
// transfer gas
msgSend := banktypes.NewMsgSend(user.GetAddr(), core.GenRandomAddr(), sdk.NewCoins(
sdk.NewCoin(s.Config.Denom, sdkmath.NewInt(5*types.DecimalGwei)),
))
Expand All @@ -419,7 +419,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithPriceChange()
gas = gas.Add(gasPrice.Amount.Mul(sdk.NewInt(int64(gasLimit))))
s.T().Log("total gas", "gas", gas)

//delete object gas
// delete object gas
msgDeleteObject := storagetypes.NewMsgDeleteObject(user.GetAddr(), bucketName, objectName1)
simulateResponse = s.SimulateTx(msgDeleteObject, user)
gasLimit = simulateResponse.GasInfo.GetGasUsed()
Expand Down Expand Up @@ -505,7 +505,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithPriceChangeRes
// create bucket
bucketName := s.createBucket(sp, user, 256)

//simulate delete bucket gas
// simulate delete bucket gas
msgDeleteBucket := storagetypes.NewMsgDeleteBucket(user.GetAddr(), bucketName)
simulateResponse := s.SimulateTx(msgDeleteBucket, user)
gasLimit := simulateResponse.GasInfo.GetGasUsed()
Expand All @@ -522,7 +522,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithPriceChangeRes
// for payment
time.Sleep(2 * time.Second)

//transfer gas
// transfer gas
msgSend := banktypes.NewMsgSend(user.GetAddr(), core.GenRandomAddr(), sdk.NewCoins(
sdk.NewCoin(s.Config.Denom, sdkmath.NewInt(5*types.DecimalGwei)),
))
Expand All @@ -534,7 +534,7 @@ func (s *PaymentTestSuite) TestStorageBill_DeleteObjectBucket_WithPriceChangeRes
gas = gas.Add(gasPrice.Amount.Mul(sdk.NewInt(int64(gasLimit))))
s.T().Log("total gas", "gas", gas)

//delete object gas
// delete object gas
msgDeleteObject := storagetypes.NewMsgDeleteObject(user.GetAddr(), bucketName, objectName1)
simulateResponse = s.SimulateTx(msgDeleteObject, user)
gasLimit = simulateResponse.GasInfo.GetGasUsed()
Expand Down Expand Up @@ -1459,7 +1459,7 @@ func (s *PaymentTestSuite) TestStorageBill_CopyObject_WithoutPriceChange() {
streamRecordsAfterCopy := s.getStreamRecords(streamAddresses)
s.Require().Equal(streamRecordsAfterCopy.User.StaticBalance, sdkmath.ZeroInt())
s.Require().Equal(streamRecordsAfterCopy.User.LockBalance, sdkmath.ZeroInt())
//gvgFamilyRate1, gvgRate1, taxRate1, userTotalRate1 := s.calculateStorageRates(sp,distBucketName, distObjectName, payloadSize)
// gvgFamilyRate1, gvgRate1, taxRate1, userTotalRate1 := s.calculateStorageRates(sp,distBucketName, distObjectName, payloadSize)
s.Require().Equal(streamRecordsAfterCopy.User.NetflowRate.Sub(streamRecordsAfter.User.NetflowRate), userTotalRate.Neg())
s.Require().Equal(streamRecordsAfterCopy.GVGFamily.NetflowRate.Sub(streamRecordsAfter.GVGFamily.NetflowRate), gvgFamilyRate)
s.Require().Equal(streamRecordsAfterCopy.GVG.NetflowRate.Sub(streamRecordsAfter.GVG.NetflowRate), gvgRate)
Expand Down Expand Up @@ -1548,7 +1548,6 @@ func (s *PaymentTestSuite) TestStorageBill_CopyObject_WithPriceChange() {
s.Require().Equal(streamRecordsAfterCopy.GVG.NetflowRate.Sub(streamRecordsAfter.GVG.NetflowRate), gvgRate1)
s.Require().Equal(streamRecordsAfterCopy.Tax.NetflowRate.Sub(streamRecordsAfter.Tax.NetflowRate), taxRate1)
s.Require().Equal(streamRecordsAfterCopy.User.NetflowRate.Sub(streamRecordsAfter.User.NetflowRate).BigInt().String(), userTotalRate1.Neg().BigInt().String())

}

// TestStorageBill_UpdateBucketQuota
Expand Down Expand Up @@ -1696,7 +1695,6 @@ func (s *PaymentTestSuite) TestStorageBill_UpdateBucketQuota() {
user.GetAddr(), bucketName, &chargedReadQuota, user.GetAddr(), storagetypes.VISIBILITY_TYPE_PRIVATE)
s.reduceBNBBalance(user, s.Validator, sdkmath.NewIntWithDecimal(1, 16))
s.SendTxBlockWithExpectErrorString(msgUpdateBucketInfo, user, "apply user flows list failed")

}

// TestStorageBill_UpdatePaymentAddress
Expand Down Expand Up @@ -1853,7 +1851,6 @@ func (s *PaymentTestSuite) TestStorageBill_UpdatePaymentAddress() {
user.GetAddr(), bucketName, &readQuota, paymentAcc, storagetypes.VISIBILITY_TYPE_PRIVATE)

s.SendTxBlockWithExpectErrorString(msgUpdateBucketInfo, user, "apply user flows list failed")

}

func (s *PaymentTestSuite) TestStorageBill_MigrationBucket() {
Expand Down Expand Up @@ -2034,8 +2031,8 @@ func (s *PaymentTestSuite) GetSecondarySP(sps ...*core.StorageProvider) ([]*core
}
return secondarySPs, secondarySPIDs
}
func (s *PaymentTestSuite) NewMigrateBucket(srcSP, dstSP *core.StorageProvider, user keys.KeyManager, bucketName string, srcID, dstID uint32, bucketID sdkmath.Uint) (*storagetypes.MsgMigrateBucket, *storagetypes.MsgCompleteMigrateBucket) {

func (s *PaymentTestSuite) NewMigrateBucket(srcSP, dstSP *core.StorageProvider, user keys.KeyManager, bucketName string, srcID, dstID uint32, bucketID sdkmath.Uint) (*storagetypes.MsgMigrateBucket, *storagetypes.MsgCompleteMigrateBucket) {
secondarySPs, _ := s.GetSecondarySP(srcSP, dstSP)
var gvgMappings []*storagetypes.GVGMapping
gvgMappings = append(gvgMappings, &storagetypes.GVGMapping{SrcGlobalVirtualGroupId: srcID, DstGlobalVirtualGroupId: dstID})
Expand Down Expand Up @@ -2063,8 +2060,8 @@ func (s *PaymentTestSuite) NewMigrateBucket(srcSP, dstSP *core.StorageProvider,
msgCompleteMigrationBucket := storagetypes.NewMsgCompleteMigrateBucket(dstSP.OperatorKey.GetAddr(), bucketName, dstID, gvgMappings)

return msgMigrationBucket, msgCompleteMigrationBucket

}

func (s *PaymentTestSuite) SetSPPrice(sp *core.StorageProvider, readPrice, storePrice string) {
ctx := context.Background()

Expand Down Expand Up @@ -2095,7 +2092,6 @@ func (s *PaymentTestSuite) SetSPPrice(sp *core.StorageProvider, readPrice, store
s.Require().NoError(err)
s.T().Logf("queryGetSpStoragePriceByTimeResp read price: %s, store price: %v",
queryGetSpStoragePriceByTimeResp.SpStoragePrice.ReadPrice, queryGetSpStoragePriceByTimeResp.SpStoragePrice.StorePrice)

}

// CreatePaymentAccount create new payment account and return latest payment account
Expand Down Expand Up @@ -2134,11 +2130,9 @@ func (s *PaymentTestSuite) copyObject(user keys.KeyManager, sp *core.StorageProv
}
headObjectResponse, err := s.Client.HeadObject(context.Background(), &queryHeadObjectRequest)
return headObjectResponse.ObjectInfo, err

}

func (s *PaymentTestSuite) updateBucket(user keys.KeyManager, bucketName string, paymentAddress string, chargedReadQuota uint64) (*storagetypes.BucketInfo, error) {

func (s *PaymentTestSuite) updateBucket(user keys.KeyManager, bucketName, paymentAddress string, chargedReadQuota uint64) (*storagetypes.BucketInfo, error) {
msgUpdateBucketInfo := storagetypes.NewMsgUpdateBucketInfo(
user.GetAddr(), bucketName, &chargedReadQuota, user.GetAddr(), storagetypes.VISIBILITY_TYPE_PRIVATE)
if paymentAddress != "" {
Expand All @@ -2151,7 +2145,6 @@ func (s *PaymentTestSuite) updateBucket(user keys.KeyManager, bucketName string,
}
headObjectResponse, err := s.Client.HeadBucket(context.Background(), &queryHeadObjectRequest)
return headObjectResponse.BucketInfo, err

}

func (s *PaymentTestSuite) reduceBNBBalance(user, to keys.KeyManager, leftBalance sdkmath.Int) {
Expand All @@ -2178,10 +2171,8 @@ func (s *PaymentTestSuite) reduceBNBBalance(user, to keys.KeyManager, leftBalanc
}

func (s *PaymentTestSuite) transferBNB(user, to keys.KeyManager, amount sdkmath.Int) {

msgSend := banktypes.NewMsgSend(user.GetAddr(), to.GetAddr(), sdk.NewCoins(
sdk.NewCoin(s.Config.Denom, amount),
))
s.SendTxBlock(user, msgSend)

}
21 changes: 12 additions & 9 deletions e2e/tests/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ func (s *StorageTestSuite) SetupTest() {
s.User = s.GenAndChargeAccounts(1, 1000000)[0]
}

var (
line = `1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
var line = `1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
Expand All @@ -57,7 +56,6 @@ var (
1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,
1234567890,1234567890,1234567890,123`
)

func (s *StorageTestSuite) TestCreateBucket() {
var err error
Expand Down Expand Up @@ -304,7 +302,8 @@ func (s *StorageTestSuite) TestCreateGroup() {

// 4. UpdateGroupMember(add)
membersToAdd := []*storagetypes.MsgGroupMember{
{Member: member.GetAddr().String(), ExpirationTime: storagetypes.MaxTimeStamp}}
{Member: member.GetAddr().String()},
}
membersToDelete := []sdk.AccAddress{}
msgUpdateGroupMember := storagetypes.NewMsgUpdateGroupMember(owner.GetAddr(), owner.GetAddr(), groupName, membersToAdd, membersToDelete)
s.SendTxBlock(owner, msgUpdateGroupMember)
Expand All @@ -322,7 +321,8 @@ func (s *StorageTestSuite) TestCreateGroup() {
// 5. UpdateGroupMember(delete)
member2 := s.GenAndChargeAccounts(1, 1000000)[0]
membersToAdd = []*storagetypes.MsgGroupMember{
{Member: member2.GetAddr().String(), ExpirationTime: storagetypes.MaxTimeStamp}}
{Member: member2.GetAddr().String()},
}
membersToDelete = []sdk.AccAddress{member.GetAddr()}
msgUpdateGroupMember = storagetypes.NewMsgUpdateGroupMember(owner.GetAddr(), owner.GetAddr(), groupName, membersToAdd, membersToDelete)
s.SendTxBlock(owner, msgUpdateGroupMember)
Expand Down Expand Up @@ -353,7 +353,8 @@ func (s *StorageTestSuite) TestLeaveGroup() {
s.SendTxBlock(owner, msgCreateGroup)
s.T().Logf("CerateGroup success, owner: %s, group name: %s", owner.GetAddr().String(), groupName)
membersToAdd := []*storagetypes.MsgGroupMember{
{Member: member.GetAddr().String(), ExpirationTime: storagetypes.MaxTimeStamp}}
{Member: member.GetAddr().String()},
}
membersToDelete := []sdk.AccAddress{}
msgUpdateGroupMember := storagetypes.NewMsgUpdateGroupMember(owner.GetAddr(), owner.GetAddr(), groupName, membersToAdd, membersToDelete)
s.SendTxBlock(owner, msgUpdateGroupMember)
Expand Down Expand Up @@ -391,7 +392,8 @@ func (s *StorageTestSuite) TestLeaveGroup() {
// 4. UpdateGroupMember
member2 := s.GenAndChargeAccounts(1, 1000000)[0]
membersToAdd = []*storagetypes.MsgGroupMember{
{Member: member2.GetAddr().String(), ExpirationTime: storagetypes.MaxTimeStamp}}
{Member: member2.GetAddr().String()},
}
membersToDelete = []sdk.AccAddress{member.GetAddr()}
msgUpdateGroupMember = storagetypes.NewMsgUpdateGroupMember(owner.GetAddr(), owner.GetAddr(), groupName, membersToAdd, membersToDelete)
s.SendTxBlock(owner, msgUpdateGroupMember)
Expand Down Expand Up @@ -1560,10 +1562,11 @@ func (s *StorageTestSuite) TestCreateAndRenewGroup() {
s.Require().Equal(headGroupResponse.GroupInfo.Extra, extra)

// Renew GroupMember
expiration, err := time.Parse(time.RFC3339, "2022-12-31T23:59:59Z")
expiration, err := time.Parse(time.RFC3339, "3023-12-31T23:59:59Z")
s.Require().NoError(err)
members := []*storagetypes.MsgGroupMember{
{Member: member.GetAddr().String(), ExpirationTime: expiration}}
{Member: member.GetAddr().String(), ExpirationTime: &expiration},
}
msgUpdateGroupMember := storagetypes.NewMsgRenewGroupMember(owner.GetAddr(), owner.GetAddr(), testGroupName, members)
s.SendTxBlock(owner, msgUpdateGroupMember)

Expand Down
21 changes: 12 additions & 9 deletions e2e/tests/virtualgroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func (s *VirtualGroupTestSuite) TestBasic() {

// test withdraw
balance, err := s.Client.BankQueryClient.Balance(context.Background(), &types2.QueryBalanceRequest{
Denom: s.Config.Denom, Address: primarySP.FundingKey.GetAddr().String()})
Denom: s.Config.Denom, Address: primarySP.FundingKey.GetAddr().String(),
})
s.Require().NoError(err)

msgWithdraw := virtualgroupmoduletypes.MsgWithdraw{
Expand All @@ -146,7 +147,8 @@ func (s *VirtualGroupTestSuite) TestBasic() {
}
s.SendTxBlock(primarySP.FundingKey, &msgWithdraw)
balanceAfterWithdraw, err := s.Client.BankQueryClient.Balance(context.Background(), &types2.QueryBalanceRequest{
Denom: s.Config.Denom, Address: primarySP.FundingKey.GetAddr().String()})
Denom: s.Config.Denom, Address: primarySP.FundingKey.GetAddr().String(),
})
s.Require().NoError(err)

s.T().Logf("balance: %s, after: %s", balance.String(), balanceAfterWithdraw.String())
Expand Down Expand Up @@ -208,12 +210,14 @@ func (s *VirtualGroupTestSuite) TestSettle() {
time.Sleep(3 * time.Second)

primaryBalance, err := s.Client.BankQueryClient.Balance(context.Background(), &types2.QueryBalanceRequest{
Denom: s.Config.Denom, Address: primarySp.FundingKey.GetAddr().String()})
Denom: s.Config.Denom, Address: primarySp.FundingKey.GetAddr().String(),
})
s.Require().NoError(err)
secondaryBalances := make([]sdkmath.Int, 0)
for _, addr := range secondarySpAddrs {
tempResp, err := s.Client.BankQueryClient.Balance(context.Background(), &types2.QueryBalanceRequest{
Denom: s.Config.Denom, Address: addr})
Denom: s.Config.Denom, Address: addr,
})
s.Require().NoError(err)
secondaryBalances = append(secondaryBalances, tempResp.Balance.Amount)
}
Expand All @@ -233,7 +237,8 @@ func (s *VirtualGroupTestSuite) TestSettle() {
s.SendTxBlock(primarySp.FundingKey, &msgSettle)

primaryBalanceAfter, err := s.Client.BankQueryClient.Balance(context.Background(), &types2.QueryBalanceRequest{
Denom: s.Config.Denom, Address: primarySp.FundingKey.GetAddr().String()})
Denom: s.Config.Denom, Address: primarySp.FundingKey.GetAddr().String(),
})
s.Require().NoError(err)

s.T().Logf("primaryBalance: %s, after: %s", primaryBalance.String(), primaryBalanceAfter.String())
Expand All @@ -257,7 +262,8 @@ func (s *VirtualGroupTestSuite) TestSettle() {
secondaryBalancesAfter := make([]sdkmath.Int, 0, len(secondaryBalances))
for _, addr := range secondarySpAddrs {
tempResp, err := s.Client.BankQueryClient.Balance(context.Background(), &types2.QueryBalanceRequest{
Denom: s.Config.Denom, Address: addr})
Denom: s.Config.Denom, Address: addr,
})
s.Require().NoError(err)
secondaryBalancesAfter = append(secondaryBalancesAfter, tempResp.Balance.Amount)
}
Expand Down Expand Up @@ -510,11 +516,9 @@ func (s *VirtualGroupTestSuite) TestSPExit() {
sp.OperatorKey,
&virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: sp.OperatorKey.GetAddr().String()},
)

}

func (s *VirtualGroupTestSuite) TestSPExit_CreateAndDeleteBucket() {

user := s.GenAndChargeAccounts(1, 1000000)[0]
bucketName := storagetestutil.GenRandomBucketName()
objectName := storagetestutil.GenRandomObjectName()
Expand Down Expand Up @@ -568,7 +572,6 @@ func (s *VirtualGroupTestSuite) TestSPExit_CreateAndDeleteBucket() {
sp.OperatorKey,
&virtualgroupmoduletypes.MsgCompleteStorageProviderExit{StorageProvider: sp.OperatorKey.GetAddr().String()},
)

}

func (s *VirtualGroupTestSuite) TestUpdateVirtualGroupParams() {
Expand Down
2 changes: 2 additions & 0 deletions proto/greenfield/permission/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ message Params {
// By placing a cap on the number of group permissions, permission control policies can be made more robust and better
// enforced, thereby reducing the chances of DDos and other security incidents.
uint64 maximum_group_num = 2;
// the maximum number of endblocker loops to execute
uint64 maximum_endblocker_loops = 18;
}
5 changes: 1 addition & 4 deletions proto/greenfield/permission/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,5 @@ message GroupMember {
// member is the account address of the member
string member = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// expiration_time defines the expiration time of the group member
google.protobuf.Timestamp expiration_time = 4 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
google.protobuf.Timestamp expiration_time = 4 [(gogoproto.stdtime) = true];
}
5 changes: 1 addition & 4 deletions proto/greenfield/storage/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,7 @@ message EventGroupMemberDetail {
// member defines the account address of the group member
string member = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// expiration_time defines the expiration time of the group member
google.protobuf.Timestamp expiration_time = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
google.protobuf.Timestamp expiration_time = 2 [(gogoproto.stdtime) = true];
}

// EventUpdateGroupExtra is emitted on MsgUpdateGroupExtra
Expand Down
5 changes: 1 addition & 4 deletions proto/greenfield/storage/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,7 @@ message MsgGroupMember {
// member defines the account address of the group member
string member = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// expiration_time defines the expiration time of the group member
google.protobuf.Timestamp expiration_time = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
google.protobuf.Timestamp expiration_time = 2 [(gogoproto.stdtime) = true];
}

message MsgUpdateGroupExtra {
Expand Down
Loading

0 comments on commit 019c81f

Please sign in to comment.