diff --git a/clientcontroller/babylon.go b/clientcontroller/babylon.go index f0cdc19c81a57..1b37147c0ea3e 100644 --- a/clientcontroller/babylon.go +++ b/clientcontroller/babylon.go @@ -262,18 +262,16 @@ func (bc *BabylonController) RegisterValidator( btcPubKey *bbntypes.BIP340PubKey, pop *btcstakingtypes.ProofOfPossession, commission sdkTypes.Dec, + description *sttypes.Description, ) (*provider.RelayerTxResponse, error) { - // TODO: This should be user configurable - emptyDesc := sttypes.Description{} - msg := &btcstakingtypes.MsgCreateBTCValidator{ Signer: bc.MustGetTxSigner(), BabylonPk: bbnPubKey, BtcPk: btcPubKey, Pop: pop, Commission: &commission, - Description: &emptyDesc, + Description: description, } res, err := bc.reliablySendMsg(msg) diff --git a/clientcontroller/interface.go b/clientcontroller/interface.go index 381b9e5bd02c0..5604480093c2e 100644 --- a/clientcontroller/interface.go +++ b/clientcontroller/interface.go @@ -10,6 +10,7 @@ import ( ctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdkTypes "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/relayer/v2/relayer/provider" "github.com/sirupsen/logrus" @@ -49,7 +50,9 @@ type ClientController interface { bbnPubKey *secp256k1.PubKey, btcPubKey *bbntypes.BIP340PubKey, pop *btcstakingtypes.ProofOfPossession, - commission sdkTypes.Dec) (*provider.RelayerTxResponse, error) + commission sdkTypes.Dec, + description *stakingtypes.Description, + ) (*provider.RelayerTxResponse, error) // CommitPubRandList commits a list of Schnorr public randomness via a MsgCommitPubRand to Babylon // it returns tx hash and error CommitPubRandList(btcPubKey *bbntypes.BIP340PubKey, startHeight uint64, pubRandList []bbntypes.SchnorrPubRand, sig *bbntypes.BIP340Signature) (*provider.RelayerTxResponse, error) diff --git a/cmd/valcli/daemoncmd.go b/cmd/valcli/daemoncmd.go index fc4c96abb39a8..0ef235ee6f0d6 100644 --- a/cmd/valcli/daemoncmd.go +++ b/cmd/valcli/daemoncmd.go @@ -7,6 +7,7 @@ import ( "strconv" "github.com/babylonchain/babylon/x/checkpointing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/urfave/cli" "github.com/babylonchain/btc-validator/proto" @@ -37,6 +38,13 @@ const ( valBabylonPkFlag = "babylon-pk" blockHeightFlag = "height" lastCommitHashFlag = "last-commit-hash" + + // flags for description + monikerFlag = "moniker" + identityFlag = "identity" + websiteFlag = "website" + securityContractFlag = "security-contract" + detailsFlag = "details" ) var ( @@ -92,6 +100,31 @@ var createValDaemonCmd = cli.Command{ Usage: "The unique name of the validator key", Required: true, }, + cli.StringFlag{ + Name: monikerFlag, + Usage: "A human-readable name for the validator", + Value: "", + }, + cli.StringFlag{ + Name: identityFlag, + Usage: "An optional identity signature (ex. UPort or Keybase)", + Value: "", + }, + cli.StringFlag{ + Name: websiteFlag, + Usage: "An optional website link", + Value: "", + }, + cli.StringFlag{ + Name: securityContractFlag, + Usage: "An optional email for security contact", + Value: "", + }, + cli.StringFlag{ + Name: detailsFlag, + Usage: "Other optional details", + Value: "", + }, }, Action: createValDaemon, } @@ -99,13 +132,18 @@ var createValDaemonCmd = cli.Command{ func createValDaemon(ctx *cli.Context) error { daemonAddress := ctx.String(valdDaemonAddressFlag) keyName := ctx.String(keyNameFlag) + description, err := getDesciptionFromContext(ctx) + if err != nil { + return err + } + client, cleanUp, err := dc.NewValidatorServiceGRpcClient(daemonAddress) if err != nil { return err } defer cleanUp() - info, err := client.CreateValidator(context.Background(), keyName) + info, err := client.CreateValidator(context.Background(), keyName, &description) if err != nil { return err @@ -116,6 +154,19 @@ func createValDaemon(ctx *cli.Context) error { return nil } +func getDesciptionFromContext(ctx *cli.Context) (stakingtypes.Description, error) { + + // get information for description + monikerStr := ctx.String(monikerFlag) + identityStr := ctx.String(identityFlag) + websiteStr := ctx.String(websiteFlag) + securityContractStr := ctx.String(securityContractFlag) + detailsStr := ctx.String(detailsFlag) + + description := stakingtypes.NewDescription(monikerStr, identityStr, websiteStr, securityContractStr, detailsStr) + return description.EnsureLength() +} + var lsValDaemonCmd = cli.Command{ Name: "list-validators", ShortName: "ls", diff --git a/cmd/valcli/validators.go b/cmd/valcli/validators.go index 19bcdafef3d31..daa7406e1001e 100644 --- a/cmd/valcli/validators.go +++ b/cmd/valcli/validators.go @@ -56,6 +56,31 @@ var createValCmd = cli.Command{ Name: keyringDirFlag, Usage: "The directory where the keyring is stored", }, + cli.StringFlag{ + Name: monikerFlag, + Usage: "A human-readable name for the validator", + Value: "", + }, + cli.StringFlag{ + Name: identityFlag, + Usage: "An optional identity signature (ex. UPort or Keybase)", + Value: "", + }, + cli.StringFlag{ + Name: websiteFlag, + Usage: "An optional website link", + Value: "", + }, + cli.StringFlag{ + Name: securityContractFlag, + Usage: "An optional email for security contact", + Value: "", + }, + cli.StringFlag{ + Name: detailsFlag, + Usage: "Other optional details", + Value: "", + }, }, Action: createVal, } @@ -82,7 +107,12 @@ func createVal(ctx *cli.Context) error { return fmt.Errorf("the key name %s is taken", krController.GetKeyName()) } - validator, err := krController.CreateBTCValidator() + description, err := getDesciptionFromContext(ctx) + if err != nil { + return err + } + + validator, err := krController.CreateBTCValidator(&description) if err != nil { return err } diff --git a/go.mod b/go.mod index b9d92ff19dbba..30ea8815fa791 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( github.com/cometbft/cometbft v0.37.2 github.com/cosmos/cosmos-sdk v0.47.3 github.com/cosmos/go-bip39 v1.0.0 + github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/relayer/v2 v2.4.1 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 @@ -84,7 +85,6 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.10 // indirect github.com/cosmos/iavl v0.20.0 // indirect github.com/cosmos/ibc-go/v7 v7.2.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect diff --git a/itest/test_manager.go b/itest/test_manager.go index 12de862bf2f4f..459b858227a3d 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -26,6 +26,7 @@ import ( "github.com/babylonchain/btc-validator/clientcontroller" "github.com/babylonchain/btc-validator/service" + "github.com/babylonchain/btc-validator/testutil" "github.com/babylonchain/btc-validator/types" "github.com/babylonchain/btc-validator/valcfg" ) @@ -113,7 +114,7 @@ func StartManagerWithValidator(t *testing.T, n int, isJury bool) *TestManager { var newValName = "test-val-" for i := 0; i < n; i++ { newValName += strconv.Itoa(i) - _, err := app.CreateValidator(newValName) + _, err := app.CreateValidator(newValName, testutil.EmptyDescription()) require.NoError(t, err) _, bbnPk, err := app.RegisterValidator(newValName) require.NoError(t, err) diff --git a/proto/buf.lock b/proto/buf.lock index a7016bb1ead01..7a2810e68aa72 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -2,10 +2,20 @@ version: v1 deps: - remote: buf.build - owner: gogo - repository: protobuf - commit: 4df00b267f944190a229ce3695781e99 - digest: shake256:de60e0534d11dfd7a1817909618e847e15d4ab6f5cc6d71154a9735af651c7bda2232b33f3fb6a4daf23f64a3fe80270e99d42d77c551bb9a69ab5dc48ec2e04 + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 954f7b05f38440fc8250134b15adec47 + digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 34d970b699f84aa382f3c29773a60836 + digest: shake256:3d3bee5229ba579e7d19ffe6e140986a228b48a8c7fe74348f308537ab95e9135210e81812489d42cd8941d33ff71f11583174ccc5972e86e6112924b6ce9f04 - remote: buf.build owner: googleapis repository: googleapis diff --git a/proto/buf.yaml b/proto/buf.yaml index 94e821ae8e970..4b16d8add061c 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,8 +1,10 @@ version: v1 name: buf.build/babylonchain/btc-validator deps: + - buf.build/cosmos/cosmos-sdk:v0.47.0 + - buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31 - buf.build/googleapis/googleapis:8d7204855ec14631a499bd7393ce1970 - - buf.build/gogo/protobuf:b03c65ea87cdc3521ede29f62fe3ce239267c1bc + - buf.build/cosmos/gogo-proto:a14993478f40695898ed8a86931094b6656e8a5d breaking: use: - FILE diff --git a/proto/scripts/protocgen.sh b/proto/scripts/protocgen.sh index 0abf8d40ab6f6..6132eed12d6df 100755 --- a/proto/scripts/protocgen.sh +++ b/proto/scripts/protocgen.sh @@ -6,3 +6,5 @@ cd proto buf mod update buf generate . cd .. + +go mod tidy -compat=1.20 diff --git a/proto/validators.go b/proto/validators.go index 0a868e3e47636..29a5ce3bca6ac 100644 --- a/proto/validators.go +++ b/proto/validators.go @@ -46,6 +46,7 @@ func NewValidatorInfo(v *StoreValidator) *ValidatorInfo { return &ValidatorInfo{ BabylonPkHex: v.GetBabylonPkHexString(), BtcPkHex: v.MustGetBIP340BTCPK().MarshalHex(), + Description: v.Description, LastVotedHeight: v.LastVotedHeight, LastCommittedHeight: v.LastCommittedHeight, Status: v.Status, diff --git a/proto/validators.pb.go b/proto/validators.pb.go index 5d5e29a5c3678..b42800ac73d12 100644 --- a/proto/validators.pb.go +++ b/proto/validators.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: validators.proto package proto import ( - _ "github.com/gogo/protobuf/gogoproto" + types "github.com/cosmos/cosmos-sdk/x/staking/types" + _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,18 +24,19 @@ const ( // ValidatorStatus is the status of a BTC validator // a Validator object has 4 states: -// - Created - created and managed by validator client, not registered to -// babylon yet -// - Registered - created and registered to Babylon, but not voting yet (No -// delegated stake) -// - Active - created and registered to Babylon with stake to vote -// - Inactive - created and registered to Babylon with no stake to vote. -// Validator was already active. +// - Created - created and managed by validator client, not registered to +// babylon yet +// - Registered - created and registered to Babylon, but not voting yet (No +// delegated stake) +// - Active - created and registered to Babylon with stake to vote +// - Inactive - created and registered to Babylon with no stake to vote. +// Validator was already active. +// // Valid State Transactions: -// - Created -> Registered -// - Registered -> Active -// - Active -> Inactive -// - Inactive -> Active +// - Created -> Registered +// - Registered -> Active +// - Active -> Inactive +// - Inactive -> Active type ValidatorStatus int32 const ( @@ -184,6 +186,8 @@ type CreateValidatorRequest struct { // key_name is the identifier key in keyring KeyName string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"` + // description defines the description terms for the validator + Description *types.Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` } func (x *CreateValidatorRequest) Reset() { @@ -225,6 +229,13 @@ func (x *CreateValidatorRequest) GetKeyName() string { return "" } +func (x *CreateValidatorRequest) GetDescription() *types.Description { + if x != nil { + return x.Description + } + return nil +} + type CreateValidatorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -699,20 +710,22 @@ type StoreValidator struct { BabylonPk []byte `protobuf:"bytes,1,opt,name=babylon_pk,json=babylonPk,proto3" json:"babylon_pk,omitempty"` // btc_pk is the BTC secp256k1 PK of the validator encoded in BIP-340 spec BtcPk []byte `protobuf:"bytes,2,opt,name=btc_pk,json=btcPk,proto3" json:"btc_pk,omitempty"` + // description defines the description terms for the validator + Description *types.Description `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // pop is the proof of possession of babylon_pk and btc_pk - Pop *ProofOfPossession `protobuf:"bytes,3,opt,name=pop,proto3" json:"pop,omitempty"` + Pop *ProofOfPossession `protobuf:"bytes,4,opt,name=pop,proto3" json:"pop,omitempty"` // key_name is the identifier of the keyring - KeyName string `protobuf:"bytes,4,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"` + KeyName string `protobuf:"bytes,5,opt,name=key_name,json=keyName,proto3" json:"key_name,omitempty"` // last_voted_height defines the height of the last voted Babylon block - LastVotedHeight uint64 `protobuf:"varint,5,opt,name=last_voted_height,json=lastVotedHeight,proto3" json:"last_voted_height,omitempty"` + LastVotedHeight uint64 `protobuf:"varint,6,opt,name=last_voted_height,json=lastVotedHeight,proto3" json:"last_voted_height,omitempty"` // last_committed_height defines the height of the last Babylon block // to which the validator committed a randomness pair - LastCommittedHeight uint64 `protobuf:"varint,6,opt,name=last_committed_height,json=lastCommittedHeight,proto3" json:"last_committed_height,omitempty"` + LastCommittedHeight uint64 `protobuf:"varint,7,opt,name=last_committed_height,json=lastCommittedHeight,proto3" json:"last_committed_height,omitempty"` // last_processed_height defines the height of the last successfully processed block // even though the vote is not cast - LastProcessedHeight uint64 `protobuf:"varint,7,opt,name=last_processed_height,json=lastProcessedHeight,proto3" json:"last_processed_height,omitempty"` + LastProcessedHeight uint64 `protobuf:"varint,8,opt,name=last_processed_height,json=lastProcessedHeight,proto3" json:"last_processed_height,omitempty"` // status defines the current validator status - Status ValidatorStatus `protobuf:"varint,8,opt,name=status,proto3,enum=proto.ValidatorStatus" json:"status,omitempty"` + Status ValidatorStatus `protobuf:"varint,9,opt,name=status,proto3,enum=proto.ValidatorStatus" json:"status,omitempty"` } func (x *StoreValidator) Reset() { @@ -761,6 +774,13 @@ func (x *StoreValidator) GetBtcPk() []byte { return nil } +func (x *StoreValidator) GetDescription() *types.Description { + if x != nil { + return x.Description + } + return nil +} + func (x *StoreValidator) GetPop() *ProofOfPossession { if x != nil { return x.Pop @@ -813,13 +833,15 @@ type ValidatorInfo struct { BabylonPkHex string `protobuf:"bytes,1,opt,name=babylon_pk_hex,json=babylonPkHex,proto3" json:"babylon_pk_hex,omitempty"` // btc_pk_hex is the hex string of the BTC secp256k1 PK of the validator encoded in BIP-340 spec BtcPkHex string `protobuf:"bytes,2,opt,name=btc_pk_hex,json=btcPkHex,proto3" json:"btc_pk_hex,omitempty"` + // description defines the description terms for the validator + Description *types.Description `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // last_voted_height defines the height of the last voted Babylon block - LastVotedHeight uint64 `protobuf:"varint,5,opt,name=last_voted_height,json=lastVotedHeight,proto3" json:"last_voted_height,omitempty"` + LastVotedHeight uint64 `protobuf:"varint,4,opt,name=last_voted_height,json=lastVotedHeight,proto3" json:"last_voted_height,omitempty"` // last_committed_height defines the height of the last Babylon block // to which the validator committed a randomness pair - LastCommittedHeight uint64 `protobuf:"varint,6,opt,name=last_committed_height,json=lastCommittedHeight,proto3" json:"last_committed_height,omitempty"` + LastCommittedHeight uint64 `protobuf:"varint,5,opt,name=last_committed_height,json=lastCommittedHeight,proto3" json:"last_committed_height,omitempty"` // status defines the current validator status - Status ValidatorStatus `protobuf:"varint,7,opt,name=status,proto3,enum=proto.ValidatorStatus" json:"status,omitempty"` + Status ValidatorStatus `protobuf:"varint,6,opt,name=status,proto3,enum=proto.ValidatorStatus" json:"status,omitempty"` } func (x *ValidatorInfo) Reset() { @@ -868,6 +890,13 @@ func (x *ValidatorInfo) GetBtcPkHex() string { return "" } +func (x *ValidatorInfo) GetDescription() *types.Description { + if x != nil { + return x.Description + } + return nil +} + func (x *ValidatorInfo) GetLastVotedHeight() uint64 { if x != nil { return x.LastVotedHeight @@ -1010,147 +1039,163 @@ var File_validators_proto protoreflect.FileDescriptor var file_validators_proto_rawDesc = []byte{ 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x33, - 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x12, 0x15, 0x0a, - 0x06, 0x62, 0x74, 0x63, 0x5f, 0x70, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, - 0x74, 0x63, 0x50, 0x6b, 0x22, 0x35, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x19, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, - 0x68, 0x22, 0x7e, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, - 0x68, 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x65, - 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, - 0x53, 0x6b, 0x48, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, - 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x53, 0x6b, 0x48, 0x65, 0x78, 0x22, 0x36, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x22, - 0x4c, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1b, 0x0a, - 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x1a, 0x51, 0x75, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x4f, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x74, + 0x63, 0x5f, 0x70, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x74, 0x63, 0x50, + 0x6b, 0x22, 0x35, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x22, 0x7e, + 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, + 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, 0x22, 0x83, + 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x53, 0x6b, 0x48, + 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x6b, 0x5f, 0x68, + 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, + 0x6b, 0x48, 0x65, 0x78, 0x22, 0x36, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x22, 0x4c, 0x0a, 0x16, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xd1, - 0x02, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x74, 0x63, 0x5f, 0x70, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x62, 0x74, 0x63, 0x50, 0x6b, 0x12, 0x2a, 0x0a, 0x03, 0x70, 0x6f, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x4f, 0x66, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x03, - 0x70, 0x6f, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, - 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x56, - 0x6f, 0x74, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, - 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x98, 0x03, 0x0a, 0x0e, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x74, 0x63, 0x5f, 0x70, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, + 0x74, 0x63, 0x50, 0x6b, 0x12, 0x45, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x03, 0x70, + 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x03, 0x70, 0x6f, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x64, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, + 0x61, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, + 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6c, - 0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, - 0x70, 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, - 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x48, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x0a, 0x62, 0x74, - 0x63, 0x5f, 0x70, 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x74, 0x63, 0x50, 0x6b, 0x48, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x64, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x4f, 0x66, 0x50, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, - 0x0b, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x12, 0x17, - 0x0a, 0x07, 0x62, 0x74, 0x63, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x62, 0x74, 0x63, 0x53, 0x69, 0x67, 0x22, 0x47, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x6e, 0x6f, - 0x72, 0x72, 0x52, 0x61, 0x6e, 0x64, 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, - 0x62, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x75, - 0x62, 0x52, 0x61, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x5f, 0x72, 0x61, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x65, 0x63, 0x52, 0x61, 0x6e, 0x64, - 0x2a, 0x85, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, - 0x00, 0x1a, 0x0b, 0x8a, 0x9d, 0x20, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x12, 0x1e, - 0x0a, 0x0a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x0e, - 0x8a, 0x9d, 0x20, 0x0a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x12, 0x16, - 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x0a, 0x8a, 0x9d, 0x20, 0x06, - 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, - 0x56, 0x45, 0x10, 0x03, 0x1a, 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, - 0x56, 0x45, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0xfe, 0x03, 0x0a, 0x0d, 0x42, 0x74, 0x63, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, - 0x0a, 0x14, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, - 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4d, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, - 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x62, 0x74, 0x63, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xaa, 0x02, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x62, 0x79, + 0x6c, 0x6f, 0x6e, 0x5f, 0x70, 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x50, 0x6b, 0x48, 0x65, 0x78, 0x12, 0x1c, + 0x0a, 0x0a, 0x62, 0x74, 0x63, 0x5f, 0x70, 0x6b, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x62, 0x74, 0x63, 0x50, 0x6b, 0x48, 0x65, 0x78, 0x12, 0x45, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x74, 0x65, + 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x6c, 0x61, 0x73, 0x74, 0x56, 0x6f, 0x74, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, + 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x66, 0x50, 0x6f, + 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x61, 0x62, 0x79, + 0x6c, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62, + 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x62, 0x74, 0x63, + 0x5f, 0x73, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62, 0x74, 0x63, 0x53, + 0x69, 0x67, 0x22, 0x47, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x6e, 0x6f, 0x72, 0x72, 0x52, 0x61, 0x6e, + 0x64, 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, 0x62, 0x5f, 0x72, 0x61, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x75, 0x62, 0x52, 0x61, 0x6e, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x73, 0x65, 0x63, 0x52, 0x61, 0x6e, 0x64, 0x2a, 0x85, 0x01, 0x0a, 0x0f, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x0b, 0x8a, 0x9d, + 0x20, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x45, 0x47, + 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x0e, 0x8a, 0x9d, 0x20, 0x0a, 0x52, + 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x0a, 0x8a, 0x9d, 0x20, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x1a, + 0x0c, 0x8a, 0x9d, 0x20, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x1a, 0x04, 0x88, + 0xa3, 0x1e, 0x00, 0x32, 0xfe, 0x03, 0x0a, 0x0d, 0x42, 0x74, 0x63, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x50, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x56, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x41, 0x64, 0x64, + 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, + 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x12, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x62, 0x79, 0x6c, 0x6f, 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x62, 0x74, 0x63, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1185,30 +1230,34 @@ var file_validators_proto_goTypes = []interface{}{ (*ValidatorInfo)(nil), // 14: proto.ValidatorInfo (*ProofOfPossession)(nil), // 15: proto.ProofOfPossession (*SchnorrRandPair)(nil), // 16: proto.SchnorrRandPair + (*types.Description)(nil), // 17: cosmos.staking.v1beta1.Description } var file_validators_proto_depIdxs = []int32{ - 14, // 0: proto.QueryValidatorResponse.validator:type_name -> proto.ValidatorInfo - 14, // 1: proto.QueryValidatorListResponse.validators:type_name -> proto.ValidatorInfo - 15, // 2: proto.StoreValidator.pop:type_name -> proto.ProofOfPossession - 0, // 3: proto.StoreValidator.status:type_name -> proto.ValidatorStatus - 0, // 4: proto.ValidatorInfo.status:type_name -> proto.ValidatorStatus - 1, // 5: proto.BtcValidators.GetInfo:input_type -> proto.GetInfoRequest - 3, // 6: proto.BtcValidators.CreateValidator:input_type -> proto.CreateValidatorRequest - 5, // 7: proto.BtcValidators.RegisterValidator:input_type -> proto.RegisterValidatorRequest - 7, // 8: proto.BtcValidators.AddFinalitySignature:input_type -> proto.AddFinalitySignatureRequest - 9, // 9: proto.BtcValidators.QueryValidator:input_type -> proto.QueryValidatorRequest - 11, // 10: proto.BtcValidators.QueryValidatorList:input_type -> proto.QueryValidatorListRequest - 2, // 11: proto.BtcValidators.GetInfo:output_type -> proto.GetInfoResponse - 4, // 12: proto.BtcValidators.CreateValidator:output_type -> proto.CreateValidatorResponse - 6, // 13: proto.BtcValidators.RegisterValidator:output_type -> proto.RegisterValidatorResponse - 8, // 14: proto.BtcValidators.AddFinalitySignature:output_type -> proto.AddFinalitySignatureResponse - 10, // 15: proto.BtcValidators.QueryValidator:output_type -> proto.QueryValidatorResponse - 12, // 16: proto.BtcValidators.QueryValidatorList:output_type -> proto.QueryValidatorListResponse - 11, // [11:17] is the sub-list for method output_type - 5, // [5:11] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 17, // 0: proto.CreateValidatorRequest.description:type_name -> cosmos.staking.v1beta1.Description + 14, // 1: proto.QueryValidatorResponse.validator:type_name -> proto.ValidatorInfo + 14, // 2: proto.QueryValidatorListResponse.validators:type_name -> proto.ValidatorInfo + 17, // 3: proto.StoreValidator.description:type_name -> cosmos.staking.v1beta1.Description + 15, // 4: proto.StoreValidator.pop:type_name -> proto.ProofOfPossession + 0, // 5: proto.StoreValidator.status:type_name -> proto.ValidatorStatus + 17, // 6: proto.ValidatorInfo.description:type_name -> cosmos.staking.v1beta1.Description + 0, // 7: proto.ValidatorInfo.status:type_name -> proto.ValidatorStatus + 1, // 8: proto.BtcValidators.GetInfo:input_type -> proto.GetInfoRequest + 3, // 9: proto.BtcValidators.CreateValidator:input_type -> proto.CreateValidatorRequest + 5, // 10: proto.BtcValidators.RegisterValidator:input_type -> proto.RegisterValidatorRequest + 7, // 11: proto.BtcValidators.AddFinalitySignature:input_type -> proto.AddFinalitySignatureRequest + 9, // 12: proto.BtcValidators.QueryValidator:input_type -> proto.QueryValidatorRequest + 11, // 13: proto.BtcValidators.QueryValidatorList:input_type -> proto.QueryValidatorListRequest + 2, // 14: proto.BtcValidators.GetInfo:output_type -> proto.GetInfoResponse + 4, // 15: proto.BtcValidators.CreateValidator:output_type -> proto.CreateValidatorResponse + 6, // 16: proto.BtcValidators.RegisterValidator:output_type -> proto.RegisterValidatorResponse + 8, // 17: proto.BtcValidators.AddFinalitySignature:output_type -> proto.AddFinalitySignatureResponse + 10, // 18: proto.BtcValidators.QueryValidator:output_type -> proto.QueryValidatorResponse + 12, // 19: proto.BtcValidators.QueryValidatorList:output_type -> proto.QueryValidatorListResponse + 14, // [14:20] is the sub-list for method output_type + 8, // [8:14] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_validators_proto_init() } diff --git a/proto/validators.proto b/proto/validators.proto index 00cfc789dccea..265845cff562c 100644 --- a/proto/validators.proto +++ b/proto/validators.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package proto; import "gogoproto/gogo.proto"; +import "cosmos/staking/v1beta1/staking.proto"; option go_package = "github.com/babylonchain/btc-validator/proto"; @@ -41,6 +42,8 @@ message GetInfoResponse { message CreateValidatorRequest { // key_name is the identifier key in keyring string key_name = 1; + // description defines the description terms for the validator + cosmos.staking.v1beta1.Description description = 2; } message CreateValidatorResponse { @@ -101,20 +104,22 @@ message StoreValidator { bytes babylon_pk = 1; // btc_pk is the BTC secp256k1 PK of the validator encoded in BIP-340 spec bytes btc_pk = 2; + // description defines the description terms for the validator + cosmos.staking.v1beta1.Description description = 3; // pop is the proof of possession of babylon_pk and btc_pk - ProofOfPossession pop = 3; + ProofOfPossession pop = 4; // key_name is the identifier of the keyring - string key_name = 4; + string key_name = 5; // last_voted_height defines the height of the last voted Babylon block - uint64 last_voted_height = 5; + uint64 last_voted_height = 6; // last_committed_height defines the height of the last Babylon block // to which the validator committed a randomness pair - uint64 last_committed_height = 6; + uint64 last_committed_height = 7; // last_processed_height defines the height of the last successfully processed block // even though the vote is not cast - uint64 last_processed_height = 7; + uint64 last_processed_height = 8; // status defines the current validator status - ValidatorStatus status = 8; + ValidatorStatus status = 9; } // ValidatorInfo is the basic information of a validator mainly for external usage @@ -123,13 +128,15 @@ message ValidatorInfo { string babylon_pk_hex = 1; // btc_pk_hex is the hex string of the BTC secp256k1 PK of the validator encoded in BIP-340 spec string btc_pk_hex = 2; + // description defines the description terms for the validator + cosmos.staking.v1beta1.Description description = 3; // last_voted_height defines the height of the last voted Babylon block - uint64 last_voted_height = 5; + uint64 last_voted_height = 4; // last_committed_height defines the height of the last Babylon block // to which the validator committed a randomness pair - uint64 last_committed_height = 6; + uint64 last_committed_height = 5; // status defines the current validator status - ValidatorStatus status = 7; + ValidatorStatus status = 6; } // ProofOfPossession is the proof of possession that a Babylon secp256k1 diff --git a/service/app.go b/service/app.go index dffe8547b5f75..371a72ae954a4 100644 --- a/service/app.go +++ b/service/app.go @@ -10,6 +10,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/sirupsen/logrus" "github.com/babylonchain/btc-validator/clientcontroller" @@ -151,6 +152,7 @@ func (app *ValidatorApp) RegisterValidator(keyName string) (*RegisterValidatorRe bbnPubKey: validator.GetBabylonPK(), btcPubKey: validator.MustGetBIP340BTCPK(), pop: pop, + description: validator.Description, errResponse: make(chan error, 1), successResponse: make(chan *RegisterValidatorResponse, 1), } @@ -430,9 +432,10 @@ func (app *ValidatorApp) Stop() error { return stopErr } -func (app *ValidatorApp) CreateValidator(keyName string) (*CreateValidatorResult, error) { +func (app *ValidatorApp) CreateValidator(keyName string, description *stakingtypes.Description) (*CreateValidatorResult, error) { req := &createValidatorRequest{ keyName: keyName, + description: description, errResponse: make(chan error, 1), successResponse: make(chan *createValidatorResponse, 1), } @@ -472,7 +475,7 @@ func (app *ValidatorApp) handleCreateValidatorRequest(req *createValidatorReques // TODO should not expose direct proto here, as this is internal db representation // connected to serialization - validator, err := kr.CreateBTCValidator() + validator, err := kr.CreateBTCValidator(req.description) if err != nil { return nil, fmt.Errorf("failed to create validator: %w", err) } diff --git a/service/app_test.go b/service/app_test.go index f72eab45bb010..1566b42c8fc66 100644 --- a/service/app_test.go +++ b/service/app_test.go @@ -71,6 +71,7 @@ func FuzzRegisterValidator(f *testing.F) { validator.MustGetBIP340BTCPK(), pop, defaultParams.MinComissionRate, + testutil.EmptyDescription(), ).Return(&provider.RelayerTxResponse{TxHash: txHash}, nil).AnyTimes() res, _, err := app.RegisterValidator(validator.KeyName) diff --git a/service/client/rpcclient.go b/service/client/rpcclient.go index 4c36b286fcbe9..3d9cadbd35880 100644 --- a/service/client/rpcclient.go +++ b/service/client/rpcclient.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -49,8 +50,8 @@ func (c *ValidatorServiceGRpcClient) RegisterValidator(ctx context.Context, keyN return res, nil } -func (c *ValidatorServiceGRpcClient) CreateValidator(ctx context.Context, keyName string) (*proto.CreateValidatorResponse, error) { - req := &proto.CreateValidatorRequest{KeyName: keyName} +func (c *ValidatorServiceGRpcClient) CreateValidator(ctx context.Context, keyName string, description *stakingtypes.Description) (*proto.CreateValidatorResponse, error) { + req := &proto.CreateValidatorRequest{KeyName: keyName, Description: description} res, err := c.client.CreateValidator(ctx, req) if err != nil { return nil, err diff --git a/service/event_loop.go b/service/event_loop.go index c50873333c437..c545169322430 100644 --- a/service/event_loop.go +++ b/service/event_loop.go @@ -146,7 +146,7 @@ func (app *ValidatorApp) handleSentToBabylonLoop() { // Most probably it fails due so some user error so we just return the error to the user. // TODO: need to start passing context here to be able to cancel the request in case of app quiting // TODO: for now use minimum commission rate, but ultimately it should be configurable - res, err := app.cc.RegisterValidator(req.bbnPubKey, req.btcPubKey, req.pop, params.MinComissionRate) + res, err := app.cc.RegisterValidator(req.bbnPubKey, req.btcPubKey, req.pop, params.MinComissionRate, req.description) if err != nil { app.logger.WithFields(logrus.Fields{ diff --git a/service/rpcserver.go b/service/rpcserver.go index fc4d032bfe4bd..c5bd6ac00eac4 100644 --- a/service/rpcserver.go +++ b/service/rpcserver.go @@ -102,7 +102,7 @@ func (r *rpcServer) GetInfo(context.Context, *proto.GetInfoRequest) (*proto.GetI // CreateValidator generates a validator object and saves it in the database func (r *rpcServer) CreateValidator(ctx context.Context, req *proto.CreateValidatorRequest) ( *proto.CreateValidatorResponse, error) { - result, err := r.app.CreateValidator(req.KeyName) + result, err := r.app.CreateValidator(req.KeyName, req.Description) if err != nil { return nil, err diff --git a/service/types.go b/service/types.go index e07ba44f76f16..dcf358e69baba 100644 --- a/service/types.go +++ b/service/types.go @@ -5,6 +5,7 @@ import ( btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) type createValidatorResponse struct { @@ -13,6 +14,7 @@ type createValidatorResponse struct { } type createValidatorRequest struct { keyName string + description *stakingtypes.Description errResponse chan error successResponse chan *createValidatorResponse } @@ -22,6 +24,7 @@ type registerValidatorRequest struct { btcPubKey *types.BIP340PubKey // TODO we should have our own representation of PoP pop *btcstakingtypes.ProofOfPossession + description *stakingtypes.Description errResponse chan error successResponse chan *RegisterValidatorResponse } diff --git a/testutil/datagen.go b/testutil/datagen.go index cbb5ef24f9490..917ee6538d1a0 100644 --- a/testutil/datagen.go +++ b/testutil/datagen.go @@ -89,7 +89,7 @@ func GenStoredValidator(r *rand.Rand, t *testing.T, app *service.ValidatorApp) * require.NoError(t, err) // create validator using the keyring - validator, err := kc.CreateBTCValidator() + validator, err := kc.CreateBTCValidator(EmptyDescription()) require.NoError(t, err) // save the validator diff --git a/testutil/mocks/babylon.go b/testutil/mocks/babylon.go index 50a130ccdb23e..58026af7a0fed 100644 --- a/testutil/mocks/babylon.go +++ b/testutil/mocks/babylon.go @@ -14,6 +14,7 @@ import ( coretypes "github.com/cometbft/cometbft/rpc/core/types" secp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" types2 "github.com/cosmos/cosmos-sdk/types" + types3 "github.com/cosmos/cosmos-sdk/x/staking/types" provider "github.com/cosmos/relayer/v2/relayer/provider" gomock "github.com/golang/mock/gomock" ) @@ -251,18 +252,18 @@ func (mr *MockClientControllerMockRecorder) QueryValidatorVotingPower(btcPubKey, } // RegisterValidator mocks base method. -func (m *MockClientController) RegisterValidator(bbnPubKey *secp256k1.PubKey, btcPubKey *types.BIP340PubKey, pop *types0.ProofOfPossession, commission types2.Dec) (*provider.RelayerTxResponse, error) { +func (m *MockClientController) RegisterValidator(bbnPubKey *secp256k1.PubKey, btcPubKey *types.BIP340PubKey, pop *types0.ProofOfPossession, commission types2.Dec, description *types3.Description) (*provider.RelayerTxResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RegisterValidator", bbnPubKey, btcPubKey, pop, commission) + ret := m.ctrl.Call(m, "RegisterValidator", bbnPubKey, btcPubKey, pop, commission, description) ret0, _ := ret[0].(*provider.RelayerTxResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // RegisterValidator indicates an expected call of RegisterValidator. -func (mr *MockClientControllerMockRecorder) RegisterValidator(bbnPubKey, btcPubKey, pop, commission interface{}) *gomock.Call { +func (mr *MockClientControllerMockRecorder) RegisterValidator(bbnPubKey, btcPubKey, pop, commission, description interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterValidator", reflect.TypeOf((*MockClientController)(nil).RegisterValidator), bbnPubKey, btcPubKey, pop, commission) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterValidator", reflect.TypeOf((*MockClientController)(nil).RegisterValidator), bbnPubKey, btcPubKey, pop, commission, description) } // SubmitBatchFinalitySigs mocks base method. diff --git a/testutil/utils.go b/testutil/utils.go index ef4b31759eff5..9003d9515d22c 100644 --- a/testutil/utils.go +++ b/testutil/utils.go @@ -6,11 +6,16 @@ import ( coretypes "github.com/cometbft/cometbft/rpc/core/types" cometbfttypes "github.com/cometbft/cometbft/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/golang/mock/gomock" "github.com/babylonchain/btc-validator/testutil/mocks" ) +func EmptyDescription() *stakingtypes.Description { + return &stakingtypes.Description{} +} + func PrepareMockedClientController(t *testing.T, r *rand.Rand, startHeight, currentHeight uint64) *mocks.MockClientController { ctl := gomock.NewController(t) mockClientController := mocks.NewMockClientController(ctl) diff --git a/val/keyringcontroller.go b/val/keyringcontroller.go index 6cc5c0de4daba..2aecf10c63d53 100644 --- a/val/keyringcontroller.go +++ b/val/keyringcontroller.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/go-bip39" "github.com/babylonchain/btc-validator/proto" @@ -73,7 +74,7 @@ func NewKeyringControllerWithKeyring(kr keyring.Keyring, name string) (*KeyringC } // CreateBTCValidator creates a BTC validator object using the keyring -func (kc *KeyringController) CreateBTCValidator() (*proto.StoreValidator, error) { +func (kc *KeyringController) CreateBTCValidator(des *stakingtypes.Description) (*proto.StoreValidator, error) { // create babylon key pair stored in the keyring babylonPubKey, err := kc.createBabylonKeyPair() if err != nil { @@ -92,7 +93,7 @@ func (kc *KeyringController) CreateBTCValidator() (*proto.StoreValidator, error) return nil, err } - return NewStoreValidator(babylonPubKey, btcPubKey, kc.GetKeyName(), pop), nil + return NewStoreValidator(babylonPubKey, btcPubKey, kc.GetKeyName(), pop, des), nil } func (kc *KeyringController) GetKeyName() string { diff --git a/val/keyringcontroller_test.go b/val/keyringcontroller_test.go index 557b6bd2ddb8c..eb12467f70612 100644 --- a/val/keyringcontroller_test.go +++ b/val/keyringcontroller_test.go @@ -30,7 +30,7 @@ func FuzzCreatePoP(f *testing.F) { require.NoError(t, err) require.False(t, kc.ValidatorKeyExists()) - validator, err := kc.CreateBTCValidator() + validator, err := kc.CreateBTCValidator(testutil.EmptyDescription()) require.NoError(t, err) require.True(t, kc.ValidatorKeyExists() && kc.ValidatorKeyNameTaken()) diff --git a/val/valstore.go b/val/valstore.go index b2149bad8f41e..034b21b6801af 100644 --- a/val/valstore.go +++ b/val/valstore.go @@ -8,6 +8,7 @@ import ( bstypes "github.com/babylonchain/babylon/x/btcstaking/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdktypes "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" gproto "google.golang.org/protobuf/proto" "github.com/babylonchain/btc-validator/proto" @@ -20,7 +21,7 @@ const ( randPairPrefix = "rand-pair" ) -func NewStoreValidator(babylonPk *secp256k1.PubKey, btcPk *types.BIP340PubKey, keyName string, pop *bstypes.ProofOfPossession) *proto.StoreValidator { +func NewStoreValidator(babylonPk *secp256k1.PubKey, btcPk *types.BIP340PubKey, keyName string, pop *bstypes.ProofOfPossession, des *stakingtypes.Description) *proto.StoreValidator { return &proto.StoreValidator{ KeyName: keyName, BabylonPk: babylonPk.Bytes(), @@ -29,7 +30,8 @@ func NewStoreValidator(babylonPk *secp256k1.PubKey, btcPk *types.BIP340PubKey, k BabylonSig: pop.BabylonSig, BtcSig: pop.BtcSig, }, - Status: proto.ValidatorStatus_CREATED, + Status: proto.ValidatorStatus_CREATED, + Description: des, } }