feat: Add timestamp to group, group policy and member (#10883)

## Description

Closes: #10668 

There is currently no timestamp in GroupInfo, GroupAccountInfo, or Member. 
Add created_at for groups and group policies.
Add added_at for members.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
This commit is contained in:
likhita-809 2022-01-06 21:59:46 +05:30 committed by GitHub
parent 60a0935d60
commit aaa61e3529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 311 additions and 125 deletions

View File

@ -22,6 +22,9 @@ message Member {
// metadata is any arbitrary metadata to attached to the member.
bytes metadata = 3;
// added_at is a timestamp specifying when a member was added.
google.protobuf.Timestamp added_at = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}
// Members defines a repeated slice of Member objects.
@ -86,6 +89,9 @@ message GroupInfo {
// total_weight is the sum of the group members' weights.
string total_weight = 5;
// created_at is a timestamp specifying when a group was created.
google.protobuf.Timestamp created_at = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}
// GroupMember represents the relationship between a group and a member.
@ -121,6 +127,9 @@ message GroupPolicyInfo {
// decision_policy specifies the group policy's decision policy.
google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"];
// created_at is a timestamp specifying when a group policy was created.
google.protobuf.Timestamp created_at = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}
// Proposal defines a group proposal. Any member of a group can submit a proposal

View File

@ -313,7 +313,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFM
github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE=
github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o=
github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk=
github.com/dgraph-io/badger/v3 v3.2103.2/go.mod h1:RHo4/GmYcKKh5Lxu63wLEMHJ70Pac2JqZRYGhlyAo2M=
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI=
@ -526,8 +525,6 @@ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9
github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs=
github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@ -636,7 +633,6 @@ github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBt
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
@ -730,7 +726,6 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS
github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4=
github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4=
github.com/jhump/protoreflect v1.10.1 h1:iH+UZfsbRE6vpyZH7asAjTPWJf7RJbpZ9j/N3lDlKs0=
github.com/jhump/protoreflect v1.10.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c=
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
@ -955,7 +950,6 @@ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc=
github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ=
github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
@ -1138,7 +1132,6 @@ github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0K
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE=
github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=
github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM=
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI=
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4=
@ -1638,7 +1631,6 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJRph7l9XkNveoExlrKYk=
@ -1728,7 +1720,6 @@ golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
@ -1737,7 +1728,6 @@ golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@ -1921,7 +1911,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=

View File

@ -93,10 +93,12 @@ func (s *TestSuite) TestCreateGroup() {
Address: addr5.String(),
Weight: "1",
Metadata: nil,
AddedAt: s.blockTime,
}, {
Address: addr6.String(),
Weight: "2",
Metadata: nil,
AddedAt: s.blockTime,
}}
expGroups := []*group.GroupInfo{
@ -106,6 +108,7 @@ func (s *TestSuite) TestCreateGroup() {
Admin: addr1.String(),
TotalWeight: "3",
Metadata: nil,
CreatedAt: s.blockTime,
},
{
GroupId: 2,
@ -113,6 +116,7 @@ func (s *TestSuite) TestCreateGroup() {
Admin: addr1.String(),
TotalWeight: "3",
Metadata: nil,
CreatedAt: s.blockTime,
},
}
@ -205,6 +209,7 @@ func (s *TestSuite) TestCreateGroup() {
s.Assert().Equal(members[i].Metadata, loadedMembers[i].Member.Metadata)
s.Assert().Equal(members[i].Address, loadedMembers[i].Member.Address)
s.Assert().Equal(members[i].Weight, loadedMembers[i].Member.Weight)
s.Assert().Equal(members[i].AddedAt, loadedMembers[i].Member.AddedAt)
s.Assert().Equal(id, loadedMembers[i].GroupId)
}
@ -219,6 +224,7 @@ func (s *TestSuite) TestCreateGroup() {
s.Assert().Equal(spec.expGroups[i].TotalWeight, loadedGroups[i].TotalWeight)
s.Assert().Equal(spec.expGroups[i].GroupId, loadedGroups[i].GroupId)
s.Assert().Equal(spec.expGroups[i].Version, loadedGroups[i].Version)
s.Assert().Equal(spec.expGroups[i].CreatedAt, loadedGroups[i].CreatedAt)
}
})
}
@ -236,6 +242,7 @@ func (s *TestSuite) TestUpdateGroupAdmin() {
Address: addr1.String(),
Weight: "1",
Metadata: nil,
AddedAt: s.blockTime,
}}
oldAdmin := addr2.String()
newAdmin := addr3.String()
@ -263,6 +270,7 @@ func (s *TestSuite) TestUpdateGroupAdmin() {
Metadata: nil,
TotalWeight: "1",
Version: 2,
CreatedAt: s.blockTime,
},
},
"with wrong admin": {
@ -278,6 +286,7 @@ func (s *TestSuite) TestUpdateGroupAdmin() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
},
"with unknown groupID": {
@ -293,6 +302,7 @@ func (s *TestSuite) TestUpdateGroupAdmin() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
},
}
@ -339,6 +349,7 @@ func (s *TestSuite) TestUpdateGroupMetadata() {
Metadata: []byte{1, 2, 3},
TotalWeight: "3",
Version: 2,
CreatedAt: s.blockTime,
},
},
"with wrong admin": {
@ -354,6 +365,7 @@ func (s *TestSuite) TestUpdateGroupMetadata() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
},
"with unknown groupid": {
@ -369,6 +381,7 @@ func (s *TestSuite) TestUpdateGroupMetadata() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
},
}
@ -438,6 +451,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "3",
Version: 2,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{
{
@ -474,6 +488,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "2",
Version: 2,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{
{
@ -501,6 +516,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "1",
Version: 2,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{
{
@ -535,6 +551,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "1",
Version: 2,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{{
GroupId: groupID,
@ -561,6 +578,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "0",
Version: 2,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{},
},
@ -581,6 +599,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{{
GroupId: groupID,
@ -608,6 +627,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{{
GroupId: groupID,
@ -634,6 +654,7 @@ func (s *TestSuite) TestUpdateGroupMembers() {
Metadata: nil,
TotalWeight: "1",
Version: 1,
CreatedAt: s.blockTime,
},
expMembers: []*group.GroupMember{{
GroupId: groupID,
@ -817,6 +838,7 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() {
Metadata: nil,
Version: 2,
DecisionPolicy: nil,
CreatedAt: s.blockTime,
},
expErr: true,
},
@ -833,6 +855,7 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() {
Metadata: nil,
Version: 2,
DecisionPolicy: nil,
CreatedAt: s.blockTime,
},
expErr: true,
},
@ -849,6 +872,7 @@ func (s *TestSuite) TestUpdateGroupPolicyAdmin() {
Metadata: nil,
Version: 2,
DecisionPolicy: nil,
CreatedAt: s.blockTime,
},
expErr: false,
},
@ -927,6 +951,7 @@ func (s *TestSuite) TestUpdateGroupPolicyMetadata() {
Metadata: []byte("hello"),
Version: 2,
DecisionPolicy: nil,
CreatedAt: s.blockTime,
},
expErr: false,
},
@ -1000,6 +1025,7 @@ func (s *TestSuite) TestUpdateGroupPolicyDecisionPolicy() {
Metadata: nil,
Version: 2,
DecisionPolicy: nil,
CreatedAt: s.blockTime,
},
expErr: false,
},
@ -1066,11 +1092,12 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() {
s.Require().NoError(err)
expectAcc := &group.GroupPolicyInfo{
Address: res.Address,
Admin: admin.String(),
Metadata: nil,
GroupId: myGroupID,
Version: uint64(1),
Address: res.Address,
Admin: admin.String(),
Metadata: nil,
GroupId: myGroupID,
Version: uint64(1),
CreatedAt: s.blockTime,
}
err = expectAcc.SetDecisionPolicy(policies[i])
s.Require().NoError(err)
@ -1093,6 +1120,7 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() {
s.Assert().Equal(policyAccs[i].Admin, expectAccs[i].Admin)
s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata)
s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version)
s.Assert().Equal(policyAccs[i].CreatedAt, expectAccs[i].CreatedAt)
s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy())
}
@ -1111,6 +1139,7 @@ func (s *TestSuite) TestGroupPoliciesByAdminOrGroup() {
s.Assert().Equal(policyAccs[i].Admin, expectAccs[i].Admin)
s.Assert().Equal(policyAccs[i].Metadata, expectAccs[i].Metadata)
s.Assert().Equal(policyAccs[i].Version, expectAccs[i].Version)
s.Assert().Equal(policyAccs[i].CreatedAt, expectAccs[i].CreatedAt)
s.Assert().Equal(policyAccs[i].GetDecisionPolicy(), expectAccs[i].GetDecisionPolicy())
}
}
@ -1349,8 +1378,8 @@ func (s *TestSuite) TestVote() {
addr4 := addrs[3]
addr5 := addrs[4]
members := []group.Member{
{Address: addr4.String(), Weight: "1"},
{Address: addr3.String(), Weight: "2"},
{Address: addr4.String(), Weight: "1", AddedAt: s.blockTime},
{Address: addr3.String(), Weight: "2", AddedAt: s.blockTime},
}
groupRes, err := s.keeper.CreateGroup(s.ctx, &group.MsgCreateGroup{
Admin: addr1.String(),

View File

@ -65,6 +65,7 @@ func (k Keeper) CreateGroup(goCtx context.Context, req *group.MsgCreateGroup) (*
Metadata: metadata,
Version: 1,
TotalWeight: totalWeight.String(),
CreatedAt: ctx.BlockTime(),
}
groupID, err := k.groupTable.Create(ctx.KVStore(k.key), groupInfo)
if err != nil {
@ -80,6 +81,7 @@ func (k Keeper) CreateGroup(goCtx context.Context, req *group.MsgCreateGroup) (*
Address: m.Address,
Weight: m.Weight,
Metadata: m.Metadata,
AddedAt: ctx.BlockTime(),
},
})
if err != nil {
@ -291,6 +293,7 @@ func (k Keeper) CreateGroupPolicy(goCtx context.Context, req *group.MsgCreateGro
metadata,
1,
policy,
ctx.BlockTime(),
)
if err != nil {
return nil, err

View File

@ -122,13 +122,14 @@ var _ orm.Validateable = GroupPolicyInfo{}
// NewGroupPolicyInfo creates a new GroupPolicyInfo instance
func NewGroupPolicyInfo(address sdk.AccAddress, group uint64, admin sdk.AccAddress, metadata []byte,
version uint64, decisionPolicy DecisionPolicy) (GroupPolicyInfo, error) {
version uint64, decisionPolicy DecisionPolicy, createdAt time.Time) (GroupPolicyInfo, error) {
p := GroupPolicyInfo{
Address: address.String(),
GroupId: group,
Admin: admin.String(),
Metadata: metadata,
Version: version,
Address: address.String(),
GroupId: group,
Admin: admin.String(),
Metadata: metadata,
Version: version,
CreatedAt: createdAt,
}
err := p.SetDecisionPolicy(decisionPolicy)

View File

@ -188,6 +188,8 @@ type Member struct {
Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
// metadata is any arbitrary metadata to attached to the member.
Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
// added_at is a timestamp specifying when a member was added.
AddedAt time.Time `protobuf:"bytes,4,opt,name=added_at,json=addedAt,proto3,stdtime" json:"added_at"`
}
func (m *Member) Reset() { *m = Member{} }
@ -244,6 +246,13 @@ func (m *Member) GetMetadata() []byte {
return nil
}
func (m *Member) GetAddedAt() time.Time {
if m != nil {
return m.AddedAt
}
return time.Time{}
}
// Members defines a repeated slice of Member objects.
type Members struct {
// members is the list of members.
@ -361,6 +370,8 @@ type GroupInfo struct {
Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
// total_weight is the sum of the group members' weights.
TotalWeight string `protobuf:"bytes,5,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"`
// created_at is a timestamp specifying when a group was created.
CreatedAt time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
}
func (m *GroupInfo) Reset() { *m = GroupInfo{} }
@ -431,6 +442,13 @@ func (m *GroupInfo) GetTotalWeight() string {
return ""
}
func (m *GroupInfo) GetCreatedAt() time.Time {
if m != nil {
return m.CreatedAt
}
return time.Time{}
}
// GroupMember represents the relationship between a group and a member.
type GroupMember struct {
// group_id is the unique ID of the group.
@ -501,6 +519,8 @@ type GroupPolicyInfo struct {
Version uint64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
// decision_policy specifies the group policy's decision policy.
DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"`
// created_at is a timestamp specifying when a group policy was created.
CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
}
func (m *GroupPolicyInfo) Reset() { *m = GroupPolicyInfo{} }
@ -753,87 +773,90 @@ func init() {
func init() { proto.RegisterFile("cosmos/group/v1beta1/types.proto", fileDescriptor_e091dfce5c49c8b6) }
var fileDescriptor_e091dfce5c49c8b6 = []byte{
// 1278 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0x1b, 0x45,
0x18, 0xf6, 0xda, 0x8e, 0x3f, 0x5e, 0x27, 0x8e, 0x35, 0x0a, 0xad, 0xe3, 0xb4, 0xce, 0x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0x63, 0xe2, 0x58, 0x98, 0x15, 0x97, 0x7f, 0xd9, 0x5d, 0xaf, 0x30, 0x8c, 0x26, 0xb0, 0x0b, 0x2f,
0xd6, 0xff, 0xeb, 0xae, 0x78, 0xdb, 0x86, 0x14, 0x4f, 0x8b, 0xce, 0x01, 0x52, 0x3e, 0x69, 0x37,
0x15, 0x75, 0x76, 0x20, 0xd1, 0x0a, 0x64, 0xc5, 0x7a, 0xab, 0x5d, 0x90, 0x50, 0x1e, 0x40, 0x98,
0x5f, 0xaa, 0x7a, 0x21, 0x8e, 0x10, 0xe4, 0x85, 0x5d, 0x6f, 0xe8, 0x46, 0xbd, 0xd9, 0x2a, 0x24,
0xd0, 0x2a, 0xe4, 0xc4, 0xda, 0x91, 0x6a, 0xb4, 0x0b, 0xc9, 0xc6, 0xb5, 0x87, 0x8f, 0xcb, 0xd2,
0xa3, 0xc7, 0x65, 0xe9, 0xaf, 0xc7, 0x65, 0xe9, 0xee, 0x93, 0x72, 0xec, 0xd1, 0x93, 0x72, 0xec,
0xb7, 0x27, 0xe5, 0xd8, 0xcd, 0x37, 0xfb, 0x0e, 0x3d, 0x0e, 0x7a, 0x55, 0x8b, 0x0c, 0xc5, 0xf3,
0x5a, 0xfc, 0xd9, 0xf6, 0xed, 0x6f, 0x6a, 0xb7, 0xf9, 0xff, 0x01, 0xbd, 0x14, 0x6b, 0xe8, 0xbd,
0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x46, 0x84, 0xac, 0x3a, 0x1e, 0x0c, 0x00, 0x00,
// 1321 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0xdb, 0xc6,
0x16, 0x15, 0x25, 0x59, 0x1f, 0x57, 0xb6, 0x2c, 0x0c, 0xfc, 0x12, 0x59, 0x4e, 0x64, 0x46, 0x79,
0x0f, 0x30, 0xde, 0x83, 0xa5, 0x67, 0xf7,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, 0xc3, 0x08, 0x49, 0xfe, 0x88, 0x0a, 0x66, 0xd8,
0xb2, 0xc8, 0xe5, 0x4f, 0x09, 0x92, 0x47, 0x84, 0xe2, 0x57, 0xdf, 0x18, 0x55, 0x58, 0x0a, 0x8e,
0x15, 0xef, 0xd5, 0x0f, 0x1f, 0x06, 0x0b, 0x1e, 0x0c, 0xd6, 0x31, 0x71, 0x2c, 0xcc, 0x92, 0xcb,
0xbf, 0xec, 0xc1, 0xa0, 0x32, 0x8c, 0x2e, 0xb0, 0x0b, 0x6f, 0xe7, 0x7f, 0xea, 0xae, 0xf8, 0xaf,
0x0d, 0x29, 0xbe, 0x2d, 0x3a, 0x07, 0x48, 0xfd, 0xb0, 0xd5, 0x50, 0xb5, 0x68, 0x43, 0xa2, 0x15,
0xc8, 0x8a, 0xf9, 0x66, 0xab, 0x20, 0xa1, 0x3c, 0x80, 0x18, 0x7e, 0xa6, 0x19, 0x85, 0x38, 0x42,
0x90, 0x17, 0x63, 0xa5, 0x6e, 0xb4, 0x95, 0x46, 0xb3, 0x90, 0x40, 0xab, 0x90, 0x13, 0x73, 0x47,
0x5a, 0xbb, 0x55, 0x48, 0xd6, 0xaf, 0x3d, 0x78, 0x54, 0x96, 0x1e, 0x3e, 0x2a, 0x4b, 0x7f, 0x3c,
0x2a, 0x4b, 0x77, 0x1f, 0x97, 0x63, 0x0f, 0x1f, 0x97, 0x63, 0xbf, 0x3c, 0x2e, 0xc7, 0x6e, 0xfe,
0xbb, 0xef, 0xd0, 0xe3, 0x71, 0xaf, 0x6a, 0x91, 0xa1, 0xf8, 0xa9, 0x20, 0xfe, 0x6c, 0xfb, 0xf6,
0x97, 0xb5, 0xdb, 0xfc, 0x37, 0x4d, 0x2f, 0xc5, 0x04, 0xbd, 0xf5, 0x77, 0x00, 0x00, 0x00, 0xff,
0xff, 0xa5, 0xd8, 0x7b, 0xb8, 0xea, 0x0c, 0x00, 0x00,
}
func (this *GroupPolicyInfo) Equal(that interface{}) bool {
@ -873,6 +896,9 @@ func (this *GroupPolicyInfo) Equal(that interface{}) bool {
if !this.DecisionPolicy.Equal(that1.DecisionPolicy) {
return false
}
if !this.CreatedAt.Equal(that1.CreatedAt) {
return false
}
return true
}
func (m *Member) Marshal() (dAtA []byte, err error) {
@ -895,6 +921,14 @@ func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AddedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AddedAt):])
if err1 != nil {
return 0, err1
}
i -= n1
i = encodeVarintTypes(dAtA, i, uint64(n1))
i--
dAtA[i] = 0x22
if len(m.Metadata) > 0 {
i -= len(m.Metadata)
copy(dAtA[i:], m.Metadata)
@ -976,12 +1010,12 @@ func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)
_ = i
var l int
_ = l
n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):])
if err1 != nil {
return 0, err1
n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Timeout):])
if err2 != nil {
return 0, err2
}
i -= n1
i = encodeVarintTypes(dAtA, i, uint64(n1))
i -= n2
i = encodeVarintTypes(dAtA, i, uint64(n2))
i--
dAtA[i] = 0x12
if len(m.Threshold) > 0 {
@ -1014,6 +1048,14 @@ func (m *GroupInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):])
if err3 != nil {
return 0, err3
}
i -= n3
i = encodeVarintTypes(dAtA, i, uint64(n3))
i--
dAtA[i] = 0x32
if len(m.TotalWeight) > 0 {
i -= len(m.TotalWeight)
copy(dAtA[i:], m.TotalWeight)
@ -1108,6 +1150,14 @@ func (m *GroupPolicyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):])
if err5 != nil {
return 0, err5
}
i -= n5
i = encodeVarintTypes(dAtA, i, uint64(n5))
i--
dAtA[i] = 0x3a
if m.DecisionPolicy != nil {
{
size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i])
@ -1193,12 +1243,12 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x60
}
n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timeout):])
if err4 != nil {
return 0, err4
n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timeout):])
if err7 != nil {
return 0, err7
}
i -= n4
i = encodeVarintTypes(dAtA, i, uint64(n4))
i -= n7
i = encodeVarintTypes(dAtA, i, uint64(n7))
i--
dAtA[i] = 0x5a
{
@ -1231,12 +1281,12 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x30
}
n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):])
if err6 != nil {
return 0, err6
n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):])
if err9 != nil {
return 0, err9
}
i -= n6
i = encodeVarintTypes(dAtA, i, uint64(n6))
i -= n9
i = encodeVarintTypes(dAtA, i, uint64(n9))
i--
dAtA[i] = 0x2a
if len(m.Proposers) > 0 {
@ -1341,12 +1391,12 @@ func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):])
if err7 != nil {
return 0, err7
n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmittedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmittedAt):])
if err10 != nil {
return 0, err10
}
i -= n7
i = encodeVarintTypes(dAtA, i, uint64(n7))
i -= n10
i = encodeVarintTypes(dAtA, i, uint64(n10))
i--
dAtA[i] = 0x2a
if len(m.Metadata) > 0 {
@ -1405,6 +1455,8 @@ func (m *Member) Size() (n int) {
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.AddedAt)
n += 1 + l + sovTypes(uint64(l))
return n
}
@ -1462,6 +1514,8 @@ func (m *GroupInfo) Size() (n int) {
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovTypes(uint64(l))
return n
}
@ -1509,6 +1563,8 @@ func (m *GroupPolicyInfo) Size() (n int) {
l = m.DecisionPolicy.Size()
n += 1 + l + sovTypes(uint64(l))
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovTypes(uint64(l))
return n
}
@ -1748,6 +1804,39 @@ func (m *Member) Unmarshal(dAtA []byte) error {
m.Metadata = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AddedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.AddedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
@ -2133,6 +2222,39 @@ func (m *GroupInfo) Unmarshal(dAtA []byte) error {
}
m.TotalWeight = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
@ -2460,6 +2582,39 @@ func (m *GroupPolicyInfo) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])