Skip to content

Commit

Permalink
Feat/QB-2331: Add beneficiary address for resource node (#333)
Browse files Browse the repository at this point in the history
* update api msgs
* add beneficiary address
* update api file
  • Loading branch information
Xiong-stratos authored Feb 21, 2024
1 parent 69fd52e commit 4e19cff
Show file tree
Hide file tree
Showing 26 changed files with 1,279 additions and 602 deletions.
3 changes: 1 addition & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
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.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
529 changes: 305 additions & 224 deletions api/stratos/register/v1/register.pulsar.go

Large diffs are not rendered by default.

232 changes: 196 additions & 36 deletions api/stratos/register/v1/tx.pulsar.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/stratosnet/stratos-chain/api v0.0.0-20231213144458-496a5e4754ff
github.com/stratosnet/stratos-chain/api v0.0.0-20231220214043-682f174b1c21
github.com/stretchr/testify v1.8.4
github.com/tyler-smith/go-bip39 v1.1.0
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,8 @@ github.com/stratosnet/cosmos-sdk v0.47.5-stratos h1:g0qhd8SurXdq6UttDL6h3+G8N/fh
github.com/stratosnet/cosmos-sdk v0.47.5-stratos/go.mod h1:WDWuv5LQB7RzVwlD1WEaYOZZZk0DzQf9o8CMD3NHrPI=
github.com/stratosnet/ledger-stratos-go v0.0.0-20230728192009-175657d24cb0 h1:Y8vzNO2ieC7ViVbge7v0eT/ft3nzwVCH78soFeqSJr4=
github.com/stratosnet/ledger-stratos-go v0.0.0-20230728192009-175657d24cb0/go.mod h1:9T0Ii/AMWWnJRtvKYKB4kDdraaOP76J+K5/IbRXQgyc=
github.com/stratosnet/stratos-chain/api v0.0.0-20231213144458-496a5e4754ff h1:kl0o0UufsWz5t4VypjaRjVlGyevH4v/AnVLLd59+yrw=
github.com/stratosnet/stratos-chain/api v0.0.0-20231213144458-496a5e4754ff/go.mod h1:cmd+23oKQApo0M9aooZL3+DY9/XiiXCGOQBOoNa95CM=
github.com/stratosnet/stratos-chain/api v0.0.0-20231220214043-682f174b1c21 h1:aVfwtoQ4dCAXbzfQ9k4rLKkT4UAeWudH8OxNb3WXQm8=
github.com/stratosnet/stratos-chain/api v0.0.0-20231220214043-682f174b1c21/go.mod h1:FN6crwtoVjf2errz8Nsj0y/zRxuIRtxs5w8qLHKVBqA=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
Expand Down
18 changes: 12 additions & 6 deletions proto/stratos/register/v1/register.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ message ResourceNode {
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"
];
string beneficiary_address = 11 [
(cosmos_proto.scalar) = "cosmos.AddressString",
(gogoproto.jsontag) = "beneficiary_address",
(gogoproto.moretags) = "yaml:\"beneficiary_address\""
];
}

message MetaNode {
Expand Down Expand Up @@ -151,22 +156,23 @@ message MetaNode {
(gogoproto.jsontag) = "owner_address",
(gogoproto.moretags) = "yaml:\"owner_address\""
];
string beneficiary_address = 7 [
(gogoproto.jsontag) = "beneficiary_address",
(gogoproto.moretags) = "yaml:\"beneficiary_address\""
];
Description description = 8 [
Description description = 7 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "description",
(gogoproto.moretags) = "yaml:\"description\""
];
google.protobuf.Timestamp creation_time = 9 [
google.protobuf.Timestamp creation_time = 8 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.stdtime) = true,
(gogoproto.jsontag) = "creation_time",
(gogoproto.moretags) = "yaml:\"creation_time\""
];
string beneficiary_address = 9 [
(cosmos_proto.scalar) = "cosmos.AddressString",
(gogoproto.jsontag) = "beneficiary_address",
(gogoproto.moretags) = "yaml:\"beneficiary_address\""
];
}

message MetaNodeRegistrationVotePool {
Expand Down
20 changes: 15 additions & 5 deletions proto/stratos/register/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ message MsgCreateResourceNode {
(gogoproto.jsontag) = "owner_address",
(gogoproto.moretags) = "yaml:\"owner_address\""
];
Description description = 5 [
string beneficiary_address = 5 [
(cosmos_proto.scalar) = "cosmos.AddressString",
(gogoproto.jsontag) = "beneficiary_address",
(gogoproto.moretags) = "yaml:\"beneficiary_address\""
];
Description description = 6 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.jsontag) = "description",
(gogoproto.moretags) = "yaml:\"description\""
];
uint32 node_type = 6 [
uint32 node_type = 7 [
(gogoproto.jsontag) = "node_type",
(gogoproto.moretags) = "yaml:\"node_type\""
];
Expand Down Expand Up @@ -171,17 +176,22 @@ message MsgUpdateResourceNode {
(gogoproto.jsontag) = "description",
(gogoproto.moretags) = "yaml:\"description\""
];
string network_address = 2 [
string beneficiary_address = 2 [
(cosmos_proto.scalar) = "cosmos.AddressString",
(gogoproto.jsontag) = "beneficiary_address",
(gogoproto.moretags) = "yaml:\"beneficiary_address\""
];
string network_address = 3 [
(cosmos_proto.scalar) = "cosmos.AddressString",
(gogoproto.jsontag) = "network_address",
(gogoproto.moretags) = "yaml:\"network_address\""
];
string owner_address = 3 [
string owner_address = 4 [
(cosmos_proto.scalar) = "cosmos.AddressString",
(gogoproto.jsontag) = "owner_address",
(gogoproto.moretags) = "yaml:\"owner_address\""
];
uint32 node_type = 4 [
uint32 node_type = 5 [
(gogoproto.jsontag) = "node_type",
(gogoproto.moretags) = "yaml:\"node_type\""
];
Expand Down
Empty file modified scripts/protocgen.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion scripts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0

## Export proto dependency

`$ buf export buf.build/cosmos/cosmos-sdk:v0.47.0 --output ./proto`
`/stratos-chain$ buf export buf.build/cosmos/cosmos-sdk:v0.47.0 --output ./proto`
Loading

0 comments on commit 4e19cff

Please sign in to comment.