From fe37b4f5bbabd859027dfd864256376790ab856d Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Fri, 21 Feb 2025 11:45:13 -0800 Subject: [PATCH 01/11] Implement validator registration attestations --- pkg/core/common/converters.go | 18 +- pkg/core/config/config.go | 7 + .../console/views/components/link_templ.go | 2 +- .../console/views/components/time_templ.go | 2 +- pkg/core/console/views/layout/base_templ.go | 2 +- .../console/views/layout/site_frame_templ.go | 2 +- .../views/pages/analytics_page_templ.go | 2 +- .../console/views/pages/block_page_templ.go | 2 +- .../console/views/pages/content_page_templ.go | 2 +- .../console/views/pages/error_page_templ.go | 2 +- .../console/views/pages/genesis_page_templ.go | 2 +- .../console/views/pages/node_page_templ.go | 2 +- .../console/views/pages/nodes_page_templ.go | 2 +- .../views/pages/overview_page_templ.go | 2 +- .../console/views/pages/pos_page_templ.go | 2 +- pkg/core/console/views/pages/tx_page_templ.go | 2 +- .../console/views/pages/uptime_page_templ.go | 2 +- .../core_openapi/protocol/protocol_client.go | 39 + ...get_registration_attestation_parameters.go | 150 +++ ..._get_registration_attestation_responses.go | 187 +++ pkg/core/gen/core_proto/protocol.pb.go | 1089 +++++++++++------ pkg/core/gen/core_proto/protocol.pb.gw.go | 85 ++ pkg/core/gen/core_proto/protocol.swagger.json | 100 +- pkg/core/gen/core_proto/protocol_grpc.pb.go | 49 +- .../gen/models/protocol_eth_registration.go | 89 ++ ...otocol_registration_attestation_request.go | 109 ++ ...tocol_registration_attestation_response.go | 112 ++ .../gen/models/protocol_signed_transaction.go | 51 + .../models/protocol_validator_registration.go | 77 +- .../protocol_validator_registration_legacy.go | 69 ++ pkg/core/protocol/protocol.proto | 37 +- pkg/core/server/abci.go | 2 +- pkg/core/server/attestations.go | 51 + pkg/core/server/eth.go | 21 + pkg/core/server/grpc.go | 42 + pkg/core/server/registration.go | 233 ++++ pkg/core/server/registration_legacy.go | 138 +++ pkg/core/server/registry_bridge.go | 270 +--- 38 files changed, 2433 insertions(+), 622 deletions(-) create mode 100644 pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go create mode 100644 pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go create mode 100644 pkg/core/gen/models/protocol_eth_registration.go create mode 100644 pkg/core/gen/models/protocol_registration_attestation_request.go create mode 100644 pkg/core/gen/models/protocol_registration_attestation_response.go create mode 100644 pkg/core/gen/models/protocol_validator_registration_legacy.go create mode 100644 pkg/core/server/attestations.go create mode 100644 pkg/core/server/registration.go create mode 100644 pkg/core/server/registration_legacy.go diff --git a/pkg/core/common/converters.go b/pkg/core/common/converters.go index 01f19d1a..635e6505 100644 --- a/pkg/core/common/converters.go +++ b/pkg/core/common/converters.go @@ -46,15 +46,15 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro Signer: innerTx.ManageEntity.Signer, Nonce: fmt.Sprint(innerTx.ManageEntity.Nonce), } - case *core_proto.SignedTransaction_ValidatorRegistration: - oapiTx.ValidatorRegistration = &models.ProtocolValidatorRegistration{ - CometAddress: innerTx.ValidatorRegistration.CometAddress, - Endpoint: innerTx.ValidatorRegistration.Endpoint, - EthBlock: innerTx.ValidatorRegistration.EthBlock, - NodeType: innerTx.ValidatorRegistration.NodeType, - SpID: innerTx.ValidatorRegistration.SpId, - Power: fmt.Sprint(innerTx.ValidatorRegistration.Power), - PubKey: innerTx.ValidatorRegistration.PubKey, + case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: + oapiTx.ValidatorRegistrationLegacy = &models.ProtocolValidatorRegistrationLegacy{ + CometAddress: innerTx.ValidatorRegistrationLegacy.CometAddress, + Endpoint: innerTx.ValidatorRegistrationLegacy.Endpoint, + EthBlock: innerTx.ValidatorRegistrationLegacy.EthBlock, + NodeType: innerTx.ValidatorRegistrationLegacy.NodeType, + SpID: innerTx.ValidatorRegistrationLegacy.SpId, + Power: fmt.Sprint(innerTx.ValidatorRegistrationLegacy.Power), + PubKey: innerTx.ValidatorRegistrationLegacy.PubKey, } case *core_proto.SignedTransaction_ValidatorDeregistration: oapiTx.ValidatorDeregistration = &models.ProtocolValidatorDeregistration{ diff --git a/pkg/core/config/config.go b/pkg/core/config/config.go index 34d8d124..8c1ff9ea 100644 --- a/pkg/core/config/config.go +++ b/pkg/core/config/config.go @@ -117,6 +117,10 @@ type Config struct { CometModule bool PprofModule bool + /* Attestation Thresholds */ + AttRegistrationMin int // minimum number of attestations needed to register a new node + AttRegistrationRSize int // rendezvous size for registration attestations (should be >= to AttRegistrationMin) + /* Feature Flags */ EnablePoS bool } @@ -146,6 +150,9 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.RetainHeight = int64(getEnvIntWithDefault("retainHeight", 604800)) cfg.Archive = GetEnvWithDefault("archive", "false") == "true" + cfg.AttRegistrationMin = 5 + cfg.AttRegistrationRSize = 10 + // check if discovery specific key is set isDiscovery := os.Getenv("audius_delegate_private_key") != "" var delegatePrivateKey string diff --git a/pkg/core/console/views/components/link_templ.go b/pkg/core/console/views/components/link_templ.go index ece6b789..7480cb68 100644 --- a/pkg/core/console/views/components/link_templ.go +++ b/pkg/core/console/views/components/link_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package components //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/components/time_templ.go b/pkg/core/console/views/components/time_templ.go index 5f987c04..cba6f1c1 100644 --- a/pkg/core/console/views/components/time_templ.go +++ b/pkg/core/console/views/components/time_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package components //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/layout/base_templ.go b/pkg/core/console/views/layout/base_templ.go index 9791d5d4..3e96725d 100644 --- a/pkg/core/console/views/layout/base_templ.go +++ b/pkg/core/console/views/layout/base_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package layout //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/layout/site_frame_templ.go b/pkg/core/console/views/layout/site_frame_templ.go index 18854bbe..98b16977 100644 --- a/pkg/core/console/views/layout/site_frame_templ.go +++ b/pkg/core/console/views/layout/site_frame_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package layout //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/analytics_page_templ.go b/pkg/core/console/views/pages/analytics_page_templ.go index 81c70d62..308ac9a3 100644 --- a/pkg/core/console/views/pages/analytics_page_templ.go +++ b/pkg/core/console/views/pages/analytics_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/block_page_templ.go b/pkg/core/console/views/pages/block_page_templ.go index 0d44a899..a6e550f6 100644 --- a/pkg/core/console/views/pages/block_page_templ.go +++ b/pkg/core/console/views/pages/block_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/content_page_templ.go b/pkg/core/console/views/pages/content_page_templ.go index 3458e8cc..cca6ad71 100644 --- a/pkg/core/console/views/pages/content_page_templ.go +++ b/pkg/core/console/views/pages/content_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/error_page_templ.go b/pkg/core/console/views/pages/error_page_templ.go index 3a263271..ae5897b2 100644 --- a/pkg/core/console/views/pages/error_page_templ.go +++ b/pkg/core/console/views/pages/error_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/genesis_page_templ.go b/pkg/core/console/views/pages/genesis_page_templ.go index 1fd6296f..0f25c0f4 100644 --- a/pkg/core/console/views/pages/genesis_page_templ.go +++ b/pkg/core/console/views/pages/genesis_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/node_page_templ.go b/pkg/core/console/views/pages/node_page_templ.go index 703ed597..dbb4a70e 100644 --- a/pkg/core/console/views/pages/node_page_templ.go +++ b/pkg/core/console/views/pages/node_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/nodes_page_templ.go b/pkg/core/console/views/pages/nodes_page_templ.go index 246f9bdc..b7d1dc4b 100644 --- a/pkg/core/console/views/pages/nodes_page_templ.go +++ b/pkg/core/console/views/pages/nodes_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/overview_page_templ.go b/pkg/core/console/views/pages/overview_page_templ.go index f066ad36..74ff6390 100644 --- a/pkg/core/console/views/pages/overview_page_templ.go +++ b/pkg/core/console/views/pages/overview_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/pos_page_templ.go b/pkg/core/console/views/pages/pos_page_templ.go index 76cde69e..8f15ae3d 100644 --- a/pkg/core/console/views/pages/pos_page_templ.go +++ b/pkg/core/console/views/pages/pos_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/tx_page_templ.go b/pkg/core/console/views/pages/tx_page_templ.go index 67b7a109..bafb33c7 100644 --- a/pkg/core/console/views/pages/tx_page_templ.go +++ b/pkg/core/console/views/pages/tx_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/uptime_page_templ.go b/pkg/core/console/views/pages/uptime_page_templ.go index 28daeeb4..acee026a 100644 --- a/pkg/core/console/views/pages/uptime_page_templ.go +++ b/pkg/core/console/views/pages/uptime_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.833 +// templ: version: v0.3.819 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/gen/core_openapi/protocol/protocol_client.go b/pkg/core/gen/core_openapi/protocol/protocol_client.go index 501e4873..e005fd5e 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_client.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_client.go @@ -60,6 +60,8 @@ type ClientService interface { ProtocolGetNodeInfo(params *ProtocolGetNodeInfoParams, opts ...ClientOption) (*ProtocolGetNodeInfoOK, error) + ProtocolGetRegistrationAttestation(params *ProtocolGetRegistrationAttestationParams, opts ...ClientOption) (*ProtocolGetRegistrationAttestationOK, error) + ProtocolGetTransaction(params *ProtocolGetTransactionParams, opts ...ClientOption) (*ProtocolGetTransactionOK, error) ProtocolPing(params *ProtocolPingParams, opts ...ClientOption) (*ProtocolPingOK, error) @@ -180,6 +182,43 @@ func (a *Client) ProtocolGetNodeInfo(params *ProtocolGetNodeInfoParams, opts ... return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ProtocolGetRegistrationAttestation protocol get registration attestation API +*/ +func (a *Client) ProtocolGetRegistrationAttestation(params *ProtocolGetRegistrationAttestationParams, opts ...ClientOption) (*ProtocolGetRegistrationAttestationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProtocolGetRegistrationAttestationParams() + } + op := &runtime.ClientOperation{ + ID: "Protocol_GetRegistrationAttestation", + Method: "POST", + PathPattern: "/core/grpc/attest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ProtocolGetRegistrationAttestationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProtocolGetRegistrationAttestationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ProtocolGetRegistrationAttestationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ProtocolGetTransaction protocol get transaction API */ diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go new file mode 100644 index 00000000..ace46609 --- /dev/null +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package protocol + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/AudiusProject/audiusd/pkg/core/gen/models" +) + +// NewProtocolGetRegistrationAttestationParams creates a new ProtocolGetRegistrationAttestationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProtocolGetRegistrationAttestationParams() *ProtocolGetRegistrationAttestationParams { + return &ProtocolGetRegistrationAttestationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProtocolGetRegistrationAttestationParamsWithTimeout creates a new ProtocolGetRegistrationAttestationParams object +// with the ability to set a timeout on a request. +func NewProtocolGetRegistrationAttestationParamsWithTimeout(timeout time.Duration) *ProtocolGetRegistrationAttestationParams { + return &ProtocolGetRegistrationAttestationParams{ + timeout: timeout, + } +} + +// NewProtocolGetRegistrationAttestationParamsWithContext creates a new ProtocolGetRegistrationAttestationParams object +// with the ability to set a context for a request. +func NewProtocolGetRegistrationAttestationParamsWithContext(ctx context.Context) *ProtocolGetRegistrationAttestationParams { + return &ProtocolGetRegistrationAttestationParams{ + Context: ctx, + } +} + +// NewProtocolGetRegistrationAttestationParamsWithHTTPClient creates a new ProtocolGetRegistrationAttestationParams object +// with the ability to set a custom HTTPClient for a request. +func NewProtocolGetRegistrationAttestationParamsWithHTTPClient(client *http.Client) *ProtocolGetRegistrationAttestationParams { + return &ProtocolGetRegistrationAttestationParams{ + HTTPClient: client, + } +} + +/* +ProtocolGetRegistrationAttestationParams contains all the parameters to send to the API endpoint + + for the protocol get registration attestation operation. + + Typically these are written to a http.Request. +*/ +type ProtocolGetRegistrationAttestationParams struct { + + // Registration. + Registration *models.ProtocolEthRegistration + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the protocol get registration attestation params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProtocolGetRegistrationAttestationParams) WithDefaults() *ProtocolGetRegistrationAttestationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the protocol get registration attestation params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProtocolGetRegistrationAttestationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) WithTimeout(timeout time.Duration) *ProtocolGetRegistrationAttestationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) WithContext(ctx context.Context) *ProtocolGetRegistrationAttestationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) WithHTTPClient(client *http.Client) *ProtocolGetRegistrationAttestationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegistration adds the registration to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) WithRegistration(registration *models.ProtocolEthRegistration) *ProtocolGetRegistrationAttestationParams { + o.SetRegistration(registration) + return o +} + +// SetRegistration adds the registration to the protocol get registration attestation params +func (o *ProtocolGetRegistrationAttestationParams) SetRegistration(registration *models.ProtocolEthRegistration) { + o.Registration = registration +} + +// WriteToRequest writes these params to a swagger request +func (o *ProtocolGetRegistrationAttestationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Registration != nil { + if err := r.SetBodyParam(o.Registration); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go new file mode 100644 index 00000000..af61267b --- /dev/null +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package protocol + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/AudiusProject/audiusd/pkg/core/gen/models" +) + +// ProtocolGetRegistrationAttestationReader is a Reader for the ProtocolGetRegistrationAttestation structure. +type ProtocolGetRegistrationAttestationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProtocolGetRegistrationAttestationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProtocolGetRegistrationAttestationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewProtocolGetRegistrationAttestationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewProtocolGetRegistrationAttestationOK creates a ProtocolGetRegistrationAttestationOK with default headers values +func NewProtocolGetRegistrationAttestationOK() *ProtocolGetRegistrationAttestationOK { + return &ProtocolGetRegistrationAttestationOK{} +} + +/* +ProtocolGetRegistrationAttestationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ProtocolGetRegistrationAttestationOK struct { + Payload *models.ProtocolRegistrationAttestationResponse +} + +// IsSuccess returns true when this protocol get registration attestation o k response has a 2xx status code +func (o *ProtocolGetRegistrationAttestationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this protocol get registration attestation o k response has a 3xx status code +func (o *ProtocolGetRegistrationAttestationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this protocol get registration attestation o k response has a 4xx status code +func (o *ProtocolGetRegistrationAttestationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this protocol get registration attestation o k response has a 5xx status code +func (o *ProtocolGetRegistrationAttestationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this protocol get registration attestation o k response a status code equal to that given +func (o *ProtocolGetRegistrationAttestationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the protocol get registration attestation o k response +func (o *ProtocolGetRegistrationAttestationOK) Code() int { + return 200 +} + +func (o *ProtocolGetRegistrationAttestationOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest][%d] protocolGetRegistrationAttestationOK %s", 200, payload) +} + +func (o *ProtocolGetRegistrationAttestationOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest][%d] protocolGetRegistrationAttestationOK %s", 200, payload) +} + +func (o *ProtocolGetRegistrationAttestationOK) GetPayload() *models.ProtocolRegistrationAttestationResponse { + return o.Payload +} + +func (o *ProtocolGetRegistrationAttestationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ProtocolRegistrationAttestationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProtocolGetRegistrationAttestationDefault creates a ProtocolGetRegistrationAttestationDefault with default headers values +func NewProtocolGetRegistrationAttestationDefault(code int) *ProtocolGetRegistrationAttestationDefault { + return &ProtocolGetRegistrationAttestationDefault{ + _statusCode: code, + } +} + +/* +ProtocolGetRegistrationAttestationDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ProtocolGetRegistrationAttestationDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this protocol get registration attestation default response has a 2xx status code +func (o *ProtocolGetRegistrationAttestationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this protocol get registration attestation default response has a 3xx status code +func (o *ProtocolGetRegistrationAttestationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this protocol get registration attestation default response has a 4xx status code +func (o *ProtocolGetRegistrationAttestationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this protocol get registration attestation default response has a 5xx status code +func (o *ProtocolGetRegistrationAttestationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this protocol get registration attestation default response a status code equal to that given +func (o *ProtocolGetRegistrationAttestationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the protocol get registration attestation default response +func (o *ProtocolGetRegistrationAttestationDefault) Code() int { + return o._statusCode +} + +func (o *ProtocolGetRegistrationAttestationDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest][%d] Protocol_GetRegistrationAttestation default %s", o._statusCode, payload) +} + +func (o *ProtocolGetRegistrationAttestationDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest][%d] Protocol_GetRegistrationAttestation default %s", o._statusCode, payload) +} + +func (o *ProtocolGetRegistrationAttestationDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ProtocolGetRegistrationAttestationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index 0b6a59f5..7c0ea146 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -32,12 +32,13 @@ type SignedTransaction struct { // Types that are assignable to Transaction: // // *SignedTransaction_Plays - // *SignedTransaction_ValidatorRegistration + // *SignedTransaction_ValidatorRegistrationLegacy // *SignedTransaction_SlaRollup // *SignedTransaction_ManageEntity // *SignedTransaction_ValidatorDeregistration // *SignedTransaction_StorageProof // *SignedTransaction_StorageProofVerification + // *SignedTransaction_ValidatorRegistration Transaction isSignedTransaction_Transaction `protobuf_oneof:"transaction"` } @@ -101,9 +102,9 @@ func (x *SignedTransaction) GetPlays() *TrackPlays { return nil } -func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistration { - if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistration); ok { - return x.ValidatorRegistration +func (x *SignedTransaction) GetValidatorRegistrationLegacy() *ValidatorRegistrationLegacy { + if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistrationLegacy); ok { + return x.ValidatorRegistrationLegacy } return nil } @@ -143,6 +144,13 @@ func (x *SignedTransaction) GetStorageProofVerification() *StorageProofVerificat return nil } +func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistration { + if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistration); ok { + return x.ValidatorRegistration + } + return nil +} + type isSignedTransaction_Transaction interface { isSignedTransaction_Transaction() } @@ -151,8 +159,8 @@ type SignedTransaction_Plays struct { Plays *TrackPlays `protobuf:"bytes,1000,opt,name=plays,proto3,oneof"` } -type SignedTransaction_ValidatorRegistration struct { - ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1001,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` +type SignedTransaction_ValidatorRegistrationLegacy struct { + ValidatorRegistrationLegacy *ValidatorRegistrationLegacy `protobuf:"bytes,1001,opt,name=validator_registration_legacy,json=validatorRegistrationLegacy,proto3,oneof"` } type SignedTransaction_SlaRollup struct { @@ -175,9 +183,13 @@ type SignedTransaction_StorageProofVerification struct { StorageProofVerification *StorageProofVerification `protobuf:"bytes,1006,opt,name=storage_proof_verification,json=storageProofVerification,proto3,oneof"` } +type SignedTransaction_ValidatorRegistration struct { + ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1007,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` +} + func (*SignedTransaction_Plays) isSignedTransaction_Transaction() {} -func (*SignedTransaction_ValidatorRegistration) isSignedTransaction_Transaction() {} +func (*SignedTransaction_ValidatorRegistrationLegacy) isSignedTransaction_Transaction() {} func (*SignedTransaction_SlaRollup) isSignedTransaction_Transaction() {} @@ -189,6 +201,8 @@ func (*SignedTransaction_StorageProof) isSignedTransaction_Transaction() {} func (*SignedTransaction_StorageProofVerification) isSignedTransaction_Transaction() {} +func (*SignedTransaction_ValidatorRegistration) isSignedTransaction_Transaction() {} + type SendTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -762,7 +776,7 @@ func (x *TrackPlays) GetPlays() []*TrackPlay { return nil } -type ValidatorRegistration struct { +type ValidatorRegistrationLegacy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -776,8 +790,8 @@ type ValidatorRegistration struct { Power int64 `protobuf:"varint,7,opt,name=power,proto3" json:"power,omitempty"` } -func (x *ValidatorRegistration) Reset() { - *x = ValidatorRegistration{} +func (x *ValidatorRegistrationLegacy) Reset() { + *x = ValidatorRegistrationLegacy{} if protoimpl.UnsafeEnabled { mi := &file_protocol_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -785,13 +799,13 @@ func (x *ValidatorRegistration) Reset() { } } -func (x *ValidatorRegistration) String() string { +func (x *ValidatorRegistrationLegacy) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidatorRegistration) ProtoMessage() {} +func (*ValidatorRegistrationLegacy) ProtoMessage() {} -func (x *ValidatorRegistration) ProtoReflect() protoreflect.Message { +func (x *ValidatorRegistrationLegacy) ProtoReflect() protoreflect.Message { mi := &file_protocol_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -803,46 +817,125 @@ func (x *ValidatorRegistration) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ValidatorRegistration.ProtoReflect.Descriptor instead. -func (*ValidatorRegistration) Descriptor() ([]byte, []int) { +// Deprecated: Use ValidatorRegistrationLegacy.ProtoReflect.Descriptor instead. +func (*ValidatorRegistrationLegacy) Descriptor() ([]byte, []int) { return file_protocol_proto_rawDescGZIP(), []int{11} } -func (x *ValidatorRegistration) GetEndpoint() string { +func (x *ValidatorRegistrationLegacy) GetEndpoint() string { if x != nil { return x.Endpoint } return "" } -func (x *ValidatorRegistration) GetCometAddress() string { +func (x *ValidatorRegistrationLegacy) GetCometAddress() string { if x != nil { return x.CometAddress } return "" } -func (x *ValidatorRegistration) GetEthBlock() string { +func (x *ValidatorRegistrationLegacy) GetEthBlock() string { if x != nil { return x.EthBlock } return "" } -func (x *ValidatorRegistration) GetNodeType() string { +func (x *ValidatorRegistrationLegacy) GetNodeType() string { if x != nil { return x.NodeType } return "" } -func (x *ValidatorRegistration) GetSpId() string { +func (x *ValidatorRegistrationLegacy) GetSpId() string { if x != nil { return x.SpId } return "" } +func (x *ValidatorRegistrationLegacy) GetPubKey() []byte { + if x != nil { + return x.PubKey + } + return nil +} + +func (x *ValidatorRegistrationLegacy) GetPower() int64 { + if x != nil { + return x.Power + } + return 0 +} + +type ValidatorRegistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attestations []string `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` + EthRegistration *EthRegistration `protobuf:"bytes,2,opt,name=eth_registration,json=ethRegistration,proto3" json:"eth_registration,omitempty"` + CometAddress string `protobuf:"bytes,3,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"` + PubKey []byte `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + Power int64 `protobuf:"varint,5,opt,name=power,proto3" json:"power,omitempty"` +} + +func (x *ValidatorRegistration) Reset() { + *x = ValidatorRegistration{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorRegistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorRegistration) ProtoMessage() {} + +func (x *ValidatorRegistration) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidatorRegistration.ProtoReflect.Descriptor instead. +func (*ValidatorRegistration) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{12} +} + +func (x *ValidatorRegistration) GetAttestations() []string { + if x != nil { + return x.Attestations + } + return nil +} + +func (x *ValidatorRegistration) GetEthRegistration() *EthRegistration { + if x != nil { + return x.EthRegistration + } + return nil +} + +func (x *ValidatorRegistration) GetCometAddress() string { + if x != nil { + return x.CometAddress + } + return "" +} + func (x *ValidatorRegistration) GetPubKey() []byte { if x != nil { return x.PubKey @@ -857,6 +950,93 @@ func (x *ValidatorRegistration) GetPower() int64 { return 0 } +type EthRegistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` + EthBlock int64 `protobuf:"varint,4,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` + SpId string `protobuf:"bytes,5,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *EthRegistration) Reset() { + *x = EthRegistration{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthRegistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthRegistration) ProtoMessage() {} + +func (x *EthRegistration) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthRegistration.ProtoReflect.Descriptor instead. +func (*EthRegistration) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{13} +} + +func (x *EthRegistration) GetDelegateWallet() string { + if x != nil { + return x.DelegateWallet + } + return "" +} + +func (x *EthRegistration) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *EthRegistration) GetNodeType() string { + if x != nil { + return x.NodeType + } + return "" +} + +func (x *EthRegistration) GetEthBlock() int64 { + if x != nil { + return x.EthBlock + } + return 0 +} + +func (x *EthRegistration) GetSpId() string { + if x != nil { + return x.SpId + } + return "" +} + +func (x *EthRegistration) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + type ValidatorDeregistration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -869,7 +1049,7 @@ type ValidatorDeregistration struct { func (x *ValidatorDeregistration) Reset() { *x = ValidatorDeregistration{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[12] + mi := &file_protocol_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -882,7 +1062,7 @@ func (x *ValidatorDeregistration) String() string { func (*ValidatorDeregistration) ProtoMessage() {} func (x *ValidatorDeregistration) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[12] + mi := &file_protocol_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -895,7 +1075,7 @@ func (x *ValidatorDeregistration) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorDeregistration.ProtoReflect.Descriptor instead. func (*ValidatorDeregistration) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{12} + return file_protocol_proto_rawDescGZIP(), []int{14} } func (x *ValidatorDeregistration) GetCometAddress() string { @@ -929,7 +1109,7 @@ type TrackPlay struct { func (x *TrackPlay) Reset() { *x = TrackPlay{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[13] + mi := &file_protocol_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -942,7 +1122,7 @@ func (x *TrackPlay) String() string { func (*TrackPlay) ProtoMessage() {} func (x *TrackPlay) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[13] + mi := &file_protocol_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -955,7 +1135,7 @@ func (x *TrackPlay) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackPlay.ProtoReflect.Descriptor instead. func (*TrackPlay) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{13} + return file_protocol_proto_rawDescGZIP(), []int{15} } func (x *TrackPlay) GetUserId() string { @@ -1016,7 +1196,7 @@ type PingRequest struct { func (x *PingRequest) Reset() { *x = PingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[14] + mi := &file_protocol_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1029,7 +1209,7 @@ func (x *PingRequest) String() string { func (*PingRequest) ProtoMessage() {} func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[14] + mi := &file_protocol_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1042,7 +1222,7 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. func (*PingRequest) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{14} + return file_protocol_proto_rawDescGZIP(), []int{16} } type PingResponse struct { @@ -1056,7 +1236,7 @@ type PingResponse struct { func (x *PingResponse) Reset() { *x = PingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[15] + mi := &file_protocol_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1069,7 +1249,7 @@ func (x *PingResponse) String() string { func (*PingResponse) ProtoMessage() {} func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[15] + mi := &file_protocol_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1082,7 +1262,7 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. func (*PingResponse) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{15} + return file_protocol_proto_rawDescGZIP(), []int{17} } func (x *PingResponse) GetMessage() string { @@ -1106,7 +1286,7 @@ type SlaRollup struct { func (x *SlaRollup) Reset() { *x = SlaRollup{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[16] + mi := &file_protocol_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1119,7 +1299,7 @@ func (x *SlaRollup) String() string { func (*SlaRollup) ProtoMessage() {} func (x *SlaRollup) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[16] + mi := &file_protocol_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1132,7 +1312,7 @@ func (x *SlaRollup) ProtoReflect() protoreflect.Message { // Deprecated: Use SlaRollup.ProtoReflect.Descriptor instead. func (*SlaRollup) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{16} + return file_protocol_proto_rawDescGZIP(), []int{18} } func (x *SlaRollup) GetTimestamp() *timestamppb.Timestamp { @@ -1175,7 +1355,7 @@ type SlaNodeReport struct { func (x *SlaNodeReport) Reset() { *x = SlaNodeReport{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[17] + mi := &file_protocol_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1188,7 +1368,7 @@ func (x *SlaNodeReport) String() string { func (*SlaNodeReport) ProtoMessage() {} func (x *SlaNodeReport) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[17] + mi := &file_protocol_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1201,7 +1381,7 @@ func (x *SlaNodeReport) ProtoReflect() protoreflect.Message { // Deprecated: Use SlaNodeReport.ProtoReflect.Descriptor instead. func (*SlaNodeReport) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{17} + return file_protocol_proto_rawDescGZIP(), []int{19} } func (x *SlaNodeReport) GetAddress() string { @@ -1233,7 +1413,7 @@ type StorageProof struct { func (x *StorageProof) Reset() { *x = StorageProof{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[18] + mi := &file_protocol_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1246,7 +1426,7 @@ func (x *StorageProof) String() string { func (*StorageProof) ProtoMessage() {} func (x *StorageProof) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[18] + mi := &file_protocol_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1259,7 +1439,7 @@ func (x *StorageProof) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageProof.ProtoReflect.Descriptor instead. func (*StorageProof) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{18} + return file_protocol_proto_rawDescGZIP(), []int{20} } func (x *StorageProof) GetHeight() int64 { @@ -1309,7 +1489,7 @@ type StorageProofVerification struct { func (x *StorageProofVerification) Reset() { *x = StorageProofVerification{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[19] + mi := &file_protocol_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1322,7 +1502,7 @@ func (x *StorageProofVerification) String() string { func (*StorageProofVerification) ProtoMessage() {} func (x *StorageProofVerification) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[19] + mi := &file_protocol_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1335,7 +1515,7 @@ func (x *StorageProofVerification) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageProofVerification.ProtoReflect.Descriptor instead. func (*StorageProofVerification) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{19} + return file_protocol_proto_rawDescGZIP(), []int{21} } func (x *StorageProofVerification) GetHeight() int64 { @@ -1370,7 +1550,7 @@ type ManageEntityLegacy struct { func (x *ManageEntityLegacy) Reset() { *x = ManageEntityLegacy{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[20] + mi := &file_protocol_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1383,7 +1563,7 @@ func (x *ManageEntityLegacy) String() string { func (*ManageEntityLegacy) ProtoMessage() {} func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[20] + mi := &file_protocol_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1396,7 +1576,7 @@ func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message { // Deprecated: Use ManageEntityLegacy.ProtoReflect.Descriptor instead. func (*ManageEntityLegacy) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{20} + return file_protocol_proto_rawDescGZIP(), []int{22} } func (x *ManageEntityLegacy) GetUserId() int64 { @@ -1455,6 +1635,108 @@ func (x *ManageEntityLegacy) GetNonce() string { return "" } +type RegistrationAttestationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Registration *EthRegistration `protobuf:"bytes,1,opt,name=registration,proto3" json:"registration,omitempty"` +} + +func (x *RegistrationAttestationRequest) Reset() { + *x = RegistrationAttestationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistrationAttestationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistrationAttestationRequest) ProtoMessage() {} + +func (x *RegistrationAttestationRequest) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistrationAttestationRequest.ProtoReflect.Descriptor instead. +func (*RegistrationAttestationRequest) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{23} +} + +func (x *RegistrationAttestationRequest) GetRegistration() *EthRegistration { + if x != nil { + return x.Registration + } + return nil +} + +type RegistrationAttestationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + Registration *EthRegistration `protobuf:"bytes,2,opt,name=registration,proto3" json:"registration,omitempty"` +} + +func (x *RegistrationAttestationResponse) Reset() { + *x = RegistrationAttestationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegistrationAttestationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegistrationAttestationResponse) ProtoMessage() {} + +func (x *RegistrationAttestationResponse) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegistrationAttestationResponse.ProtoReflect.Descriptor instead. +func (*RegistrationAttestationResponse) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{24} +} + +func (x *RegistrationAttestationResponse) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *RegistrationAttestationResponse) GetRegistration() *EthRegistration { + if x != nil { + return x.Registration + } + return nil +} + var File_protocol_proto protoreflect.FileDescriptor var file_protocol_proto_rawDesc = []byte{ @@ -1463,7 +1745,7 @@ var file_protocol_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xec, 0x04, 0x0a, 0x11, 0x53, 0x69, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x05, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, @@ -1471,239 +1753,298 @@ var file_protocol_proto_rawDesc = []byte{ 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, - 0x79, 0x73, 0x48, 0x00, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x59, 0x0a, 0x16, 0x76, + 0x79, 0x73, 0x48, 0x00, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x6c, 0x0a, 0x1d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x6c, 0x61, 0x5f, 0x72, 0x6f, - 0x6c, 0x6c, 0x75, 0x70, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, - 0x48, 0x00, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x44, 0x0a, - 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0xeb, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x18, 0xe9, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x1b, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x6c, 0x61, + 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, + 0x6c, 0x75, 0x70, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, + 0x12, 0x44, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x63, 0x0a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x63, 0x0a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, + 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x16, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xef, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x47, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x46, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb1, + 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, + 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, + 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, + 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x73, + 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x1b, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, + 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0xd5, 0x01, 0x0a, 0x15, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x5f, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, + 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x65, + 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, + 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x22, 0xdf, 0x01, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x74, 0x68, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x57, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, + 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, + 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, + 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, + 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, + 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, + 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, + 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, + 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x1e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, + 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, + 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1f, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, + 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, + 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xd4, 0x06, 0x0a, + 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x22, 0xae, 0x01, 0x0a, - 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3d, 0x0a, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, - 0x1a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, - 0x79, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, - 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xd6, 0x01, - 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x74, 0x68, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x57, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, - 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, - 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, - 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, - 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, - 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, - 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, - 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, - 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, - 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, - 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x32, 0xb7, 0x05, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, - 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, - 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, - 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, - 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, - 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, + 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, + 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1718,66 +2059,77 @@ func file_protocol_proto_rawDescGZIP() []byte { return file_protocol_proto_rawDescData } -var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_protocol_proto_goTypes = []interface{}{ - (*SignedTransaction)(nil), // 0: protocol.SignedTransaction - (*SendTransactionRequest)(nil), // 1: protocol.SendTransactionRequest - (*ForwardTransactionRequest)(nil), // 2: protocol.ForwardTransactionRequest - (*GetTransactionRequest)(nil), // 3: protocol.GetTransactionRequest - (*TransactionResponse)(nil), // 4: protocol.TransactionResponse - (*ForwardTransactionResponse)(nil), // 5: protocol.ForwardTransactionResponse - (*GetBlockRequest)(nil), // 6: protocol.GetBlockRequest - (*BlockResponse)(nil), // 7: protocol.BlockResponse - (*GetNodeInfoRequest)(nil), // 8: protocol.GetNodeInfoRequest - (*NodeInfoResponse)(nil), // 9: protocol.NodeInfoResponse - (*TrackPlays)(nil), // 10: protocol.TrackPlays - (*ValidatorRegistration)(nil), // 11: protocol.ValidatorRegistration - (*ValidatorDeregistration)(nil), // 12: protocol.ValidatorDeregistration - (*TrackPlay)(nil), // 13: protocol.TrackPlay - (*PingRequest)(nil), // 14: protocol.PingRequest - (*PingResponse)(nil), // 15: protocol.PingResponse - (*SlaRollup)(nil), // 16: protocol.SlaRollup - (*SlaNodeReport)(nil), // 17: protocol.SlaNodeReport - (*StorageProof)(nil), // 18: protocol.StorageProof - (*StorageProofVerification)(nil), // 19: protocol.StorageProofVerification - (*ManageEntityLegacy)(nil), // 20: protocol.ManageEntityLegacy - (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp + (*SignedTransaction)(nil), // 0: protocol.SignedTransaction + (*SendTransactionRequest)(nil), // 1: protocol.SendTransactionRequest + (*ForwardTransactionRequest)(nil), // 2: protocol.ForwardTransactionRequest + (*GetTransactionRequest)(nil), // 3: protocol.GetTransactionRequest + (*TransactionResponse)(nil), // 4: protocol.TransactionResponse + (*ForwardTransactionResponse)(nil), // 5: protocol.ForwardTransactionResponse + (*GetBlockRequest)(nil), // 6: protocol.GetBlockRequest + (*BlockResponse)(nil), // 7: protocol.BlockResponse + (*GetNodeInfoRequest)(nil), // 8: protocol.GetNodeInfoRequest + (*NodeInfoResponse)(nil), // 9: protocol.NodeInfoResponse + (*TrackPlays)(nil), // 10: protocol.TrackPlays + (*ValidatorRegistrationLegacy)(nil), // 11: protocol.ValidatorRegistrationLegacy + (*ValidatorRegistration)(nil), // 12: protocol.ValidatorRegistration + (*EthRegistration)(nil), // 13: protocol.EthRegistration + (*ValidatorDeregistration)(nil), // 14: protocol.ValidatorDeregistration + (*TrackPlay)(nil), // 15: protocol.TrackPlay + (*PingRequest)(nil), // 16: protocol.PingRequest + (*PingResponse)(nil), // 17: protocol.PingResponse + (*SlaRollup)(nil), // 18: protocol.SlaRollup + (*SlaNodeReport)(nil), // 19: protocol.SlaNodeReport + (*StorageProof)(nil), // 20: protocol.StorageProof + (*StorageProofVerification)(nil), // 21: protocol.StorageProofVerification + (*ManageEntityLegacy)(nil), // 22: protocol.ManageEntityLegacy + (*RegistrationAttestationRequest)(nil), // 23: protocol.RegistrationAttestationRequest + (*RegistrationAttestationResponse)(nil), // 24: protocol.RegistrationAttestationResponse + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp } var file_protocol_proto_depIdxs = []int32{ 10, // 0: protocol.SignedTransaction.plays:type_name -> protocol.TrackPlays - 11, // 1: protocol.SignedTransaction.validator_registration:type_name -> protocol.ValidatorRegistration - 16, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup - 20, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy - 12, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorDeregistration - 18, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof - 19, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification - 0, // 7: protocol.SendTransactionRequest.transaction:type_name -> protocol.SignedTransaction - 0, // 8: protocol.ForwardTransactionRequest.transaction:type_name -> protocol.SignedTransaction - 0, // 9: protocol.TransactionResponse.transaction:type_name -> protocol.SignedTransaction - 0, // 10: protocol.BlockResponse.transactions:type_name -> protocol.SignedTransaction - 21, // 11: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp - 4, // 12: protocol.BlockResponse.transaction_responses:type_name -> protocol.TransactionResponse - 13, // 13: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay - 21, // 14: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp - 21, // 15: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp - 17, // 16: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport - 1, // 17: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest - 2, // 18: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest - 3, // 19: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest - 6, // 20: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest - 8, // 21: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest - 14, // 22: protocol.Protocol.Ping:input_type -> protocol.PingRequest - 4, // 23: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse - 5, // 24: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse - 4, // 25: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse - 7, // 26: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse - 9, // 27: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse - 15, // 28: protocol.Protocol.Ping:output_type -> protocol.PingResponse - 23, // [23:29] is the sub-list for method output_type - 17, // [17:23] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 11, // 1: protocol.SignedTransaction.validator_registration_legacy:type_name -> protocol.ValidatorRegistrationLegacy + 18, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup + 22, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy + 14, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorDeregistration + 20, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof + 21, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification + 12, // 7: protocol.SignedTransaction.validator_registration:type_name -> protocol.ValidatorRegistration + 0, // 8: protocol.SendTransactionRequest.transaction:type_name -> protocol.SignedTransaction + 0, // 9: protocol.ForwardTransactionRequest.transaction:type_name -> protocol.SignedTransaction + 0, // 10: protocol.TransactionResponse.transaction:type_name -> protocol.SignedTransaction + 0, // 11: protocol.BlockResponse.transactions:type_name -> protocol.SignedTransaction + 25, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 4, // 13: protocol.BlockResponse.transaction_responses:type_name -> protocol.TransactionResponse + 15, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay + 13, // 15: protocol.ValidatorRegistration.eth_registration:type_name -> protocol.EthRegistration + 25, // 16: protocol.EthRegistration.timestamp:type_name -> google.protobuf.Timestamp + 25, // 17: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp + 25, // 18: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp + 19, // 19: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport + 13, // 20: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.EthRegistration + 13, // 21: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.EthRegistration + 1, // 22: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest + 2, // 23: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest + 3, // 24: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest + 6, // 25: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest + 8, // 26: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest + 16, // 27: protocol.Protocol.Ping:input_type -> protocol.PingRequest + 23, // 28: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest + 4, // 29: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse + 5, // 30: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse + 4, // 31: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse + 7, // 32: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse + 9, // 33: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse + 17, // 34: protocol.Protocol.Ping:output_type -> protocol.PingResponse + 24, // 35: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse + 29, // [29:36] is the sub-list for method output_type + 22, // [22:29] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_protocol_proto_init() } @@ -1919,7 +2271,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorRegistration); i { + switch v := v.(*ValidatorRegistrationLegacy); i { case 0: return &v.state case 1: @@ -1931,7 +2283,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorDeregistration); i { + switch v := v.(*ValidatorRegistration); i { case 0: return &v.state case 1: @@ -1943,7 +2295,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackPlay); i { + switch v := v.(*EthRegistration); i { case 0: return &v.state case 1: @@ -1955,7 +2307,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { + switch v := v.(*ValidatorDeregistration); i { case 0: return &v.state case 1: @@ -1967,7 +2319,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { + switch v := v.(*TrackPlay); i { case 0: return &v.state case 1: @@ -1979,7 +2331,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SlaRollup); i { + switch v := v.(*PingRequest); i { case 0: return &v.state case 1: @@ -1991,7 +2343,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SlaNodeReport); i { + switch v := v.(*PingResponse); i { case 0: return &v.state case 1: @@ -2003,7 +2355,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageProof); i { + switch v := v.(*SlaRollup); i { case 0: return &v.state case 1: @@ -2015,7 +2367,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageProofVerification); i { + switch v := v.(*SlaNodeReport); i { case 0: return &v.state case 1: @@ -2027,6 +2379,30 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageProof); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageProofVerification); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ManageEntityLegacy); i { case 0: return &v.state @@ -2038,15 +2414,40 @@ func file_protocol_proto_init() { return nil } } + file_protocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistrationAttestationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistrationAttestationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_protocol_proto_msgTypes[0].OneofWrappers = []interface{}{ (*SignedTransaction_Plays)(nil), - (*SignedTransaction_ValidatorRegistration)(nil), + (*SignedTransaction_ValidatorRegistrationLegacy)(nil), (*SignedTransaction_SlaRollup)(nil), (*SignedTransaction_ManageEntity)(nil), (*SignedTransaction_ValidatorDeregistration)(nil), (*SignedTransaction_StorageProof)(nil), (*SignedTransaction_StorageProofVerification)(nil), + (*SignedTransaction_ValidatorRegistration)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2054,7 +2455,7 @@ func file_protocol_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_proto_rawDesc, NumEnums: 0, - NumMessages: 21, + NumMessages: 25, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/core/gen/core_proto/protocol.pb.gw.go b/pkg/core/gen/core_proto/protocol.pb.gw.go index 9cb02bb5..853d74a6 100644 --- a/pkg/core/gen/core_proto/protocol.pb.gw.go +++ b/pkg/core/gen/core_proto/protocol.pb.gw.go @@ -257,6 +257,40 @@ func local_request_Protocol_Ping_0(ctx context.Context, marshaler runtime.Marsha } +func request_Protocol_GetRegistrationAttestation_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegistrationAttestationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Registration); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRegistrationAttestation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Protocol_GetRegistrationAttestation_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegistrationAttestationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Registration); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRegistrationAttestation(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterProtocolHandlerServer registers the http handlers for service Protocol to "mux". // UnaryRPC :call ProtocolServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -413,6 +447,31 @@ func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, s }) + mux.Handle("POST", pattern_Protocol_GetRegistrationAttestation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/protocol.Protocol/GetRegistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Protocol_GetRegistrationAttestation_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Protocol_GetRegistrationAttestation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -586,6 +645,28 @@ func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, c }) + mux.Handle("POST", pattern_Protocol_GetRegistrationAttestation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/protocol.Protocol/GetRegistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Protocol_GetRegistrationAttestation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Protocol_GetRegistrationAttestation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -601,6 +682,8 @@ var ( pattern_Protocol_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "node_info"}, "")) pattern_Protocol_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "ping"}, "")) + + pattern_Protocol_GetRegistrationAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "attest"}, "")) ) var ( @@ -615,4 +698,6 @@ var ( forward_Protocol_GetNodeInfo_0 = runtime.ForwardResponseMessage forward_Protocol_Ping_0 = runtime.ForwardResponseMessage + + forward_Protocol_GetRegistrationAttestation_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/core/gen/core_proto/protocol.swagger.json b/pkg/core/gen/core_proto/protocol.swagger.json index 11961295..3284c70e 100644 --- a/pkg/core/gen/core_proto/protocol.swagger.json +++ b/pkg/core/gen/core_proto/protocol.swagger.json @@ -16,6 +16,38 @@ "application/json" ], "paths": { + "/core/grpc/attest": { + "post": { + "operationId": "Protocol_GetRegistrationAttestation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/protocolRegistrationAttestationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "registration", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/protocolEthRegistration" + } + } + ], + "tags": [ + "Protocol" + ] + } + }, "/core/grpc/block/{height}": { "get": { "operationId": "Protocol_GetBlock", @@ -243,6 +275,31 @@ } } }, + "protocolEthRegistration": { + "type": "object", + "properties": { + "delegateWallet": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "nodeType": { + "type": "string" + }, + "ethBlock": { + "type": "string", + "format": "int64" + }, + "spId": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + } + }, "protocolForwardTransactionResponse": { "type": "object" }, @@ -306,6 +363,17 @@ } } }, + "protocolRegistrationAttestationResponse": { + "type": "object", + "properties": { + "signature": { + "type": "string" + }, + "registration": { + "$ref": "#/definitions/protocolEthRegistration" + } + } + }, "protocolSignedTransaction": { "type": "object", "properties": { @@ -318,8 +386,8 @@ "plays": { "$ref": "#/definitions/protocolTrackPlays" }, - "validatorRegistration": { - "$ref": "#/definitions/protocolValidatorRegistration" + "validatorRegistrationLegacy": { + "$ref": "#/definitions/protocolValidatorRegistrationLegacy" }, "slaRollup": { "$ref": "#/definitions/protocolSlaRollup" @@ -335,6 +403,9 @@ }, "storageProofVerification": { "$ref": "#/definitions/protocolStorageProofVerification" + }, + "validatorRegistration": { + "$ref": "#/definitions/protocolValidatorRegistration" } } }, @@ -482,6 +553,31 @@ } }, "protocolValidatorRegistration": { + "type": "object", + "properties": { + "attestations": { + "type": "array", + "items": { + "type": "string" + } + }, + "ethRegistration": { + "$ref": "#/definitions/protocolEthRegistration" + }, + "cometAddress": { + "type": "string" + }, + "pubKey": { + "type": "string", + "format": "byte" + }, + "power": { + "type": "string", + "format": "int64" + } + } + }, + "protocolValidatorRegistrationLegacy": { "type": "object", "properties": { "endpoint": { diff --git a/pkg/core/gen/core_proto/protocol_grpc.pb.go b/pkg/core/gen/core_proto/protocol_grpc.pb.go index a53f13c7..55df1bb8 100644 --- a/pkg/core/gen/core_proto/protocol_grpc.pb.go +++ b/pkg/core/gen/core_proto/protocol_grpc.pb.go @@ -19,12 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Protocol_SendTransaction_FullMethodName = "/protocol.Protocol/SendTransaction" - Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" - Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" - Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" - Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" - Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" + Protocol_SendTransaction_FullMethodName = "/protocol.Protocol/SendTransaction" + Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" + Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" + Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" + Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" + Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" + Protocol_GetRegistrationAttestation_FullMethodName = "/protocol.Protocol/GetRegistrationAttestation" ) // ProtocolClient is the client API for Protocol service. @@ -37,6 +38,7 @@ type ProtocolClient interface { GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) + GetRegistrationAttestation(ctx context.Context, in *RegistrationAttestationRequest, opts ...grpc.CallOption) (*RegistrationAttestationResponse, error) } type protocolClient struct { @@ -101,6 +103,15 @@ func (c *protocolClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc return out, nil } +func (c *protocolClient) GetRegistrationAttestation(ctx context.Context, in *RegistrationAttestationRequest, opts ...grpc.CallOption) (*RegistrationAttestationResponse, error) { + out := new(RegistrationAttestationResponse) + err := c.cc.Invoke(ctx, Protocol_GetRegistrationAttestation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ProtocolServer is the server API for Protocol service. // All implementations must embed UnimplementedProtocolServer // for forward compatibility @@ -111,6 +122,7 @@ type ProtocolServer interface { GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) Ping(context.Context, *PingRequest) (*PingResponse, error) + GetRegistrationAttestation(context.Context, *RegistrationAttestationRequest) (*RegistrationAttestationResponse, error) mustEmbedUnimplementedProtocolServer() } @@ -136,6 +148,9 @@ func (UnimplementedProtocolServer) GetNodeInfo(context.Context, *GetNodeInfoRequ func (UnimplementedProtocolServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } +func (UnimplementedProtocolServer) GetRegistrationAttestation(context.Context, *RegistrationAttestationRequest) (*RegistrationAttestationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRegistrationAttestation not implemented") +} func (UnimplementedProtocolServer) mustEmbedUnimplementedProtocolServer() {} // UnsafeProtocolServer may be embedded to opt out of forward compatibility for this service. @@ -257,6 +272,24 @@ func _Protocol_Ping_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Protocol_GetRegistrationAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegistrationAttestationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServer).GetRegistrationAttestation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Protocol_GetRegistrationAttestation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServer).GetRegistrationAttestation(ctx, req.(*RegistrationAttestationRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Protocol_ServiceDesc is the grpc.ServiceDesc for Protocol service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -288,6 +321,10 @@ var Protocol_ServiceDesc = grpc.ServiceDesc{ MethodName: "Ping", Handler: _Protocol_Ping_Handler, }, + { + MethodName: "GetRegistrationAttestation", + Handler: _Protocol_GetRegistrationAttestation_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "protocol.proto", diff --git a/pkg/core/gen/models/protocol_eth_registration.go b/pkg/core/gen/models/protocol_eth_registration.go new file mode 100644 index 00000000..49c1a19c --- /dev/null +++ b/pkg/core/gen/models/protocol_eth_registration.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ProtocolEthRegistration protocol eth registration +// +// swagger:model protocolEthRegistration +type ProtocolEthRegistration struct { + + // delegate wallet + DelegateWallet string `json:"delegateWallet,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // eth block + EthBlock string `json:"ethBlock,omitempty"` + + // node type + NodeType string `json:"nodeType,omitempty"` + + // sp Id + SpID string `json:"spId,omitempty"` + + // timestamp + // Format: date-time + Timestamp strfmt.DateTime `json:"timestamp,omitempty"` +} + +// Validate validates this protocol eth registration +func (m *ProtocolEthRegistration) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolEthRegistration) validateTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.Timestamp) { // not required + return nil + } + + if err := validate.FormatOf("timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this protocol eth registration based on context it is used +func (m *ProtocolEthRegistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolEthRegistration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolEthRegistration) UnmarshalBinary(b []byte) error { + var res ProtocolEthRegistration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_registration_attestation_request.go b/pkg/core/gen/models/protocol_registration_attestation_request.go new file mode 100644 index 00000000..09c46dfc --- /dev/null +++ b/pkg/core/gen/models/protocol_registration_attestation_request.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolRegistrationAttestationRequest protocol registration attestation request +// +// swagger:model protocolRegistrationAttestationRequest +type ProtocolRegistrationAttestationRequest struct { + + // registration + Registration *ProtocolEthRegistration `json:"registration,omitempty"` +} + +// Validate validates this protocol registration attestation request +func (m *ProtocolRegistrationAttestationRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegistration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolRegistrationAttestationRequest) validateRegistration(formats strfmt.Registry) error { + if swag.IsZero(m.Registration) { // not required + return nil + } + + if m.Registration != nil { + if err := m.Registration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("registration") + } + return err + } + } + + return nil +} + +// ContextValidate validate this protocol registration attestation request based on the context it is used +func (m *ProtocolRegistrationAttestationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRegistration(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolRegistrationAttestationRequest) contextValidateRegistration(ctx context.Context, formats strfmt.Registry) error { + + if m.Registration != nil { + + if swag.IsZero(m.Registration) { // not required + return nil + } + + if err := m.Registration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("registration") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolRegistrationAttestationRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolRegistrationAttestationRequest) UnmarshalBinary(b []byte) error { + var res ProtocolRegistrationAttestationRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_registration_attestation_response.go b/pkg/core/gen/models/protocol_registration_attestation_response.go new file mode 100644 index 00000000..5057193f --- /dev/null +++ b/pkg/core/gen/models/protocol_registration_attestation_response.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolRegistrationAttestationResponse protocol registration attestation response +// +// swagger:model protocolRegistrationAttestationResponse +type ProtocolRegistrationAttestationResponse struct { + + // registration + Registration *ProtocolEthRegistration `json:"registration,omitempty"` + + // signature + Signature string `json:"signature,omitempty"` +} + +// Validate validates this protocol registration attestation response +func (m *ProtocolRegistrationAttestationResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegistration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolRegistrationAttestationResponse) validateRegistration(formats strfmt.Registry) error { + if swag.IsZero(m.Registration) { // not required + return nil + } + + if m.Registration != nil { + if err := m.Registration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("registration") + } + return err + } + } + + return nil +} + +// ContextValidate validate this protocol registration attestation response based on the context it is used +func (m *ProtocolRegistrationAttestationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRegistration(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolRegistrationAttestationResponse) contextValidateRegistration(ctx context.Context, formats strfmt.Registry) error { + + if m.Registration != nil { + + if swag.IsZero(m.Registration) { // not required + return nil + } + + if err := m.Registration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("registration") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolRegistrationAttestationResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolRegistrationAttestationResponse) UnmarshalBinary(b []byte) error { + var res ProtocolRegistrationAttestationResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_signed_transaction.go b/pkg/core/gen/models/protocol_signed_transaction.go index 58404da4..a3694ab8 100644 --- a/pkg/core/gen/models/protocol_signed_transaction.go +++ b/pkg/core/gen/models/protocol_signed_transaction.go @@ -44,6 +44,9 @@ type ProtocolSignedTransaction struct { // validator registration ValidatorRegistration *ProtocolValidatorRegistration `json:"validatorRegistration,omitempty"` + + // validator registration legacy + ValidatorRegistrationLegacy *ProtocolValidatorRegistrationLegacy `json:"validatorRegistrationLegacy,omitempty"` } // Validate validates this protocol signed transaction @@ -78,6 +81,10 @@ func (m *ProtocolSignedTransaction) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateValidatorRegistrationLegacy(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -217,6 +224,25 @@ func (m *ProtocolSignedTransaction) validateValidatorRegistration(formats strfmt return nil } +func (m *ProtocolSignedTransaction) validateValidatorRegistrationLegacy(formats strfmt.Registry) error { + if swag.IsZero(m.ValidatorRegistrationLegacy) { // not required + return nil + } + + if m.ValidatorRegistrationLegacy != nil { + if err := m.ValidatorRegistrationLegacy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("validatorRegistrationLegacy") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("validatorRegistrationLegacy") + } + return err + } + } + + return nil +} + // ContextValidate validate this protocol signed transaction based on the context it is used func (m *ProtocolSignedTransaction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -249,6 +275,10 @@ func (m *ProtocolSignedTransaction) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateValidatorRegistrationLegacy(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -402,6 +432,27 @@ func (m *ProtocolSignedTransaction) contextValidateValidatorRegistration(ctx con return nil } +func (m *ProtocolSignedTransaction) contextValidateValidatorRegistrationLegacy(ctx context.Context, formats strfmt.Registry) error { + + if m.ValidatorRegistrationLegacy != nil { + + if swag.IsZero(m.ValidatorRegistrationLegacy) { // not required + return nil + } + + if err := m.ValidatorRegistrationLegacy.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("validatorRegistrationLegacy") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("validatorRegistrationLegacy") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ProtocolSignedTransaction) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/pkg/core/gen/models/protocol_validator_registration.go b/pkg/core/gen/models/protocol_validator_registration.go index 78d307ac..ada0ac01 100644 --- a/pkg/core/gen/models/protocol_validator_registration.go +++ b/pkg/core/gen/models/protocol_validator_registration.go @@ -8,6 +8,7 @@ package models import ( "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -17,17 +18,14 @@ import ( // swagger:model protocolValidatorRegistration type ProtocolValidatorRegistration struct { + // attestations + Attestations []string `json:"attestations"` + // comet address CometAddress string `json:"cometAddress,omitempty"` - // endpoint - Endpoint string `json:"endpoint,omitempty"` - - // eth block - EthBlock string `json:"ethBlock,omitempty"` - - // node type - NodeType string `json:"nodeType,omitempty"` + // eth registration + EthRegistration *ProtocolEthRegistration `json:"ethRegistration,omitempty"` // power Power string `json:"power,omitempty"` @@ -35,18 +33,73 @@ type ProtocolValidatorRegistration struct { // pub key // Format: byte PubKey strfmt.Base64 `json:"pubKey,omitempty"` - - // sp Id - SpID string `json:"spId,omitempty"` } // Validate validates this protocol validator registration func (m *ProtocolValidatorRegistration) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEthRegistration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } -// ContextValidate validates this protocol validator registration based on context it is used +func (m *ProtocolValidatorRegistration) validateEthRegistration(formats strfmt.Registry) error { + if swag.IsZero(m.EthRegistration) { // not required + return nil + } + + if m.EthRegistration != nil { + if err := m.EthRegistration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ethRegistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ethRegistration") + } + return err + } + } + + return nil +} + +// ContextValidate validate this protocol validator registration based on the context it is used func (m *ProtocolValidatorRegistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEthRegistration(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolValidatorRegistration) contextValidateEthRegistration(ctx context.Context, formats strfmt.Registry) error { + + if m.EthRegistration != nil { + + if swag.IsZero(m.EthRegistration) { // not required + return nil + } + + if err := m.EthRegistration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ethRegistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ethRegistration") + } + return err + } + } + return nil } diff --git a/pkg/core/gen/models/protocol_validator_registration_legacy.go b/pkg/core/gen/models/protocol_validator_registration_legacy.go new file mode 100644 index 00000000..de82afd7 --- /dev/null +++ b/pkg/core/gen/models/protocol_validator_registration_legacy.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolValidatorRegistrationLegacy protocol validator registration legacy +// +// swagger:model protocolValidatorRegistrationLegacy +type ProtocolValidatorRegistrationLegacy struct { + + // comet address + CometAddress string `json:"cometAddress,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // eth block + EthBlock string `json:"ethBlock,omitempty"` + + // node type + NodeType string `json:"nodeType,omitempty"` + + // power + Power string `json:"power,omitempty"` + + // pub key + // Format: byte + PubKey strfmt.Base64 `json:"pubKey,omitempty"` + + // sp Id + SpID string `json:"spId,omitempty"` +} + +// Validate validates this protocol validator registration legacy +func (m *ProtocolValidatorRegistrationLegacy) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protocol validator registration legacy based on context it is used +func (m *ProtocolValidatorRegistrationLegacy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolValidatorRegistrationLegacy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolValidatorRegistrationLegacy) UnmarshalBinary(b []byte) error { + var res ProtocolValidatorRegistrationLegacy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index 64c44418..3884ffc9 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -32,6 +32,12 @@ service Protocol { rpc Ping(PingRequest) returns (PingResponse) { option (google.api.http) = {get: "/core/grpc/ping"}; } + rpc GetRegistrationAttestation(RegistrationAttestationRequest) returns (RegistrationAttestationResponse) { + option (google.api.http) = { + post: "/core/grpc/attest" + body: "registration" + }; + } } message SignedTransaction { @@ -39,12 +45,13 @@ message SignedTransaction { string request_id = 2; oneof transaction { TrackPlays plays = 1000; - ValidatorRegistration validator_registration = 1001; + ValidatorRegistrationLegacy validator_registration_legacy = 1001; SlaRollup sla_rollup = 1002; ManageEntityLegacy manage_entity = 1003; ValidatorDeregistration validator_deregistration = 1004; StorageProof storage_proof = 1005; StorageProofVerification storage_proof_verification = 1006; + ValidatorRegistration validator_registration = 1007; } } @@ -100,7 +107,7 @@ message TrackPlays { repeated TrackPlay plays = 1; } -message ValidatorRegistration { +message ValidatorRegistrationLegacy { string endpoint = 1; string comet_address = 2; string eth_block = 3; @@ -110,6 +117,23 @@ message ValidatorRegistration { int64 power = 7; } +message ValidatorRegistration { + repeated string attestations = 1; + EthRegistration eth_registration = 2; + string comet_address = 3; + bytes pub_key = 4; + int64 power = 5; +} + +message EthRegistration { + string delegate_wallet = 1; + string endpoint = 2; + string node_type = 3; + int64 eth_block = 4; + string sp_id = 5; + google.protobuf.Timestamp timestamp = 6; +} + message ValidatorDeregistration { string comet_address = 1; bytes pub_key = 2; @@ -166,3 +190,12 @@ message ManageEntityLegacy { string signer = 7; string nonce = 8; } + +message RegistrationAttestationRequest { + EthRegistration registration = 1; +} + +message RegistrationAttestationResponse { + string signature = 1; + EthRegistration registration = 2; +} diff --git a/pkg/core/server/abci.go b/pkg/core/server/abci.go index c074fbae..048833e0 100644 --- a/pkg/core/server/abci.go +++ b/pkg/core/server/abci.go @@ -455,7 +455,7 @@ func (s *Server) validateBlockTx(ctx context.Context, blockTime time.Time, block switch signedTx.Transaction.(type) { case *core_proto.SignedTransaction_Plays: case *core_proto.SignedTransaction_ValidatorRegistration: - if err := s.isValidRegisterNodeTx(signedTx); err != nil { + if err := s.isValidLegacyRegisterNodeTx(signedTx); err != nil { s.logger.Error("Invalid block: invalid register node tx", "error", err) return false, nil } diff --git a/pkg/core/server/attestations.go b/pkg/core/server/attestations.go new file mode 100644 index 00000000..d16aa7b2 --- /dev/null +++ b/pkg/core/server/attestations.go @@ -0,0 +1,51 @@ +package server + +import ( + "bytes" + "crypto/sha256" + "io" + "sort" + + "github.com/AudiusProject/audiusd/pkg/core/db" +) + +type NodeTuple struct { + addr string + score []byte +} + +type NodeTuples []NodeTuple + +func (s NodeTuples) Len() int { return len(s) } +func (s NodeTuples) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s NodeTuples) Less(i, j int) bool { + c := bytes.Compare(s[i].score, s[j].score) + if c == 0 { + return s[i].addr < s[j].addr + } + return c == -1 +} + +// Returns the first `size` number of addresses from a list of all validators sorted +// by a hashing function. The hashing is seeded according to the given key. +func getAttestorRendezvous(nodes []db.CoreValidator, key []byte, size int) map[string]bool { + tuples := make(NodeTuples, len(nodes)) + + hasher := sha256.New() + for i, node := range nodes { + hasher.Reset() + io.WriteString(hasher, node.EthAddress) + hasher.Write(key) + tuples[i] = NodeTuple{node.EthAddress, hasher.Sum(nil)} + } + sort.Sort(tuples) + result := make(map[string]bool, len(nodes)) + bound := min(len(tuples), size) + for i, tup := range tuples { + if i >= bound { + break + } + result[tup.addr] = true + } + return result +} diff --git a/pkg/core/server/eth.go b/pkg/core/server/eth.go index 988c6f48..34421b00 100644 --- a/pkg/core/server/eth.go +++ b/pkg/core/server/eth.go @@ -1,11 +1,14 @@ package server import ( + "bytes" "context" "fmt" + "math/big" "time" "github.com/AudiusProject/audiusd/pkg/core/contracts" + "github.com/ethereum/go-ethereum/common" "github.com/labstack/echo/v4" ) @@ -96,3 +99,21 @@ func (s *Server) getEthNodesHandler(c echo.Context) error { } return c.JSON(200, res) } + +func (s *Server) isNodeRegisteredOnEthereum(delegateWallet common.Address, endpoint string, ethBlock *big.Int) bool { + s.ethNodeMU.RLock() + defer s.ethNodeMU.RUnlock() + for _, node := range s.ethNodes { + if bytes.EqualFold(delegateWallet.Bytes(), node.DelegateOwnerWallet.Bytes()) { + continue + } + if endpoint != node.Endpoint { + continue + } + if node.BlockNumber.Cmp(ethBlock) != 0 { + continue + } + return true + } + return false +} diff --git a/pkg/core/server/grpc.go b/pkg/core/server/grpc.go index 4b26e442..3a65d6fc 100644 --- a/pkg/core/server/grpc.go +++ b/pkg/core/server/grpc.go @@ -5,6 +5,7 @@ import ( "context" "errors" "fmt" + "math/big" "net" "reflect" "strings" @@ -13,6 +14,7 @@ import ( "github.com/AudiusProject/audiusd/pkg/core/common" "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/iancoleman/strcase" "github.com/jackc/pgx/v5" "google.golang.org/protobuf/proto" @@ -294,3 +296,43 @@ func (s *Server) getBlockRpcFallback(ctx context.Context, height int64) (*core_p return res, nil } + +func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto.RegistrationAttestationRequest) (*core_proto.RegistrationAttestationResponse, error) { + ethReg := req.GetRegistration() + if ethReg == nil { + return nil, errors.New("empty registration attestation") + } + + if !s.isNodeRegisteredOnEthereum( + ethcommon.HexToAddress(ethReg.DelegateWallet), + ethReg.Endpoint, + big.NewInt(ethReg.EthBlock), + ) || time.Since(ethReg.Timestamp.AsTime()) > 48*time.Hour || ethReg.Timestamp.AsTime().After(time.Now()) { + s.logger.Error( + "Could not attest to node eth registration", + "delegate", + ethReg.DelegateWallet, + "endpoint", + ethReg.Endpoint, + "eth block", + ethReg.EthBlock, + ) + return nil, errors.New("node is not registered on ethereum") + } + + ethRegBytes, err := proto.Marshal(ethReg) + if err != nil { + s.logger.Error("could not marshal ethereum registration", "error", err) + return nil, err + } + sig, err := common.EthSign(s.config.EthereumKey, ethRegBytes) + if err != nil { + s.logger.Error("could not sign ethereum registration", "error", err) + return nil, err + } + + return &core_proto.RegistrationAttestationResponse{ + Signature: sig, + Registration: ethReg, + }, nil +} diff --git a/pkg/core/server/registration.go b/pkg/core/server/registration.go new file mode 100644 index 00000000..85f990a7 --- /dev/null +++ b/pkg/core/server/registration.go @@ -0,0 +1,233 @@ +package server + +import ( + "context" + "encoding/base64" + "encoding/binary" + "errors" + "fmt" + "strconv" + "time" + + "github.com/AudiusProject/audiusd/pkg/core/common" + "github.com/AudiusProject/audiusd/pkg/core/db" + "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" + abcitypes "github.com/cometbft/cometbft/abci/types" + cometcrypto "github.com/cometbft/cometbft/crypto" + "github.com/cometbft/cometbft/crypto/ed25519" + "github.com/cometbft/cometbft/types" + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + "google.golang.org/protobuf/proto" +) + +func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { + sig := tx.GetSignature() + if sig == "" { + return fmt.Errorf("no signature provided for registration tx: %v", tx) + } + + vr := tx.GetValidatorRegistration() + if vr == nil { + return fmt.Errorf("unknown tx fell into isValidRegisterNodeTx: %v", tx) + } + er := vr.GetEthRegistration() + if er == nil { + return fmt.Errorf("Empty eth registration fell into isValidRegisterNodeTx: %v", tx) + } + + vrBytes, err := proto.Marshal(vr) + if err != nil { + return fmt.Errorf("could not marshal registration tx: %v", err) + } + erBytes, err := proto.Marshal(er) + if err != nil { + return fmt.Errorf("could not marshal ethereum registration: %v", err) + } + + _, address, err := common.EthRecover(tx.GetSignature(), vrBytes) + if err != nil { + return fmt.Errorf("could not recover msg sig: %v", err) + } + if address != er.GetDelegateWallet() { + return fmt.Errorf("Signature address '%s' does not match ethereum registration '%s'", address, er.GetDelegateWallet()) + } + if vr.GetPower() != int64(s.config.ValidatorVotingPower) { + return fmt.Errorf("invalid voting power '%d'", vr.GetPower()) + } + + if len(vr.GetPubKey()) == 0 { + return fmt.Errorf("public Key missing from %s registration tx", er.GetEndpoint()) + } + vrPubKey := ed25519.PubKey(vr.GetPubKey()) + if vrPubKey.Address().String() != vr.GetCometAddress() { + return fmt.Errorf("address does not match public key: %s %s", vrPubKey.Address(), vr.GetCometAddress()) + } + + if _, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), vr.GetCometAddress()); !errors.Is(err, pgx.ErrNoRows) { + return fmt.Errorf("address '%s' is already registered on comet, node %s attempted to acquire it", vr.GetCometAddress(), er.GetEndpoint()) + } + + atts := vr.GetAttestations() + if atts == nil { + return fmt.Errorf("No attestations provided to RegisterNode tx: %v", tx) + } + + nodes, err := s.db.GetAllRegisteredNodes(context.Background()) + if err != nil { + return fmt.Errorf("Failed to get core validators while validating registration: %v", err) + } + + requiredAttestations := min(len(nodes), s.config.AttRegistrationMin) + keyBytes := make([]byte, 8) + binary.BigEndian.PutUint64(keyBytes, uint64(er.GetEthBlock())) + rendezvous := getAttestorRendezvous(nodes, keyBytes, s.config.AttRegistrationRSize) + for _, att := range atts { + _, address, err := common.EthRecover(att, erBytes) + if err != nil { + return fmt.Errorf("Invalid attestation provided to RegisterNode tx: %v", err) + } + if rendezvous[address] { + requiredAttestations-- + delete(rendezvous, address) + } + } + if requiredAttestations > 0 { + return fmt.Errorf("Not enough attestations provided to register validator at '%s'. Had: %d, needed: %d more", er.GetEndpoint(), len(atts), requiredAttestations) + } + + return nil +} + +func (s *Server) finalizeRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockTime time.Time) (*core_proto.ValidatorRegistration, error) { + if err := s.isValidRegisterNodeTx(tx); err != nil { + return nil, fmt.Errorf("invalid register node tx: %v", err) + } + + qtx := s.getDb() + vr := tx.GetValidatorRegistration() + er := vr.GetEthRegistration() + + sig := tx.GetSignature() + txBytes, err := proto.Marshal(vr) + if err != nil { + return nil, fmt.Errorf("could not unmarshal tx bytes: %v", err) + } + pubKey, _, err := common.EthRecover(sig, txBytes) + if err != nil { + return nil, fmt.Errorf("could not recover signer: %v", err) + } + + serializedPubKey, err := common.SerializePublicKey(pubKey) + if err != nil { + return nil, fmt.Errorf("could not serialize pubkey: %v", err) + } + + // Do not reinsert duplicate registrations + if _, err = qtx.GetRegisteredNodeByEthAddress(ctx, er.GetDelegateWallet()); errors.Is(err, pgx.ErrNoRows) { + err = qtx.InsertRegisteredNode(ctx, db.InsertRegisteredNodeParams{ + PubKey: serializedPubKey, + EthAddress: er.GetDelegateWallet(), + Endpoint: er.GetEndpoint(), + CometAddress: vr.GetCometAddress(), + CometPubKey: base64.StdEncoding.EncodeToString(vr.GetPubKey()), + EthBlock: strconv.FormatInt(er.GetEthBlock(), 10), + NodeType: er.GetNodeType(), + SpID: er.GetSpId(), + }) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return nil, fmt.Errorf("error inserting registered node: %v", err) + } + } + return vr, nil +} + +func (s *Server) isValidDeregisterNodeTx(tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) error { + sig := tx.GetSignature() + if sig == "" { + return fmt.Errorf("no signature provided for deregistration tx: %v", tx) + } + + vd := tx.GetValidatorDeregistration() + if vd == nil { + return fmt.Errorf("unknown tx fell into isValidDeregisterNodeTx: %v", tx) + } + + addr := vd.GetCometAddress() + + _, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), addr) + if err != nil { + return fmt.Errorf("not able to find registered node: %v", err) + } + + if len(vd.GetPubKey()) == 0 { + return fmt.Errorf("public Key missing from deregistration tx: %v", tx) + } + vdPubKey := ed25519.PubKey(vd.GetPubKey()) + if vdPubKey.Address().String() != addr { + return fmt.Errorf("address does not match public key: %s %s", vdPubKey.Address(), addr) + } + + for _, mb := range misbehavior { + validator := mb.GetValidator() + if addr == cometcrypto.Address(validator.GetAddress()).String() { + return nil + } + } + + return fmt.Errorf("no misbehavior found matching deregistration tx: %v", tx) +} + +func (s *Server) finalizeDeregisterNode(ctx context.Context, tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) (*core_proto.ValidatorDeregistration, error) { + if err := s.isValidDeregisterNodeTx(tx, misbehavior); err != nil { + return nil, fmt.Errorf("invalid deregister node tx: %v", err) + } + + vd := tx.GetValidatorDeregistration() + qtx := s.getDb() + err := qtx.DeleteRegisteredNode(ctx, vd.GetCometAddress()) + if err != nil { + return nil, fmt.Errorf("error deleting registered node: %v", err) + } + + return vd, nil +} + +func (s *Server) createDeregisterTransaction(address types.Address) ([]byte, error) { + node, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), address.String()) + if err != nil { + return []byte{}, fmt.Errorf("not able to find registered node with address '%s': %v", address.String(), err) + } + pubkeyEnc, err := base64.StdEncoding.DecodeString(node.CometPubKey) + if err != nil { + return []byte{}, fmt.Errorf("could not decode public key '%s' as base64 encoded string: %v", node.CometPubKey, err) + } + deregistrationTx := &core_proto.ValidatorDeregistration{ + PubKey: pubkeyEnc, + CometAddress: address.String(), + } + + txBytes, err := proto.Marshal(deregistrationTx) + if err != nil { + return []byte{}, fmt.Errorf("failure to marshal deregister tx: %v", err) + } + + sig, err := common.EthSign(s.config.EthereumKey, txBytes) + if err != nil { + return []byte{}, fmt.Errorf("could not sign deregister tx: %v", err) + } + + tx := core_proto.SignedTransaction{ + Signature: sig, + RequestId: uuid.NewString(), + Transaction: &core_proto.SignedTransaction_ValidatorDeregistration{ + ValidatorDeregistration: deregistrationTx, + }, + } + + signedTxBytes, err := proto.Marshal(&tx) + if err != nil { + return []byte{}, err + } + return signedTxBytes, nil +} diff --git a/pkg/core/server/registration_legacy.go b/pkg/core/server/registration_legacy.go new file mode 100644 index 00000000..b9723592 --- /dev/null +++ b/pkg/core/server/registration_legacy.go @@ -0,0 +1,138 @@ +package server + +import ( + "context" + "encoding/base64" + "errors" + "fmt" + "time" + + "github.com/AudiusProject/audiusd/pkg/core/common" + "github.com/AudiusProject/audiusd/pkg/core/db" + "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" + "github.com/cometbft/cometbft/crypto/ed25519" + "github.com/jackc/pgx/v5" + "google.golang.org/protobuf/proto" +) + +// checks if the register node tx is valid +// calls ethereum mainnet and validates signature to confirm node should be a validator +func (s *Server) isValidLegacyRegisterNodeTx(tx *core_proto.SignedTransaction) error { + sig := tx.GetSignature() + if sig == "" { + return fmt.Errorf("no signature provided for registration tx: %v", tx) + } + + vr := tx.GetValidatorRegistrationLegacy() + if vr == nil { + return fmt.Errorf("unknown tx fell into isValidLegacyRegisterNodeTx: %v", tx) + } + + info, err := s.getRegisteredNode(vr.GetEndpoint()) + if err != nil { + return fmt.Errorf("not able to find registered node: %v", err) + } + + // compare on chain info to requested comet data + onChainOwnerWallet := info.DelegateOwnerWallet.Hex() + onChainBlockNumber := info.BlockNumber.String() + onChainEndpoint := info.Endpoint + + if err := s.isDuplicateDelegateOwnerWallet(onChainOwnerWallet); err != nil { + return err + } + + data, err := proto.Marshal(vr) + if err != nil { + return fmt.Errorf("could not marshal registration tx: %v", err) + } + + _, address, err := common.EthRecover(tx.GetSignature(), data) + if err != nil { + return fmt.Errorf("could not recover msg sig: %v", err) + } + + vrOwnerWallet := address + vrEndpoint := vr.GetEndpoint() + vrEthBlock := vr.GetEthBlock() + vrCometAddress := vr.GetCometAddress() + vrPower := int(vr.GetPower()) + + if len(vr.GetPubKey()) == 0 { + return fmt.Errorf("public Key missing from %s registration tx", vrEndpoint) + } + vrPubKey := ed25519.PubKey(vr.GetPubKey()) + + if onChainOwnerWallet != vrOwnerWallet { + return fmt.Errorf("wallet %s tried to register %s as %s", vrOwnerWallet, onChainOwnerWallet, vr.Endpoint) + } + + if onChainBlockNumber != vrEthBlock { + return fmt.Errorf("block number mismatch: %s %s", onChainBlockNumber, vrEthBlock) + } + + if onChainEndpoint != vrEndpoint { + return fmt.Errorf("endpoints don't match: %s %s", onChainEndpoint, vrEndpoint) + } + + if vrPubKey.Address().String() != vrCometAddress { + return fmt.Errorf("address does not match public key: %s %s", vrPubKey.Address(), vrCometAddress) + } + + if vrPower != s.config.ValidatorVotingPower { + return fmt.Errorf("invalid voting power '%d'", vrPower) + } + + return nil +} + +// persists the register node request should it pass validation +func (s *Server) finalizeLegacyRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockTime time.Time) (*core_proto.ValidatorRegistrationLegacy, error) { + // TODO: remove logic after validator registration switches to attestations + oldBlock := time.Since(blockTime) >= week + if !oldBlock { + if err := s.isValidLegacyRegisterNodeTx(tx); err != nil { + return nil, fmt.Errorf("invalid register node tx: %v", err) + } + } + + qtx := s.getDb() + + vr := tx.GetValidatorRegistrationLegacy() + sig := tx.GetSignature() + txBytes, err := proto.Marshal(vr) + if err != nil { + return nil, fmt.Errorf("could not unmarshal tx bytes: %v", err) + } + + pubKey, address, err := common.EthRecover(sig, txBytes) + if err != nil { + return nil, fmt.Errorf("could not recover signer: %v", err) + } + + serializedPubKey, err := common.SerializePublicKey(pubKey) + if err != nil { + return nil, fmt.Errorf("could not serialize pubkey: %v", err) + } + + registerNode := tx.GetValidatorRegistrationLegacy() + + // Do not reinsert duplicate registrations + if _, err = qtx.GetRegisteredNodeByEthAddress(ctx, address); errors.Is(err, pgx.ErrNoRows) { + err = qtx.InsertRegisteredNode(ctx, db.InsertRegisteredNodeParams{ + PubKey: serializedPubKey, + EthAddress: address, + Endpoint: registerNode.GetEndpoint(), + CometAddress: registerNode.GetCometAddress(), + CometPubKey: base64.StdEncoding.EncodeToString(registerNode.GetPubKey()), + EthBlock: registerNode.GetEthBlock(), + NodeType: registerNode.GetNodeType(), + SpID: registerNode.GetSpId(), + }) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return nil, fmt.Errorf("error inserting registered node: %v", err) + } + } + + return vr, nil +} diff --git a/pkg/core/server/registry_bridge.go b/pkg/core/server/registry_bridge.go index 90c1dc97..23e11d18 100644 --- a/pkg/core/server/registry_bridge.go +++ b/pkg/core/server/registry_bridge.go @@ -3,7 +3,7 @@ package server import ( "context" - "encoding/base64" + "encoding/binary" "errors" "fmt" "math/big" @@ -11,20 +11,16 @@ import ( "github.com/AudiusProject/audiusd/pkg/core/common" "github.com/AudiusProject/audiusd/pkg/core/contracts" - "github.com/AudiusProject/audiusd/pkg/core/db" "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" "github.com/AudiusProject/audiusd/pkg/logger" - abcitypes "github.com/cometbft/cometbft/abci/types" - cometcrypto "github.com/cometbft/cometbft/crypto" - "github.com/cometbft/cometbft/crypto/ed25519" - "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" geth "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/google/uuid" "github.com/jackc/pgx/v5" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" ) func (s *Server) startRegistryBridge() error { @@ -122,12 +118,10 @@ func (s *Server) RegisterSelf() error { return fmt.Errorf("node %s is claiming to be %s but that endpoint is owned by %s", nodeAddress.Hex(), nodeEndpoint, info.DelegateOwnerWallet.Hex()) } - ethBlock := info.BlockNumber.String() - nodeRecord, err := s.db.GetNodeByEndpoint(ctx, nodeEndpoint) if errors.Is(err, pgx.ErrNoRows) { s.logger.Infof("node %s not found on comet but found on eth, registering", nodeEndpoint) - if err := s.registerSelfOnComet(ethBlock, spID.String()); err != nil { + if err := s.registerSelfOnComet(ctx, info.DelegateOwnerWallet, info.BlockNumber, spID.String()); err != nil { return fmt.Errorf("could not register on comet: %v", err) } return nil @@ -143,7 +137,7 @@ func (s *Server) isDevEnvironment() bool { return s.config.Environment == "dev" || s.config.Environment == "sandbox" } -func (s *Server) registerSelfOnComet(ethBlock, spID string) error { +func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet geth.Address, ethBlock *big.Int, spID string) error { if err := s.isDuplicateDelegateOwnerWallet(s.config.WalletAddress); err != nil { s.logger.Errorf("node is a duplicate, not registering on comet: %s", s.config.WalletAddress) return nil @@ -170,14 +164,40 @@ func (s *Server) registerSelfOnComet(ethBlock, spID string) error { return fmt.Errorf("invalid node type: %v", err) } + nodes, err := s.db.GetAllRegisteredNodes(ctx) + if err != nil { + return fmt.Errorf("Failed to get all registered nodes: %v", err) + } + keyBytes := make([]byte, 8) + binary.BigEndian.PutUint64(keyBytes, ethBlock.Uint64()) + rendezvous := getAttestorRendezvous(nodes, keyBytes, s.config.AttRegistrationRSize) + attestations := make([]string, 0, s.config.AttRegistrationRSize) + ethReg := &core_proto.EthRegistration{ + DelegateWallet: delegateOwnerWallet.Hex(), + Endpoint: s.config.NodeEndpoint, + NodeType: common.HexToUtf8(serviceType), + EthBlock: ethBlock.Int64(), + SpId: spID, + Timestamp: timestamppb.New(time.Now()), + } + req := &core_proto.RegistrationAttestationRequest{Registration: ethReg} + for addr, _ := range rendezvous { + if peer, ok := peers[addr]; ok { + resp, err := peer.GetRegistrationAttestation(ctx, req) + if err != nil { + s.logger.Error("Failed to get registration attestation from %s: %v", peer.OAPIEndpoint, err) + continue + } + attestations = append(attestations, resp.Signature) + } + } + registrationTx := &core_proto.ValidatorRegistration{ - Endpoint: s.config.NodeEndpoint, - CometAddress: s.config.ProposerAddress, - EthBlock: ethBlock, - NodeType: common.HexToUtf8(serviceType), - SpId: spID, - PubKey: s.config.CometKey.PubKey().Bytes(), - Power: int64(s.config.ValidatorVotingPower), + Attestations: attestations, + EthRegistration: ethReg, + CometAddress: s.config.ProposerAddress, + PubKey: s.config.CometKey.PubKey().Bytes(), + Power: int64(s.config.ValidatorVotingPower), } txBytes, err := proto.Marshal(registrationTx) @@ -198,11 +218,11 @@ func (s *Server) registerSelfOnComet(ethBlock, spID string) error { }, } - req := &core_proto.SendTransactionRequest{ + txreq := &core_proto.SendTransactionRequest{ Transaction: tx, } - txhash, err := s.SendTransaction(context.Background(), req) + txhash, err := s.SendTransaction(context.Background(), txreq) if err != nil { return fmt.Errorf("send register tx failed: %v", err) } @@ -212,45 +232,6 @@ func (s *Server) registerSelfOnComet(ethBlock, spID string) error { return nil } -func (s *Server) createDeregisterTransaction(address types.Address) ([]byte, error) { - node, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), address.String()) - if err != nil { - return []byte{}, fmt.Errorf("not able to find registered node with address '%s': %v", address.String(), err) - } - pubkeyEnc, err := base64.StdEncoding.DecodeString(node.CometPubKey) - if err != nil { - return []byte{}, fmt.Errorf("could not decode public key '%s' as base64 encoded string: %v", node.CometPubKey, err) - } - deregistrationTx := &core_proto.ValidatorDeregistration{ - PubKey: pubkeyEnc, - CometAddress: address.String(), - } - - txBytes, err := proto.Marshal(deregistrationTx) - if err != nil { - return []byte{}, fmt.Errorf("failure to marshal deregister tx: %v", err) - } - - sig, err := common.EthSign(s.config.EthereumKey, txBytes) - if err != nil { - return []byte{}, fmt.Errorf("could not sign deregister tx: %v", err) - } - - tx := core_proto.SignedTransaction{ - Signature: sig, - RequestId: uuid.NewString(), - Transaction: &core_proto.SignedTransaction_ValidatorDeregistration{ - ValidatorDeregistration: deregistrationTx, - }, - } - - signedTxBytes, err := proto.Marshal(&tx) - if err != nil { - return []byte{}, err - } - return signedTxBytes, nil -} - func (s *Server) awaitNodeCatchup(ctx context.Context) error { retries := 60 for tries := retries; tries >= 0; tries-- { @@ -382,113 +363,6 @@ func (s *Server) getRegisteredNode(endpoint string) (*contracts.Node, error) { return nil, fmt.Errorf("node not found: %s", endpoint) } -// checks if the register node tx is valid -// calls ethereum mainnet and validates signature to confirm node should be a validator -func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { - sig := tx.GetSignature() - if sig == "" { - return fmt.Errorf("no signature provided for registration tx: %v", tx) - } - - vr := tx.GetValidatorRegistration() - if vr == nil { - return fmt.Errorf("unknown tx fell into isValidRegisterNodeTx: %v", tx) - } - - info, err := s.getRegisteredNode(vr.GetEndpoint()) - if err != nil { - return fmt.Errorf("not able to find registered node: %v", err) - } - - // compare on chain info to requested comet data - onChainOwnerWallet := info.DelegateOwnerWallet.Hex() - onChainBlockNumber := info.BlockNumber.String() - onChainEndpoint := info.Endpoint - - if err := s.isDuplicateDelegateOwnerWallet(onChainOwnerWallet); err != nil { - return err - } - - data, err := proto.Marshal(vr) - if err != nil { - return fmt.Errorf("could not marshal registration tx: %v", err) - } - - _, address, err := common.EthRecover(tx.GetSignature(), data) - if err != nil { - return fmt.Errorf("could not recover msg sig: %v", err) - } - - vrOwnerWallet := address - vrEndpoint := vr.GetEndpoint() - vrEthBlock := vr.GetEthBlock() - vrCometAddress := vr.GetCometAddress() - vrPower := int(vr.GetPower()) - - if len(vr.GetPubKey()) == 0 { - return fmt.Errorf("public Key missing from %s registration tx", vrEndpoint) - } - vrPubKey := ed25519.PubKey(vr.GetPubKey()) - - if onChainOwnerWallet != vrOwnerWallet { - return fmt.Errorf("wallet %s tried to register %s as %s", vrOwnerWallet, onChainOwnerWallet, vr.Endpoint) - } - - if onChainBlockNumber != vrEthBlock { - return fmt.Errorf("block number mismatch: %s %s", onChainBlockNumber, vrEthBlock) - } - - if onChainEndpoint != vrEndpoint { - return fmt.Errorf("endpoints don't match: %s %s", onChainEndpoint, vrEndpoint) - } - - if vrPubKey.Address().String() != vrCometAddress { - return fmt.Errorf("address does not match public key: %s %s", vrPubKey.Address(), vrCometAddress) - } - - if vrPower != s.config.ValidatorVotingPower { - return fmt.Errorf("invalid voting power '%d'", vrPower) - } - - return nil -} - -func (s *Server) isValidDeregisterNodeTx(tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) error { - sig := tx.GetSignature() - if sig == "" { - return fmt.Errorf("no signature provided for deregistration tx: %v", tx) - } - - vd := tx.GetValidatorDeregistration() - if vd == nil { - return fmt.Errorf("unknown tx fell into isValidDeregisterNodeTx: %v", tx) - } - - addr := vd.GetCometAddress() - - _, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), addr) - if err != nil { - return fmt.Errorf("not able to find registered node: %v", err) - } - - if len(vd.GetPubKey()) == 0 { - return fmt.Errorf("public Key missing from deregistration tx: %v", tx) - } - vdPubKey := ed25519.PubKey(vd.GetPubKey()) - if vdPubKey.Address().String() != addr { - return fmt.Errorf("address does not match public key: %s %s", vdPubKey.Address(), addr) - } - - for _, mb := range misbehavior { - validator := mb.GetValidator() - if addr == cometcrypto.Address(validator.GetAddress()).String() { - return nil - } - } - - return fmt.Errorf("no misbehavior found matching deregistration tx: %v", tx) -} - func (s *Server) isDuplicateDelegateOwnerWallet(delegateOwnerWallet string) error { s.ethNodeMU.RLock() defer s.ethNodeMU.RUnlock() @@ -501,69 +375,3 @@ func (s *Server) isDuplicateDelegateOwnerWallet(delegateOwnerWallet string) erro return nil } - -// persists the register node request should it pass validation -func (s *Server) finalizeRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockTime time.Time) (*core_proto.ValidatorRegistration, error) { - // TODO: remove logic after validator registration switches to attestations - oldBlock := time.Since(blockTime) >= week - if !oldBlock { - if err := s.isValidRegisterNodeTx(tx); err != nil { - return nil, fmt.Errorf("invalid register node tx: %v", err) - } - } - - qtx := s.getDb() - - vr := tx.GetValidatorRegistration() - sig := tx.GetSignature() - txBytes, err := proto.Marshal(vr) - if err != nil { - return nil, fmt.Errorf("could not unmarshal tx bytes: %v", err) - } - - pubKey, address, err := common.EthRecover(sig, txBytes) - if err != nil { - return nil, fmt.Errorf("could not recover signer: %v", err) - } - - serializedPubKey, err := common.SerializePublicKey(pubKey) - if err != nil { - return nil, fmt.Errorf("could not serialize pubkey: %v", err) - } - - registerNode := tx.GetValidatorRegistration() - - // Do not reinsert duplicate registrations - if _, err = qtx.GetRegisteredNodeByEthAddress(ctx, address); errors.Is(err, pgx.ErrNoRows) { - err = qtx.InsertRegisteredNode(ctx, db.InsertRegisteredNodeParams{ - PubKey: serializedPubKey, - EthAddress: address, - Endpoint: registerNode.GetEndpoint(), - CometAddress: registerNode.GetCometAddress(), - CometPubKey: base64.StdEncoding.EncodeToString(registerNode.GetPubKey()), - EthBlock: registerNode.GetEthBlock(), - NodeType: registerNode.GetNodeType(), - SpID: registerNode.GetSpId(), - }) - if err != nil && !errors.Is(err, pgx.ErrNoRows) { - return nil, fmt.Errorf("error inserting registered node: %v", err) - } - } - - return vr, nil -} - -func (s *Server) finalizeDeregisterNode(ctx context.Context, tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) (*core_proto.ValidatorDeregistration, error) { - if err := s.isValidDeregisterNodeTx(tx, misbehavior); err != nil { - return nil, fmt.Errorf("invalid deregister node tx: %v", err) - } - - vd := tx.GetValidatorDeregistration() - qtx := s.getDb() - err := qtx.DeleteRegisteredNode(ctx, vd.GetCometAddress()) - if err != nil { - return nil, fmt.Errorf("error deleting registered node: %v", err) - } - - return vd, nil -} From 6ad5b1b4f12f9f82be55775a5deccae622fb1958 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Wed, 26 Feb 2025 14:05:42 -0800 Subject: [PATCH 02/11] bugfixes --- pkg/core/common/accounts_test.go | 5 +- pkg/core/common/converters.go | 18 + .../console/views/components/link_templ.go | 2 +- .../console/views/components/time_templ.go | 2 +- pkg/core/console/views/layout/base_templ.go | 2 +- .../console/views/layout/site_frame_templ.go | 2 +- .../views/pages/analytics_page_templ.go | 2 +- .../console/views/pages/block_page_templ.go | 2 +- .../console/views/pages/content_page_templ.go | 2 +- .../console/views/pages/error_page_templ.go | 2 +- .../console/views/pages/genesis_page_templ.go | 2 +- .../console/views/pages/node_page_templ.go | 2 +- .../console/views/pages/nodes_page_templ.go | 2 +- .../views/pages/overview_page_templ.go | 2 +- .../console/views/pages/pos_page_templ.go | 2 +- pkg/core/console/views/pages/tx_page_templ.go | 2 +- .../console/views/pages/uptime_page_templ.go | 2 +- pkg/core/gen/core_proto/protocol.pb.go | 357 +++++++++--------- pkg/core/gen/core_proto/protocol.swagger.json | 8 +- .../gen/models/protocol_eth_registration.go | 27 -- pkg/core/protocol/protocol.proto | 5 +- pkg/core/server/abci.go | 7 + pkg/core/server/eth.go | 2 +- pkg/core/server/grpc.go | 2 +- pkg/core/server/registration.go | 10 +- pkg/core/server/registry_bridge.go | 14 +- 26 files changed, 234 insertions(+), 251 deletions(-) diff --git a/pkg/core/common/accounts_test.go b/pkg/core/common/accounts_test.go index 0d8e3700..5845e0dd 100644 --- a/pkg/core/common/accounts_test.go +++ b/pkg/core/common/accounts_test.go @@ -18,8 +18,11 @@ func TestSignAndRecover(t *testing.T) { require.Nil(t, err) registerEvent := &core_proto.ValidatorRegistration{ - Endpoint: "http://road-to-uninode.audius.co", CometAddress: "12345", + Attestations: []string{"abc", "123"}, + EthRegistration: &core_proto.EthRegistration{ + DelegateWallet: "0xabcdef", + }, } eventBytes, err := proto.Marshal(registerEvent) diff --git a/pkg/core/common/converters.go b/pkg/core/common/converters.go index 635e6505..d889b1f2 100644 --- a/pkg/core/common/converters.go +++ b/pkg/core/common/converters.go @@ -46,6 +46,14 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro Signer: innerTx.ManageEntity.Signer, Nonce: fmt.Sprint(innerTx.ManageEntity.Nonce), } + case *core_proto.SignedTransaction_ValidatorRegistration: + oapiTx.ValidatorRegistration = &models.ProtocolValidatorRegistration{ + Attestations: innerTx.ValidatorRegistration.Attestations, + EthRegistration: EthRegistrationProtoIntoEthRegistrationOapi(innerTx.ValidatorRegistration.EthRegistration), + CometAddress: innerTx.ValidatorRegistration.CometAddress, + Power: fmt.Sprint(innerTx.ValidatorRegistration.Power), + PubKey: innerTx.ValidatorRegistration.PubKey, + } case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: oapiTx.ValidatorRegistrationLegacy = &models.ProtocolValidatorRegistrationLegacy{ CometAddress: innerTx.ValidatorRegistrationLegacy.CometAddress, @@ -78,3 +86,13 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro return oapiTx } + +func EthRegistrationProtoIntoEthRegistrationOapi(ethReg *core_proto.EthRegistration) *models.ProtocolEthRegistration { + return &models.ProtocolEthRegistration{ + DelegateWallet: ethReg.DelegateWallet, + Endpoint: ethReg.Endpoint, + NodeType: ethReg.NodeType, + EthBlock: fmt.Sprint(ethReg.EthBlock), + SpID: ethReg.SpId, + } +} diff --git a/pkg/core/console/views/components/link_templ.go b/pkg/core/console/views/components/link_templ.go index 7480cb68..ece6b789 100644 --- a/pkg/core/console/views/components/link_templ.go +++ b/pkg/core/console/views/components/link_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package components //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/components/time_templ.go b/pkg/core/console/views/components/time_templ.go index cba6f1c1..5f987c04 100644 --- a/pkg/core/console/views/components/time_templ.go +++ b/pkg/core/console/views/components/time_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package components //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/layout/base_templ.go b/pkg/core/console/views/layout/base_templ.go index 3e96725d..9791d5d4 100644 --- a/pkg/core/console/views/layout/base_templ.go +++ b/pkg/core/console/views/layout/base_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package layout //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/layout/site_frame_templ.go b/pkg/core/console/views/layout/site_frame_templ.go index 98b16977..18854bbe 100644 --- a/pkg/core/console/views/layout/site_frame_templ.go +++ b/pkg/core/console/views/layout/site_frame_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package layout //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/analytics_page_templ.go b/pkg/core/console/views/pages/analytics_page_templ.go index 308ac9a3..81c70d62 100644 --- a/pkg/core/console/views/pages/analytics_page_templ.go +++ b/pkg/core/console/views/pages/analytics_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/block_page_templ.go b/pkg/core/console/views/pages/block_page_templ.go index a6e550f6..0d44a899 100644 --- a/pkg/core/console/views/pages/block_page_templ.go +++ b/pkg/core/console/views/pages/block_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/content_page_templ.go b/pkg/core/console/views/pages/content_page_templ.go index cca6ad71..3458e8cc 100644 --- a/pkg/core/console/views/pages/content_page_templ.go +++ b/pkg/core/console/views/pages/content_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/error_page_templ.go b/pkg/core/console/views/pages/error_page_templ.go index ae5897b2..3a263271 100644 --- a/pkg/core/console/views/pages/error_page_templ.go +++ b/pkg/core/console/views/pages/error_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/genesis_page_templ.go b/pkg/core/console/views/pages/genesis_page_templ.go index 0f25c0f4..1fd6296f 100644 --- a/pkg/core/console/views/pages/genesis_page_templ.go +++ b/pkg/core/console/views/pages/genesis_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/node_page_templ.go b/pkg/core/console/views/pages/node_page_templ.go index dbb4a70e..703ed597 100644 --- a/pkg/core/console/views/pages/node_page_templ.go +++ b/pkg/core/console/views/pages/node_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/nodes_page_templ.go b/pkg/core/console/views/pages/nodes_page_templ.go index b7d1dc4b..246f9bdc 100644 --- a/pkg/core/console/views/pages/nodes_page_templ.go +++ b/pkg/core/console/views/pages/nodes_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/overview_page_templ.go b/pkg/core/console/views/pages/overview_page_templ.go index 74ff6390..f066ad36 100644 --- a/pkg/core/console/views/pages/overview_page_templ.go +++ b/pkg/core/console/views/pages/overview_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/pos_page_templ.go b/pkg/core/console/views/pages/pos_page_templ.go index 8f15ae3d..76cde69e 100644 --- a/pkg/core/console/views/pages/pos_page_templ.go +++ b/pkg/core/console/views/pages/pos_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/tx_page_templ.go b/pkg/core/console/views/pages/tx_page_templ.go index bafb33c7..67b7a109 100644 --- a/pkg/core/console/views/pages/tx_page_templ.go +++ b/pkg/core/console/views/pages/tx_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/console/views/pages/uptime_page_templ.go b/pkg/core/console/views/pages/uptime_page_templ.go index acee026a..28daeeb4 100644 --- a/pkg/core/console/views/pages/uptime_page_templ.go +++ b/pkg/core/console/views/pages/uptime_page_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.3.819 +// templ: version: v0.3.833 package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index 7c0ea146..2a6fe8ee 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -955,12 +955,11 @@ type EthRegistration struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` - Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` - EthBlock int64 `protobuf:"varint,4,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` - SpId string `protobuf:"bytes,5,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` + SpId string `protobuf:"bytes,4,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` + EthBlock int64 `protobuf:"varint,5,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` } func (x *EthRegistration) Reset() { @@ -1016,13 +1015,6 @@ func (x *EthRegistration) GetNodeType() string { return "" } -func (x *EthRegistration) GetEthBlock() int64 { - if x != nil { - return x.EthBlock - } - return 0 -} - func (x *EthRegistration) GetSpId() string { if x != nil { return x.SpId @@ -1030,11 +1022,11 @@ func (x *EthRegistration) GetSpId() string { return "" } -func (x *EthRegistration) GetTimestamp() *timestamppb.Timestamp { +func (x *EthRegistration) GetEthBlock() int64 { if x != nil { - return x.Timestamp + return x.EthBlock } - return nil + return 0 } type ValidatorDeregistration struct { @@ -1890,161 +1882,157 @@ var file_protocol_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x22, 0xdf, 0x01, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x22, 0xa5, 0x01, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x74, 0x68, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x57, 0x0a, 0x17, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, + 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, + 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, + 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, + 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0x57, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, - 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, - 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, - 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, - 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, - 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, - 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, - 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, - 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, - 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x1e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, - 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, - 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1f, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, - 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, - 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xd4, 0x06, 0x0a, - 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, + 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, + 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, + 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6e, + 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, + 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x22, 0x5f, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x32, 0xd4, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, + 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, - 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, - 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, 0x73, + 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, + 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2105,31 +2093,30 @@ var file_protocol_proto_depIdxs = []int32{ 4, // 13: protocol.BlockResponse.transaction_responses:type_name -> protocol.TransactionResponse 15, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay 13, // 15: protocol.ValidatorRegistration.eth_registration:type_name -> protocol.EthRegistration - 25, // 16: protocol.EthRegistration.timestamp:type_name -> google.protobuf.Timestamp - 25, // 17: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp - 25, // 18: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp - 19, // 19: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport - 13, // 20: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.EthRegistration - 13, // 21: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.EthRegistration - 1, // 22: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest - 2, // 23: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest - 3, // 24: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest - 6, // 25: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest - 8, // 26: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest - 16, // 27: protocol.Protocol.Ping:input_type -> protocol.PingRequest - 23, // 28: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest - 4, // 29: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse - 5, // 30: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse - 4, // 31: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse - 7, // 32: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse - 9, // 33: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse - 17, // 34: protocol.Protocol.Ping:output_type -> protocol.PingResponse - 24, // 35: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse - 29, // [29:36] is the sub-list for method output_type - 22, // [22:29] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 25, // 16: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp + 25, // 17: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp + 19, // 18: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport + 13, // 19: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.EthRegistration + 13, // 20: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.EthRegistration + 1, // 21: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest + 2, // 22: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest + 3, // 23: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest + 6, // 24: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest + 8, // 25: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest + 16, // 26: protocol.Protocol.Ping:input_type -> protocol.PingRequest + 23, // 27: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest + 4, // 28: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse + 5, // 29: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse + 4, // 30: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse + 7, // 31: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse + 9, // 32: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse + 17, // 33: protocol.Protocol.Ping:output_type -> protocol.PingResponse + 24, // 34: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse + 28, // [28:35] is the sub-list for method output_type + 21, // [21:28] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_protocol_proto_init() } diff --git a/pkg/core/gen/core_proto/protocol.swagger.json b/pkg/core/gen/core_proto/protocol.swagger.json index 3284c70e..272aeccd 100644 --- a/pkg/core/gen/core_proto/protocol.swagger.json +++ b/pkg/core/gen/core_proto/protocol.swagger.json @@ -287,16 +287,12 @@ "nodeType": { "type": "string" }, - "ethBlock": { - "type": "string", - "format": "int64" - }, "spId": { "type": "string" }, - "timestamp": { + "ethBlock": { "type": "string", - "format": "date-time" + "format": "int64" } } }, diff --git a/pkg/core/gen/models/protocol_eth_registration.go b/pkg/core/gen/models/protocol_eth_registration.go index 49c1a19c..0bbeaad0 100644 --- a/pkg/core/gen/models/protocol_eth_registration.go +++ b/pkg/core/gen/models/protocol_eth_registration.go @@ -8,10 +8,8 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // ProtocolEthRegistration protocol eth registration @@ -33,35 +31,10 @@ type ProtocolEthRegistration struct { // sp Id SpID string `json:"spId,omitempty"` - - // timestamp - // Format: date-time - Timestamp strfmt.DateTime `json:"timestamp,omitempty"` } // Validate validates this protocol eth registration func (m *ProtocolEthRegistration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimestamp(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtocolEthRegistration) validateTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.Timestamp) { // not required - return nil - } - - if err := validate.FormatOf("timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil { - return err - } - return nil } diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index 3884ffc9..2faa06c1 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -129,9 +129,8 @@ message EthRegistration { string delegate_wallet = 1; string endpoint = 2; string node_type = 3; - int64 eth_block = 4; - string sp_id = 5; - google.protobuf.Timestamp timestamp = 6; + string sp_id = 4; + int64 eth_block = 5; } message ValidatorDeregistration { diff --git a/pkg/core/server/abci.go b/pkg/core/server/abci.go index 048833e0..2fc9a2b5 100644 --- a/pkg/core/server/abci.go +++ b/pkg/core/server/abci.go @@ -455,6 +455,11 @@ func (s *Server) validateBlockTx(ctx context.Context, blockTime time.Time, block switch signedTx.Transaction.(type) { case *core_proto.SignedTransaction_Plays: case *core_proto.SignedTransaction_ValidatorRegistration: + if err := s.isValidRegisterNodeTx(signedTx); err != nil { + s.logger.Error("Invalid block: invalid register node tx", "error", err) + return false, nil + } + case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: if err := s.isValidLegacyRegisterNodeTx(signedTx); err != nil { s.logger.Error("Invalid block: invalid register node tx", "error", err) return false, nil @@ -495,6 +500,8 @@ func (s *Server) finalizeTransaction(ctx context.Context, req *abcitypes.Finaliz return s.finalizeManageEntity(ctx, msg) case *core_proto.SignedTransaction_ValidatorRegistration: return s.finalizeRegisterNode(ctx, msg, req.Time) + case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: + return s.finalizeLegacyRegisterNode(ctx, msg, req.Time) case *core_proto.SignedTransaction_ValidatorDeregistration: return s.finalizeDeregisterNode(ctx, msg, misbehavior) case *core_proto.SignedTransaction_SlaRollup: diff --git a/pkg/core/server/eth.go b/pkg/core/server/eth.go index 34421b00..df32db78 100644 --- a/pkg/core/server/eth.go +++ b/pkg/core/server/eth.go @@ -104,7 +104,7 @@ func (s *Server) isNodeRegisteredOnEthereum(delegateWallet common.Address, endpo s.ethNodeMU.RLock() defer s.ethNodeMU.RUnlock() for _, node := range s.ethNodes { - if bytes.EqualFold(delegateWallet.Bytes(), node.DelegateOwnerWallet.Bytes()) { + if !bytes.EqualFold(delegateWallet.Bytes(), node.DelegateOwnerWallet.Bytes()) { continue } if endpoint != node.Endpoint { diff --git a/pkg/core/server/grpc.go b/pkg/core/server/grpc.go index 3a65d6fc..d28c9806 100644 --- a/pkg/core/server/grpc.go +++ b/pkg/core/server/grpc.go @@ -307,7 +307,7 @@ func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto ethcommon.HexToAddress(ethReg.DelegateWallet), ethReg.Endpoint, big.NewInt(ethReg.EthBlock), - ) || time.Since(ethReg.Timestamp.AsTime()) > 48*time.Hour || ethReg.Timestamp.AsTime().After(time.Now()) { + ) { s.logger.Error( "Could not attest to node eth registration", "delegate", diff --git a/pkg/core/server/registration.go b/pkg/core/server/registration.go index 85f990a7..29786dde 100644 --- a/pkg/core/server/registration.go +++ b/pkg/core/server/registration.go @@ -68,16 +68,16 @@ func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { return fmt.Errorf("address '%s' is already registered on comet, node %s attempted to acquire it", vr.GetCometAddress(), er.GetEndpoint()) } - atts := vr.GetAttestations() - if atts == nil { - return fmt.Errorf("No attestations provided to RegisterNode tx: %v", tx) - } - nodes, err := s.db.GetAllRegisteredNodes(context.Background()) if err != nil { return fmt.Errorf("Failed to get core validators while validating registration: %v", err) } + atts := vr.GetAttestations() + if atts == nil { + atts = make([]string, 0) // empty attestations are expected at genesis + } + requiredAttestations := min(len(nodes), s.config.AttRegistrationMin) keyBytes := make([]byte, 8) binary.BigEndian.PutUint64(keyBytes, uint64(er.GetEthBlock())) diff --git a/pkg/core/server/registry_bridge.go b/pkg/core/server/registry_bridge.go index 23e11d18..f4608032 100644 --- a/pkg/core/server/registry_bridge.go +++ b/pkg/core/server/registry_bridge.go @@ -11,6 +11,7 @@ import ( "github.com/AudiusProject/audiusd/pkg/core/common" "github.com/AudiusProject/audiusd/pkg/core/contracts" + "github.com/AudiusProject/audiusd/pkg/core/gen/core_openapi/protocol" "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" "github.com/AudiusProject/audiusd/pkg/logger" @@ -20,7 +21,6 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5" "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" ) func (s *Server) startRegistryBridge() error { @@ -166,7 +166,7 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge nodes, err := s.db.GetAllRegisteredNodes(ctx) if err != nil { - return fmt.Errorf("Failed to get all registered nodes: %v", err) + return fmt.Errorf("failed to get all registered nodes: %v", err) } keyBytes := make([]byte, 8) binary.BigEndian.PutUint64(keyBytes, ethBlock.Uint64()) @@ -178,17 +178,17 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge NodeType: common.HexToUtf8(serviceType), EthBlock: ethBlock.Int64(), SpId: spID, - Timestamp: timestamppb.New(time.Now()), } - req := &core_proto.RegistrationAttestationRequest{Registration: ethReg} + params := protocol.NewProtocolGetRegistrationAttestationParams() + params.SetRegistration(common.EthRegistrationProtoIntoEthRegistrationOapi(ethReg)) for addr, _ := range rendezvous { if peer, ok := peers[addr]; ok { - resp, err := peer.GetRegistrationAttestation(ctx, req) + resp, err := peer.ProtocolGetRegistrationAttestation(params) if err != nil { - s.logger.Error("Failed to get registration attestation from %s: %v", peer.OAPIEndpoint, err) + s.logger.Error("failed to get registration attestation from %s: %v", peer.OAPIEndpoint, err) continue } - attestations = append(attestations, resp.Signature) + attestations = append(attestations, resp.Payload.Signature) } } From c4776901b0ca13ec492015e060d771099e6332c3 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Thu, 27 Feb 2025 16:58:22 -0800 Subject: [PATCH 03/11] Block height validation --- pkg/core/common/converters.go | 32 +- .../attestations.go => common/rendezvous.go} | 16 +- pkg/core/config/config.go | 8 +- pkg/core/db/reads.sql.go | 25 + pkg/core/db/sql/reads.sql | 4 + .../core_openapi/protocol/protocol_client.go | 39 + .../protocol_get_height_parameters.go | 128 +++ .../protocol/protocol_get_height_responses.go | 187 +++++ pkg/core/gen/core_proto/protocol.pb.go | 781 ++++++++++-------- pkg/core/gen/core_proto/protocol.pb.gw.go | 69 ++ pkg/core/gen/core_proto/protocol.swagger.json | 39 +- pkg/core/gen/core_proto/protocol_grpc.pb.go | 37 + .../gen/models/protocol_eth_registration.go | 3 + .../gen/models/protocol_height_response.go | 50 ++ .../gen/models/protocol_signed_transaction.go | 34 +- pkg/core/protocol/protocol.proto | 14 +- pkg/core/server/abci.go | 14 +- pkg/core/server/grpc.go | 10 + pkg/core/server/registration.go | 35 +- pkg/core/server/registration_legacy.go | 84 +- pkg/core/server/registry_bridge.go | 30 +- 21 files changed, 1168 insertions(+), 471 deletions(-) rename pkg/core/{server/attestations.go => common/rendezvous.go} (67%) create mode 100644 pkg/core/gen/core_openapi/protocol/protocol_get_height_parameters.go create mode 100644 pkg/core/gen/core_openapi/protocol/protocol_get_height_responses.go create mode 100644 pkg/core/gen/models/protocol_height_response.go diff --git a/pkg/core/common/converters.go b/pkg/core/common/converters.go index d889b1f2..a1c6aff1 100644 --- a/pkg/core/common/converters.go +++ b/pkg/core/common/converters.go @@ -46,23 +46,23 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro Signer: innerTx.ManageEntity.Signer, Nonce: fmt.Sprint(innerTx.ManageEntity.Nonce), } - case *core_proto.SignedTransaction_ValidatorRegistration: - oapiTx.ValidatorRegistration = &models.ProtocolValidatorRegistration{ - Attestations: innerTx.ValidatorRegistration.Attestations, - EthRegistration: EthRegistrationProtoIntoEthRegistrationOapi(innerTx.ValidatorRegistration.EthRegistration), - CometAddress: innerTx.ValidatorRegistration.CometAddress, - Power: fmt.Sprint(innerTx.ValidatorRegistration.Power), - PubKey: innerTx.ValidatorRegistration.PubKey, + case *core_proto.SignedTransaction_ValidatorRegistrationV2: + oapiTx.ValidatorRegistrationV2 = &models.ProtocolValidatorRegistration{ + Attestations: innerTx.ValidatorRegistrationV2.Attestations, + EthRegistration: EthRegistrationProtoIntoEthRegistrationOapi(innerTx.ValidatorRegistrationV2.EthRegistration), + CometAddress: innerTx.ValidatorRegistrationV2.CometAddress, + Power: fmt.Sprint(innerTx.ValidatorRegistrationV2.Power), + PubKey: innerTx.ValidatorRegistrationV2.PubKey, } - case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: - oapiTx.ValidatorRegistrationLegacy = &models.ProtocolValidatorRegistrationLegacy{ - CometAddress: innerTx.ValidatorRegistrationLegacy.CometAddress, - Endpoint: innerTx.ValidatorRegistrationLegacy.Endpoint, - EthBlock: innerTx.ValidatorRegistrationLegacy.EthBlock, - NodeType: innerTx.ValidatorRegistrationLegacy.NodeType, - SpID: innerTx.ValidatorRegistrationLegacy.SpId, - Power: fmt.Sprint(innerTx.ValidatorRegistrationLegacy.Power), - PubKey: innerTx.ValidatorRegistrationLegacy.PubKey, + case *core_proto.SignedTransaction_ValidatorRegistration: + oapiTx.ValidatorRegistration = &models.ProtocolValidatorRegistrationLegacy{ + CometAddress: innerTx.ValidatorRegistration.CometAddress, + Endpoint: innerTx.ValidatorRegistration.Endpoint, + EthBlock: innerTx.ValidatorRegistration.EthBlock, + NodeType: innerTx.ValidatorRegistration.NodeType, + SpID: innerTx.ValidatorRegistration.SpId, + Power: fmt.Sprint(innerTx.ValidatorRegistration.Power), + PubKey: innerTx.ValidatorRegistration.PubKey, } case *core_proto.SignedTransaction_ValidatorDeregistration: oapiTx.ValidatorDeregistration = &models.ProtocolValidatorDeregistration{ diff --git a/pkg/core/server/attestations.go b/pkg/core/common/rendezvous.go similarity index 67% rename from pkg/core/server/attestations.go rename to pkg/core/common/rendezvous.go index d16aa7b2..abb0312a 100644 --- a/pkg/core/server/attestations.go +++ b/pkg/core/common/rendezvous.go @@ -1,12 +1,10 @@ -package server +package common import ( "bytes" "crypto/sha256" "io" "sort" - - "github.com/AudiusProject/audiusd/pkg/core/db" ) type NodeTuple struct { @@ -28,18 +26,18 @@ func (s NodeTuples) Less(i, j int) bool { // Returns the first `size` number of addresses from a list of all validators sorted // by a hashing function. The hashing is seeded according to the given key. -func getAttestorRendezvous(nodes []db.CoreValidator, key []byte, size int) map[string]bool { - tuples := make(NodeTuples, len(nodes)) +func GetAttestorRendezvous(validatorAddresses []string, key []byte, size int) map[string]bool { + tuples := make(NodeTuples, len(validatorAddresses)) hasher := sha256.New() - for i, node := range nodes { + for i, addr := range validatorAddresses { hasher.Reset() - io.WriteString(hasher, node.EthAddress) + io.WriteString(hasher, addr) hasher.Write(key) - tuples[i] = NodeTuple{node.EthAddress, hasher.Sum(nil)} + tuples[i] = NodeTuple{addr, hasher.Sum(nil)} } sort.Sort(tuples) - result := make(map[string]bool, len(nodes)) + result := make(map[string]bool, len(validatorAddresses)) bound := min(len(tuples), size) for i, tup := range tuples { if i >= bound { diff --git a/pkg/core/config/config.go b/pkg/core/config/config.go index 8c1ff9ea..04143dd4 100644 --- a/pkg/core/config/config.go +++ b/pkg/core/config/config.go @@ -118,8 +118,9 @@ type Config struct { PprofModule bool /* Attestation Thresholds */ - AttRegistrationMin int // minimum number of attestations needed to register a new node - AttRegistrationRSize int // rendezvous size for registration attestations (should be >= to AttRegistrationMin) + AttRegistrationMin int // minimum number of attestations needed to register a new node + AttRegistrationRSize int // rendezvous size for registration attestations (should be >= to AttRegistrationMin) + LegacyRegistrationCutoff int64 // Blocks after this height cannot register using the legacy tx (remove after next chain rollover) /* Feature Flags */ EnablePoS bool @@ -203,6 +204,7 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.SlaRollupInterval = mainnetRollupInterval cfg.ValidatorVotingPower = mainnetValidatorVotingPower cfg.EnablePoS = true + cfg.LegacyRegistrationCutoff = 1820000 // delete after chain rollover case "stage", "staging", "testnet": cfg.PersistentPeers = GetEnvWithDefault("persistentPeers", moduloPersistentPeers(ethAddress, StagePersistentPeers, 3)) @@ -213,6 +215,7 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.SlaRollupInterval = testnetRollupInterval cfg.ValidatorVotingPower = testnetValidatorVotingPower cfg.EnablePoS = true + cfg.LegacyRegistrationCutoff = 3900000 // delete after chain rollover case "dev", "development", "devnet", "local", "sandbox": cfg.PersistentPeers = GetEnvWithDefault("persistentPeers", DevPersistentPeers) @@ -227,6 +230,7 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.SlaRollupInterval = devnetRollupInterval cfg.ValidatorVotingPower = devnetValidatorVotingPower cfg.EnablePoS = true + cfg.LegacyRegistrationCutoff = 0 } // Disable ssl for local postgres db connection diff --git a/pkg/core/db/reads.sql.go b/pkg/core/db/reads.sql.go index 6998d800..723ed8c0 100644 --- a/pkg/core/db/reads.sql.go +++ b/pkg/core/db/reads.sql.go @@ -11,6 +11,31 @@ import ( "github.com/jackc/pgx/v5/pgtype" ) +const getAllEthAddressesOfRegisteredNodes = `-- name: GetAllEthAddressesOfRegisteredNodes :many +select eth_address +from core_validators +` + +func (q *Queries) GetAllEthAddressesOfRegisteredNodes(ctx context.Context) ([]string, error) { + rows, err := q.db.Query(ctx, getAllEthAddressesOfRegisteredNodes) + if err != nil { + return nil, err + } + defer rows.Close() + var items []string + for rows.Next() { + var eth_address string + if err := rows.Scan(ð_address); err != nil { + return nil, err + } + items = append(items, eth_address) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const getAllRegisteredNodes = `-- name: GetAllRegisteredNodes :many select rowid, pub_key, endpoint, eth_address, comet_address, eth_block, node_type, sp_id, comet_pub_key from core_validators diff --git a/pkg/core/db/sql/reads.sql b/pkg/core/db/sql/reads.sql index e94cca7d..fb34a19a 100644 --- a/pkg/core/db/sql/reads.sql +++ b/pkg/core/db/sql/reads.sql @@ -25,6 +25,10 @@ select * from core_validators order by comet_address; +-- name: GetAllEthAddressesOfRegisteredNodes :many +select eth_address +from core_validators; + -- name: GetNodeByEndpoint :one select * from core_validators diff --git a/pkg/core/gen/core_openapi/protocol/protocol_client.go b/pkg/core/gen/core_openapi/protocol/protocol_client.go index e005fd5e..9e5ec3c0 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_client.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_client.go @@ -58,6 +58,8 @@ type ClientService interface { ProtocolGetBlock(params *ProtocolGetBlockParams, opts ...ClientOption) (*ProtocolGetBlockOK, error) + ProtocolGetHeight(params *ProtocolGetHeightParams, opts ...ClientOption) (*ProtocolGetHeightOK, error) + ProtocolGetNodeInfo(params *ProtocolGetNodeInfoParams, opts ...ClientOption) (*ProtocolGetNodeInfoOK, error) ProtocolGetRegistrationAttestation(params *ProtocolGetRegistrationAttestationParams, opts ...ClientOption) (*ProtocolGetRegistrationAttestationOK, error) @@ -145,6 +147,43 @@ func (a *Client) ProtocolGetBlock(params *ProtocolGetBlockParams, opts ...Client return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ProtocolGetHeight protocol get height API +*/ +func (a *Client) ProtocolGetHeight(params *ProtocolGetHeightParams, opts ...ClientOption) (*ProtocolGetHeightOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProtocolGetHeightParams() + } + op := &runtime.ClientOperation{ + ID: "Protocol_GetHeight", + Method: "GET", + PathPattern: "/core/grpc/height", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ProtocolGetHeightReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProtocolGetHeightOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ProtocolGetHeightDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ProtocolGetNodeInfo protocol get node info API */ diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_height_parameters.go b/pkg/core/gen/core_openapi/protocol/protocol_get_height_parameters.go new file mode 100644 index 00000000..0f42dc65 --- /dev/null +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_height_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package protocol + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewProtocolGetHeightParams creates a new ProtocolGetHeightParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProtocolGetHeightParams() *ProtocolGetHeightParams { + return &ProtocolGetHeightParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProtocolGetHeightParamsWithTimeout creates a new ProtocolGetHeightParams object +// with the ability to set a timeout on a request. +func NewProtocolGetHeightParamsWithTimeout(timeout time.Duration) *ProtocolGetHeightParams { + return &ProtocolGetHeightParams{ + timeout: timeout, + } +} + +// NewProtocolGetHeightParamsWithContext creates a new ProtocolGetHeightParams object +// with the ability to set a context for a request. +func NewProtocolGetHeightParamsWithContext(ctx context.Context) *ProtocolGetHeightParams { + return &ProtocolGetHeightParams{ + Context: ctx, + } +} + +// NewProtocolGetHeightParamsWithHTTPClient creates a new ProtocolGetHeightParams object +// with the ability to set a custom HTTPClient for a request. +func NewProtocolGetHeightParamsWithHTTPClient(client *http.Client) *ProtocolGetHeightParams { + return &ProtocolGetHeightParams{ + HTTPClient: client, + } +} + +/* +ProtocolGetHeightParams contains all the parameters to send to the API endpoint + + for the protocol get height operation. + + Typically these are written to a http.Request. +*/ +type ProtocolGetHeightParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the protocol get height params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProtocolGetHeightParams) WithDefaults() *ProtocolGetHeightParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the protocol get height params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProtocolGetHeightParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the protocol get height params +func (o *ProtocolGetHeightParams) WithTimeout(timeout time.Duration) *ProtocolGetHeightParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the protocol get height params +func (o *ProtocolGetHeightParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the protocol get height params +func (o *ProtocolGetHeightParams) WithContext(ctx context.Context) *ProtocolGetHeightParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the protocol get height params +func (o *ProtocolGetHeightParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the protocol get height params +func (o *ProtocolGetHeightParams) WithHTTPClient(client *http.Client) *ProtocolGetHeightParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the protocol get height params +func (o *ProtocolGetHeightParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ProtocolGetHeightParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_height_responses.go b/pkg/core/gen/core_openapi/protocol/protocol_get_height_responses.go new file mode 100644 index 00000000..458c8b50 --- /dev/null +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_height_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package protocol + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/AudiusProject/audiusd/pkg/core/gen/models" +) + +// ProtocolGetHeightReader is a Reader for the ProtocolGetHeight structure. +type ProtocolGetHeightReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProtocolGetHeightReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProtocolGetHeightOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewProtocolGetHeightDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewProtocolGetHeightOK creates a ProtocolGetHeightOK with default headers values +func NewProtocolGetHeightOK() *ProtocolGetHeightOK { + return &ProtocolGetHeightOK{} +} + +/* +ProtocolGetHeightOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ProtocolGetHeightOK struct { + Payload *models.ProtocolHeightResponse +} + +// IsSuccess returns true when this protocol get height o k response has a 2xx status code +func (o *ProtocolGetHeightOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this protocol get height o k response has a 3xx status code +func (o *ProtocolGetHeightOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this protocol get height o k response has a 4xx status code +func (o *ProtocolGetHeightOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this protocol get height o k response has a 5xx status code +func (o *ProtocolGetHeightOK) IsServerError() bool { + return false +} + +// IsCode returns true when this protocol get height o k response a status code equal to that given +func (o *ProtocolGetHeightOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the protocol get height o k response +func (o *ProtocolGetHeightOK) Code() int { + return 200 +} + +func (o *ProtocolGetHeightOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /core/grpc/height][%d] protocolGetHeightOK %s", 200, payload) +} + +func (o *ProtocolGetHeightOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /core/grpc/height][%d] protocolGetHeightOK %s", 200, payload) +} + +func (o *ProtocolGetHeightOK) GetPayload() *models.ProtocolHeightResponse { + return o.Payload +} + +func (o *ProtocolGetHeightOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ProtocolHeightResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProtocolGetHeightDefault creates a ProtocolGetHeightDefault with default headers values +func NewProtocolGetHeightDefault(code int) *ProtocolGetHeightDefault { + return &ProtocolGetHeightDefault{ + _statusCode: code, + } +} + +/* +ProtocolGetHeightDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ProtocolGetHeightDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this protocol get height default response has a 2xx status code +func (o *ProtocolGetHeightDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this protocol get height default response has a 3xx status code +func (o *ProtocolGetHeightDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this protocol get height default response has a 4xx status code +func (o *ProtocolGetHeightDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this protocol get height default response has a 5xx status code +func (o *ProtocolGetHeightDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this protocol get height default response a status code equal to that given +func (o *ProtocolGetHeightDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the protocol get height default response +func (o *ProtocolGetHeightDefault) Code() int { + return o._statusCode +} + +func (o *ProtocolGetHeightDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /core/grpc/height][%d] Protocol_GetHeight default %s", o._statusCode, payload) +} + +func (o *ProtocolGetHeightDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /core/grpc/height][%d] Protocol_GetHeight default %s", o._statusCode, payload) +} + +func (o *ProtocolGetHeightDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ProtocolGetHeightDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index 2a6fe8ee..f6d758ae 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -32,13 +32,13 @@ type SignedTransaction struct { // Types that are assignable to Transaction: // // *SignedTransaction_Plays - // *SignedTransaction_ValidatorRegistrationLegacy + // *SignedTransaction_ValidatorRegistration // *SignedTransaction_SlaRollup // *SignedTransaction_ManageEntity // *SignedTransaction_ValidatorDeregistration // *SignedTransaction_StorageProof // *SignedTransaction_StorageProofVerification - // *SignedTransaction_ValidatorRegistration + // *SignedTransaction_ValidatorRegistrationV2 Transaction isSignedTransaction_Transaction `protobuf_oneof:"transaction"` } @@ -102,9 +102,9 @@ func (x *SignedTransaction) GetPlays() *TrackPlays { return nil } -func (x *SignedTransaction) GetValidatorRegistrationLegacy() *ValidatorRegistrationLegacy { - if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistrationLegacy); ok { - return x.ValidatorRegistrationLegacy +func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistrationLegacy { + if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistration); ok { + return x.ValidatorRegistration } return nil } @@ -144,9 +144,9 @@ func (x *SignedTransaction) GetStorageProofVerification() *StorageProofVerificat return nil } -func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistration { - if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistration); ok { - return x.ValidatorRegistration +func (x *SignedTransaction) GetValidatorRegistrationV2() *ValidatorRegistration { + if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistrationV2); ok { + return x.ValidatorRegistrationV2 } return nil } @@ -159,8 +159,8 @@ type SignedTransaction_Plays struct { Plays *TrackPlays `protobuf:"bytes,1000,opt,name=plays,proto3,oneof"` } -type SignedTransaction_ValidatorRegistrationLegacy struct { - ValidatorRegistrationLegacy *ValidatorRegistrationLegacy `protobuf:"bytes,1001,opt,name=validator_registration_legacy,json=validatorRegistrationLegacy,proto3,oneof"` +type SignedTransaction_ValidatorRegistration struct { + ValidatorRegistration *ValidatorRegistrationLegacy `protobuf:"bytes,1001,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` } type SignedTransaction_SlaRollup struct { @@ -183,13 +183,13 @@ type SignedTransaction_StorageProofVerification struct { StorageProofVerification *StorageProofVerification `protobuf:"bytes,1006,opt,name=storage_proof_verification,json=storageProofVerification,proto3,oneof"` } -type SignedTransaction_ValidatorRegistration struct { - ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1007,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` +type SignedTransaction_ValidatorRegistrationV2 struct { + ValidatorRegistrationV2 *ValidatorRegistration `protobuf:"bytes,1007,opt,name=validator_registration_v2,json=validatorRegistrationV2,proto3,oneof"` } func (*SignedTransaction_Plays) isSignedTransaction_Transaction() {} -func (*SignedTransaction_ValidatorRegistrationLegacy) isSignedTransaction_Transaction() {} +func (*SignedTransaction_ValidatorRegistration) isSignedTransaction_Transaction() {} func (*SignedTransaction_SlaRollup) isSignedTransaction_Transaction() {} @@ -201,7 +201,7 @@ func (*SignedTransaction_StorageProof) isSignedTransaction_Transaction() {} func (*SignedTransaction_StorageProofVerification) isSignedTransaction_Transaction() {} -func (*SignedTransaction_ValidatorRegistration) isSignedTransaction_Transaction() {} +func (*SignedTransaction_ValidatorRegistrationV2) isSignedTransaction_Transaction() {} type SendTransactionRequest struct { state protoimpl.MessageState @@ -955,11 +955,12 @@ type EthRegistration struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` - Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` - SpId string `protobuf:"bytes,4,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` - EthBlock int64 `protobuf:"varint,5,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` + DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` + SpId string `protobuf:"bytes,4,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` + EthBlock int64 `protobuf:"varint,5,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` + ReferenceHeight int64 `protobuf:"varint,6,opt,name=reference_height,json=referenceHeight,proto3" json:"reference_height,omitempty"` } func (x *EthRegistration) Reset() { @@ -1029,6 +1030,13 @@ func (x *EthRegistration) GetEthBlock() int64 { return 0 } +func (x *EthRegistration) GetReferenceHeight() int64 { + if x != nil { + return x.ReferenceHeight + } + return 0 +} + type ValidatorDeregistration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1729,6 +1737,91 @@ func (x *RegistrationAttestationResponse) GetRegistration() *EthRegistration { return nil } +type GetHeightRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetHeightRequest) Reset() { + *x = GetHeightRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHeightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHeightRequest) ProtoMessage() {} + +func (x *GetHeightRequest) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHeightRequest.ProtoReflect.Descriptor instead. +func (*GetHeightRequest) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{25} +} + +type HeightResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *HeightResponse) Reset() { + *x = HeightResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeightResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeightResponse) ProtoMessage() {} + +func (x *HeightResponse) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeightResponse.ProtoReflect.Descriptor instead. +func (*HeightResponse) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{26} +} + +func (x *HeightResponse) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + var File_protocol_proto protoreflect.FileDescriptor var file_protocol_proto_rawDesc = []byte{ @@ -1737,7 +1830,7 @@ var file_protocol_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x05, 0x0a, 0x11, 0x53, 0x69, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x05, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, @@ -1745,294 +1838,306 @@ var file_protocol_proto_rawDesc = []byte{ 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, - 0x79, 0x73, 0x48, 0x00, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x6c, 0x0a, 0x1d, 0x76, + 0x79, 0x73, 0x48, 0x00, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x18, 0xe9, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0a, + 0x73, 0x6c, 0x61, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, + 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x52, 0x6f, 0x6c, + 0x6c, 0x75, 0x70, 0x12, 0x44, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0xed, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x63, 0x0a, 0x1a, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x5e, 0x0a, 0x19, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x18, 0xef, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x1b, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x6c, 0x61, - 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, - 0x6c, 0x75, 0x70, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, - 0x12, 0x44, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x63, 0x0a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x16, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xef, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x46, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb1, - 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, - 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, - 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, - 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x42, + 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, + 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, + 0x73, 0x68, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, + 0x73, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, + 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x73, - 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x1b, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, - 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, - 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0xd5, 0x01, 0x0a, 0x15, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, - 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x65, - 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, - 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, + 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, + 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, + 0x61, 0x79, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, + 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, + 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x22, 0xa5, 0x01, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x57, 0x0a, 0x17, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, - 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, - 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, - 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, - 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, - 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, - 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, - 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, - 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, - 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, - 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6e, - 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, - 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, - 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x22, 0x5f, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0xd4, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, - 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x22, 0xd5, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x44, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0xd0, 0x01, 0x0a, 0x0f, 0x45, + 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, + 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x57, 0x0a, + 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, + 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0xb6, 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x63, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x32, 0xb2, 0x07, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, + 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, 0x73, - 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, - 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, + 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x5c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, + 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x12, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, 0x50, + 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2047,7 +2152,7 @@ func file_protocol_proto_rawDescGZIP() []byte { return file_protocol_proto_rawDescData } -var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_protocol_proto_goTypes = []interface{}{ (*SignedTransaction)(nil), // 0: protocol.SignedTransaction (*SendTransactionRequest)(nil), // 1: protocol.SendTransactionRequest @@ -2074,27 +2179,29 @@ var file_protocol_proto_goTypes = []interface{}{ (*ManageEntityLegacy)(nil), // 22: protocol.ManageEntityLegacy (*RegistrationAttestationRequest)(nil), // 23: protocol.RegistrationAttestationRequest (*RegistrationAttestationResponse)(nil), // 24: protocol.RegistrationAttestationResponse - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*GetHeightRequest)(nil), // 25: protocol.GetHeightRequest + (*HeightResponse)(nil), // 26: protocol.HeightResponse + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp } var file_protocol_proto_depIdxs = []int32{ 10, // 0: protocol.SignedTransaction.plays:type_name -> protocol.TrackPlays - 11, // 1: protocol.SignedTransaction.validator_registration_legacy:type_name -> protocol.ValidatorRegistrationLegacy + 11, // 1: protocol.SignedTransaction.validator_registration:type_name -> protocol.ValidatorRegistrationLegacy 18, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup 22, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy 14, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorDeregistration 20, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof 21, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification - 12, // 7: protocol.SignedTransaction.validator_registration:type_name -> protocol.ValidatorRegistration + 12, // 7: protocol.SignedTransaction.validator_registration_v2:type_name -> protocol.ValidatorRegistration 0, // 8: protocol.SendTransactionRequest.transaction:type_name -> protocol.SignedTransaction 0, // 9: protocol.ForwardTransactionRequest.transaction:type_name -> protocol.SignedTransaction 0, // 10: protocol.TransactionResponse.transaction:type_name -> protocol.SignedTransaction 0, // 11: protocol.BlockResponse.transactions:type_name -> protocol.SignedTransaction - 25, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 27, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp 4, // 13: protocol.BlockResponse.transaction_responses:type_name -> protocol.TransactionResponse 15, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay 13, // 15: protocol.ValidatorRegistration.eth_registration:type_name -> protocol.EthRegistration - 25, // 16: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp - 25, // 17: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp + 27, // 16: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp + 27, // 17: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp 19, // 18: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport 13, // 19: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.EthRegistration 13, // 20: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.EthRegistration @@ -2102,18 +2209,20 @@ var file_protocol_proto_depIdxs = []int32{ 2, // 22: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest 3, // 23: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest 6, // 24: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest - 8, // 25: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest - 16, // 26: protocol.Protocol.Ping:input_type -> protocol.PingRequest - 23, // 27: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest - 4, // 28: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse - 5, // 29: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse - 4, // 30: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse - 7, // 31: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse - 9, // 32: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse - 17, // 33: protocol.Protocol.Ping:output_type -> protocol.PingResponse - 24, // 34: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse - 28, // [28:35] is the sub-list for method output_type - 21, // [21:28] is the sub-list for method input_type + 25, // 25: protocol.Protocol.GetHeight:input_type -> protocol.GetHeightRequest + 8, // 26: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest + 16, // 27: protocol.Protocol.Ping:input_type -> protocol.PingRequest + 23, // 28: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest + 4, // 29: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse + 5, // 30: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse + 4, // 31: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse + 7, // 32: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse + 26, // 33: protocol.Protocol.GetHeight:output_type -> protocol.HeightResponse + 9, // 34: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse + 17, // 35: protocol.Protocol.Ping:output_type -> protocol.PingResponse + 24, // 36: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse + 29, // [29:37] is the sub-list for method output_type + 21, // [21:29] is the sub-list for method input_type 21, // [21:21] is the sub-list for extension type_name 21, // [21:21] is the sub-list for extension extendee 0, // [0:21] is the sub-list for field type_name @@ -2425,16 +2534,40 @@ func file_protocol_proto_init() { return nil } } + file_protocol_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHeightRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeightResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_protocol_proto_msgTypes[0].OneofWrappers = []interface{}{ (*SignedTransaction_Plays)(nil), - (*SignedTransaction_ValidatorRegistrationLegacy)(nil), + (*SignedTransaction_ValidatorRegistration)(nil), (*SignedTransaction_SlaRollup)(nil), (*SignedTransaction_ManageEntity)(nil), (*SignedTransaction_ValidatorDeregistration)(nil), (*SignedTransaction_StorageProof)(nil), (*SignedTransaction_StorageProofVerification)(nil), - (*SignedTransaction_ValidatorRegistration)(nil), + (*SignedTransaction_ValidatorRegistrationV2)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2442,7 +2575,7 @@ func file_protocol_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_proto_rawDesc, NumEnums: 0, - NumMessages: 25, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/core/gen/core_proto/protocol.pb.gw.go b/pkg/core/gen/core_proto/protocol.pb.gw.go index 853d74a6..50cffe13 100644 --- a/pkg/core/gen/core_proto/protocol.pb.gw.go +++ b/pkg/core/gen/core_proto/protocol.pb.gw.go @@ -221,6 +221,24 @@ func local_request_Protocol_GetBlock_0(ctx context.Context, marshaler runtime.Ma } +func request_Protocol_GetHeight_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHeightRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Protocol_GetHeight_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHeightRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetHeight(ctx, &protoReq) + return msg, metadata, err + +} + func request_Protocol_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetNodeInfoRequest var metadata runtime.ServerMetadata @@ -397,6 +415,31 @@ func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, s }) + mux.Handle("GET", pattern_Protocol_GetHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/protocol.Protocol/GetHeight", runtime.WithHTTPPathPattern("/core/grpc/height")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Protocol_GetHeight_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Protocol_GetHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Protocol_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -601,6 +644,28 @@ func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, c }) + mux.Handle("GET", pattern_Protocol_GetHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/protocol.Protocol/GetHeight", runtime.WithHTTPPathPattern("/core/grpc/height")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Protocol_GetHeight_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Protocol_GetHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Protocol_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -679,6 +744,8 @@ var ( pattern_Protocol_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"core", "grpc", "block", "height"}, "")) + pattern_Protocol_GetHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "height"}, "")) + pattern_Protocol_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "node_info"}, "")) pattern_Protocol_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "ping"}, "")) @@ -695,6 +762,8 @@ var ( forward_Protocol_GetBlock_0 = runtime.ForwardResponseMessage + forward_Protocol_GetHeight_0 = runtime.ForwardResponseMessage + forward_Protocol_GetNodeInfo_0 = runtime.ForwardResponseMessage forward_Protocol_Ping_0 = runtime.ForwardResponseMessage diff --git a/pkg/core/gen/core_proto/protocol.swagger.json b/pkg/core/gen/core_proto/protocol.swagger.json index 272aeccd..af30a3f2 100644 --- a/pkg/core/gen/core_proto/protocol.swagger.json +++ b/pkg/core/gen/core_proto/protocol.swagger.json @@ -79,6 +79,28 @@ ] } }, + "/core/grpc/height": { + "get": { + "operationId": "Protocol_GetHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/protocolHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Protocol" + ] + } + }, "/core/grpc/node_info": { "get": { "operationId": "Protocol_GetNodeInfo", @@ -293,12 +315,25 @@ "ethBlock": { "type": "string", "format": "int64" + }, + "referenceHeight": { + "type": "string", + "format": "int64" } } }, "protocolForwardTransactionResponse": { "type": "object" }, + "protocolHeightResponse": { + "type": "object", + "properties": { + "height": { + "type": "string", + "format": "int64" + } + } + }, "protocolManageEntityLegacy": { "type": "object", "properties": { @@ -382,7 +417,7 @@ "plays": { "$ref": "#/definitions/protocolTrackPlays" }, - "validatorRegistrationLegacy": { + "validatorRegistration": { "$ref": "#/definitions/protocolValidatorRegistrationLegacy" }, "slaRollup": { @@ -400,7 +435,7 @@ "storageProofVerification": { "$ref": "#/definitions/protocolStorageProofVerification" }, - "validatorRegistration": { + "validatorRegistrationV2": { "$ref": "#/definitions/protocolValidatorRegistration" } } diff --git a/pkg/core/gen/core_proto/protocol_grpc.pb.go b/pkg/core/gen/core_proto/protocol_grpc.pb.go index 55df1bb8..f4e01a84 100644 --- a/pkg/core/gen/core_proto/protocol_grpc.pb.go +++ b/pkg/core/gen/core_proto/protocol_grpc.pb.go @@ -23,6 +23,7 @@ const ( Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" + Protocol_GetHeight_FullMethodName = "/protocol.Protocol/GetHeight" Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" Protocol_GetRegistrationAttestation_FullMethodName = "/protocol.Protocol/GetRegistrationAttestation" @@ -36,6 +37,7 @@ type ProtocolClient interface { ForwardTransaction(ctx context.Context, in *ForwardTransactionRequest, opts ...grpc.CallOption) (*ForwardTransactionResponse, error) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) + GetHeight(ctx context.Context, in *GetHeightRequest, opts ...grpc.CallOption) (*HeightResponse, error) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) GetRegistrationAttestation(ctx context.Context, in *RegistrationAttestationRequest, opts ...grpc.CallOption) (*RegistrationAttestationResponse, error) @@ -85,6 +87,15 @@ func (c *protocolClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts return out, nil } +func (c *protocolClient) GetHeight(ctx context.Context, in *GetHeightRequest, opts ...grpc.CallOption) (*HeightResponse, error) { + out := new(HeightResponse) + err := c.cc.Invoke(ctx, Protocol_GetHeight_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *protocolClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) { out := new(NodeInfoResponse) err := c.cc.Invoke(ctx, Protocol_GetNodeInfo_FullMethodName, in, out, opts...) @@ -120,6 +131,7 @@ type ProtocolServer interface { ForwardTransaction(context.Context, *ForwardTransactionRequest) (*ForwardTransactionResponse, error) GetTransaction(context.Context, *GetTransactionRequest) (*TransactionResponse, error) GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error) + GetHeight(context.Context, *GetHeightRequest) (*HeightResponse, error) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) Ping(context.Context, *PingRequest) (*PingResponse, error) GetRegistrationAttestation(context.Context, *RegistrationAttestationRequest) (*RegistrationAttestationResponse, error) @@ -142,6 +154,9 @@ func (UnimplementedProtocolServer) GetTransaction(context.Context, *GetTransacti func (UnimplementedProtocolServer) GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") } +func (UnimplementedProtocolServer) GetHeight(context.Context, *GetHeightRequest) (*HeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHeight not implemented") +} func (UnimplementedProtocolServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") } @@ -236,6 +251,24 @@ func _Protocol_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Protocol_GetHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServer).GetHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Protocol_GetHeight_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServer).GetHeight(ctx, req.(*GetHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Protocol_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNodeInfoRequest) if err := dec(in); err != nil { @@ -313,6 +346,10 @@ var Protocol_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetBlock", Handler: _Protocol_GetBlock_Handler, }, + { + MethodName: "GetHeight", + Handler: _Protocol_GetHeight_Handler, + }, { MethodName: "GetNodeInfo", Handler: _Protocol_GetNodeInfo_Handler, diff --git a/pkg/core/gen/models/protocol_eth_registration.go b/pkg/core/gen/models/protocol_eth_registration.go index 0bbeaad0..f5760bc3 100644 --- a/pkg/core/gen/models/protocol_eth_registration.go +++ b/pkg/core/gen/models/protocol_eth_registration.go @@ -29,6 +29,9 @@ type ProtocolEthRegistration struct { // node type NodeType string `json:"nodeType,omitempty"` + // reference height + ReferenceHeight string `json:"referenceHeight,omitempty"` + // sp Id SpID string `json:"spId,omitempty"` } diff --git a/pkg/core/gen/models/protocol_height_response.go b/pkg/core/gen/models/protocol_height_response.go new file mode 100644 index 00000000..ccea8363 --- /dev/null +++ b/pkg/core/gen/models/protocol_height_response.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolHeightResponse protocol height response +// +// swagger:model protocolHeightResponse +type ProtocolHeightResponse struct { + + // height + Height string `json:"height,omitempty"` +} + +// Validate validates this protocol height response +func (m *ProtocolHeightResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protocol height response based on context it is used +func (m *ProtocolHeightResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolHeightResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolHeightResponse) UnmarshalBinary(b []byte) error { + var res ProtocolHeightResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_signed_transaction.go b/pkg/core/gen/models/protocol_signed_transaction.go index a3694ab8..bcacddf4 100644 --- a/pkg/core/gen/models/protocol_signed_transaction.go +++ b/pkg/core/gen/models/protocol_signed_transaction.go @@ -43,10 +43,10 @@ type ProtocolSignedTransaction struct { ValidatorDeregistration *ProtocolValidatorDeregistration `json:"validatorDeregistration,omitempty"` // validator registration - ValidatorRegistration *ProtocolValidatorRegistration `json:"validatorRegistration,omitempty"` + ValidatorRegistration *ProtocolValidatorRegistrationLegacy `json:"validatorRegistration,omitempty"` - // validator registration legacy - ValidatorRegistrationLegacy *ProtocolValidatorRegistrationLegacy `json:"validatorRegistrationLegacy,omitempty"` + // validator registration v2 + ValidatorRegistrationV2 *ProtocolValidatorRegistration `json:"validatorRegistrationV2,omitempty"` } // Validate validates this protocol signed transaction @@ -81,7 +81,7 @@ func (m *ProtocolSignedTransaction) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateValidatorRegistrationLegacy(formats); err != nil { + if err := m.validateValidatorRegistrationV2(formats); err != nil { res = append(res, err) } @@ -224,17 +224,17 @@ func (m *ProtocolSignedTransaction) validateValidatorRegistration(formats strfmt return nil } -func (m *ProtocolSignedTransaction) validateValidatorRegistrationLegacy(formats strfmt.Registry) error { - if swag.IsZero(m.ValidatorRegistrationLegacy) { // not required +func (m *ProtocolSignedTransaction) validateValidatorRegistrationV2(formats strfmt.Registry) error { + if swag.IsZero(m.ValidatorRegistrationV2) { // not required return nil } - if m.ValidatorRegistrationLegacy != nil { - if err := m.ValidatorRegistrationLegacy.Validate(formats); err != nil { + if m.ValidatorRegistrationV2 != nil { + if err := m.ValidatorRegistrationV2.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validatorRegistrationLegacy") + return ve.ValidateName("validatorRegistrationV2") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validatorRegistrationLegacy") + return ce.ValidateName("validatorRegistrationV2") } return err } @@ -275,7 +275,7 @@ func (m *ProtocolSignedTransaction) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateValidatorRegistrationLegacy(ctx, formats); err != nil { + if err := m.contextValidateValidatorRegistrationV2(ctx, formats); err != nil { res = append(res, err) } @@ -432,19 +432,19 @@ func (m *ProtocolSignedTransaction) contextValidateValidatorRegistration(ctx con return nil } -func (m *ProtocolSignedTransaction) contextValidateValidatorRegistrationLegacy(ctx context.Context, formats strfmt.Registry) error { +func (m *ProtocolSignedTransaction) contextValidateValidatorRegistrationV2(ctx context.Context, formats strfmt.Registry) error { - if m.ValidatorRegistrationLegacy != nil { + if m.ValidatorRegistrationV2 != nil { - if swag.IsZero(m.ValidatorRegistrationLegacy) { // not required + if swag.IsZero(m.ValidatorRegistrationV2) { // not required return nil } - if err := m.ValidatorRegistrationLegacy.ContextValidate(ctx, formats); err != nil { + if err := m.ValidatorRegistrationV2.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validatorRegistrationLegacy") + return ve.ValidateName("validatorRegistrationV2") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validatorRegistrationLegacy") + return ce.ValidateName("validatorRegistrationV2") } return err } diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index 2faa06c1..0bc79c36 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -26,6 +26,9 @@ service Protocol { rpc GetBlock(GetBlockRequest) returns (BlockResponse) { option (google.api.http) = {get: "/core/grpc/block/{height}"}; } + rpc GetHeight(GetHeightRequest) returns (HeightResponse) { + option (google.api.http) = {get: "/core/grpc/height"}; + } rpc GetNodeInfo(GetNodeInfoRequest) returns (NodeInfoResponse) { option (google.api.http) = {get: "/core/grpc/node_info"}; } @@ -45,13 +48,13 @@ message SignedTransaction { string request_id = 2; oneof transaction { TrackPlays plays = 1000; - ValidatorRegistrationLegacy validator_registration_legacy = 1001; + ValidatorRegistrationLegacy validator_registration = 1001; SlaRollup sla_rollup = 1002; ManageEntityLegacy manage_entity = 1003; ValidatorDeregistration validator_deregistration = 1004; StorageProof storage_proof = 1005; StorageProofVerification storage_proof_verification = 1006; - ValidatorRegistration validator_registration = 1007; + ValidatorRegistration validator_registration_v2 = 1007; } } @@ -131,6 +134,7 @@ message EthRegistration { string node_type = 3; string sp_id = 4; int64 eth_block = 5; + int64 reference_height = 6; } message ValidatorDeregistration { @@ -198,3 +202,9 @@ message RegistrationAttestationResponse { string signature = 1; EthRegistration registration = 2; } + +message GetHeightRequest {} + +message HeightResponse { + int64 height = 1; +} diff --git a/pkg/core/server/abci.go b/pkg/core/server/abci.go index 2fc9a2b5..762d370f 100644 --- a/pkg/core/server/abci.go +++ b/pkg/core/server/abci.go @@ -454,13 +454,13 @@ func (s *Server) validateBlockTx(ctx context.Context, blockTime time.Time, block switch signedTx.Transaction.(type) { case *core_proto.SignedTransaction_Plays: - case *core_proto.SignedTransaction_ValidatorRegistration: - if err := s.isValidRegisterNodeTx(signedTx); err != nil { + case *core_proto.SignedTransaction_ValidatorRegistrationV2: + if err := s.isValidRegisterNodeTx(ctx, signedTx, blockHeight); err != nil { s.logger.Error("Invalid block: invalid register node tx", "error", err) return false, nil } - case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: - if err := s.isValidLegacyRegisterNodeTx(signedTx); err != nil { + case *core_proto.SignedTransaction_ValidatorRegistration: + if err := s.isValidLegacyRegisterNodeTx(signedTx, blockHeight); err != nil { s.logger.Error("Invalid block: invalid register node tx", "error", err) return false, nil } @@ -498,10 +498,10 @@ func (s *Server) finalizeTransaction(ctx context.Context, req *abcitypes.Finaliz return s.finalizePlayTransaction(ctx, msg) case *core_proto.SignedTransaction_ManageEntity: return s.finalizeManageEntity(ctx, msg) + case *core_proto.SignedTransaction_ValidatorRegistrationV2: + return s.finalizeRegisterNode(ctx, msg, req.Height) case *core_proto.SignedTransaction_ValidatorRegistration: - return s.finalizeRegisterNode(ctx, msg, req.Time) - case *core_proto.SignedTransaction_ValidatorRegistrationLegacy: - return s.finalizeLegacyRegisterNode(ctx, msg, req.Time) + return s.finalizeLegacyRegisterNode(ctx, msg, blockHeight) case *core_proto.SignedTransaction_ValidatorDeregistration: return s.finalizeDeregisterNode(ctx, msg, misbehavior) case *core_proto.SignedTransaction_SlaRollup: diff --git a/pkg/core/server/grpc.go b/pkg/core/server/grpc.go index d28c9806..24c5dbe9 100644 --- a/pkg/core/server/grpc.go +++ b/pkg/core/server/grpc.go @@ -214,6 +214,12 @@ func (s *Server) GetBlock(ctx context.Context, req *core_proto.GetBlockRequest) return res, nil } +func (s *Server) GetHeight(ctx context.Context, req *core_proto.GetHeightRequest) (*core_proto.HeightResponse, error) { + return &core_proto.HeightResponse{ + Height: s.cache.currentHeight, + }, nil +} + func (s *Server) GetNodeInfo(ctx context.Context, req *core_proto.GetNodeInfoRequest) (*core_proto.NodeInfoResponse, error) { status, err := s.rpc.Status(ctx) if err != nil { @@ -303,6 +309,10 @@ func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto return nil, errors.New("empty registration attestation") } + if ethReg.ReferenceHeight > s.cache.currentHeight { + return nil, fmt.Errorf("Cannot sign registration request with reference height %d (current height is %d)", ethReg.ReferenceHeight, s.cache.currentHeight) + } + if !s.isNodeRegisteredOnEthereum( ethcommon.HexToAddress(ethReg.DelegateWallet), ethReg.Endpoint, diff --git a/pkg/core/server/registration.go b/pkg/core/server/registration.go index 29786dde..9be4630f 100644 --- a/pkg/core/server/registration.go +++ b/pkg/core/server/registration.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "strconv" - "time" "github.com/AudiusProject/audiusd/pkg/core/common" "github.com/AudiusProject/audiusd/pkg/core/db" @@ -21,13 +20,15 @@ import ( "google.golang.org/protobuf/proto" ) -func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { +const maxRegistrationAge = 24 * 60 * 60 // Registration requests are only valid for approx 24 hours + +func (s *Server) isValidRegisterNodeTx(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) error { sig := tx.GetSignature() if sig == "" { return fmt.Errorf("no signature provided for registration tx: %v", tx) } - vr := tx.GetValidatorRegistration() + vr := tx.GetValidatorRegistrationV2() if vr == nil { return fmt.Errorf("unknown tx fell into isValidRegisterNodeTx: %v", tx) } @@ -36,6 +37,7 @@ func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { return fmt.Errorf("Empty eth registration fell into isValidRegisterNodeTx: %v", tx) } + // convert to bytes for signature recovery vrBytes, err := proto.Marshal(vr) if err != nil { return fmt.Errorf("could not marshal registration tx: %v", err) @@ -45,6 +47,7 @@ func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { return fmt.Errorf("could not marshal ethereum registration: %v", err) } + // validate address _, address, err := common.EthRecover(tx.GetSignature(), vrBytes) if err != nil { return fmt.Errorf("could not recover msg sig: %v", err) @@ -52,10 +55,13 @@ func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { if address != er.GetDelegateWallet() { return fmt.Errorf("Signature address '%s' does not match ethereum registration '%s'", address, er.GetDelegateWallet()) } + + // validate voting power if vr.GetPower() != int64(s.config.ValidatorVotingPower) { return fmt.Errorf("invalid voting power '%d'", vr.GetPower()) } + // validate pub key if len(vr.GetPubKey()) == 0 { return fmt.Errorf("public Key missing from %s registration tx", er.GetEndpoint()) } @@ -64,24 +70,29 @@ func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { return fmt.Errorf("address does not match public key: %s %s", vrPubKey.Address(), vr.GetCometAddress()) } + // ensure comet address is not already taken if _, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), vr.GetCometAddress()); !errors.Is(err, pgx.ErrNoRows) { return fmt.Errorf("address '%s' is already registered on comet, node %s attempted to acquire it", vr.GetCometAddress(), er.GetEndpoint()) } - nodes, err := s.db.GetAllRegisteredNodes(context.Background()) - if err != nil { - return fmt.Errorf("Failed to get core validators while validating registration: %v", err) + // validate age of request + if er.ReferenceHeight > blockHeight || er.ReferenceHeight < blockHeight-maxRegistrationAge { + return fmt.Errorf("Registration request for '%s' with reference height %d is too old (current height is %d)", er.GetEndpoint(), er.ReferenceHeight, blockHeight) } + // validate attestations + addrs, err := s.db.GetAllEthAddressesOfRegisteredNodes(ctx) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return fmt.Errorf("Failed to get core validators while validating registration: %v", err) + } atts := vr.GetAttestations() if atts == nil { atts = make([]string, 0) // empty attestations are expected at genesis } - - requiredAttestations := min(len(nodes), s.config.AttRegistrationMin) + requiredAttestations := min(len(addrs), s.config.AttRegistrationMin) keyBytes := make([]byte, 8) binary.BigEndian.PutUint64(keyBytes, uint64(er.GetEthBlock())) - rendezvous := getAttestorRendezvous(nodes, keyBytes, s.config.AttRegistrationRSize) + rendezvous := common.GetAttestorRendezvous(addrs, keyBytes, s.config.AttRegistrationRSize) for _, att := range atts { _, address, err := common.EthRecover(att, erBytes) if err != nil { @@ -99,13 +110,13 @@ func (s *Server) isValidRegisterNodeTx(tx *core_proto.SignedTransaction) error { return nil } -func (s *Server) finalizeRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockTime time.Time) (*core_proto.ValidatorRegistration, error) { - if err := s.isValidRegisterNodeTx(tx); err != nil { +func (s *Server) finalizeRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) (*core_proto.ValidatorRegistration, error) { + if err := s.isValidRegisterNodeTx(ctx, tx, blockHeight); err != nil { return nil, fmt.Errorf("invalid register node tx: %v", err) } qtx := s.getDb() - vr := tx.GetValidatorRegistration() + vr := tx.GetValidatorRegistrationV2() er := vr.GetEthRegistration() sig := tx.GetSignature() diff --git a/pkg/core/server/registration_legacy.go b/pkg/core/server/registration_legacy.go index b9723592..8c558590 100644 --- a/pkg/core/server/registration_legacy.go +++ b/pkg/core/server/registration_legacy.go @@ -5,100 +5,34 @@ import ( "encoding/base64" "errors" "fmt" - "time" "github.com/AudiusProject/audiusd/pkg/core/common" "github.com/AudiusProject/audiusd/pkg/core/db" "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" - "github.com/cometbft/cometbft/crypto/ed25519" "github.com/jackc/pgx/v5" "google.golang.org/protobuf/proto" ) // checks if the register node tx is valid // calls ethereum mainnet and validates signature to confirm node should be a validator -func (s *Server) isValidLegacyRegisterNodeTx(tx *core_proto.SignedTransaction) error { - sig := tx.GetSignature() - if sig == "" { - return fmt.Errorf("no signature provided for registration tx: %v", tx) - } - - vr := tx.GetValidatorRegistrationLegacy() - if vr == nil { - return fmt.Errorf("unknown tx fell into isValidLegacyRegisterNodeTx: %v", tx) - } - - info, err := s.getRegisteredNode(vr.GetEndpoint()) - if err != nil { - return fmt.Errorf("not able to find registered node: %v", err) - } - - // compare on chain info to requested comet data - onChainOwnerWallet := info.DelegateOwnerWallet.Hex() - onChainBlockNumber := info.BlockNumber.String() - onChainEndpoint := info.Endpoint - - if err := s.isDuplicateDelegateOwnerWallet(onChainOwnerWallet); err != nil { - return err - } - - data, err := proto.Marshal(vr) - if err != nil { - return fmt.Errorf("could not marshal registration tx: %v", err) - } - - _, address, err := common.EthRecover(tx.GetSignature(), data) - if err != nil { - return fmt.Errorf("could not recover msg sig: %v", err) - } - - vrOwnerWallet := address - vrEndpoint := vr.GetEndpoint() - vrEthBlock := vr.GetEthBlock() - vrCometAddress := vr.GetCometAddress() - vrPower := int(vr.GetPower()) - - if len(vr.GetPubKey()) == 0 { - return fmt.Errorf("public Key missing from %s registration tx", vrEndpoint) - } - vrPubKey := ed25519.PubKey(vr.GetPubKey()) - - if onChainOwnerWallet != vrOwnerWallet { - return fmt.Errorf("wallet %s tried to register %s as %s", vrOwnerWallet, onChainOwnerWallet, vr.Endpoint) - } - - if onChainBlockNumber != vrEthBlock { - return fmt.Errorf("block number mismatch: %s %s", onChainBlockNumber, vrEthBlock) - } - - if onChainEndpoint != vrEndpoint { - return fmt.Errorf("endpoints don't match: %s %s", onChainEndpoint, vrEndpoint) - } - - if vrPubKey.Address().String() != vrCometAddress { - return fmt.Errorf("address does not match public key: %s %s", vrPubKey.Address(), vrCometAddress) - } - - if vrPower != s.config.ValidatorVotingPower { - return fmt.Errorf("invalid voting power '%d'", vrPower) +func (s *Server) isValidLegacyRegisterNodeTx(_ *core_proto.SignedTransaction, blockHeight int64) error { + // We only care if this attempted legacy registration is post-cutoff + if blockHeight > s.config.LegacyRegistrationCutoff { + return fmt.Errorf("Legacy registration is after cutoff.") } return nil } // persists the register node request should it pass validation -func (s *Server) finalizeLegacyRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockTime time.Time) (*core_proto.ValidatorRegistrationLegacy, error) { - // TODO: remove logic after validator registration switches to attestations - oldBlock := time.Since(blockTime) >= week - if !oldBlock { - if err := s.isValidLegacyRegisterNodeTx(tx); err != nil { - return nil, fmt.Errorf("invalid register node tx: %v", err) - } +func (s *Server) finalizeLegacyRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) (*core_proto.ValidatorRegistrationLegacy, error) { + if err := s.isValidLegacyRegisterNodeTx(tx, blockHeight); err != nil { + return nil, fmt.Errorf("invalid register node tx: %v", err) } qtx := s.getDb() - vr := tx.GetValidatorRegistrationLegacy() + vr := tx.GetValidatorRegistration() sig := tx.GetSignature() txBytes, err := proto.Marshal(vr) if err != nil { @@ -115,7 +49,7 @@ func (s *Server) finalizeLegacyRegisterNode(ctx context.Context, tx *core_proto. return nil, fmt.Errorf("could not serialize pubkey: %v", err) } - registerNode := tx.GetValidatorRegistrationLegacy() + registerNode := tx.GetValidatorRegistration() // Do not reinsert duplicate registrations if _, err = qtx.GetRegisteredNodeByEthAddress(ctx, address); errors.Is(err, pgx.ErrNoRows) { diff --git a/pkg/core/server/registry_bridge.go b/pkg/core/server/registry_bridge.go index f4608032..ae0886c2 100644 --- a/pkg/core/server/registry_bridge.go +++ b/pkg/core/server/registry_bridge.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "math/big" + "strconv" "time" "github.com/AudiusProject/audiusd/pkg/core/common" @@ -164,13 +165,32 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge return fmt.Errorf("invalid node type: %v", err) } - nodes, err := s.db.GetAllRegisteredNodes(ctx) - if err != nil { + addrs, err := s.db.GetAllEthAddressesOfRegisteredNodes(ctx) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { return fmt.Errorf("failed to get all registered nodes: %v", err) } keyBytes := make([]byte, 8) binary.BigEndian.PutUint64(keyBytes, ethBlock.Uint64()) - rendezvous := getAttestorRendezvous(nodes, keyBytes, s.config.AttRegistrationRSize) + rendezvous := common.GetAttestorRendezvous(addrs, keyBytes, s.config.AttRegistrationRSize) + + // Get latest comet block height from peers (this node is likely syncing) + var cometBlockHeight int64 + for addr, _ := range rendezvous { + if peer, ok := peers[addr]; ok && addr != delegateOwnerWallet.Hex() { + resp, err := peer.ProtocolGetHeight(protocol.NewProtocolGetHeightParams()) + if err != nil { + s.logger.Error("failed to get latest block height from %s: %v", peer.OAPIEndpoint, err) + continue + } + heightResp, err := strconv.ParseInt(resp.Payload.Height, 10, 64) + if err != nil { + s.logger.Error("failed to parse latest block height from %s: %v", peer.OAPIEndpoint, err) + continue + } + cometBlockHeight = max(heightResp, cometBlockHeight) + } + } + attestations := make([]string, 0, s.config.AttRegistrationRSize) ethReg := &core_proto.EthRegistration{ DelegateWallet: delegateOwnerWallet.Hex(), @@ -213,8 +233,8 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge tx := &core_proto.SignedTransaction{ Signature: sig, RequestId: uuid.NewString(), - Transaction: &core_proto.SignedTransaction_ValidatorRegistration{ - ValidatorRegistration: registrationTx, + Transaction: &core_proto.SignedTransaction_ValidatorRegistrationV2{ + ValidatorRegistrationV2: registrationTx, }, } From c4d1fa4a1acd0d298928ba7ceda41e784586a696 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Tue, 4 Mar 2025 14:26:58 -0800 Subject: [PATCH 04/11] Do not register during sync --- pkg/core/server/cache.go | 12 ++++++++---- pkg/core/server/grpc.go | 11 +++++------ pkg/core/server/pos.go | 3 +-- pkg/core/server/registry_bridge.go | 4 ++++ pkg/core/server/sync.go | 3 +++ 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/pkg/core/server/cache.go b/pkg/core/server/cache.go index da2db977..b96cc37e 100644 --- a/pkg/core/server/cache.go +++ b/pkg/core/server/cache.go @@ -12,11 +12,15 @@ import ( // a simple in memory cache of frequently queried things // maybe upgrade to something like bigcache later type Cache struct { - currentHeight int64 + currentHeight atomic.Int64 + catchingUp atomic.Bool } func NewCache() *Cache { - return &Cache{} + c := &Cache{} + c.currentHeight.Store(0) + c.catchingUp.Store(true) // assume syncing on startup + return c } // maybe put a separate errgroup in here for things that @@ -29,7 +33,7 @@ func (s *Server) startCache() error { return fmt.Errorf("could not get initial status: %v", err) } - atomic.StoreInt64(&s.cache.currentHeight, status.SyncInfo.LatestBlockHeight) + s.cache.currentHeight.Store(status.SyncInfo.LatestBlockHeight) node := s.node eb := node.EventBus() @@ -56,7 +60,7 @@ func (s *Server) startCache() error { case msg := <-subscription.Out(): blockEvent := msg.Data().(types.EventDataNewBlock) blockHeight := blockEvent.Block.Height - atomic.StoreInt64(&s.cache.currentHeight, blockHeight) + s.cache.currentHeight.Store(blockHeight) case err := <-subscription.Canceled(): s.logger.Errorf("Subscription cancelled: %v", err) return nil diff --git a/pkg/core/server/grpc.go b/pkg/core/server/grpc.go index 24c5dbe9..f3b27746 100644 --- a/pkg/core/server/grpc.go +++ b/pkg/core/server/grpc.go @@ -9,7 +9,6 @@ import ( "net" "reflect" "strings" - "sync/atomic" "time" "github.com/AudiusProject/audiusd/pkg/core/common" @@ -160,7 +159,7 @@ func (s *Server) GetTransaction(ctx context.Context, req *core_proto.GetTransact } func (s *Server) GetBlock(ctx context.Context, req *core_proto.GetBlockRequest) (*core_proto.BlockResponse, error) { - currentHeight := atomic.LoadInt64(&s.cache.currentHeight) + currentHeight := s.cache.currentHeight.Load() if req.Height > currentHeight { return &core_proto.BlockResponse{ Chainid: s.config.GenesisFile.ChainID, @@ -216,7 +215,7 @@ func (s *Server) GetBlock(ctx context.Context, req *core_proto.GetBlockRequest) func (s *Server) GetHeight(ctx context.Context, req *core_proto.GetHeightRequest) (*core_proto.HeightResponse, error) { return &core_proto.HeightResponse{ - Height: s.cache.currentHeight, + Height: s.cache.currentHeight.Load(), }, nil } @@ -264,7 +263,7 @@ func (s *Server) startGRPC() error { // Utilities func (s *Server) getBlockRpcFallback(ctx context.Context, height int64) (*core_proto.BlockResponse, error) { - currentHeight := s.cache.currentHeight + currentHeight := s.cache.currentHeight.Load() block, err := s.rpc.Block(ctx, &height) if err != nil { blockInFutureMsg := "must be less than or equal to the current blockchain height" @@ -309,8 +308,8 @@ func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto return nil, errors.New("empty registration attestation") } - if ethReg.ReferenceHeight > s.cache.currentHeight { - return nil, fmt.Errorf("Cannot sign registration request with reference height %d (current height is %d)", ethReg.ReferenceHeight, s.cache.currentHeight) + if ethReg.ReferenceHeight > s.cache.currentHeight.Load() { + return nil, fmt.Errorf("Cannot sign registration request with reference height %d (current height is %d)", ethReg.ReferenceHeight, s.cache.currentHeight.Load()) } if !s.isNodeRegisteredOnEthereum( diff --git a/pkg/core/server/pos.go b/pkg/core/server/pos.go index 4c2be436..659d91d6 100644 --- a/pkg/core/server/pos.go +++ b/pkg/core/server/pos.go @@ -29,9 +29,8 @@ const ( // Called during FinalizeBlock. Keeps Proof of Storage subsystem up to date with current block. func (s *Server) syncPoS(_ context.Context, latestBlockHash []byte, latestBlockHeight int64) error { - if blockShouldTriggerNewPoSChallenge(latestBlockHash) { + if !s.cache.catchingUp.Load() && blockShouldTriggerNewPoSChallenge(latestBlockHash) { s.logger.Info("PoS Challenge triggered", "height", latestBlockHeight, "hash", hex.EncodeToString(latestBlockHash)) - // TODO: disable in block sync mode go s.sendPoSChallengeToStorage(latestBlockHash, latestBlockHeight) } return nil diff --git a/pkg/core/server/registry_bridge.go b/pkg/core/server/registry_bridge.go index ae0886c2..ce2b0f5d 100644 --- a/pkg/core/server/registry_bridge.go +++ b/pkg/core/server/registry_bridge.go @@ -144,6 +144,10 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge return nil } + if s.cache.catchingUp.Load() { + return errors.New("Aborting comet registration because node is still syncing.") + } + genValidators := s.config.GenesisFile.Validators isGenValidator := false for _, validator := range genValidators { diff --git a/pkg/core/server/sync.go b/pkg/core/server/sync.go index 10201756..b1dd2f4b 100644 --- a/pkg/core/server/sync.go +++ b/pkg/core/server/sync.go @@ -39,7 +39,10 @@ func (s *Server) onSyncTick() error { } if status.SyncInfo.CatchingUp { + s.cache.catchingUp.Store(true) return ErrRpcNotSynced + } else { + s.cache.catchingUp.Store(false) } return nil From 80e299aabe9413ad89dbf6bd18099188c6209386 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Tue, 4 Mar 2025 14:43:56 -0800 Subject: [PATCH 05/11] Add new registration type to abci --- pkg/core/server/abci.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/core/server/abci.go b/pkg/core/server/abci.go index 762d370f..dc9385d8 100644 --- a/pkg/core/server/abci.go +++ b/pkg/core/server/abci.go @@ -228,7 +228,17 @@ func (s *Server) FinalizeBlock(ctx context.Context, req *abcitypes.FinalizeBlock if err != nil { s.logger.Errorf("error finalizing event: %v", err) txs[i] = &abcitypes.ExecTxResult{Code: 2} - } else if vr := signedTx.GetValidatorRegistration(); vr != nil { + } else if vr := signedTx.GetValidatorRegistration(); vr != nil { // TODO: delete legacy registration after chain rollover + vrPubKey := ed25519.PubKey(vr.GetPubKey()) + vrAddr := vrPubKey.Address().String() + if _, ok := validatorUpdatesMap[vrAddr]; !ok { + validatorUpdatesMap[vrAddr] = abcitypes.ValidatorUpdate{ + Power: vr.Power, + PubKeyBytes: vr.PubKey, + PubKeyType: "ed25519", + } + } + } else if vr := signedTx.GetValidatorRegistrationV2(); vr != nil { vrPubKey := ed25519.PubKey(vr.GetPubKey()) vrAddr := vrPubKey.Address().String() if _, ok := validatorUpdatesMap[vrAddr]; !ok { From fb9a94a16dca84782ede22642ad3e45ef09bddee Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Fri, 7 Mar 2025 13:33:15 -0800 Subject: [PATCH 06/11] Use attestation oneof model --- pkg/core/common/converters.go | 32 +- .../core_openapi/protocol/protocol_client.go | 39 - ...get_registration_attestation_parameters.go | 6 +- pkg/core/gen/core_proto/protocol.pb.go | 895 ++++++++---------- pkg/core/gen/core_proto/protocol.pb.gw.go | 69 -- pkg/core/gen/core_proto/protocol.swagger.json | 103 +- pkg/core/gen/core_proto/protocol_grpc.pb.go | 37 - pkg/core/gen/models/protocol_attestation.go | 112 +++ .../gen/models/protocol_eth_registration.go | 3 - ...tocol_registration_attestation_response.go | 2 +- .../gen/models/protocol_signed_transaction.go | 102 +- .../models/protocol_validator_registration.go | 83 +- pkg/core/protocol/protocol.proto | 31 +- pkg/core/server/abci.go | 13 +- pkg/core/server/attestation.go | 110 +++ pkg/core/server/grpc.go | 32 +- pkg/core/server/registration.go | 110 +-- pkg/core/server/registry_bridge.go | 42 +- 18 files changed, 828 insertions(+), 993 deletions(-) create mode 100644 pkg/core/gen/models/protocol_attestation.go create mode 100644 pkg/core/server/attestation.go diff --git a/pkg/core/common/converters.go b/pkg/core/common/converters.go index a1c6aff1..8edc56a8 100644 --- a/pkg/core/common/converters.go +++ b/pkg/core/common/converters.go @@ -46,13 +46,13 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro Signer: innerTx.ManageEntity.Signer, Nonce: fmt.Sprint(innerTx.ManageEntity.Nonce), } - case *core_proto.SignedTransaction_ValidatorRegistrationV2: - oapiTx.ValidatorRegistrationV2 = &models.ProtocolValidatorRegistration{ - Attestations: innerTx.ValidatorRegistrationV2.Attestations, - EthRegistration: EthRegistrationProtoIntoEthRegistrationOapi(innerTx.ValidatorRegistrationV2.EthRegistration), - CometAddress: innerTx.ValidatorRegistrationV2.CometAddress, - Power: fmt.Sprint(innerTx.ValidatorRegistrationV2.Power), - PubKey: innerTx.ValidatorRegistrationV2.PubKey, + case *core_proto.SignedTransaction_Attestation: + oapiTx.Attestation = &models.ProtocolAttestation{ + Signatures: innerTx.Attestation.Signatures, + } + switch innerTx.Attestation.Body.(type) { + case *core_proto.Attestation_ValidatorRegistration: + oapiTx.Attestation.ValidatorRegistration = ValidatorRegistrationIntoOapi(innerTx.Attestation.GetValidatorRegistration()) } case *core_proto.SignedTransaction_ValidatorRegistration: oapiTx.ValidatorRegistration = &models.ProtocolValidatorRegistrationLegacy{ @@ -87,12 +87,16 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro return oapiTx } -func EthRegistrationProtoIntoEthRegistrationOapi(ethReg *core_proto.EthRegistration) *models.ProtocolEthRegistration { - return &models.ProtocolEthRegistration{ - DelegateWallet: ethReg.DelegateWallet, - Endpoint: ethReg.Endpoint, - NodeType: ethReg.NodeType, - EthBlock: fmt.Sprint(ethReg.EthBlock), - SpID: ethReg.SpId, +func ValidatorRegistrationIntoOapi(vr *core_proto.ValidatorRegistration) *models.ProtocolValidatorRegistration { + return &models.ProtocolValidatorRegistration{ + DelegateWallet: vr.DelegateWallet, + Endpoint: vr.Endpoint, + NodeType: vr.NodeType, + EthBlock: fmt.Sprint(vr.EthBlock), + SpID: vr.SpId, + CometAddress: vr.CometAddress, + Power: fmt.Sprint(vr.Power), + PubKey: vr.PubKey, + Deadline: fmt.Sprint(vr.Deadline), } } diff --git a/pkg/core/gen/core_openapi/protocol/protocol_client.go b/pkg/core/gen/core_openapi/protocol/protocol_client.go index 9e5ec3c0..e005fd5e 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_client.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_client.go @@ -58,8 +58,6 @@ type ClientService interface { ProtocolGetBlock(params *ProtocolGetBlockParams, opts ...ClientOption) (*ProtocolGetBlockOK, error) - ProtocolGetHeight(params *ProtocolGetHeightParams, opts ...ClientOption) (*ProtocolGetHeightOK, error) - ProtocolGetNodeInfo(params *ProtocolGetNodeInfoParams, opts ...ClientOption) (*ProtocolGetNodeInfoOK, error) ProtocolGetRegistrationAttestation(params *ProtocolGetRegistrationAttestationParams, opts ...ClientOption) (*ProtocolGetRegistrationAttestationOK, error) @@ -147,43 +145,6 @@ func (a *Client) ProtocolGetBlock(params *ProtocolGetBlockParams, opts ...Client return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -ProtocolGetHeight protocol get height API -*/ -func (a *Client) ProtocolGetHeight(params *ProtocolGetHeightParams, opts ...ClientOption) (*ProtocolGetHeightOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewProtocolGetHeightParams() - } - op := &runtime.ClientOperation{ - ID: "Protocol_GetHeight", - Method: "GET", - PathPattern: "/core/grpc/height", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ProtocolGetHeightReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ProtocolGetHeightOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ProtocolGetHeightDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ProtocolGetNodeInfo protocol get node info API */ diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go index ace46609..af97046d 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_parameters.go @@ -64,7 +64,7 @@ ProtocolGetRegistrationAttestationParams contains all the parameters to send to type ProtocolGetRegistrationAttestationParams struct { // Registration. - Registration *models.ProtocolEthRegistration + Registration *models.ProtocolValidatorRegistration timeout time.Duration Context context.Context @@ -120,13 +120,13 @@ func (o *ProtocolGetRegistrationAttestationParams) SetHTTPClient(client *http.Cl } // WithRegistration adds the registration to the protocol get registration attestation params -func (o *ProtocolGetRegistrationAttestationParams) WithRegistration(registration *models.ProtocolEthRegistration) *ProtocolGetRegistrationAttestationParams { +func (o *ProtocolGetRegistrationAttestationParams) WithRegistration(registration *models.ProtocolValidatorRegistration) *ProtocolGetRegistrationAttestationParams { o.SetRegistration(registration) return o } // SetRegistration adds the registration to the protocol get registration attestation params -func (o *ProtocolGetRegistrationAttestationParams) SetRegistration(registration *models.ProtocolEthRegistration) { +func (o *ProtocolGetRegistrationAttestationParams) SetRegistration(registration *models.ProtocolValidatorRegistration) { o.Registration = registration } diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index f6d758ae..7b6f341d 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -38,7 +38,7 @@ type SignedTransaction struct { // *SignedTransaction_ValidatorDeregistration // *SignedTransaction_StorageProof // *SignedTransaction_StorageProofVerification - // *SignedTransaction_ValidatorRegistrationV2 + // *SignedTransaction_Attestation Transaction isSignedTransaction_Transaction `protobuf_oneof:"transaction"` } @@ -144,9 +144,9 @@ func (x *SignedTransaction) GetStorageProofVerification() *StorageProofVerificat return nil } -func (x *SignedTransaction) GetValidatorRegistrationV2() *ValidatorRegistration { - if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorRegistrationV2); ok { - return x.ValidatorRegistrationV2 +func (x *SignedTransaction) GetAttestation() *Attestation { + if x, ok := x.GetTransaction().(*SignedTransaction_Attestation); ok { + return x.Attestation } return nil } @@ -183,8 +183,8 @@ type SignedTransaction_StorageProofVerification struct { StorageProofVerification *StorageProofVerification `protobuf:"bytes,1006,opt,name=storage_proof_verification,json=storageProofVerification,proto3,oneof"` } -type SignedTransaction_ValidatorRegistrationV2 struct { - ValidatorRegistrationV2 *ValidatorRegistration `protobuf:"bytes,1007,opt,name=validator_registration_v2,json=validatorRegistrationV2,proto3,oneof"` +type SignedTransaction_Attestation struct { + Attestation *Attestation `protobuf:"bytes,1007,opt,name=attestation,proto3,oneof"` } func (*SignedTransaction_Plays) isSignedTransaction_Transaction() {} @@ -201,7 +201,7 @@ func (*SignedTransaction_StorageProof) isSignedTransaction_Transaction() {} func (*SignedTransaction_StorageProofVerification) isSignedTransaction_Transaction() {} -func (*SignedTransaction_ValidatorRegistrationV2) isSignedTransaction_Transaction() {} +func (*SignedTransaction_Attestation) isSignedTransaction_Transaction() {} type SendTransactionRequest struct { state protoimpl.MessageState @@ -876,11 +876,15 @@ type ValidatorRegistration struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Attestations []string `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` - EthRegistration *EthRegistration `protobuf:"bytes,2,opt,name=eth_registration,json=ethRegistration,proto3" json:"eth_registration,omitempty"` - CometAddress string `protobuf:"bytes,3,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"` - PubKey []byte `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - Power int64 `protobuf:"varint,5,opt,name=power,proto3" json:"power,omitempty"` + DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` + SpId string `protobuf:"bytes,4,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` + EthBlock int64 `protobuf:"varint,5,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` + CometAddress string `protobuf:"bytes,6,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"` + PubKey []byte `protobuf:"bytes,7,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + Power int64 `protobuf:"varint,8,opt,name=power,proto3" json:"power,omitempty"` + Deadline int64 `protobuf:"varint,9,opt,name=deadline,proto3" json:"deadline,omitempty"` } func (x *ValidatorRegistration) Reset() { @@ -915,124 +919,65 @@ func (*ValidatorRegistration) Descriptor() ([]byte, []int) { return file_protocol_proto_rawDescGZIP(), []int{12} } -func (x *ValidatorRegistration) GetAttestations() []string { +func (x *ValidatorRegistration) GetDelegateWallet() string { if x != nil { - return x.Attestations - } - return nil -} - -func (x *ValidatorRegistration) GetEthRegistration() *EthRegistration { - if x != nil { - return x.EthRegistration - } - return nil -} - -func (x *ValidatorRegistration) GetCometAddress() string { - if x != nil { - return x.CometAddress + return x.DelegateWallet } return "" } -func (x *ValidatorRegistration) GetPubKey() []byte { +func (x *ValidatorRegistration) GetEndpoint() string { if x != nil { - return x.PubKey + return x.Endpoint } - return nil + return "" } -func (x *ValidatorRegistration) GetPower() int64 { +func (x *ValidatorRegistration) GetNodeType() string { if x != nil { - return x.Power - } - return 0 -} - -type EthRegistration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DelegateWallet string `protobuf:"bytes,1,opt,name=delegate_wallet,json=delegateWallet,proto3" json:"delegate_wallet,omitempty"` - Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - NodeType string `protobuf:"bytes,3,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` - SpId string `protobuf:"bytes,4,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"` - EthBlock int64 `protobuf:"varint,5,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"` - ReferenceHeight int64 `protobuf:"varint,6,opt,name=reference_height,json=referenceHeight,proto3" json:"reference_height,omitempty"` -} - -func (x *EthRegistration) Reset() { - *x = EthRegistration{} - if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthRegistration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthRegistration) ProtoMessage() {} - -func (x *EthRegistration) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms + return x.NodeType } - return mi.MessageOf(x) -} - -// Deprecated: Use EthRegistration.ProtoReflect.Descriptor instead. -func (*EthRegistration) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{13} + return "" } -func (x *EthRegistration) GetDelegateWallet() string { +func (x *ValidatorRegistration) GetSpId() string { if x != nil { - return x.DelegateWallet + return x.SpId } return "" } -func (x *EthRegistration) GetEndpoint() string { +func (x *ValidatorRegistration) GetEthBlock() int64 { if x != nil { - return x.Endpoint + return x.EthBlock } - return "" + return 0 } -func (x *EthRegistration) GetNodeType() string { +func (x *ValidatorRegistration) GetCometAddress() string { if x != nil { - return x.NodeType + return x.CometAddress } return "" } -func (x *EthRegistration) GetSpId() string { +func (x *ValidatorRegistration) GetPubKey() []byte { if x != nil { - return x.SpId + return x.PubKey } - return "" + return nil } -func (x *EthRegistration) GetEthBlock() int64 { +func (x *ValidatorRegistration) GetPower() int64 { if x != nil { - return x.EthBlock + return x.Power } return 0 } -func (x *EthRegistration) GetReferenceHeight() int64 { +func (x *ValidatorRegistration) GetDeadline() int64 { if x != nil { - return x.ReferenceHeight + return x.Deadline } return 0 } @@ -1049,7 +994,7 @@ type ValidatorDeregistration struct { func (x *ValidatorDeregistration) Reset() { *x = ValidatorDeregistration{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[14] + mi := &file_protocol_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1062,7 +1007,7 @@ func (x *ValidatorDeregistration) String() string { func (*ValidatorDeregistration) ProtoMessage() {} func (x *ValidatorDeregistration) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[14] + mi := &file_protocol_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1075,7 +1020,7 @@ func (x *ValidatorDeregistration) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorDeregistration.ProtoReflect.Descriptor instead. func (*ValidatorDeregistration) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{14} + return file_protocol_proto_rawDescGZIP(), []int{13} } func (x *ValidatorDeregistration) GetCometAddress() string { @@ -1109,7 +1054,7 @@ type TrackPlay struct { func (x *TrackPlay) Reset() { *x = TrackPlay{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[15] + mi := &file_protocol_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1122,7 +1067,7 @@ func (x *TrackPlay) String() string { func (*TrackPlay) ProtoMessage() {} func (x *TrackPlay) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[15] + mi := &file_protocol_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1135,7 +1080,7 @@ func (x *TrackPlay) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackPlay.ProtoReflect.Descriptor instead. func (*TrackPlay) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{15} + return file_protocol_proto_rawDescGZIP(), []int{14} } func (x *TrackPlay) GetUserId() string { @@ -1196,7 +1141,7 @@ type PingRequest struct { func (x *PingRequest) Reset() { *x = PingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[16] + mi := &file_protocol_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1209,7 +1154,7 @@ func (x *PingRequest) String() string { func (*PingRequest) ProtoMessage() {} func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[16] + mi := &file_protocol_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1222,7 +1167,7 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. func (*PingRequest) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{16} + return file_protocol_proto_rawDescGZIP(), []int{15} } type PingResponse struct { @@ -1236,7 +1181,7 @@ type PingResponse struct { func (x *PingResponse) Reset() { *x = PingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[17] + mi := &file_protocol_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1249,7 +1194,7 @@ func (x *PingResponse) String() string { func (*PingResponse) ProtoMessage() {} func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[17] + mi := &file_protocol_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1262,7 +1207,7 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. func (*PingResponse) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{17} + return file_protocol_proto_rawDescGZIP(), []int{16} } func (x *PingResponse) GetMessage() string { @@ -1286,7 +1231,7 @@ type SlaRollup struct { func (x *SlaRollup) Reset() { *x = SlaRollup{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[18] + mi := &file_protocol_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1299,7 +1244,7 @@ func (x *SlaRollup) String() string { func (*SlaRollup) ProtoMessage() {} func (x *SlaRollup) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[18] + mi := &file_protocol_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1312,7 +1257,7 @@ func (x *SlaRollup) ProtoReflect() protoreflect.Message { // Deprecated: Use SlaRollup.ProtoReflect.Descriptor instead. func (*SlaRollup) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{18} + return file_protocol_proto_rawDescGZIP(), []int{17} } func (x *SlaRollup) GetTimestamp() *timestamppb.Timestamp { @@ -1355,7 +1300,7 @@ type SlaNodeReport struct { func (x *SlaNodeReport) Reset() { *x = SlaNodeReport{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[19] + mi := &file_protocol_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1368,7 +1313,7 @@ func (x *SlaNodeReport) String() string { func (*SlaNodeReport) ProtoMessage() {} func (x *SlaNodeReport) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[19] + mi := &file_protocol_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1381,7 +1326,7 @@ func (x *SlaNodeReport) ProtoReflect() protoreflect.Message { // Deprecated: Use SlaNodeReport.ProtoReflect.Descriptor instead. func (*SlaNodeReport) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{19} + return file_protocol_proto_rawDescGZIP(), []int{18} } func (x *SlaNodeReport) GetAddress() string { @@ -1413,7 +1358,7 @@ type StorageProof struct { func (x *StorageProof) Reset() { *x = StorageProof{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[20] + mi := &file_protocol_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1426,7 +1371,7 @@ func (x *StorageProof) String() string { func (*StorageProof) ProtoMessage() {} func (x *StorageProof) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[20] + mi := &file_protocol_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1439,7 +1384,7 @@ func (x *StorageProof) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageProof.ProtoReflect.Descriptor instead. func (*StorageProof) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{20} + return file_protocol_proto_rawDescGZIP(), []int{19} } func (x *StorageProof) GetHeight() int64 { @@ -1489,7 +1434,7 @@ type StorageProofVerification struct { func (x *StorageProofVerification) Reset() { *x = StorageProofVerification{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[21] + mi := &file_protocol_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1502,7 +1447,7 @@ func (x *StorageProofVerification) String() string { func (*StorageProofVerification) ProtoMessage() {} func (x *StorageProofVerification) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[21] + mi := &file_protocol_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1515,7 +1460,7 @@ func (x *StorageProofVerification) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageProofVerification.ProtoReflect.Descriptor instead. func (*StorageProofVerification) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{21} + return file_protocol_proto_rawDescGZIP(), []int{20} } func (x *StorageProofVerification) GetHeight() int64 { @@ -1550,7 +1495,7 @@ type ManageEntityLegacy struct { func (x *ManageEntityLegacy) Reset() { *x = ManageEntityLegacy{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[22] + mi := &file_protocol_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1563,7 +1508,7 @@ func (x *ManageEntityLegacy) String() string { func (*ManageEntityLegacy) ProtoMessage() {} func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[22] + mi := &file_protocol_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1576,7 +1521,7 @@ func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message { // Deprecated: Use ManageEntityLegacy.ProtoReflect.Descriptor instead. func (*ManageEntityLegacy) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{22} + return file_protocol_proto_rawDescGZIP(), []int{21} } func (x *ManageEntityLegacy) GetUserId() int64 { @@ -1640,13 +1585,13 @@ type RegistrationAttestationRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Registration *EthRegistration `protobuf:"bytes,1,opt,name=registration,proto3" json:"registration,omitempty"` + Registration *ValidatorRegistration `protobuf:"bytes,1,opt,name=registration,proto3" json:"registration,omitempty"` } func (x *RegistrationAttestationRequest) Reset() { *x = RegistrationAttestationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[23] + mi := &file_protocol_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1659,7 +1604,7 @@ func (x *RegistrationAttestationRequest) String() string { func (*RegistrationAttestationRequest) ProtoMessage() {} func (x *RegistrationAttestationRequest) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[23] + mi := &file_protocol_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1672,10 +1617,10 @@ func (x *RegistrationAttestationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegistrationAttestationRequest.ProtoReflect.Descriptor instead. func (*RegistrationAttestationRequest) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{23} + return file_protocol_proto_rawDescGZIP(), []int{22} } -func (x *RegistrationAttestationRequest) GetRegistration() *EthRegistration { +func (x *RegistrationAttestationRequest) GetRegistration() *ValidatorRegistration { if x != nil { return x.Registration } @@ -1687,14 +1632,14 @@ type RegistrationAttestationResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` - Registration *EthRegistration `protobuf:"bytes,2,opt,name=registration,proto3" json:"registration,omitempty"` + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + Registration *ValidatorRegistration `protobuf:"bytes,2,opt,name=registration,proto3" json:"registration,omitempty"` } func (x *RegistrationAttestationResponse) Reset() { *x = RegistrationAttestationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[24] + mi := &file_protocol_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1707,7 +1652,7 @@ func (x *RegistrationAttestationResponse) String() string { func (*RegistrationAttestationResponse) ProtoMessage() {} func (x *RegistrationAttestationResponse) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[24] + mi := &file_protocol_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1720,7 +1665,7 @@ func (x *RegistrationAttestationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegistrationAttestationResponse.ProtoReflect.Descriptor instead. func (*RegistrationAttestationResponse) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{24} + return file_protocol_proto_rawDescGZIP(), []int{23} } func (x *RegistrationAttestationResponse) GetSignature() string { @@ -1730,36 +1675,42 @@ func (x *RegistrationAttestationResponse) GetSignature() string { return "" } -func (x *RegistrationAttestationResponse) GetRegistration() *EthRegistration { +func (x *RegistrationAttestationResponse) GetRegistration() *ValidatorRegistration { if x != nil { return x.Registration } return nil } -type GetHeightRequest struct { +type Attestation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Signatures []string `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` + // Types that are assignable to Body: + // + // *Attestation_ValidatorRegistration + Body isAttestation_Body `protobuf_oneof:"body"` } -func (x *GetHeightRequest) Reset() { - *x = GetHeightRequest{} +func (x *Attestation) Reset() { + *x = Attestation{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[25] + mi := &file_protocol_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetHeightRequest) String() string { +func (x *Attestation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetHeightRequest) ProtoMessage() {} +func (*Attestation) ProtoMessage() {} -func (x *GetHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[25] +func (x *Attestation) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1770,58 +1721,42 @@ func (x *GetHeightRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetHeightRequest.ProtoReflect.Descriptor instead. -func (*GetHeightRequest) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{25} -} - -type HeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +// Deprecated: Use Attestation.ProtoReflect.Descriptor instead. +func (*Attestation) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{24} } -func (x *HeightResponse) Reset() { - *x = HeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *Attestation) GetSignatures() []string { + if x != nil { + return x.Signatures } + return nil } -func (x *HeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (m *Attestation) GetBody() isAttestation_Body { + if m != nil { + return m.Body + } + return nil } -func (*HeightResponse) ProtoMessage() {} - -func (x *HeightResponse) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *Attestation) GetValidatorRegistration() *ValidatorRegistration { + if x, ok := x.GetBody().(*Attestation_ValidatorRegistration); ok { + return x.ValidatorRegistration } - return mi.MessageOf(x) + return nil } -// Deprecated: Use HeightResponse.ProtoReflect.Descriptor instead. -func (*HeightResponse) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{26} +type isAttestation_Body interface { + isAttestation_Body() } -func (x *HeightResponse) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 +type Attestation_ValidatorRegistration struct { + ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,2,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` } +func (*Attestation_ValidatorRegistration) isAttestation_Body() {} + var File_protocol_proto protoreflect.FileDescriptor var file_protocol_proto_rawDesc = []byte{ @@ -1830,7 +1765,7 @@ var file_protocol_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x05, 0x0a, 0x11, 0x53, 0x69, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x05, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, @@ -1869,214 +1804,209 @@ var file_protocol_proto_rawDesc = []byte{ 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x5e, 0x0a, 0x19, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x18, 0xef, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x42, - 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, - 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, - 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, - 0x73, 0x68, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, - 0x73, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, - 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, - 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, - 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, - 0x61, 0x79, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, - 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, - 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x22, 0xd5, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, - 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x44, 0x0a, 0x10, 0x65, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, - 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0xd0, 0x01, 0x0a, 0x0f, 0x45, - 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, - 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x57, 0x0a, - 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, - 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0xb6, 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x63, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, - 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x32, 0xb2, 0x07, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x3a, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xef, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x16, 0x53, 0x65, + 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x22, 0xae, + 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3d, + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, + 0x1c, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, + 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, + 0x6c, 0x61, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x22, + 0xdc, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, + 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x9b, + 0x02, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0d, + 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, + 0x77, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, + 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x57, 0x0a, 0x17, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, + 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, + 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, + 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x22, 0x65, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x1f, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x43, 0x0a, 0x0c, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x58, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x32, 0xd4, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, @@ -2108,36 +2038,30 @@ var file_protocol_proto_rawDesc = []byte{ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x5c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x12, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, 0x50, - 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, 0x0a, 0x1a, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, + 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2152,7 +2076,7 @@ func file_protocol_proto_rawDescGZIP() []byte { return file_protocol_proto_rawDescData } -var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_protocol_proto_goTypes = []interface{}{ (*SignedTransaction)(nil), // 0: protocol.SignedTransaction (*SendTransactionRequest)(nil), // 1: protocol.SendTransactionRequest @@ -2167,62 +2091,58 @@ var file_protocol_proto_goTypes = []interface{}{ (*TrackPlays)(nil), // 10: protocol.TrackPlays (*ValidatorRegistrationLegacy)(nil), // 11: protocol.ValidatorRegistrationLegacy (*ValidatorRegistration)(nil), // 12: protocol.ValidatorRegistration - (*EthRegistration)(nil), // 13: protocol.EthRegistration - (*ValidatorDeregistration)(nil), // 14: protocol.ValidatorDeregistration - (*TrackPlay)(nil), // 15: protocol.TrackPlay - (*PingRequest)(nil), // 16: protocol.PingRequest - (*PingResponse)(nil), // 17: protocol.PingResponse - (*SlaRollup)(nil), // 18: protocol.SlaRollup - (*SlaNodeReport)(nil), // 19: protocol.SlaNodeReport - (*StorageProof)(nil), // 20: protocol.StorageProof - (*StorageProofVerification)(nil), // 21: protocol.StorageProofVerification - (*ManageEntityLegacy)(nil), // 22: protocol.ManageEntityLegacy - (*RegistrationAttestationRequest)(nil), // 23: protocol.RegistrationAttestationRequest - (*RegistrationAttestationResponse)(nil), // 24: protocol.RegistrationAttestationResponse - (*GetHeightRequest)(nil), // 25: protocol.GetHeightRequest - (*HeightResponse)(nil), // 26: protocol.HeightResponse - (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp + (*ValidatorDeregistration)(nil), // 13: protocol.ValidatorDeregistration + (*TrackPlay)(nil), // 14: protocol.TrackPlay + (*PingRequest)(nil), // 15: protocol.PingRequest + (*PingResponse)(nil), // 16: protocol.PingResponse + (*SlaRollup)(nil), // 17: protocol.SlaRollup + (*SlaNodeReport)(nil), // 18: protocol.SlaNodeReport + (*StorageProof)(nil), // 19: protocol.StorageProof + (*StorageProofVerification)(nil), // 20: protocol.StorageProofVerification + (*ManageEntityLegacy)(nil), // 21: protocol.ManageEntityLegacy + (*RegistrationAttestationRequest)(nil), // 22: protocol.RegistrationAttestationRequest + (*RegistrationAttestationResponse)(nil), // 23: protocol.RegistrationAttestationResponse + (*Attestation)(nil), // 24: protocol.Attestation + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp } var file_protocol_proto_depIdxs = []int32{ 10, // 0: protocol.SignedTransaction.plays:type_name -> protocol.TrackPlays 11, // 1: protocol.SignedTransaction.validator_registration:type_name -> protocol.ValidatorRegistrationLegacy - 18, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup - 22, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy - 14, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorDeregistration - 20, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof - 21, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification - 12, // 7: protocol.SignedTransaction.validator_registration_v2:type_name -> protocol.ValidatorRegistration + 17, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup + 21, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy + 13, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorDeregistration + 19, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof + 20, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification + 24, // 7: protocol.SignedTransaction.attestation:type_name -> protocol.Attestation 0, // 8: protocol.SendTransactionRequest.transaction:type_name -> protocol.SignedTransaction 0, // 9: protocol.ForwardTransactionRequest.transaction:type_name -> protocol.SignedTransaction 0, // 10: protocol.TransactionResponse.transaction:type_name -> protocol.SignedTransaction 0, // 11: protocol.BlockResponse.transactions:type_name -> protocol.SignedTransaction - 27, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 25, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp 4, // 13: protocol.BlockResponse.transaction_responses:type_name -> protocol.TransactionResponse - 15, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay - 13, // 15: protocol.ValidatorRegistration.eth_registration:type_name -> protocol.EthRegistration - 27, // 16: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp - 27, // 17: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp - 19, // 18: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport - 13, // 19: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.EthRegistration - 13, // 20: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.EthRegistration + 14, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay + 25, // 15: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp + 25, // 16: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp + 18, // 17: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport + 12, // 18: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.ValidatorRegistration + 12, // 19: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.ValidatorRegistration + 12, // 20: protocol.Attestation.validator_registration:type_name -> protocol.ValidatorRegistration 1, // 21: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest 2, // 22: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest 3, // 23: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest 6, // 24: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest - 25, // 25: protocol.Protocol.GetHeight:input_type -> protocol.GetHeightRequest - 8, // 26: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest - 16, // 27: protocol.Protocol.Ping:input_type -> protocol.PingRequest - 23, // 28: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest - 4, // 29: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse - 5, // 30: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse - 4, // 31: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse - 7, // 32: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse - 26, // 33: protocol.Protocol.GetHeight:output_type -> protocol.HeightResponse - 9, // 34: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse - 17, // 35: protocol.Protocol.Ping:output_type -> protocol.PingResponse - 24, // 36: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse - 29, // [29:37] is the sub-list for method output_type - 21, // [21:29] is the sub-list for method input_type + 8, // 25: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest + 15, // 26: protocol.Protocol.Ping:input_type -> protocol.PingRequest + 22, // 27: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest + 4, // 28: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse + 5, // 29: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse + 4, // 30: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse + 7, // 31: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse + 9, // 32: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse + 16, // 33: protocol.Protocol.Ping:output_type -> protocol.PingResponse + 23, // 34: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse + 28, // [28:35] is the sub-list for method output_type + 21, // [21:28] is the sub-list for method input_type 21, // [21:21] is the sub-list for extension type_name 21, // [21:21] is the sub-list for extension extendee 0, // [0:21] is the sub-list for field type_name @@ -2391,18 +2311,6 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthRegistration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorDeregistration); i { case 0: return &v.state @@ -2414,7 +2322,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackPlay); i { case 0: return &v.state @@ -2426,7 +2334,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PingRequest); i { case 0: return &v.state @@ -2438,7 +2346,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PingResponse); i { case 0: return &v.state @@ -2450,7 +2358,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SlaRollup); i { case 0: return &v.state @@ -2462,7 +2370,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SlaNodeReport); i { case 0: return &v.state @@ -2474,7 +2382,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StorageProof); i { case 0: return &v.state @@ -2486,7 +2394,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StorageProofVerification); i { case 0: return &v.state @@ -2498,7 +2406,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ManageEntityLegacy); i { case 0: return &v.state @@ -2510,7 +2418,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegistrationAttestationRequest); i { case 0: return &v.state @@ -2522,7 +2430,7 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_protocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegistrationAttestationResponse); i { case 0: return &v.state @@ -2534,20 +2442,8 @@ func file_protocol_proto_init() { return nil } } - file_protocol_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protocol_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeightResponse); i { + file_protocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Attestation); i { case 0: return &v.state case 1: @@ -2567,7 +2463,10 @@ func file_protocol_proto_init() { (*SignedTransaction_ValidatorDeregistration)(nil), (*SignedTransaction_StorageProof)(nil), (*SignedTransaction_StorageProofVerification)(nil), - (*SignedTransaction_ValidatorRegistrationV2)(nil), + (*SignedTransaction_Attestation)(nil), + } + file_protocol_proto_msgTypes[24].OneofWrappers = []interface{}{ + (*Attestation_ValidatorRegistration)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2575,7 +2474,7 @@ func file_protocol_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_proto_rawDesc, NumEnums: 0, - NumMessages: 27, + NumMessages: 25, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/core/gen/core_proto/protocol.pb.gw.go b/pkg/core/gen/core_proto/protocol.pb.gw.go index 50cffe13..853d74a6 100644 --- a/pkg/core/gen/core_proto/protocol.pb.gw.go +++ b/pkg/core/gen/core_proto/protocol.pb.gw.go @@ -221,24 +221,6 @@ func local_request_Protocol_GetBlock_0(ctx context.Context, marshaler runtime.Ma } -func request_Protocol_GetHeight_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetHeightRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Protocol_GetHeight_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetHeightRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetHeight(ctx, &protoReq) - return msg, metadata, err - -} - func request_Protocol_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetNodeInfoRequest var metadata runtime.ServerMetadata @@ -415,31 +397,6 @@ func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, s }) - mux.Handle("GET", pattern_Protocol_GetHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/protocol.Protocol/GetHeight", runtime.WithHTTPPathPattern("/core/grpc/height")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Protocol_GetHeight_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Protocol_GetHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Protocol_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -644,28 +601,6 @@ func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, c }) - mux.Handle("GET", pattern_Protocol_GetHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/protocol.Protocol/GetHeight", runtime.WithHTTPPathPattern("/core/grpc/height")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Protocol_GetHeight_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Protocol_GetHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Protocol_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -744,8 +679,6 @@ var ( pattern_Protocol_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"core", "grpc", "block", "height"}, "")) - pattern_Protocol_GetHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "height"}, "")) - pattern_Protocol_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "node_info"}, "")) pattern_Protocol_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "ping"}, "")) @@ -762,8 +695,6 @@ var ( forward_Protocol_GetBlock_0 = runtime.ForwardResponseMessage - forward_Protocol_GetHeight_0 = runtime.ForwardResponseMessage - forward_Protocol_GetNodeInfo_0 = runtime.ForwardResponseMessage forward_Protocol_Ping_0 = runtime.ForwardResponseMessage diff --git a/pkg/core/gen/core_proto/protocol.swagger.json b/pkg/core/gen/core_proto/protocol.swagger.json index af30a3f2..631573fa 100644 --- a/pkg/core/gen/core_proto/protocol.swagger.json +++ b/pkg/core/gen/core_proto/protocol.swagger.json @@ -39,7 +39,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/protocolEthRegistration" + "$ref": "#/definitions/protocolValidatorRegistration" } } ], @@ -79,28 +79,6 @@ ] } }, - "/core/grpc/height": { - "get": { - "operationId": "Protocol_GetHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/protocolHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "Protocol" - ] - } - }, "/core/grpc/node_info": { "get": { "operationId": "Protocol_GetNodeInfo", @@ -256,6 +234,20 @@ }, "additionalProperties": {} }, + "protocolAttestation": { + "type": "object", + "properties": { + "signatures": { + "type": "array", + "items": { + "type": "string" + } + }, + "validatorRegistration": { + "$ref": "#/definitions/protocolValidatorRegistration" + } + } + }, "protocolBlockResponse": { "type": "object", "properties": { @@ -297,43 +289,9 @@ } } }, - "protocolEthRegistration": { - "type": "object", - "properties": { - "delegateWallet": { - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "nodeType": { - "type": "string" - }, - "spId": { - "type": "string" - }, - "ethBlock": { - "type": "string", - "format": "int64" - }, - "referenceHeight": { - "type": "string", - "format": "int64" - } - } - }, "protocolForwardTransactionResponse": { "type": "object" }, - "protocolHeightResponse": { - "type": "object", - "properties": { - "height": { - "type": "string", - "format": "int64" - } - } - }, "protocolManageEntityLegacy": { "type": "object", "properties": { @@ -401,7 +359,7 @@ "type": "string" }, "registration": { - "$ref": "#/definitions/protocolEthRegistration" + "$ref": "#/definitions/protocolValidatorRegistration" } } }, @@ -435,8 +393,8 @@ "storageProofVerification": { "$ref": "#/definitions/protocolStorageProofVerification" }, - "validatorRegistrationV2": { - "$ref": "#/definitions/protocolValidatorRegistration" + "attestation": { + "$ref": "#/definitions/protocolAttestation" } } }, @@ -586,14 +544,21 @@ "protocolValidatorRegistration": { "type": "object", "properties": { - "attestations": { - "type": "array", - "items": { - "type": "string" - } + "delegateWallet": { + "type": "string" }, - "ethRegistration": { - "$ref": "#/definitions/protocolEthRegistration" + "endpoint": { + "type": "string" + }, + "nodeType": { + "type": "string" + }, + "spId": { + "type": "string" + }, + "ethBlock": { + "type": "string", + "format": "int64" }, "cometAddress": { "type": "string" @@ -605,6 +570,10 @@ "power": { "type": "string", "format": "int64" + }, + "deadline": { + "type": "string", + "format": "int64" } } }, diff --git a/pkg/core/gen/core_proto/protocol_grpc.pb.go b/pkg/core/gen/core_proto/protocol_grpc.pb.go index f4e01a84..55df1bb8 100644 --- a/pkg/core/gen/core_proto/protocol_grpc.pb.go +++ b/pkg/core/gen/core_proto/protocol_grpc.pb.go @@ -23,7 +23,6 @@ const ( Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" - Protocol_GetHeight_FullMethodName = "/protocol.Protocol/GetHeight" Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" Protocol_GetRegistrationAttestation_FullMethodName = "/protocol.Protocol/GetRegistrationAttestation" @@ -37,7 +36,6 @@ type ProtocolClient interface { ForwardTransaction(ctx context.Context, in *ForwardTransactionRequest, opts ...grpc.CallOption) (*ForwardTransactionResponse, error) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*BlockResponse, error) - GetHeight(ctx context.Context, in *GetHeightRequest, opts ...grpc.CallOption) (*HeightResponse, error) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) GetRegistrationAttestation(ctx context.Context, in *RegistrationAttestationRequest, opts ...grpc.CallOption) (*RegistrationAttestationResponse, error) @@ -87,15 +85,6 @@ func (c *protocolClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts return out, nil } -func (c *protocolClient) GetHeight(ctx context.Context, in *GetHeightRequest, opts ...grpc.CallOption) (*HeightResponse, error) { - out := new(HeightResponse) - err := c.cc.Invoke(ctx, Protocol_GetHeight_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *protocolClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) { out := new(NodeInfoResponse) err := c.cc.Invoke(ctx, Protocol_GetNodeInfo_FullMethodName, in, out, opts...) @@ -131,7 +120,6 @@ type ProtocolServer interface { ForwardTransaction(context.Context, *ForwardTransactionRequest) (*ForwardTransactionResponse, error) GetTransaction(context.Context, *GetTransactionRequest) (*TransactionResponse, error) GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error) - GetHeight(context.Context, *GetHeightRequest) (*HeightResponse, error) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) Ping(context.Context, *PingRequest) (*PingResponse, error) GetRegistrationAttestation(context.Context, *RegistrationAttestationRequest) (*RegistrationAttestationResponse, error) @@ -154,9 +142,6 @@ func (UnimplementedProtocolServer) GetTransaction(context.Context, *GetTransacti func (UnimplementedProtocolServer) GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") } -func (UnimplementedProtocolServer) GetHeight(context.Context, *GetHeightRequest) (*HeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHeight not implemented") -} func (UnimplementedProtocolServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") } @@ -251,24 +236,6 @@ func _Protocol_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Protocol_GetHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServer).GetHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Protocol_GetHeight_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServer).GetHeight(ctx, req.(*GetHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Protocol_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNodeInfoRequest) if err := dec(in); err != nil { @@ -346,10 +313,6 @@ var Protocol_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetBlock", Handler: _Protocol_GetBlock_Handler, }, - { - MethodName: "GetHeight", - Handler: _Protocol_GetHeight_Handler, - }, { MethodName: "GetNodeInfo", Handler: _Protocol_GetNodeInfo_Handler, diff --git a/pkg/core/gen/models/protocol_attestation.go b/pkg/core/gen/models/protocol_attestation.go new file mode 100644 index 00000000..a70b62dc --- /dev/null +++ b/pkg/core/gen/models/protocol_attestation.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolAttestation protocol attestation +// +// swagger:model protocolAttestation +type ProtocolAttestation struct { + + // signatures + Signatures []string `json:"signatures"` + + // validator registration + ValidatorRegistration *ProtocolValidatorRegistration `json:"validatorRegistration,omitempty"` +} + +// Validate validates this protocol attestation +func (m *ProtocolAttestation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValidatorRegistration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolAttestation) validateValidatorRegistration(formats strfmt.Registry) error { + if swag.IsZero(m.ValidatorRegistration) { // not required + return nil + } + + if m.ValidatorRegistration != nil { + if err := m.ValidatorRegistration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("validatorRegistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("validatorRegistration") + } + return err + } + } + + return nil +} + +// ContextValidate validate this protocol attestation based on the context it is used +func (m *ProtocolAttestation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValidatorRegistration(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolAttestation) contextValidateValidatorRegistration(ctx context.Context, formats strfmt.Registry) error { + + if m.ValidatorRegistration != nil { + + if swag.IsZero(m.ValidatorRegistration) { // not required + return nil + } + + if err := m.ValidatorRegistration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("validatorRegistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("validatorRegistration") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolAttestation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolAttestation) UnmarshalBinary(b []byte) error { + var res ProtocolAttestation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_eth_registration.go b/pkg/core/gen/models/protocol_eth_registration.go index f5760bc3..0bbeaad0 100644 --- a/pkg/core/gen/models/protocol_eth_registration.go +++ b/pkg/core/gen/models/protocol_eth_registration.go @@ -29,9 +29,6 @@ type ProtocolEthRegistration struct { // node type NodeType string `json:"nodeType,omitempty"` - // reference height - ReferenceHeight string `json:"referenceHeight,omitempty"` - // sp Id SpID string `json:"spId,omitempty"` } diff --git a/pkg/core/gen/models/protocol_registration_attestation_response.go b/pkg/core/gen/models/protocol_registration_attestation_response.go index 5057193f..8f5aa940 100644 --- a/pkg/core/gen/models/protocol_registration_attestation_response.go +++ b/pkg/core/gen/models/protocol_registration_attestation_response.go @@ -19,7 +19,7 @@ import ( type ProtocolRegistrationAttestationResponse struct { // registration - Registration *ProtocolEthRegistration `json:"registration,omitempty"` + Registration *ProtocolValidatorRegistration `json:"registration,omitempty"` // signature Signature string `json:"signature,omitempty"` diff --git a/pkg/core/gen/models/protocol_signed_transaction.go b/pkg/core/gen/models/protocol_signed_transaction.go index bcacddf4..67c1be8a 100644 --- a/pkg/core/gen/models/protocol_signed_transaction.go +++ b/pkg/core/gen/models/protocol_signed_transaction.go @@ -18,6 +18,9 @@ import ( // swagger:model protocolSignedTransaction type ProtocolSignedTransaction struct { + // attestation + Attestation *ProtocolAttestation `json:"attestation,omitempty"` + // manage entity ManageEntity *ProtocolManageEntityLegacy `json:"manageEntity,omitempty"` @@ -44,15 +47,16 @@ type ProtocolSignedTransaction struct { // validator registration ValidatorRegistration *ProtocolValidatorRegistrationLegacy `json:"validatorRegistration,omitempty"` - - // validator registration v2 - ValidatorRegistrationV2 *ProtocolValidatorRegistration `json:"validatorRegistrationV2,omitempty"` } // Validate validates this protocol signed transaction func (m *ProtocolSignedTransaction) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAttestation(formats); err != nil { + res = append(res, err) + } + if err := m.validateManageEntity(formats); err != nil { res = append(res, err) } @@ -81,16 +85,31 @@ func (m *ProtocolSignedTransaction) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateValidatorRegistrationV2(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *ProtocolSignedTransaction) validateAttestation(formats strfmt.Registry) error { + if swag.IsZero(m.Attestation) { // not required + return nil + } + + if m.Attestation != nil { + if err := m.Attestation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attestation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attestation") + } + return err + } + } + + return nil +} + func (m *ProtocolSignedTransaction) validateManageEntity(formats strfmt.Registry) error { if swag.IsZero(m.ManageEntity) { // not required return nil @@ -224,29 +243,14 @@ func (m *ProtocolSignedTransaction) validateValidatorRegistration(formats strfmt return nil } -func (m *ProtocolSignedTransaction) validateValidatorRegistrationV2(formats strfmt.Registry) error { - if swag.IsZero(m.ValidatorRegistrationV2) { // not required - return nil - } - - if m.ValidatorRegistrationV2 != nil { - if err := m.ValidatorRegistrationV2.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validatorRegistrationV2") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validatorRegistrationV2") - } - return err - } - } - - return nil -} - // ContextValidate validate this protocol signed transaction based on the context it is used func (m *ProtocolSignedTransaction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAttestation(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateManageEntity(ctx, formats); err != nil { res = append(res, err) } @@ -275,16 +279,33 @@ func (m *ProtocolSignedTransaction) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateValidatorRegistrationV2(ctx, formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *ProtocolSignedTransaction) contextValidateAttestation(ctx context.Context, formats strfmt.Registry) error { + + if m.Attestation != nil { + + if swag.IsZero(m.Attestation) { // not required + return nil + } + + if err := m.Attestation.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attestation") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("attestation") + } + return err + } + } + + return nil +} + func (m *ProtocolSignedTransaction) contextValidateManageEntity(ctx context.Context, formats strfmt.Registry) error { if m.ManageEntity != nil { @@ -432,27 +453,6 @@ func (m *ProtocolSignedTransaction) contextValidateValidatorRegistration(ctx con return nil } -func (m *ProtocolSignedTransaction) contextValidateValidatorRegistrationV2(ctx context.Context, formats strfmt.Registry) error { - - if m.ValidatorRegistrationV2 != nil { - - if swag.IsZero(m.ValidatorRegistrationV2) { // not required - return nil - } - - if err := m.ValidatorRegistrationV2.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("validatorRegistrationV2") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("validatorRegistrationV2") - } - return err - } - } - - return nil -} - // MarshalBinary interface implementation func (m *ProtocolSignedTransaction) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/pkg/core/gen/models/protocol_validator_registration.go b/pkg/core/gen/models/protocol_validator_registration.go index ada0ac01..70477a67 100644 --- a/pkg/core/gen/models/protocol_validator_registration.go +++ b/pkg/core/gen/models/protocol_validator_registration.go @@ -8,7 +8,6 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -18,14 +17,23 @@ import ( // swagger:model protocolValidatorRegistration type ProtocolValidatorRegistration struct { - // attestations - Attestations []string `json:"attestations"` - // comet address CometAddress string `json:"cometAddress,omitempty"` - // eth registration - EthRegistration *ProtocolEthRegistration `json:"ethRegistration,omitempty"` + // deadline + Deadline string `json:"deadline,omitempty"` + + // delegate wallet + DelegateWallet string `json:"delegateWallet,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // eth block + EthBlock string `json:"ethBlock,omitempty"` + + // node type + NodeType string `json:"nodeType,omitempty"` // power Power string `json:"power,omitempty"` @@ -33,73 +41,18 @@ type ProtocolValidatorRegistration struct { // pub key // Format: byte PubKey strfmt.Base64 `json:"pubKey,omitempty"` + + // sp Id + SpID string `json:"spId,omitempty"` } // Validate validates this protocol validator registration func (m *ProtocolValidatorRegistration) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEthRegistration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtocolValidatorRegistration) validateEthRegistration(formats strfmt.Registry) error { - if swag.IsZero(m.EthRegistration) { // not required - return nil - } - - if m.EthRegistration != nil { - if err := m.EthRegistration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ethRegistration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ethRegistration") - } - return err - } - } - - return nil -} - -// ContextValidate validate this protocol validator registration based on the context it is used +// ContextValidate validates this protocol validator registration based on context it is used func (m *ProtocolValidatorRegistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEthRegistration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProtocolValidatorRegistration) contextValidateEthRegistration(ctx context.Context, formats strfmt.Registry) error { - - if m.EthRegistration != nil { - - if swag.IsZero(m.EthRegistration) { // not required - return nil - } - - if err := m.EthRegistration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ethRegistration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ethRegistration") - } - return err - } - } - return nil } diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index 0bc79c36..6b5a929a 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -26,9 +26,6 @@ service Protocol { rpc GetBlock(GetBlockRequest) returns (BlockResponse) { option (google.api.http) = {get: "/core/grpc/block/{height}"}; } - rpc GetHeight(GetHeightRequest) returns (HeightResponse) { - option (google.api.http) = {get: "/core/grpc/height"}; - } rpc GetNodeInfo(GetNodeInfoRequest) returns (NodeInfoResponse) { option (google.api.http) = {get: "/core/grpc/node_info"}; } @@ -54,7 +51,7 @@ message SignedTransaction { ValidatorDeregistration validator_deregistration = 1004; StorageProof storage_proof = 1005; StorageProofVerification storage_proof_verification = 1006; - ValidatorRegistration validator_registration_v2 = 1007; + Attestation attestation = 1007; } } @@ -121,20 +118,15 @@ message ValidatorRegistrationLegacy { } message ValidatorRegistration { - repeated string attestations = 1; - EthRegistration eth_registration = 2; - string comet_address = 3; - bytes pub_key = 4; - int64 power = 5; -} - -message EthRegistration { string delegate_wallet = 1; string endpoint = 2; string node_type = 3; string sp_id = 4; int64 eth_block = 5; - int64 reference_height = 6; + string comet_address = 6; + bytes pub_key = 7; + int64 power = 8; + int64 deadline = 9; } message ValidatorDeregistration { @@ -195,16 +187,17 @@ message ManageEntityLegacy { } message RegistrationAttestationRequest { - EthRegistration registration = 1; + ValidatorRegistration registration = 1; } message RegistrationAttestationResponse { string signature = 1; - EthRegistration registration = 2; + ValidatorRegistration registration = 2; } -message GetHeightRequest {} - -message HeightResponse { - int64 height = 1; +message Attestation { + repeated string signatures = 1; + oneof body { + ValidatorRegistration validator_registration = 2; + } } diff --git a/pkg/core/server/abci.go b/pkg/core/server/abci.go index dc9385d8..3995a328 100644 --- a/pkg/core/server/abci.go +++ b/pkg/core/server/abci.go @@ -238,7 +238,8 @@ func (s *Server) FinalizeBlock(ctx context.Context, req *abcitypes.FinalizeBlock PubKeyType: "ed25519", } } - } else if vr := signedTx.GetValidatorRegistrationV2(); vr != nil { + } else if att := signedTx.GetAttestation(); att != nil && att.GetValidatorRegistration() != nil { + vr := att.GetValidatorRegistration() vrPubKey := ed25519.PubKey(vr.GetPubKey()) vrAddr := vrPubKey.Address().String() if _, ok := validatorUpdatesMap[vrAddr]; !ok { @@ -464,9 +465,9 @@ func (s *Server) validateBlockTx(ctx context.Context, blockTime time.Time, block switch signedTx.Transaction.(type) { case *core_proto.SignedTransaction_Plays: - case *core_proto.SignedTransaction_ValidatorRegistrationV2: - if err := s.isValidRegisterNodeTx(ctx, signedTx, blockHeight); err != nil { - s.logger.Error("Invalid block: invalid register node tx", "error", err) + case *core_proto.SignedTransaction_Attestation: + if err := s.isValidAttestation(ctx, signedTx, blockHeight); err != nil { + s.logger.Error("Invalid block: invalid attestation tx", "error", err) return false, nil } case *core_proto.SignedTransaction_ValidatorRegistration: @@ -508,8 +509,8 @@ func (s *Server) finalizeTransaction(ctx context.Context, req *abcitypes.Finaliz return s.finalizePlayTransaction(ctx, msg) case *core_proto.SignedTransaction_ManageEntity: return s.finalizeManageEntity(ctx, msg) - case *core_proto.SignedTransaction_ValidatorRegistrationV2: - return s.finalizeRegisterNode(ctx, msg, req.Height) + case *core_proto.SignedTransaction_Attestation: + return s.finalizeAttestation(ctx, msg, req.Height) case *core_proto.SignedTransaction_ValidatorRegistration: return s.finalizeLegacyRegisterNode(ctx, msg, blockHeight) case *core_proto.SignedTransaction_ValidatorDeregistration: diff --git a/pkg/core/server/attestation.go b/pkg/core/server/attestation.go new file mode 100644 index 00000000..b36dea98 --- /dev/null +++ b/pkg/core/server/attestation.go @@ -0,0 +1,110 @@ +package server + +import ( + "context" + "errors" + "fmt" + "sync" + + "github.com/AudiusProject/audiusd/pkg/core/common" + "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" + "github.com/jackc/pgx/v5" + "google.golang.org/protobuf/proto" +) + +func (s *Server) isValidAttestation(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) error { + att := tx.GetAttestation() + if att == nil { + return errors.New("empty attestation tx") + } + + bodyBytes, err := getAttestationBodyBytes(att) + if err != nil { + return fmt.Errorf("could not marshal attestation body into bytes: %v", err) + } + signerAddrs, err := recoverSigners(att.Signatures, bodyBytes) + if err != nil { + return fmt.Errorf("could not recover signers: %v", err) + } + + switch t := att.Body.(type) { + case *core_proto.Attestation_ValidatorRegistration: + return s.isValidRegisterNodeAttestation(ctx, tx, signerAddrs, blockHeight) + default: + return fmt.Errorf("unhandled attestation: %v %T", tx, t) + } +} + +func (s *Server) finalizeAttestation(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) (*core_proto.SignedTransaction, error) { + if err := s.isValidAttestation(ctx, tx, blockHeight); err != nil { + return nil, fmt.Errorf("invalid attestation during finalize step: %v", err) + } + + switch t := tx.GetAttestation().Body.(type) { + case *core_proto.Attestation_ValidatorRegistration: + return tx, s.finalizeRegisterNodeAttestation(ctx, tx, blockHeight) + default: + return nil, fmt.Errorf("unhandled attestation: %v %T", tx, t) + } +} + +func getAttestationBodyBytes(att *core_proto.Attestation) ([]byte, error) { + switch t := att.Body.(type) { + case *core_proto.Attestation_ValidatorRegistration: + return proto.Marshal(att.GetValidatorRegistration()) + default: + return nil, fmt.Errorf("unhandled attestation: %v %T", att, t) + } +} + +func recoverSigners(signatures []string, data []byte) ([]string, error) { + res := make([]string, len(signatures)) + type result struct { + index int + address string + err error + } + + ch := make(chan result, len(signatures)) + var wg sync.WaitGroup + for i, sig := range signatures { + wg.Add(1) + go func(i int, sig string) { + defer wg.Done() + _, address, err := common.EthRecover(sig, data) + ch <- result{i, address, err} + }(i, sig) + } + + wg.Wait() + close(ch) + + for r := range ch { + if r.err != nil { + return nil, fmt.Errorf("invalid signature provided to attestation tx: %v", r.err) + } + res[r.index] = r.address + } + + return res, nil +} + +func (s *Server) attestationHasEnoughSigners(ctx context.Context, signers []string, rendezvousKey []byte, rendezvousSize, signersNeeded int) (bool, error) { + addrs, err := s.db.GetAllEthAddressesOfRegisteredNodes(ctx) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return false, fmt.Errorf("failed to get core validators while validating registration: %v", err) + } + signersNeeded = min(len(addrs), signersNeeded) + rendezvous := common.GetAttestorRendezvous(addrs, rendezvousKey, rendezvousSize) + for _, address := range signers { + if rendezvous[address] { + signersNeeded-- + delete(rendezvous, address) + } + } + if signersNeeded > 0 { + s.logger.Infof("not enough attestations. Had: %d, needed: %d more", len(signers), signersNeeded) + return false, nil + } + return true, nil +} diff --git a/pkg/core/server/grpc.go b/pkg/core/server/grpc.go index f3b27746..17edd99d 100644 --- a/pkg/core/server/grpc.go +++ b/pkg/core/server/grpc.go @@ -213,12 +213,6 @@ func (s *Server) GetBlock(ctx context.Context, req *core_proto.GetBlockRequest) return res, nil } -func (s *Server) GetHeight(ctx context.Context, req *core_proto.GetHeightRequest) (*core_proto.HeightResponse, error) { - return &core_proto.HeightResponse{ - Height: s.cache.currentHeight.Load(), - }, nil -} - func (s *Server) GetNodeInfo(ctx context.Context, req *core_proto.GetNodeInfoRequest) (*core_proto.NodeInfoResponse, error) { status, err := s.rpc.Status(ctx) if err != nil { @@ -303,38 +297,38 @@ func (s *Server) getBlockRpcFallback(ctx context.Context, height int64) (*core_p } func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto.RegistrationAttestationRequest) (*core_proto.RegistrationAttestationResponse, error) { - ethReg := req.GetRegistration() - if ethReg == nil { + reg := req.GetRegistration() + if reg == nil { return nil, errors.New("empty registration attestation") } - if ethReg.ReferenceHeight > s.cache.currentHeight.Load() { - return nil, fmt.Errorf("Cannot sign registration request with reference height %d (current height is %d)", ethReg.ReferenceHeight, s.cache.currentHeight.Load()) + if reg.Deadline < s.cache.currentHeight.Load() || reg.Deadline > s.cache.currentHeight.Load()+maxRegistrationAttestationValidity { + return nil, fmt.Errorf("Cannot sign registration request with deadline %d (current height is %d)", reg.Deadline, s.cache.currentHeight.Load()) } if !s.isNodeRegisteredOnEthereum( - ethcommon.HexToAddress(ethReg.DelegateWallet), - ethReg.Endpoint, - big.NewInt(ethReg.EthBlock), + ethcommon.HexToAddress(reg.DelegateWallet), + reg.Endpoint, + big.NewInt(reg.EthBlock), ) { s.logger.Error( "Could not attest to node eth registration", "delegate", - ethReg.DelegateWallet, + reg.DelegateWallet, "endpoint", - ethReg.Endpoint, + reg.Endpoint, "eth block", - ethReg.EthBlock, + reg.EthBlock, ) return nil, errors.New("node is not registered on ethereum") } - ethRegBytes, err := proto.Marshal(ethReg) + regBytes, err := proto.Marshal(reg) if err != nil { s.logger.Error("could not marshal ethereum registration", "error", err) return nil, err } - sig, err := common.EthSign(s.config.EthereumKey, ethRegBytes) + sig, err := common.EthSign(s.config.EthereumKey, regBytes) if err != nil { s.logger.Error("could not sign ethereum registration", "error", err) return nil, err @@ -342,6 +336,6 @@ func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto return &core_proto.RegistrationAttestationResponse{ Signature: sig, - Registration: ethReg, + Registration: reg, }, nil } diff --git a/pkg/core/server/registration.go b/pkg/core/server/registration.go index 9be4630f..f7d58a3c 100644 --- a/pkg/core/server/registration.go +++ b/pkg/core/server/registration.go @@ -20,40 +20,29 @@ import ( "google.golang.org/protobuf/proto" ) -const maxRegistrationAge = 24 * 60 * 60 // Registration requests are only valid for approx 24 hours +const maxRegistrationAttestationValidity = 24 * 60 * 60 // Registration requests are only valid for approx 24 hours -func (s *Server) isValidRegisterNodeTx(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) error { +func (s *Server) isValidRegisterNodeAttestation(ctx context.Context, tx *core_proto.SignedTransaction, signers []string, blockHeight int64) error { + vr := tx.GetAttestation().GetValidatorRegistration() + if vr == nil { + return fmt.Errorf("unknown tx fell into isValidRegisterNodeAttestation: %v", tx) + } + + // validate address from tx signature sig := tx.GetSignature() if sig == "" { return fmt.Errorf("no signature provided for registration tx: %v", tx) } - - vr := tx.GetValidatorRegistrationV2() - if vr == nil { - return fmt.Errorf("unknown tx fell into isValidRegisterNodeTx: %v", tx) - } - er := vr.GetEthRegistration() - if er == nil { - return fmt.Errorf("Empty eth registration fell into isValidRegisterNodeTx: %v", tx) - } - - // convert to bytes for signature recovery - vrBytes, err := proto.Marshal(vr) + attBytes, err := proto.Marshal(tx.GetAttestation()) if err != nil { return fmt.Errorf("could not marshal registration tx: %v", err) } - erBytes, err := proto.Marshal(er) - if err != nil { - return fmt.Errorf("could not marshal ethereum registration: %v", err) - } - - // validate address - _, address, err := common.EthRecover(tx.GetSignature(), vrBytes) + _, address, err := common.EthRecover(tx.GetSignature(), attBytes) if err != nil { return fmt.Errorf("could not recover msg sig: %v", err) } - if address != er.GetDelegateWallet() { - return fmt.Errorf("Signature address '%s' does not match ethereum registration '%s'", address, er.GetDelegateWallet()) + if address != vr.GetDelegateWallet() { + return fmt.Errorf("signature address '%s' does not match ethereum registration '%s'", address, vr.GetDelegateWallet()) } // validate voting power @@ -63,7 +52,7 @@ func (s *Server) isValidRegisterNodeTx(ctx context.Context, tx *core_proto.Signe // validate pub key if len(vr.GetPubKey()) == 0 { - return fmt.Errorf("public Key missing from %s registration tx", er.GetEndpoint()) + return fmt.Errorf("public Key missing from %s registration tx", vr.GetEndpoint()) } vrPubKey := ed25519.PubKey(vr.GetPubKey()) if vrPubKey.Address().String() != vr.GetCometAddress() { @@ -72,85 +61,62 @@ func (s *Server) isValidRegisterNodeTx(ctx context.Context, tx *core_proto.Signe // ensure comet address is not already taken if _, err := s.db.GetRegisteredNodeByCometAddress(context.Background(), vr.GetCometAddress()); !errors.Is(err, pgx.ErrNoRows) { - return fmt.Errorf("address '%s' is already registered on comet, node %s attempted to acquire it", vr.GetCometAddress(), er.GetEndpoint()) + return fmt.Errorf("address '%s' is already registered on comet, node %s attempted to acquire it", vr.GetCometAddress(), vr.GetEndpoint()) } // validate age of request - if er.ReferenceHeight > blockHeight || er.ReferenceHeight < blockHeight-maxRegistrationAge { - return fmt.Errorf("Registration request for '%s' with reference height %d is too old (current height is %d)", er.GetEndpoint(), er.ReferenceHeight, blockHeight) + if vr.Deadline < blockHeight || vr.Deadline > blockHeight+maxRegistrationAttestationValidity { + return fmt.Errorf("Registration request for '%s' with deadline %d is too new/old (current height is %d)", vr.GetEndpoint(), vr.Deadline, blockHeight) } - // validate attestations - addrs, err := s.db.GetAllEthAddressesOfRegisteredNodes(ctx) - if err != nil && !errors.Is(err, pgx.ErrNoRows) { - return fmt.Errorf("Failed to get core validators while validating registration: %v", err) - } - atts := vr.GetAttestations() - if atts == nil { - atts = make([]string, 0) // empty attestations are expected at genesis - } - requiredAttestations := min(len(addrs), s.config.AttRegistrationMin) + // validate signers keyBytes := make([]byte, 8) - binary.BigEndian.PutUint64(keyBytes, uint64(er.GetEthBlock())) - rendezvous := common.GetAttestorRendezvous(addrs, keyBytes, s.config.AttRegistrationRSize) - for _, att := range atts { - _, address, err := common.EthRecover(att, erBytes) - if err != nil { - return fmt.Errorf("Invalid attestation provided to RegisterNode tx: %v", err) - } - if rendezvous[address] { - requiredAttestations-- - delete(rendezvous, address) - } - } - if requiredAttestations > 0 { - return fmt.Errorf("Not enough attestations provided to register validator at '%s'. Had: %d, needed: %d more", er.GetEndpoint(), len(atts), requiredAttestations) + binary.BigEndian.PutUint64(keyBytes, uint64(vr.GetEthBlock())) + enough, err := s.attestationHasEnoughSigners(ctx, signers, keyBytes, s.config.AttRegistrationRSize, s.config.AttRegistrationMin) + if err != nil { + return fmt.Errorf("Error checking attestors against validators: %v", err) + } else if !enough { + return fmt.Errorf("Not enough attestations provided to register validator at '%s'", vr.GetEndpoint()) } return nil } -func (s *Server) finalizeRegisterNode(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) (*core_proto.ValidatorRegistration, error) { - if err := s.isValidRegisterNodeTx(ctx, tx, blockHeight); err != nil { - return nil, fmt.Errorf("invalid register node tx: %v", err) - } - +func (s *Server) finalizeRegisterNodeAttestation(ctx context.Context, tx *core_proto.SignedTransaction, blockHeight int64) error { qtx := s.getDb() - vr := tx.GetValidatorRegistrationV2() - er := vr.GetEthRegistration() + vr := tx.GetAttestation().GetValidatorRegistration() - sig := tx.GetSignature() - txBytes, err := proto.Marshal(vr) + txBytes, err := proto.Marshal(tx) if err != nil { - return nil, fmt.Errorf("could not unmarshal tx bytes: %v", err) + return fmt.Errorf("could not unmarshal tx bytes: %v", err) } - pubKey, _, err := common.EthRecover(sig, txBytes) + pubKey, _, err := common.EthRecover(tx.GetSignature(), txBytes) if err != nil { - return nil, fmt.Errorf("could not recover signer: %v", err) + return fmt.Errorf("could not recover signer: %v", err) } serializedPubKey, err := common.SerializePublicKey(pubKey) if err != nil { - return nil, fmt.Errorf("could not serialize pubkey: %v", err) + return fmt.Errorf("could not serialize pubkey: %v", err) } // Do not reinsert duplicate registrations - if _, err = qtx.GetRegisteredNodeByEthAddress(ctx, er.GetDelegateWallet()); errors.Is(err, pgx.ErrNoRows) { + if _, err = qtx.GetRegisteredNodeByEthAddress(ctx, vr.GetDelegateWallet()); errors.Is(err, pgx.ErrNoRows) { err = qtx.InsertRegisteredNode(ctx, db.InsertRegisteredNodeParams{ PubKey: serializedPubKey, - EthAddress: er.GetDelegateWallet(), - Endpoint: er.GetEndpoint(), + EthAddress: vr.GetDelegateWallet(), + Endpoint: vr.GetEndpoint(), CometAddress: vr.GetCometAddress(), CometPubKey: base64.StdEncoding.EncodeToString(vr.GetPubKey()), - EthBlock: strconv.FormatInt(er.GetEthBlock(), 10), - NodeType: er.GetNodeType(), - SpID: er.GetSpId(), + EthBlock: strconv.FormatInt(vr.GetEthBlock(), 10), + NodeType: vr.GetNodeType(), + SpID: vr.GetSpId(), }) if err != nil && !errors.Is(err, pgx.ErrNoRows) { - return nil, fmt.Errorf("error inserting registered node: %v", err) + return fmt.Errorf("error inserting registered node: %v", err) } } - return vr, nil + return nil } func (s *Server) isValidDeregisterNodeTx(tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) error { diff --git a/pkg/core/server/registry_bridge.go b/pkg/core/server/registry_bridge.go index ce2b0f5d..b38e71e6 100644 --- a/pkg/core/server/registry_bridge.go +++ b/pkg/core/server/registry_bridge.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "math/big" - "strconv" "time" "github.com/AudiusProject/audiusd/pkg/core/common" @@ -177,34 +176,20 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge binary.BigEndian.PutUint64(keyBytes, ethBlock.Uint64()) rendezvous := common.GetAttestorRendezvous(addrs, keyBytes, s.config.AttRegistrationRSize) - // Get latest comet block height from peers (this node is likely syncing) - var cometBlockHeight int64 - for addr, _ := range rendezvous { - if peer, ok := peers[addr]; ok && addr != delegateOwnerWallet.Hex() { - resp, err := peer.ProtocolGetHeight(protocol.NewProtocolGetHeightParams()) - if err != nil { - s.logger.Error("failed to get latest block height from %s: %v", peer.OAPIEndpoint, err) - continue - } - heightResp, err := strconv.ParseInt(resp.Payload.Height, 10, 64) - if err != nil { - s.logger.Error("failed to parse latest block height from %s: %v", peer.OAPIEndpoint, err) - continue - } - cometBlockHeight = max(heightResp, cometBlockHeight) - } - } - attestations := make([]string, 0, s.config.AttRegistrationRSize) - ethReg := &core_proto.EthRegistration{ + reg := &core_proto.ValidatorRegistration{ + CometAddress: s.config.ProposerAddress, + PubKey: s.config.CometKey.PubKey().Bytes(), + Power: int64(s.config.ValidatorVotingPower), DelegateWallet: delegateOwnerWallet.Hex(), Endpoint: s.config.NodeEndpoint, NodeType: common.HexToUtf8(serviceType), EthBlock: ethBlock.Int64(), SpId: spID, + Deadline: s.cache.currentHeight.Load() + 120, } params := protocol.NewProtocolGetRegistrationAttestationParams() - params.SetRegistration(common.EthRegistrationProtoIntoEthRegistrationOapi(ethReg)) + params.SetRegistration(common.ValidatorRegistrationIntoOapi(reg)) for addr, _ := range rendezvous { if peer, ok := peers[addr]; ok { resp, err := peer.ProtocolGetRegistrationAttestation(params) @@ -216,15 +201,12 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge } } - registrationTx := &core_proto.ValidatorRegistration{ - Attestations: attestations, - EthRegistration: ethReg, - CometAddress: s.config.ProposerAddress, - PubKey: s.config.CometKey.PubKey().Bytes(), - Power: int64(s.config.ValidatorVotingPower), + registrationAtt := &core_proto.Attestation{ + Signatures: attestations, + Body: &core_proto.Attestation_ValidatorRegistration{reg}, } - txBytes, err := proto.Marshal(registrationTx) + txBytes, err := proto.Marshal(registrationAtt) if err != nil { return fmt.Errorf("failure to marshal register tx: %v", err) } @@ -237,8 +219,8 @@ func (s *Server) registerSelfOnComet(ctx context.Context, delegateOwnerWallet ge tx := &core_proto.SignedTransaction{ Signature: sig, RequestId: uuid.NewString(), - Transaction: &core_proto.SignedTransaction_ValidatorRegistrationV2{ - ValidatorRegistrationV2: registrationTx, + Transaction: &core_proto.SignedTransaction_Attestation{ + Attestation: registrationAtt, }, } From be5dc8b89df4c7d12a28c66c6cb22bf1a55ff284 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Fri, 7 Mar 2025 13:37:05 -0800 Subject: [PATCH 07/11] Modify grpc post endpoint --- .../gen/core_openapi/protocol/protocol_client.go | 2 +- ...ocol_get_registration_attestation_responses.go | 8 ++++---- pkg/core/gen/core_proto/protocol.pb.go | 15 ++++++++------- pkg/core/gen/core_proto/protocol.pb.gw.go | 6 +++--- pkg/core/gen/core_proto/protocol.swagger.json | 2 +- pkg/core/protocol/protocol.proto | 2 +- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/pkg/core/gen/core_openapi/protocol/protocol_client.go b/pkg/core/gen/core_openapi/protocol/protocol_client.go index e005fd5e..7dc91d9b 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_client.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_client.go @@ -193,7 +193,7 @@ func (a *Client) ProtocolGetRegistrationAttestation(params *ProtocolGetRegistrat op := &runtime.ClientOperation{ ID: "Protocol_GetRegistrationAttestation", Method: "POST", - PathPattern: "/core/grpc/attest", + PathPattern: "/core/grpc/attest/registration", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go index af61267b..3557d688 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_registration_attestation_responses.go @@ -88,12 +88,12 @@ func (o *ProtocolGetRegistrationAttestationOK) Code() int { func (o *ProtocolGetRegistrationAttestationOK) Error() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /core/grpc/attest][%d] protocolGetRegistrationAttestationOK %s", 200, payload) + return fmt.Sprintf("[POST /core/grpc/attest/registration][%d] protocolGetRegistrationAttestationOK %s", 200, payload) } func (o *ProtocolGetRegistrationAttestationOK) String() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /core/grpc/attest][%d] protocolGetRegistrationAttestationOK %s", 200, payload) + return fmt.Sprintf("[POST /core/grpc/attest/registration][%d] protocolGetRegistrationAttestationOK %s", 200, payload) } func (o *ProtocolGetRegistrationAttestationOK) GetPayload() *models.ProtocolRegistrationAttestationResponse { @@ -162,12 +162,12 @@ func (o *ProtocolGetRegistrationAttestationDefault) Code() int { func (o *ProtocolGetRegistrationAttestationDefault) Error() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /core/grpc/attest][%d] Protocol_GetRegistrationAttestation default %s", o._statusCode, payload) + return fmt.Sprintf("[POST /core/grpc/attest/registration][%d] Protocol_GetRegistrationAttestation default %s", o._statusCode, payload) } func (o *ProtocolGetRegistrationAttestationDefault) String() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /core/grpc/attest][%d] Protocol_GetRegistrationAttestation default %s", o._statusCode, payload) + return fmt.Sprintf("[POST /core/grpc/attest/registration][%d] Protocol_GetRegistrationAttestation default %s", o._statusCode, payload) } func (o *ProtocolGetRegistrationAttestationDefault) GetPayload() *models.RPCStatus { diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index 7b6f341d..a873fbd5 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -2006,7 +2006,7 @@ var file_protocol_proto_rawDesc = []byte{ 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x32, 0xd4, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x6f, 0x64, 0x79, 0x32, 0xe1, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, @@ -2049,7 +2049,7 @@ var file_protocol_proto_rawDesc = []byte{ 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x9a, 0x01, + 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0xa7, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, @@ -2057,11 +2057,12 @@ var file_protocol_proto_rawDesc = []byte{ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x11, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/core/gen/core_proto/protocol.pb.gw.go b/pkg/core/gen/core_proto/protocol.pb.gw.go index 853d74a6..c6847cc6 100644 --- a/pkg/core/gen/core_proto/protocol.pb.gw.go +++ b/pkg/core/gen/core_proto/protocol.pb.gw.go @@ -455,7 +455,7 @@ func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, s inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/protocol.Protocol/GetRegistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/protocol.Protocol/GetRegistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest/registration")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -651,7 +651,7 @@ func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, c inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/protocol.Protocol/GetRegistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/protocol.Protocol/GetRegistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest/registration")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -683,7 +683,7 @@ var ( pattern_Protocol_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "ping"}, "")) - pattern_Protocol_GetRegistrationAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "attest"}, "")) + pattern_Protocol_GetRegistrationAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"core", "grpc", "attest", "registration"}, "")) ) var ( diff --git a/pkg/core/gen/core_proto/protocol.swagger.json b/pkg/core/gen/core_proto/protocol.swagger.json index 631573fa..d635e29a 100644 --- a/pkg/core/gen/core_proto/protocol.swagger.json +++ b/pkg/core/gen/core_proto/protocol.swagger.json @@ -16,7 +16,7 @@ "application/json" ], "paths": { - "/core/grpc/attest": { + "/core/grpc/attest/registration": { "post": { "operationId": "Protocol_GetRegistrationAttestation", "responses": { diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index 6b5a929a..c556a373 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -34,7 +34,7 @@ service Protocol { } rpc GetRegistrationAttestation(RegistrationAttestationRequest) returns (RegistrationAttestationResponse) { option (google.api.http) = { - post: "/core/grpc/attest" + post: "/core/grpc/attest/registration" body: "registration" }; } From c509afe48b76fc450ddd3233815f5a61ec1c1140 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Mon, 10 Mar 2025 09:45:58 -0700 Subject: [PATCH 08/11] Better protobuf field numbering --- pkg/core/gen/core_proto/protocol.pb.go | 128 ++++++++++++------------- pkg/core/protocol/protocol.proto | 2 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index a873fbd5..f5592575 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -1752,7 +1752,7 @@ type isAttestation_Body interface { } type Attestation_ValidatorRegistration struct { - ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,2,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` + ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1000,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` } func (*Attestation_ValidatorRegistration) isAttestation_Body() {} @@ -1997,72 +1997,72 @@ var file_protocol_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x58, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x32, 0xe1, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, - 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x73, 0x12, 0x59, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe8, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x32, 0xe1, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, - 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, - 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0xa7, 0x01, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, + 0x61, 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, + 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0xa7, + 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index c556a373..82db09c0 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -198,6 +198,6 @@ message RegistrationAttestationResponse { message Attestation { repeated string signatures = 1; oneof body { - ValidatorRegistration validator_registration = 2; + ValidatorRegistration validator_registration = 1000; } } From 1ba9be08ba81851c483d78bab5b18344b207d112 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Mon, 10 Mar 2025 10:00:31 -0700 Subject: [PATCH 09/11] fix test --- pkg/core/common/accounts_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/core/common/accounts_test.go b/pkg/core/common/accounts_test.go index 5845e0dd..336aa767 100644 --- a/pkg/core/common/accounts_test.go +++ b/pkg/core/common/accounts_test.go @@ -18,11 +18,10 @@ func TestSignAndRecover(t *testing.T) { require.Nil(t, err) registerEvent := &core_proto.ValidatorRegistration{ - CometAddress: "12345", - Attestations: []string{"abc", "123"}, - EthRegistration: &core_proto.EthRegistration{ - DelegateWallet: "0xabcdef", - }, + CometAddress: "12345", + DelegateWallet: "0xabcdef", + EthBlock: 20202, + Power: 10, } eventBytes, err := proto.Marshal(registerEvent) From e3a8345330e7e86180d09ccb44922ea7c46f7d53 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Wed, 12 Mar 2025 15:23:11 -0700 Subject: [PATCH 10/11] Increase legacy registration cutoff to the future --- pkg/core/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/config/config.go b/pkg/core/config/config.go index 04143dd4..1ac4f832 100644 --- a/pkg/core/config/config.go +++ b/pkg/core/config/config.go @@ -204,7 +204,7 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.SlaRollupInterval = mainnetRollupInterval cfg.ValidatorVotingPower = mainnetValidatorVotingPower cfg.EnablePoS = true - cfg.LegacyRegistrationCutoff = 1820000 // delete after chain rollover + cfg.LegacyRegistrationCutoff = 3000000 // delete after chain rollover case "stage", "staging", "testnet": cfg.PersistentPeers = GetEnvWithDefault("persistentPeers", moduloPersistentPeers(ethAddress, StagePersistentPeers, 3)) @@ -215,7 +215,7 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.SlaRollupInterval = testnetRollupInterval cfg.ValidatorVotingPower = testnetValidatorVotingPower cfg.EnablePoS = true - cfg.LegacyRegistrationCutoff = 3900000 // delete after chain rollover + cfg.LegacyRegistrationCutoff = 5000000 // delete after chain rollover case "dev", "development", "devnet", "local", "sandbox": cfg.PersistentPeers = GetEnvWithDefault("persistentPeers", DevPersistentPeers) From c59348655169aeaebb78f6a223142ead17258ad0 Mon Sep 17 00:00:00 2001 From: Daniel Phelps Date: Mon, 10 Mar 2025 09:50:11 -0700 Subject: [PATCH 11/11] Deregistration attestations --- pkg/core/common/converters.go | 12 +- pkg/core/config/config.go | 4 + .../core_openapi/protocol/protocol_client.go | 39 + ...t_deregistration_attestation_parameters.go | 150 +++ ...et_deregistration_attestation_responses.go | 187 +++ pkg/core/gen/core_proto/protocol.pb.go | 1018 +++++++++++------ pkg/core/gen/core_proto/protocol.pb.gw.go | 85 ++ pkg/core/gen/core_proto/protocol.swagger.json | 64 +- pkg/core/gen/core_proto/protocol_grpc.pb.go | 51 +- pkg/core/gen/models/protocol_attestation.go | 51 + ...col_deregistration_attestation_response.go | 112 ++ .../gen/models/protocol_signed_transaction.go | 2 +- .../protocol_validator_deregistration.go | 3 + .../gen/models/protocol_validator_info.go | 54 + ...ol_validator_misbehavior_deregistration.go | 54 + pkg/core/protocol/protocol.proto | 24 +- pkg/core/server/abci.go | 14 +- pkg/core/server/attestation.go | 2 + pkg/core/server/eth.go | 38 +- pkg/core/server/grpc.go | 54 +- pkg/core/server/registration.go | 63 +- pkg/core/server/registry_bridge.go | 74 ++ pkg/core/server/server.go | 2 + 23 files changed, 1759 insertions(+), 398 deletions(-) create mode 100644 pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_parameters.go create mode 100644 pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_responses.go create mode 100644 pkg/core/gen/models/protocol_deregistration_attestation_response.go create mode 100644 pkg/core/gen/models/protocol_validator_info.go create mode 100644 pkg/core/gen/models/protocol_validator_misbehavior_deregistration.go diff --git a/pkg/core/common/converters.go b/pkg/core/common/converters.go index 8edc56a8..8139d5b5 100644 --- a/pkg/core/common/converters.go +++ b/pkg/core/common/converters.go @@ -53,6 +53,8 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro switch innerTx.Attestation.Body.(type) { case *core_proto.Attestation_ValidatorRegistration: oapiTx.Attestation.ValidatorRegistration = ValidatorRegistrationIntoOapi(innerTx.Attestation.GetValidatorRegistration()) + case *core_proto.Attestation_ValidatorDeregistration: + oapiTx.Attestation.ValidatorDeregistration = ValidatorDeregistrationIntoOapi(innerTx.Attestation.GetValidatorDeregistration()) } case *core_proto.SignedTransaction_ValidatorRegistration: oapiTx.ValidatorRegistration = &models.ProtocolValidatorRegistrationLegacy{ @@ -65,7 +67,7 @@ func SignedTxProtoIntoSignedTxOapi(tx *core_proto.SignedTransaction) *models.Pro PubKey: innerTx.ValidatorRegistration.PubKey, } case *core_proto.SignedTransaction_ValidatorDeregistration: - oapiTx.ValidatorDeregistration = &models.ProtocolValidatorDeregistration{ + oapiTx.ValidatorDeregistration = &models.ProtocolValidatorMisbehaviorDeregistration{ CometAddress: innerTx.ValidatorDeregistration.CometAddress, PubKey: innerTx.ValidatorDeregistration.PubKey, } @@ -100,3 +102,11 @@ func ValidatorRegistrationIntoOapi(vr *core_proto.ValidatorRegistration) *models Deadline: fmt.Sprint(vr.Deadline), } } + +func ValidatorDeregistrationIntoOapi(vr *core_proto.ValidatorDeregistration) *models.ProtocolValidatorDeregistration { + return &models.ProtocolValidatorDeregistration{ + CometAddress: vr.CometAddress, + PubKey: vr.PubKey, + Deadline: fmt.Sprint(vr.Deadline), + } +} diff --git a/pkg/core/config/config.go b/pkg/core/config/config.go index 1ac4f832..1315b294 100644 --- a/pkg/core/config/config.go +++ b/pkg/core/config/config.go @@ -120,6 +120,8 @@ type Config struct { /* Attestation Thresholds */ AttRegistrationMin int // minimum number of attestations needed to register a new node AttRegistrationRSize int // rendezvous size for registration attestations (should be >= to AttRegistrationMin) + AttDeregistrationMin int // minimum number of attestations needed to deregister a node + AttDeregistrationRSize int // rendezvous size for deregistration attestations (should be >= to AttDeregistrationMin) LegacyRegistrationCutoff int64 // Blocks after this height cannot register using the legacy tx (remove after next chain rollover) /* Feature Flags */ @@ -153,6 +155,8 @@ func ReadConfig(logger *common.Logger) (*Config, error) { cfg.AttRegistrationMin = 5 cfg.AttRegistrationRSize = 10 + cfg.AttDeregistrationMin = 5 + cfg.AttDeregistrationRSize = 10 // check if discovery specific key is set isDiscovery := os.Getenv("audius_delegate_private_key") != "" diff --git a/pkg/core/gen/core_openapi/protocol/protocol_client.go b/pkg/core/gen/core_openapi/protocol/protocol_client.go index 7dc91d9b..dddddd5a 100644 --- a/pkg/core/gen/core_openapi/protocol/protocol_client.go +++ b/pkg/core/gen/core_openapi/protocol/protocol_client.go @@ -58,6 +58,8 @@ type ClientService interface { ProtocolGetBlock(params *ProtocolGetBlockParams, opts ...ClientOption) (*ProtocolGetBlockOK, error) + ProtocolGetDeregistrationAttestation(params *ProtocolGetDeregistrationAttestationParams, opts ...ClientOption) (*ProtocolGetDeregistrationAttestationOK, error) + ProtocolGetNodeInfo(params *ProtocolGetNodeInfoParams, opts ...ClientOption) (*ProtocolGetNodeInfoOK, error) ProtocolGetRegistrationAttestation(params *ProtocolGetRegistrationAttestationParams, opts ...ClientOption) (*ProtocolGetRegistrationAttestationOK, error) @@ -145,6 +147,43 @@ func (a *Client) ProtocolGetBlock(params *ProtocolGetBlockParams, opts ...Client return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ProtocolGetDeregistrationAttestation protocol get deregistration attestation API +*/ +func (a *Client) ProtocolGetDeregistrationAttestation(params *ProtocolGetDeregistrationAttestationParams, opts ...ClientOption) (*ProtocolGetDeregistrationAttestationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProtocolGetDeregistrationAttestationParams() + } + op := &runtime.ClientOperation{ + ID: "Protocol_GetDeregistrationAttestation", + Method: "POST", + PathPattern: "/core/grpc/attest/deregistration", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ProtocolGetDeregistrationAttestationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ProtocolGetDeregistrationAttestationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ProtocolGetDeregistrationAttestationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ProtocolGetNodeInfo protocol get node info API */ diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_parameters.go b/pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_parameters.go new file mode 100644 index 00000000..62f3b21d --- /dev/null +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package protocol + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/AudiusProject/audiusd/pkg/core/gen/models" +) + +// NewProtocolGetDeregistrationAttestationParams creates a new ProtocolGetDeregistrationAttestationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewProtocolGetDeregistrationAttestationParams() *ProtocolGetDeregistrationAttestationParams { + return &ProtocolGetDeregistrationAttestationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewProtocolGetDeregistrationAttestationParamsWithTimeout creates a new ProtocolGetDeregistrationAttestationParams object +// with the ability to set a timeout on a request. +func NewProtocolGetDeregistrationAttestationParamsWithTimeout(timeout time.Duration) *ProtocolGetDeregistrationAttestationParams { + return &ProtocolGetDeregistrationAttestationParams{ + timeout: timeout, + } +} + +// NewProtocolGetDeregistrationAttestationParamsWithContext creates a new ProtocolGetDeregistrationAttestationParams object +// with the ability to set a context for a request. +func NewProtocolGetDeregistrationAttestationParamsWithContext(ctx context.Context) *ProtocolGetDeregistrationAttestationParams { + return &ProtocolGetDeregistrationAttestationParams{ + Context: ctx, + } +} + +// NewProtocolGetDeregistrationAttestationParamsWithHTTPClient creates a new ProtocolGetDeregistrationAttestationParams object +// with the ability to set a custom HTTPClient for a request. +func NewProtocolGetDeregistrationAttestationParamsWithHTTPClient(client *http.Client) *ProtocolGetDeregistrationAttestationParams { + return &ProtocolGetDeregistrationAttestationParams{ + HTTPClient: client, + } +} + +/* +ProtocolGetDeregistrationAttestationParams contains all the parameters to send to the API endpoint + + for the protocol get deregistration attestation operation. + + Typically these are written to a http.Request. +*/ +type ProtocolGetDeregistrationAttestationParams struct { + + // Deregistration. + Deregistration *models.ProtocolValidatorDeregistration + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the protocol get deregistration attestation params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProtocolGetDeregistrationAttestationParams) WithDefaults() *ProtocolGetDeregistrationAttestationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the protocol get deregistration attestation params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ProtocolGetDeregistrationAttestationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) WithTimeout(timeout time.Duration) *ProtocolGetDeregistrationAttestationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) WithContext(ctx context.Context) *ProtocolGetDeregistrationAttestationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) WithHTTPClient(client *http.Client) *ProtocolGetDeregistrationAttestationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDeregistration adds the deregistration to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) WithDeregistration(deregistration *models.ProtocolValidatorDeregistration) *ProtocolGetDeregistrationAttestationParams { + o.SetDeregistration(deregistration) + return o +} + +// SetDeregistration adds the deregistration to the protocol get deregistration attestation params +func (o *ProtocolGetDeregistrationAttestationParams) SetDeregistration(deregistration *models.ProtocolValidatorDeregistration) { + o.Deregistration = deregistration +} + +// WriteToRequest writes these params to a swagger request +func (o *ProtocolGetDeregistrationAttestationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Deregistration != nil { + if err := r.SetBodyParam(o.Deregistration); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_responses.go b/pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_responses.go new file mode 100644 index 00000000..efa1e4f0 --- /dev/null +++ b/pkg/core/gen/core_openapi/protocol/protocol_get_deregistration_attestation_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package protocol + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/AudiusProject/audiusd/pkg/core/gen/models" +) + +// ProtocolGetDeregistrationAttestationReader is a Reader for the ProtocolGetDeregistrationAttestation structure. +type ProtocolGetDeregistrationAttestationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProtocolGetDeregistrationAttestationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProtocolGetDeregistrationAttestationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewProtocolGetDeregistrationAttestationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewProtocolGetDeregistrationAttestationOK creates a ProtocolGetDeregistrationAttestationOK with default headers values +func NewProtocolGetDeregistrationAttestationOK() *ProtocolGetDeregistrationAttestationOK { + return &ProtocolGetDeregistrationAttestationOK{} +} + +/* +ProtocolGetDeregistrationAttestationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ProtocolGetDeregistrationAttestationOK struct { + Payload *models.ProtocolDeregistrationAttestationResponse +} + +// IsSuccess returns true when this protocol get deregistration attestation o k response has a 2xx status code +func (o *ProtocolGetDeregistrationAttestationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this protocol get deregistration attestation o k response has a 3xx status code +func (o *ProtocolGetDeregistrationAttestationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this protocol get deregistration attestation o k response has a 4xx status code +func (o *ProtocolGetDeregistrationAttestationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this protocol get deregistration attestation o k response has a 5xx status code +func (o *ProtocolGetDeregistrationAttestationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this protocol get deregistration attestation o k response a status code equal to that given +func (o *ProtocolGetDeregistrationAttestationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the protocol get deregistration attestation o k response +func (o *ProtocolGetDeregistrationAttestationOK) Code() int { + return 200 +} + +func (o *ProtocolGetDeregistrationAttestationOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest/deregistration][%d] protocolGetDeregistrationAttestationOK %s", 200, payload) +} + +func (o *ProtocolGetDeregistrationAttestationOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest/deregistration][%d] protocolGetDeregistrationAttestationOK %s", 200, payload) +} + +func (o *ProtocolGetDeregistrationAttestationOK) GetPayload() *models.ProtocolDeregistrationAttestationResponse { + return o.Payload +} + +func (o *ProtocolGetDeregistrationAttestationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ProtocolDeregistrationAttestationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewProtocolGetDeregistrationAttestationDefault creates a ProtocolGetDeregistrationAttestationDefault with default headers values +func NewProtocolGetDeregistrationAttestationDefault(code int) *ProtocolGetDeregistrationAttestationDefault { + return &ProtocolGetDeregistrationAttestationDefault{ + _statusCode: code, + } +} + +/* +ProtocolGetDeregistrationAttestationDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ProtocolGetDeregistrationAttestationDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this protocol get deregistration attestation default response has a 2xx status code +func (o *ProtocolGetDeregistrationAttestationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this protocol get deregistration attestation default response has a 3xx status code +func (o *ProtocolGetDeregistrationAttestationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this protocol get deregistration attestation default response has a 4xx status code +func (o *ProtocolGetDeregistrationAttestationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this protocol get deregistration attestation default response has a 5xx status code +func (o *ProtocolGetDeregistrationAttestationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this protocol get deregistration attestation default response a status code equal to that given +func (o *ProtocolGetDeregistrationAttestationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the protocol get deregistration attestation default response +func (o *ProtocolGetDeregistrationAttestationDefault) Code() int { + return o._statusCode +} + +func (o *ProtocolGetDeregistrationAttestationDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest/deregistration][%d] Protocol_GetDeregistrationAttestation default %s", o._statusCode, payload) +} + +func (o *ProtocolGetDeregistrationAttestationDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /core/grpc/attest/deregistration][%d] Protocol_GetDeregistrationAttestation default %s", o._statusCode, payload) +} + +func (o *ProtocolGetDeregistrationAttestationDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ProtocolGetDeregistrationAttestationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/pkg/core/gen/core_proto/protocol.pb.go b/pkg/core/gen/core_proto/protocol.pb.go index f5592575..1aab0eac 100644 --- a/pkg/core/gen/core_proto/protocol.pb.go +++ b/pkg/core/gen/core_proto/protocol.pb.go @@ -123,7 +123,7 @@ func (x *SignedTransaction) GetManageEntity() *ManageEntityLegacy { return nil } -func (x *SignedTransaction) GetValidatorDeregistration() *ValidatorDeregistration { +func (x *SignedTransaction) GetValidatorDeregistration() *ValidatorMisbehaviorDeregistration { if x, ok := x.GetTransaction().(*SignedTransaction_ValidatorDeregistration); ok { return x.ValidatorDeregistration } @@ -172,7 +172,7 @@ type SignedTransaction_ManageEntity struct { } type SignedTransaction_ValidatorDeregistration struct { - ValidatorDeregistration *ValidatorDeregistration `protobuf:"bytes,1004,opt,name=validator_deregistration,json=validatorDeregistration,proto3,oneof"` + ValidatorDeregistration *ValidatorMisbehaviorDeregistration `protobuf:"bytes,1004,opt,name=validator_deregistration,json=validatorDeregistration,proto3,oneof"` } type SignedTransaction_StorageProof struct { @@ -982,6 +982,61 @@ func (x *ValidatorRegistration) GetDeadline() int64 { return 0 } +type ValidatorMisbehaviorDeregistration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CometAddress string `protobuf:"bytes,1,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"` + PubKey []byte `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` +} + +func (x *ValidatorMisbehaviorDeregistration) Reset() { + *x = ValidatorMisbehaviorDeregistration{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorMisbehaviorDeregistration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorMisbehaviorDeregistration) ProtoMessage() {} + +func (x *ValidatorMisbehaviorDeregistration) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidatorMisbehaviorDeregistration.ProtoReflect.Descriptor instead. +func (*ValidatorMisbehaviorDeregistration) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{13} +} + +func (x *ValidatorMisbehaviorDeregistration) GetCometAddress() string { + if x != nil { + return x.CometAddress + } + return "" +} + +func (x *ValidatorMisbehaviorDeregistration) GetPubKey() []byte { + if x != nil { + return x.PubKey + } + return nil +} + type ValidatorDeregistration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -989,12 +1044,13 @@ type ValidatorDeregistration struct { CometAddress string `protobuf:"bytes,1,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"` PubKey []byte `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + Deadline int64 `protobuf:"varint,3,opt,name=deadline,proto3" json:"deadline,omitempty"` } func (x *ValidatorDeregistration) Reset() { *x = ValidatorDeregistration{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[13] + mi := &file_protocol_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1007,7 +1063,7 @@ func (x *ValidatorDeregistration) String() string { func (*ValidatorDeregistration) ProtoMessage() {} func (x *ValidatorDeregistration) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[13] + mi := &file_protocol_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1020,7 +1076,7 @@ func (x *ValidatorDeregistration) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorDeregistration.ProtoReflect.Descriptor instead. func (*ValidatorDeregistration) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{13} + return file_protocol_proto_rawDescGZIP(), []int{14} } func (x *ValidatorDeregistration) GetCometAddress() string { @@ -1037,6 +1093,13 @@ func (x *ValidatorDeregistration) GetPubKey() []byte { return nil } +func (x *ValidatorDeregistration) GetDeadline() int64 { + if x != nil { + return x.Deadline + } + return 0 +} + type TrackPlay struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1054,7 +1117,7 @@ type TrackPlay struct { func (x *TrackPlay) Reset() { *x = TrackPlay{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[14] + mi := &file_protocol_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1067,7 +1130,7 @@ func (x *TrackPlay) String() string { func (*TrackPlay) ProtoMessage() {} func (x *TrackPlay) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[14] + mi := &file_protocol_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1080,7 +1143,7 @@ func (x *TrackPlay) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackPlay.ProtoReflect.Descriptor instead. func (*TrackPlay) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{14} + return file_protocol_proto_rawDescGZIP(), []int{15} } func (x *TrackPlay) GetUserId() string { @@ -1141,7 +1204,7 @@ type PingRequest struct { func (x *PingRequest) Reset() { *x = PingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[15] + mi := &file_protocol_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1154,7 +1217,7 @@ func (x *PingRequest) String() string { func (*PingRequest) ProtoMessage() {} func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[15] + mi := &file_protocol_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1167,7 +1230,7 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. func (*PingRequest) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{15} + return file_protocol_proto_rawDescGZIP(), []int{16} } type PingResponse struct { @@ -1181,7 +1244,7 @@ type PingResponse struct { func (x *PingResponse) Reset() { *x = PingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[16] + mi := &file_protocol_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1194,7 +1257,7 @@ func (x *PingResponse) String() string { func (*PingResponse) ProtoMessage() {} func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[16] + mi := &file_protocol_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1207,7 +1270,7 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. func (*PingResponse) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{16} + return file_protocol_proto_rawDescGZIP(), []int{17} } func (x *PingResponse) GetMessage() string { @@ -1231,7 +1294,7 @@ type SlaRollup struct { func (x *SlaRollup) Reset() { *x = SlaRollup{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[17] + mi := &file_protocol_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1244,7 +1307,7 @@ func (x *SlaRollup) String() string { func (*SlaRollup) ProtoMessage() {} func (x *SlaRollup) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[17] + mi := &file_protocol_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1257,7 +1320,7 @@ func (x *SlaRollup) ProtoReflect() protoreflect.Message { // Deprecated: Use SlaRollup.ProtoReflect.Descriptor instead. func (*SlaRollup) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{17} + return file_protocol_proto_rawDescGZIP(), []int{18} } func (x *SlaRollup) GetTimestamp() *timestamppb.Timestamp { @@ -1300,7 +1363,7 @@ type SlaNodeReport struct { func (x *SlaNodeReport) Reset() { *x = SlaNodeReport{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[18] + mi := &file_protocol_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1313,7 +1376,7 @@ func (x *SlaNodeReport) String() string { func (*SlaNodeReport) ProtoMessage() {} func (x *SlaNodeReport) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[18] + mi := &file_protocol_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1326,7 +1389,7 @@ func (x *SlaNodeReport) ProtoReflect() protoreflect.Message { // Deprecated: Use SlaNodeReport.ProtoReflect.Descriptor instead. func (*SlaNodeReport) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{18} + return file_protocol_proto_rawDescGZIP(), []int{19} } func (x *SlaNodeReport) GetAddress() string { @@ -1358,7 +1421,7 @@ type StorageProof struct { func (x *StorageProof) Reset() { *x = StorageProof{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[19] + mi := &file_protocol_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1371,7 +1434,7 @@ func (x *StorageProof) String() string { func (*StorageProof) ProtoMessage() {} func (x *StorageProof) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[19] + mi := &file_protocol_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1384,7 +1447,7 @@ func (x *StorageProof) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageProof.ProtoReflect.Descriptor instead. func (*StorageProof) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{19} + return file_protocol_proto_rawDescGZIP(), []int{20} } func (x *StorageProof) GetHeight() int64 { @@ -1434,7 +1497,7 @@ type StorageProofVerification struct { func (x *StorageProofVerification) Reset() { *x = StorageProofVerification{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[20] + mi := &file_protocol_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1447,7 +1510,7 @@ func (x *StorageProofVerification) String() string { func (*StorageProofVerification) ProtoMessage() {} func (x *StorageProofVerification) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[20] + mi := &file_protocol_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1460,7 +1523,7 @@ func (x *StorageProofVerification) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageProofVerification.ProtoReflect.Descriptor instead. func (*StorageProofVerification) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{20} + return file_protocol_proto_rawDescGZIP(), []int{21} } func (x *StorageProofVerification) GetHeight() int64 { @@ -1495,7 +1558,7 @@ type ManageEntityLegacy struct { func (x *ManageEntityLegacy) Reset() { *x = ManageEntityLegacy{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[21] + mi := &file_protocol_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1508,7 +1571,7 @@ func (x *ManageEntityLegacy) String() string { func (*ManageEntityLegacy) ProtoMessage() {} func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[21] + mi := &file_protocol_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1521,7 +1584,7 @@ func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message { // Deprecated: Use ManageEntityLegacy.ProtoReflect.Descriptor instead. func (*ManageEntityLegacy) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{21} + return file_protocol_proto_rawDescGZIP(), []int{22} } func (x *ManageEntityLegacy) GetUserId() int64 { @@ -1591,7 +1654,7 @@ type RegistrationAttestationRequest struct { func (x *RegistrationAttestationRequest) Reset() { *x = RegistrationAttestationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[22] + mi := &file_protocol_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1604,7 +1667,7 @@ func (x *RegistrationAttestationRequest) String() string { func (*RegistrationAttestationRequest) ProtoMessage() {} func (x *RegistrationAttestationRequest) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[22] + mi := &file_protocol_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1617,7 +1680,7 @@ func (x *RegistrationAttestationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegistrationAttestationRequest.ProtoReflect.Descriptor instead. func (*RegistrationAttestationRequest) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{22} + return file_protocol_proto_rawDescGZIP(), []int{23} } func (x *RegistrationAttestationRequest) GetRegistration() *ValidatorRegistration { @@ -1639,7 +1702,7 @@ type RegistrationAttestationResponse struct { func (x *RegistrationAttestationResponse) Reset() { *x = RegistrationAttestationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[23] + mi := &file_protocol_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1652,7 +1715,7 @@ func (x *RegistrationAttestationResponse) String() string { func (*RegistrationAttestationResponse) ProtoMessage() {} func (x *RegistrationAttestationResponse) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[23] + mi := &file_protocol_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1665,7 +1728,7 @@ func (x *RegistrationAttestationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegistrationAttestationResponse.ProtoReflect.Descriptor instead. func (*RegistrationAttestationResponse) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{23} + return file_protocol_proto_rawDescGZIP(), []int{24} } func (x *RegistrationAttestationResponse) GetSignature() string { @@ -1682,6 +1745,108 @@ func (x *RegistrationAttestationResponse) GetRegistration() *ValidatorRegistrati return nil } +type DeregistrationAttestationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Deregistration *ValidatorDeregistration `protobuf:"bytes,1,opt,name=deregistration,proto3" json:"deregistration,omitempty"` +} + +func (x *DeregistrationAttestationRequest) Reset() { + *x = DeregistrationAttestationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeregistrationAttestationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeregistrationAttestationRequest) ProtoMessage() {} + +func (x *DeregistrationAttestationRequest) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeregistrationAttestationRequest.ProtoReflect.Descriptor instead. +func (*DeregistrationAttestationRequest) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{25} +} + +func (x *DeregistrationAttestationRequest) GetDeregistration() *ValidatorDeregistration { + if x != nil { + return x.Deregistration + } + return nil +} + +type DeregistrationAttestationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + Deregistration *ValidatorDeregistration `protobuf:"bytes,2,opt,name=deregistration,proto3" json:"deregistration,omitempty"` +} + +func (x *DeregistrationAttestationResponse) Reset() { + *x = DeregistrationAttestationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeregistrationAttestationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeregistrationAttestationResponse) ProtoMessage() {} + +func (x *DeregistrationAttestationResponse) ProtoReflect() protoreflect.Message { + mi := &file_protocol_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeregistrationAttestationResponse.ProtoReflect.Descriptor instead. +func (*DeregistrationAttestationResponse) Descriptor() ([]byte, []int) { + return file_protocol_proto_rawDescGZIP(), []int{26} +} + +func (x *DeregistrationAttestationResponse) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *DeregistrationAttestationResponse) GetDeregistration() *ValidatorDeregistration { + if x != nil { + return x.Deregistration + } + return nil +} + type Attestation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1691,13 +1856,14 @@ type Attestation struct { // Types that are assignable to Body: // // *Attestation_ValidatorRegistration + // *Attestation_ValidatorDeregistration Body isAttestation_Body `protobuf_oneof:"body"` } func (x *Attestation) Reset() { *x = Attestation{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_proto_msgTypes[24] + mi := &file_protocol_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1710,7 +1876,7 @@ func (x *Attestation) String() string { func (*Attestation) ProtoMessage() {} func (x *Attestation) ProtoReflect() protoreflect.Message { - mi := &file_protocol_proto_msgTypes[24] + mi := &file_protocol_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1723,7 +1889,7 @@ func (x *Attestation) ProtoReflect() protoreflect.Message { // Deprecated: Use Attestation.ProtoReflect.Descriptor instead. func (*Attestation) Descriptor() ([]byte, []int) { - return file_protocol_proto_rawDescGZIP(), []int{24} + return file_protocol_proto_rawDescGZIP(), []int{27} } func (x *Attestation) GetSignatures() []string { @@ -1747,6 +1913,13 @@ func (x *Attestation) GetValidatorRegistration() *ValidatorRegistration { return nil } +func (x *Attestation) GetValidatorDeregistration() *ValidatorDeregistration { + if x, ok := x.GetBody().(*Attestation_ValidatorDeregistration); ok { + return x.ValidatorDeregistration + } + return nil +} + type isAttestation_Body interface { isAttestation_Body() } @@ -1755,8 +1928,14 @@ type Attestation_ValidatorRegistration struct { ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1000,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"` } +type Attestation_ValidatorDeregistration struct { + ValidatorDeregistration *ValidatorDeregistration `protobuf:"bytes,1001,opt,name=validator_deregistration,json=validatorDeregistration,proto3,oneof"` +} + func (*Attestation_ValidatorRegistration) isAttestation_Body() {} +func (*Attestation_ValidatorDeregistration) isAttestation_Body() {} + var File_protocol_proto protoreflect.FileDescriptor var file_protocol_proto_rawDesc = []byte{ @@ -1765,7 +1944,7 @@ var file_protocol_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x05, 0x0a, 0x11, 0x53, 0x69, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x05, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, @@ -1787,282 +1966,324 @@ var file_protocol_proto_rawDesc = []byte{ 0x74, 0x69, 0x74, 0x79, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x76, 0x61, 0x6c, + 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x6a, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0xed, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x63, 0x0a, 0x1a, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3a, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xef, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, - 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x16, 0x53, 0x65, - 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, - 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x22, 0xae, - 0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3d, - 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, - 0x1c, 0x0a, 0x1a, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, - 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, - 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, - 0x6c, 0x61, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, - 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x22, - 0xdc, 0x01, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, - 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, - 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, - 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x9b, - 0x02, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0d, - 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, - 0x77, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x57, 0x0a, 0x17, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x72, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0xed, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x63, 0x0a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0xee, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xef, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x57, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, + 0x0a, 0x19, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x46, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, + 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x52, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xb1, 0x01, + 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x79, + 0x6e, 0x63, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, + 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x37, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x73, 0x12, + 0x29, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, + 0x6c, 0x61, 0x79, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x1b, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, + 0x74, 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x65, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x9b, 0x02, 0x0a, 0x15, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x74, + 0x68, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, + 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, - 0x6c, 0x61, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x74, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, + 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x62, 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x44, + 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, + 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x73, 0x0a, 0x17, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, + 0x22, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x6c, 0x61, 0x79, 0x12, 0x17, + 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x6b, + 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, + 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, + 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, + 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x09, 0x53, 0x6c, + 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, + 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x64, 0x12, + 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x6c, 0x61, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, + 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6e, 0x75, 0x6d, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x22, 0xa6, 0x01, + 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x76, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x27, 0x0a, + 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x65, + 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x43, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x20, + 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x49, 0x0a, 0x0e, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x64, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x21, + 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, - 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb6, - 0x01, 0x0a, 0x09, 0x53, 0x6c, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x45, 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x53, 0x6c, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x07, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0d, 0x53, 0x6c, 0x61, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x11, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, - 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x22, 0x65, 0x0a, 0x1e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, + 0x49, 0x0a, 0x0e, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x64, 0x65, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf1, 0x01, 0x0a, 0x0b, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x16, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x1f, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x43, 0x0a, 0x0c, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x59, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe8, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x32, 0xe1, 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x95, + 0x08, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x7f, 0x0a, 0x0f, 0x53, + 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, + 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x66, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, - 0x61, 0x73, 0x68, 0x7d, 0x12, 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, - 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0xa7, - 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x74, 0x78, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x61, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x7d, 0x12, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, + 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0xa7, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0xb1, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, + 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x0e, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, + 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2077,76 +2298,84 @@ func file_protocol_proto_rawDescGZIP() []byte { return file_protocol_proto_rawDescData } -var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_protocol_proto_goTypes = []interface{}{ - (*SignedTransaction)(nil), // 0: protocol.SignedTransaction - (*SendTransactionRequest)(nil), // 1: protocol.SendTransactionRequest - (*ForwardTransactionRequest)(nil), // 2: protocol.ForwardTransactionRequest - (*GetTransactionRequest)(nil), // 3: protocol.GetTransactionRequest - (*TransactionResponse)(nil), // 4: protocol.TransactionResponse - (*ForwardTransactionResponse)(nil), // 5: protocol.ForwardTransactionResponse - (*GetBlockRequest)(nil), // 6: protocol.GetBlockRequest - (*BlockResponse)(nil), // 7: protocol.BlockResponse - (*GetNodeInfoRequest)(nil), // 8: protocol.GetNodeInfoRequest - (*NodeInfoResponse)(nil), // 9: protocol.NodeInfoResponse - (*TrackPlays)(nil), // 10: protocol.TrackPlays - (*ValidatorRegistrationLegacy)(nil), // 11: protocol.ValidatorRegistrationLegacy - (*ValidatorRegistration)(nil), // 12: protocol.ValidatorRegistration - (*ValidatorDeregistration)(nil), // 13: protocol.ValidatorDeregistration - (*TrackPlay)(nil), // 14: protocol.TrackPlay - (*PingRequest)(nil), // 15: protocol.PingRequest - (*PingResponse)(nil), // 16: protocol.PingResponse - (*SlaRollup)(nil), // 17: protocol.SlaRollup - (*SlaNodeReport)(nil), // 18: protocol.SlaNodeReport - (*StorageProof)(nil), // 19: protocol.StorageProof - (*StorageProofVerification)(nil), // 20: protocol.StorageProofVerification - (*ManageEntityLegacy)(nil), // 21: protocol.ManageEntityLegacy - (*RegistrationAttestationRequest)(nil), // 22: protocol.RegistrationAttestationRequest - (*RegistrationAttestationResponse)(nil), // 23: protocol.RegistrationAttestationResponse - (*Attestation)(nil), // 24: protocol.Attestation - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*SignedTransaction)(nil), // 0: protocol.SignedTransaction + (*SendTransactionRequest)(nil), // 1: protocol.SendTransactionRequest + (*ForwardTransactionRequest)(nil), // 2: protocol.ForwardTransactionRequest + (*GetTransactionRequest)(nil), // 3: protocol.GetTransactionRequest + (*TransactionResponse)(nil), // 4: protocol.TransactionResponse + (*ForwardTransactionResponse)(nil), // 5: protocol.ForwardTransactionResponse + (*GetBlockRequest)(nil), // 6: protocol.GetBlockRequest + (*BlockResponse)(nil), // 7: protocol.BlockResponse + (*GetNodeInfoRequest)(nil), // 8: protocol.GetNodeInfoRequest + (*NodeInfoResponse)(nil), // 9: protocol.NodeInfoResponse + (*TrackPlays)(nil), // 10: protocol.TrackPlays + (*ValidatorRegistrationLegacy)(nil), // 11: protocol.ValidatorRegistrationLegacy + (*ValidatorRegistration)(nil), // 12: protocol.ValidatorRegistration + (*ValidatorMisbehaviorDeregistration)(nil), // 13: protocol.ValidatorMisbehaviorDeregistration + (*ValidatorDeregistration)(nil), // 14: protocol.ValidatorDeregistration + (*TrackPlay)(nil), // 15: protocol.TrackPlay + (*PingRequest)(nil), // 16: protocol.PingRequest + (*PingResponse)(nil), // 17: protocol.PingResponse + (*SlaRollup)(nil), // 18: protocol.SlaRollup + (*SlaNodeReport)(nil), // 19: protocol.SlaNodeReport + (*StorageProof)(nil), // 20: protocol.StorageProof + (*StorageProofVerification)(nil), // 21: protocol.StorageProofVerification + (*ManageEntityLegacy)(nil), // 22: protocol.ManageEntityLegacy + (*RegistrationAttestationRequest)(nil), // 23: protocol.RegistrationAttestationRequest + (*RegistrationAttestationResponse)(nil), // 24: protocol.RegistrationAttestationResponse + (*DeregistrationAttestationRequest)(nil), // 25: protocol.DeregistrationAttestationRequest + (*DeregistrationAttestationResponse)(nil), // 26: protocol.DeregistrationAttestationResponse + (*Attestation)(nil), // 27: protocol.Attestation + (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp } var file_protocol_proto_depIdxs = []int32{ 10, // 0: protocol.SignedTransaction.plays:type_name -> protocol.TrackPlays 11, // 1: protocol.SignedTransaction.validator_registration:type_name -> protocol.ValidatorRegistrationLegacy - 17, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup - 21, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy - 13, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorDeregistration - 19, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof - 20, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification - 24, // 7: protocol.SignedTransaction.attestation:type_name -> protocol.Attestation + 18, // 2: protocol.SignedTransaction.sla_rollup:type_name -> protocol.SlaRollup + 22, // 3: protocol.SignedTransaction.manage_entity:type_name -> protocol.ManageEntityLegacy + 13, // 4: protocol.SignedTransaction.validator_deregistration:type_name -> protocol.ValidatorMisbehaviorDeregistration + 20, // 5: protocol.SignedTransaction.storage_proof:type_name -> protocol.StorageProof + 21, // 6: protocol.SignedTransaction.storage_proof_verification:type_name -> protocol.StorageProofVerification + 27, // 7: protocol.SignedTransaction.attestation:type_name -> protocol.Attestation 0, // 8: protocol.SendTransactionRequest.transaction:type_name -> protocol.SignedTransaction 0, // 9: protocol.ForwardTransactionRequest.transaction:type_name -> protocol.SignedTransaction 0, // 10: protocol.TransactionResponse.transaction:type_name -> protocol.SignedTransaction 0, // 11: protocol.BlockResponse.transactions:type_name -> protocol.SignedTransaction - 25, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 28, // 12: protocol.BlockResponse.timestamp:type_name -> google.protobuf.Timestamp 4, // 13: protocol.BlockResponse.transaction_responses:type_name -> protocol.TransactionResponse - 14, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay - 25, // 15: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp - 25, // 16: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp - 18, // 17: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport + 15, // 14: protocol.TrackPlays.plays:type_name -> protocol.TrackPlay + 28, // 15: protocol.TrackPlay.timestamp:type_name -> google.protobuf.Timestamp + 28, // 16: protocol.SlaRollup.timestamp:type_name -> google.protobuf.Timestamp + 19, // 17: protocol.SlaRollup.reports:type_name -> protocol.SlaNodeReport 12, // 18: protocol.RegistrationAttestationRequest.registration:type_name -> protocol.ValidatorRegistration 12, // 19: protocol.RegistrationAttestationResponse.registration:type_name -> protocol.ValidatorRegistration - 12, // 20: protocol.Attestation.validator_registration:type_name -> protocol.ValidatorRegistration - 1, // 21: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest - 2, // 22: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest - 3, // 23: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest - 6, // 24: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest - 8, // 25: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest - 15, // 26: protocol.Protocol.Ping:input_type -> protocol.PingRequest - 22, // 27: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest - 4, // 28: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse - 5, // 29: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse - 4, // 30: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse - 7, // 31: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse - 9, // 32: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse - 16, // 33: protocol.Protocol.Ping:output_type -> protocol.PingResponse - 23, // 34: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse - 28, // [28:35] is the sub-list for method output_type - 21, // [21:28] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 14, // 20: protocol.DeregistrationAttestationRequest.deregistration:type_name -> protocol.ValidatorDeregistration + 14, // 21: protocol.DeregistrationAttestationResponse.deregistration:type_name -> protocol.ValidatorDeregistration + 12, // 22: protocol.Attestation.validator_registration:type_name -> protocol.ValidatorRegistration + 14, // 23: protocol.Attestation.validator_deregistration:type_name -> protocol.ValidatorDeregistration + 1, // 24: protocol.Protocol.SendTransaction:input_type -> protocol.SendTransactionRequest + 2, // 25: protocol.Protocol.ForwardTransaction:input_type -> protocol.ForwardTransactionRequest + 3, // 26: protocol.Protocol.GetTransaction:input_type -> protocol.GetTransactionRequest + 6, // 27: protocol.Protocol.GetBlock:input_type -> protocol.GetBlockRequest + 8, // 28: protocol.Protocol.GetNodeInfo:input_type -> protocol.GetNodeInfoRequest + 16, // 29: protocol.Protocol.Ping:input_type -> protocol.PingRequest + 23, // 30: protocol.Protocol.GetRegistrationAttestation:input_type -> protocol.RegistrationAttestationRequest + 25, // 31: protocol.Protocol.GetDeregistrationAttestation:input_type -> protocol.DeregistrationAttestationRequest + 4, // 32: protocol.Protocol.SendTransaction:output_type -> protocol.TransactionResponse + 5, // 33: protocol.Protocol.ForwardTransaction:output_type -> protocol.ForwardTransactionResponse + 4, // 34: protocol.Protocol.GetTransaction:output_type -> protocol.TransactionResponse + 7, // 35: protocol.Protocol.GetBlock:output_type -> protocol.BlockResponse + 9, // 36: protocol.Protocol.GetNodeInfo:output_type -> protocol.NodeInfoResponse + 17, // 37: protocol.Protocol.Ping:output_type -> protocol.PingResponse + 24, // 38: protocol.Protocol.GetRegistrationAttestation:output_type -> protocol.RegistrationAttestationResponse + 26, // 39: protocol.Protocol.GetDeregistrationAttestation:output_type -> protocol.DeregistrationAttestationResponse + 32, // [32:40] is the sub-list for method output_type + 24, // [24:32] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_protocol_proto_init() } @@ -2312,7 +2541,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorDeregistration); i { + switch v := v.(*ValidatorMisbehaviorDeregistration); i { case 0: return &v.state case 1: @@ -2324,7 +2553,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackPlay); i { + switch v := v.(*ValidatorDeregistration); i { case 0: return &v.state case 1: @@ -2336,7 +2565,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { + switch v := v.(*TrackPlay); i { case 0: return &v.state case 1: @@ -2348,7 +2577,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { + switch v := v.(*PingRequest); i { case 0: return &v.state case 1: @@ -2360,7 +2589,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SlaRollup); i { + switch v := v.(*PingResponse); i { case 0: return &v.state case 1: @@ -2372,7 +2601,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SlaNodeReport); i { + switch v := v.(*SlaRollup); i { case 0: return &v.state case 1: @@ -2384,7 +2613,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageProof); i { + switch v := v.(*SlaNodeReport); i { case 0: return &v.state case 1: @@ -2396,7 +2625,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageProofVerification); i { + switch v := v.(*StorageProof); i { case 0: return &v.state case 1: @@ -2408,7 +2637,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ManageEntityLegacy); i { + switch v := v.(*StorageProofVerification); i { case 0: return &v.state case 1: @@ -2420,7 +2649,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegistrationAttestationRequest); i { + switch v := v.(*ManageEntityLegacy); i { case 0: return &v.state case 1: @@ -2432,7 +2661,7 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegistrationAttestationResponse); i { + switch v := v.(*RegistrationAttestationRequest); i { case 0: return &v.state case 1: @@ -2444,6 +2673,42 @@ func file_protocol_proto_init() { } } file_protocol_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegistrationAttestationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeregistrationAttestationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeregistrationAttestationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Attestation); i { case 0: return &v.state @@ -2466,8 +2731,9 @@ func file_protocol_proto_init() { (*SignedTransaction_StorageProofVerification)(nil), (*SignedTransaction_Attestation)(nil), } - file_protocol_proto_msgTypes[24].OneofWrappers = []interface{}{ + file_protocol_proto_msgTypes[27].OneofWrappers = []interface{}{ (*Attestation_ValidatorRegistration)(nil), + (*Attestation_ValidatorDeregistration)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2475,7 +2741,7 @@ func file_protocol_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_proto_rawDesc, NumEnums: 0, - NumMessages: 25, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/core/gen/core_proto/protocol.pb.gw.go b/pkg/core/gen/core_proto/protocol.pb.gw.go index c6847cc6..79d0b3f9 100644 --- a/pkg/core/gen/core_proto/protocol.pb.gw.go +++ b/pkg/core/gen/core_proto/protocol.pb.gw.go @@ -291,6 +291,40 @@ func local_request_Protocol_GetRegistrationAttestation_0(ctx context.Context, ma } +func request_Protocol_GetDeregistrationAttestation_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeregistrationAttestationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Deregistration); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDeregistrationAttestation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Protocol_GetDeregistrationAttestation_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeregistrationAttestationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Deregistration); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDeregistrationAttestation(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterProtocolHandlerServer registers the http handlers for service Protocol to "mux". // UnaryRPC :call ProtocolServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -472,6 +506,31 @@ func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, s }) + mux.Handle("POST", pattern_Protocol_GetDeregistrationAttestation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/protocol.Protocol/GetDeregistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest/deregistration")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Protocol_GetDeregistrationAttestation_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Protocol_GetDeregistrationAttestation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -667,6 +726,28 @@ func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, c }) + mux.Handle("POST", pattern_Protocol_GetDeregistrationAttestation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/protocol.Protocol/GetDeregistrationAttestation", runtime.WithHTTPPathPattern("/core/grpc/attest/deregistration")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Protocol_GetDeregistrationAttestation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Protocol_GetDeregistrationAttestation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -684,6 +765,8 @@ var ( pattern_Protocol_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "grpc", "ping"}, "")) pattern_Protocol_GetRegistrationAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"core", "grpc", "attest", "registration"}, "")) + + pattern_Protocol_GetDeregistrationAttestation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"core", "grpc", "attest", "deregistration"}, "")) ) var ( @@ -700,4 +783,6 @@ var ( forward_Protocol_Ping_0 = runtime.ForwardResponseMessage forward_Protocol_GetRegistrationAttestation_0 = runtime.ForwardResponseMessage + + forward_Protocol_GetDeregistrationAttestation_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/core/gen/core_proto/protocol.swagger.json b/pkg/core/gen/core_proto/protocol.swagger.json index d635e29a..97f79fa3 100644 --- a/pkg/core/gen/core_proto/protocol.swagger.json +++ b/pkg/core/gen/core_proto/protocol.swagger.json @@ -16,6 +16,38 @@ "application/json" ], "paths": { + "/core/grpc/attest/deregistration": { + "post": { + "operationId": "Protocol_GetDeregistrationAttestation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/protocolDeregistrationAttestationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "deregistration", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/protocolValidatorDeregistration" + } + } + ], + "tags": [ + "Protocol" + ] + } + }, "/core/grpc/attest/registration": { "post": { "operationId": "Protocol_GetRegistrationAttestation", @@ -245,6 +277,9 @@ }, "validatorRegistration": { "$ref": "#/definitions/protocolValidatorRegistration" + }, + "validatorDeregistration": { + "$ref": "#/definitions/protocolValidatorDeregistration" } } }, @@ -289,6 +324,17 @@ } } }, + "protocolDeregistrationAttestationResponse": { + "type": "object", + "properties": { + "signature": { + "type": "string" + }, + "deregistration": { + "$ref": "#/definitions/protocolValidatorDeregistration" + } + } + }, "protocolForwardTransactionResponse": { "type": "object" }, @@ -385,7 +431,7 @@ "$ref": "#/definitions/protocolManageEntityLegacy" }, "validatorDeregistration": { - "$ref": "#/definitions/protocolValidatorDeregistration" + "$ref": "#/definitions/protocolValidatorMisbehaviorDeregistration" }, "storageProof": { "$ref": "#/definitions/protocolStorageProof" @@ -530,6 +576,22 @@ } }, "protocolValidatorDeregistration": { + "type": "object", + "properties": { + "cometAddress": { + "type": "string" + }, + "pubKey": { + "type": "string", + "format": "byte" + }, + "deadline": { + "type": "string", + "format": "int64" + } + } + }, + "protocolValidatorMisbehaviorDeregistration": { "type": "object", "properties": { "cometAddress": { diff --git a/pkg/core/gen/core_proto/protocol_grpc.pb.go b/pkg/core/gen/core_proto/protocol_grpc.pb.go index 55df1bb8..2b33fe1b 100644 --- a/pkg/core/gen/core_proto/protocol_grpc.pb.go +++ b/pkg/core/gen/core_proto/protocol_grpc.pb.go @@ -19,13 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Protocol_SendTransaction_FullMethodName = "/protocol.Protocol/SendTransaction" - Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" - Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" - Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" - Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" - Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" - Protocol_GetRegistrationAttestation_FullMethodName = "/protocol.Protocol/GetRegistrationAttestation" + Protocol_SendTransaction_FullMethodName = "/protocol.Protocol/SendTransaction" + Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" + Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" + Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" + Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" + Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" + Protocol_GetRegistrationAttestation_FullMethodName = "/protocol.Protocol/GetRegistrationAttestation" + Protocol_GetDeregistrationAttestation_FullMethodName = "/protocol.Protocol/GetDeregistrationAttestation" ) // ProtocolClient is the client API for Protocol service. @@ -39,6 +40,7 @@ type ProtocolClient interface { GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) GetRegistrationAttestation(ctx context.Context, in *RegistrationAttestationRequest, opts ...grpc.CallOption) (*RegistrationAttestationResponse, error) + GetDeregistrationAttestation(ctx context.Context, in *DeregistrationAttestationRequest, opts ...grpc.CallOption) (*DeregistrationAttestationResponse, error) } type protocolClient struct { @@ -112,6 +114,15 @@ func (c *protocolClient) GetRegistrationAttestation(ctx context.Context, in *Reg return out, nil } +func (c *protocolClient) GetDeregistrationAttestation(ctx context.Context, in *DeregistrationAttestationRequest, opts ...grpc.CallOption) (*DeregistrationAttestationResponse, error) { + out := new(DeregistrationAttestationResponse) + err := c.cc.Invoke(ctx, Protocol_GetDeregistrationAttestation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ProtocolServer is the server API for Protocol service. // All implementations must embed UnimplementedProtocolServer // for forward compatibility @@ -123,6 +134,7 @@ type ProtocolServer interface { GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error) Ping(context.Context, *PingRequest) (*PingResponse, error) GetRegistrationAttestation(context.Context, *RegistrationAttestationRequest) (*RegistrationAttestationResponse, error) + GetDeregistrationAttestation(context.Context, *DeregistrationAttestationRequest) (*DeregistrationAttestationResponse, error) mustEmbedUnimplementedProtocolServer() } @@ -151,6 +163,9 @@ func (UnimplementedProtocolServer) Ping(context.Context, *PingRequest) (*PingRes func (UnimplementedProtocolServer) GetRegistrationAttestation(context.Context, *RegistrationAttestationRequest) (*RegistrationAttestationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRegistrationAttestation not implemented") } +func (UnimplementedProtocolServer) GetDeregistrationAttestation(context.Context, *DeregistrationAttestationRequest) (*DeregistrationAttestationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDeregistrationAttestation not implemented") +} func (UnimplementedProtocolServer) mustEmbedUnimplementedProtocolServer() {} // UnsafeProtocolServer may be embedded to opt out of forward compatibility for this service. @@ -290,6 +305,24 @@ func _Protocol_GetRegistrationAttestation_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _Protocol_GetDeregistrationAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeregistrationAttestationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServer).GetDeregistrationAttestation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Protocol_GetDeregistrationAttestation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServer).GetDeregistrationAttestation(ctx, req.(*DeregistrationAttestationRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Protocol_ServiceDesc is the grpc.ServiceDesc for Protocol service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -325,6 +358,10 @@ var Protocol_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetRegistrationAttestation", Handler: _Protocol_GetRegistrationAttestation_Handler, }, + { + MethodName: "GetDeregistrationAttestation", + Handler: _Protocol_GetDeregistrationAttestation_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "protocol.proto", diff --git a/pkg/core/gen/models/protocol_attestation.go b/pkg/core/gen/models/protocol_attestation.go index a70b62dc..621502e4 100644 --- a/pkg/core/gen/models/protocol_attestation.go +++ b/pkg/core/gen/models/protocol_attestation.go @@ -21,6 +21,9 @@ type ProtocolAttestation struct { // signatures Signatures []string `json:"signatures"` + // validator deregistration + ValidatorDeregistration *ProtocolValidatorDeregistration `json:"validatorDeregistration,omitempty"` + // validator registration ValidatorRegistration *ProtocolValidatorRegistration `json:"validatorRegistration,omitempty"` } @@ -29,6 +32,10 @@ type ProtocolAttestation struct { func (m *ProtocolAttestation) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateValidatorDeregistration(formats); err != nil { + res = append(res, err) + } + if err := m.validateValidatorRegistration(formats); err != nil { res = append(res, err) } @@ -39,6 +46,25 @@ func (m *ProtocolAttestation) Validate(formats strfmt.Registry) error { return nil } +func (m *ProtocolAttestation) validateValidatorDeregistration(formats strfmt.Registry) error { + if swag.IsZero(m.ValidatorDeregistration) { // not required + return nil + } + + if m.ValidatorDeregistration != nil { + if err := m.ValidatorDeregistration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("validatorDeregistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("validatorDeregistration") + } + return err + } + } + + return nil +} + func (m *ProtocolAttestation) validateValidatorRegistration(formats strfmt.Registry) error { if swag.IsZero(m.ValidatorRegistration) { // not required return nil @@ -62,6 +88,10 @@ func (m *ProtocolAttestation) validateValidatorRegistration(formats strfmt.Regis func (m *ProtocolAttestation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateValidatorDeregistration(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateValidatorRegistration(ctx, formats); err != nil { res = append(res, err) } @@ -72,6 +102,27 @@ func (m *ProtocolAttestation) ContextValidate(ctx context.Context, formats strfm return nil } +func (m *ProtocolAttestation) contextValidateValidatorDeregistration(ctx context.Context, formats strfmt.Registry) error { + + if m.ValidatorDeregistration != nil { + + if swag.IsZero(m.ValidatorDeregistration) { // not required + return nil + } + + if err := m.ValidatorDeregistration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("validatorDeregistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("validatorDeregistration") + } + return err + } + } + + return nil +} + func (m *ProtocolAttestation) contextValidateValidatorRegistration(ctx context.Context, formats strfmt.Registry) error { if m.ValidatorRegistration != nil { diff --git a/pkg/core/gen/models/protocol_deregistration_attestation_response.go b/pkg/core/gen/models/protocol_deregistration_attestation_response.go new file mode 100644 index 00000000..57f72f08 --- /dev/null +++ b/pkg/core/gen/models/protocol_deregistration_attestation_response.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolDeregistrationAttestationResponse protocol deregistration attestation response +// +// swagger:model protocolDeregistrationAttestationResponse +type ProtocolDeregistrationAttestationResponse struct { + + // deregistration + Deregistration *ProtocolValidatorDeregistration `json:"deregistration,omitempty"` + + // signature + Signature string `json:"signature,omitempty"` +} + +// Validate validates this protocol deregistration attestation response +func (m *ProtocolDeregistrationAttestationResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeregistration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolDeregistrationAttestationResponse) validateDeregistration(formats strfmt.Registry) error { + if swag.IsZero(m.Deregistration) { // not required + return nil + } + + if m.Deregistration != nil { + if err := m.Deregistration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deregistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deregistration") + } + return err + } + } + + return nil +} + +// ContextValidate validate this protocol deregistration attestation response based on the context it is used +func (m *ProtocolDeregistrationAttestationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDeregistration(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProtocolDeregistrationAttestationResponse) contextValidateDeregistration(ctx context.Context, formats strfmt.Registry) error { + + if m.Deregistration != nil { + + if swag.IsZero(m.Deregistration) { // not required + return nil + } + + if err := m.Deregistration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deregistration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deregistration") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolDeregistrationAttestationResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolDeregistrationAttestationResponse) UnmarshalBinary(b []byte) error { + var res ProtocolDeregistrationAttestationResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_signed_transaction.go b/pkg/core/gen/models/protocol_signed_transaction.go index 67c1be8a..13d1917c 100644 --- a/pkg/core/gen/models/protocol_signed_transaction.go +++ b/pkg/core/gen/models/protocol_signed_transaction.go @@ -43,7 +43,7 @@ type ProtocolSignedTransaction struct { StorageProofVerification *ProtocolStorageProofVerification `json:"storageProofVerification,omitempty"` // validator deregistration - ValidatorDeregistration *ProtocolValidatorDeregistration `json:"validatorDeregistration,omitempty"` + ValidatorDeregistration *ProtocolValidatorMisbehaviorDeregistration `json:"validatorDeregistration,omitempty"` // validator registration ValidatorRegistration *ProtocolValidatorRegistrationLegacy `json:"validatorRegistration,omitempty"` diff --git a/pkg/core/gen/models/protocol_validator_deregistration.go b/pkg/core/gen/models/protocol_validator_deregistration.go index b508f181..898836ca 100644 --- a/pkg/core/gen/models/protocol_validator_deregistration.go +++ b/pkg/core/gen/models/protocol_validator_deregistration.go @@ -20,6 +20,9 @@ type ProtocolValidatorDeregistration struct { // comet address CometAddress string `json:"cometAddress,omitempty"` + // deadline + Deadline string `json:"deadline,omitempty"` + // pub key // Format: byte PubKey strfmt.Base64 `json:"pubKey,omitempty"` diff --git a/pkg/core/gen/models/protocol_validator_info.go b/pkg/core/gen/models/protocol_validator_info.go new file mode 100644 index 00000000..4713591f --- /dev/null +++ b/pkg/core/gen/models/protocol_validator_info.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolValidatorInfo protocol validator info +// +// swagger:model protocolValidatorInfo +type ProtocolValidatorInfo struct { + + // comet address + CometAddress string `json:"cometAddress,omitempty"` + + // pub key + // Format: byte + PubKey strfmt.Base64 `json:"pubKey,omitempty"` +} + +// Validate validates this protocol validator info +func (m *ProtocolValidatorInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protocol validator info based on context it is used +func (m *ProtocolValidatorInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolValidatorInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolValidatorInfo) UnmarshalBinary(b []byte) error { + var res ProtocolValidatorInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/gen/models/protocol_validator_misbehavior_deregistration.go b/pkg/core/gen/models/protocol_validator_misbehavior_deregistration.go new file mode 100644 index 00000000..45ecc430 --- /dev/null +++ b/pkg/core/gen/models/protocol_validator_misbehavior_deregistration.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtocolValidatorMisbehaviorDeregistration protocol validator misbehavior deregistration +// +// swagger:model protocolValidatorMisbehaviorDeregistration +type ProtocolValidatorMisbehaviorDeregistration struct { + + // comet address + CometAddress string `json:"cometAddress,omitempty"` + + // pub key + // Format: byte + PubKey strfmt.Base64 `json:"pubKey,omitempty"` +} + +// Validate validates this protocol validator misbehavior deregistration +func (m *ProtocolValidatorMisbehaviorDeregistration) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protocol validator misbehavior deregistration based on context it is used +func (m *ProtocolValidatorMisbehaviorDeregistration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtocolValidatorMisbehaviorDeregistration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtocolValidatorMisbehaviorDeregistration) UnmarshalBinary(b []byte) error { + var res ProtocolValidatorMisbehaviorDeregistration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/core/protocol/protocol.proto b/pkg/core/protocol/protocol.proto index 82db09c0..cc46464e 100644 --- a/pkg/core/protocol/protocol.proto +++ b/pkg/core/protocol/protocol.proto @@ -38,6 +38,12 @@ service Protocol { body: "registration" }; } + rpc GetDeregistrationAttestation(DeregistrationAttestationRequest) returns (DeregistrationAttestationResponse) { + option (google.api.http) = { + post: "/core/grpc/attest/deregistration" + body: "deregistration" + }; + } } message SignedTransaction { @@ -48,7 +54,7 @@ message SignedTransaction { ValidatorRegistrationLegacy validator_registration = 1001; SlaRollup sla_rollup = 1002; ManageEntityLegacy manage_entity = 1003; - ValidatorDeregistration validator_deregistration = 1004; + ValidatorMisbehaviorDeregistration validator_deregistration = 1004; StorageProof storage_proof = 1005; StorageProofVerification storage_proof_verification = 1006; Attestation attestation = 1007; @@ -129,9 +135,15 @@ message ValidatorRegistration { int64 deadline = 9; } +message ValidatorMisbehaviorDeregistration { + string comet_address = 1; + bytes pub_key = 2; +} + message ValidatorDeregistration { string comet_address = 1; bytes pub_key = 2; + int64 deadline = 3; } message TrackPlay { @@ -195,9 +207,19 @@ message RegistrationAttestationResponse { ValidatorRegistration registration = 2; } +message DeregistrationAttestationRequest { + ValidatorDeregistration deregistration = 1; +} + +message DeregistrationAttestationResponse { + string signature = 1; + ValidatorDeregistration deregistration = 2; +} + message Attestation { repeated string signatures = 1; oneof body { ValidatorRegistration validator_registration = 1000; + ValidatorDeregistration validator_deregistration = 1001; } } diff --git a/pkg/core/server/abci.go b/pkg/core/server/abci.go index 3995a328..30fa4c21 100644 --- a/pkg/core/server/abci.go +++ b/pkg/core/server/abci.go @@ -249,6 +249,16 @@ func (s *Server) FinalizeBlock(ctx context.Context, req *abcitypes.FinalizeBlock PubKeyType: "ed25519", } } + } else if att := signedTx.GetAttestation(); att != nil && att.GetValidatorDeregistration() != nil { + vr := att.GetValidatorDeregistration() + vrPubKey := ed25519.PubKey(vr.GetPubKey()) + vrAddr := vrPubKey.Address().String() + // intentionally override any existing updates + validatorUpdatesMap[vrAddr] = abcitypes.ValidatorUpdate{ + Power: int64(0), + PubKeyBytes: vr.PubKey, + PubKeyType: "ed25519", + } } else if vd := signedTx.GetValidatorDeregistration(); vd != nil { vdPubKey := ed25519.PubKey(vd.GetPubKey()) vdAddr := vdPubKey.Address().String() @@ -476,7 +486,7 @@ func (s *Server) validateBlockTx(ctx context.Context, blockTime time.Time, block return false, nil } case *core_proto.SignedTransaction_ValidatorDeregistration: - if err := s.isValidDeregisterNodeTx(signedTx, misbehavior); err != nil { + if err := s.isValidDeregisterMisbehavingNodeTx(signedTx, misbehavior); err != nil { s.logger.Error("Invalid block: invalid deregister node tx", "error", err) return false, nil } @@ -514,7 +524,7 @@ func (s *Server) finalizeTransaction(ctx context.Context, req *abcitypes.Finaliz case *core_proto.SignedTransaction_ValidatorRegistration: return s.finalizeLegacyRegisterNode(ctx, msg, blockHeight) case *core_proto.SignedTransaction_ValidatorDeregistration: - return s.finalizeDeregisterNode(ctx, msg, misbehavior) + return s.finalizeDeregisterMisbehavingNode(ctx, msg, misbehavior) case *core_proto.SignedTransaction_SlaRollup: return s.finalizeSlaRollup(ctx, msg, txHash) case *core_proto.SignedTransaction_StorageProof: diff --git a/pkg/core/server/attestation.go b/pkg/core/server/attestation.go index b36dea98..feb7203d 100644 --- a/pkg/core/server/attestation.go +++ b/pkg/core/server/attestation.go @@ -30,6 +30,8 @@ func (s *Server) isValidAttestation(ctx context.Context, tx *core_proto.SignedTr switch t := att.Body.(type) { case *core_proto.Attestation_ValidatorRegistration: return s.isValidRegisterNodeAttestation(ctx, tx, signerAddrs, blockHeight) + case *core_proto.Attestation_ValidatorDeregistration: + return s.isValidDeregisterNodeAttestation(ctx, tx, signerAddrs, blockHeight) default: return fmt.Errorf("unhandled attestation: %v %T", tx, t) } diff --git a/pkg/core/server/eth.go b/pkg/core/server/eth.go index df32db78..0708b02a 100644 --- a/pkg/core/server/eth.go +++ b/pkg/core/server/eth.go @@ -3,12 +3,14 @@ package server import ( "bytes" "context" + "errors" "fmt" "math/big" "time" "github.com/AudiusProject/audiusd/pkg/core/contracts" "github.com/ethereum/go-ethereum/common" + "github.com/jackc/pgx/v5" "github.com/labstack/echo/v4" ) @@ -52,7 +54,8 @@ func (s *Server) startEthNodeManager() error { func (s *Server) gatherEthNodes() error { s.logger.Info("gathering ethereum nodes") - nodes, err := s.contracts.GetAllRegisteredNodes(context.Background()) + ctx := context.Background() + nodes, err := s.contracts.GetAllRegisteredNodes(ctx) if err != nil { return err } @@ -64,6 +67,7 @@ func (s *Server) gatherEthNodes() error { ethNodeMap := make(map[string]*contracts.Node, len(nodes)) duplicateEthNodeSet := make(map[string]*contracts.Node) + // identify duplicates for _, node := range nodes { ethaddr := node.DelegateOwnerWallet.String() if existingNode, ok := ethNodeMap[ethaddr]; ok { @@ -74,6 +78,18 @@ func (s *Server) gatherEthNodes() error { } } + // identify missing + missingEthNodeSet := make(map[string]bool) + existingValidators, err := s.db.GetAllRegisteredNodes(ctx) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return fmt.Errorf("could not get existing validators: %v", err) + } + for _, ev := range existingValidators { + if _, ok := ethNodeMap[ev.EthAddress]; !ok { + missingEthNodeSet[ev.EthAddress] = true + } + } + s.ethNodeMU.Lock() defer s.ethNodeMU.Unlock() @@ -84,6 +100,24 @@ func (s *Server) gatherEthNodes() error { } s.duplicateEthNodes = duplicateEthNodes + // handle deregistering nodes that have been missing for two cycles. + // (waiting for a second cycle ensures attestors will have noticed it missing too) + if !s.cache.catchingUp.Load() { + for _, addr := range s.missingEthNodes { + if missingEthNodeSet[addr] { + go s.deregisterMissingNode(ctx, addr) + } + } + } else { + s.logger.Info("skipping peer auto-deregistration while syncing") + } + + missingEthNodes := make([]string, 0, len(missingEthNodeSet)) + for addr, _ := range missingEthNodeSet { + missingEthNodes = append(missingEthNodes, addr) + } + s.missingEthNodes = missingEthNodes + return nil } @@ -93,9 +127,11 @@ func (s *Server) getEthNodesHandler(c echo.Context) error { res := struct { Nodes []*contracts.Node `json:"nodes"` DuplicateNodes []*contracts.Node `json:"duplicateNodes"` + MissingNodes []string `json:"missingNodes"` }{ Nodes: s.ethNodes, DuplicateNodes: s.duplicateEthNodes, + MissingNodes: s.missingEthNodes, } return c.JSON(200, res) } diff --git a/pkg/core/server/grpc.go b/pkg/core/server/grpc.go index 17edd99d..8a1f046d 100644 --- a/pkg/core/server/grpc.go +++ b/pkg/core/server/grpc.go @@ -325,12 +325,12 @@ func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto regBytes, err := proto.Marshal(reg) if err != nil { - s.logger.Error("could not marshal ethereum registration", "error", err) + s.logger.Error("could not marshal registration", "error", err) return nil, err } sig, err := common.EthSign(s.config.EthereumKey, regBytes) if err != nil { - s.logger.Error("could not sign ethereum registration", "error", err) + s.logger.Error("could not sign registration", "error", err) return nil, err } @@ -339,3 +339,53 @@ func (s *Server) GetRegistrationAttestation(ctx context.Context, req *core_proto Registration: reg, }, nil } + +func (s *Server) GetDeregistrationAttestation(ctx context.Context, req *core_proto.DeregistrationAttestationRequest) (*core_proto.DeregistrationAttestationResponse, error) { + dereg := req.GetDeregistration() + if dereg == nil { + return nil, errors.New("empty deregistration attestation") + } + + node, err := s.db.GetRegisteredNodeByCometAddress(ctx, dereg.CometAddress) + if err != nil { + return nil, fmt.Errorf("Could not attest deregistration for '%s': %v", dereg.CometAddress, err) + } + + ethBlock := new(big.Int) + ethBlock, ok := ethBlock.SetString(node.EthBlock, 10) + if !ok { + return nil, fmt.Errorf("Could not format eth block '%s' for node '%s'", node.EthBlock, node.Endpoint) + } + + if s.isNodeRegisteredOnEthereum( + ethcommon.HexToAddress(node.EthAddress), + node.Endpoint, + ethBlock, + ) { + s.logger.Error("Could not attest to node eth deregistration: node is still registered", + "cometAddress", + dereg.CometAddress, + "ethAddress", + node.EthAddress, + "endpoint", + node.Endpoint, + ) + return nil, errors.New("node is still registered on ethereum") + } + + deregBytes, err := proto.Marshal(dereg) + if err != nil { + s.logger.Error("could not marshal deregistration", "error", err) + return nil, err + } + sig, err := common.EthSign(s.config.EthereumKey, deregBytes) + if err != nil { + s.logger.Error("could not sign deregistration", "error", err) + return nil, err + } + + return &core_proto.DeregistrationAttestationResponse{ + Signature: sig, + Deregistration: dereg, + }, nil +} diff --git a/pkg/core/server/registration.go b/pkg/core/server/registration.go index f7d58a3c..f973105c 100644 --- a/pkg/core/server/registration.go +++ b/pkg/core/server/registration.go @@ -20,7 +20,8 @@ import ( "google.golang.org/protobuf/proto" ) -const maxRegistrationAttestationValidity = 24 * 60 * 60 // Registration requests are only valid for approx 24 hours +const maxRegistrationAttestationValidity = 24 * 60 * 60 // Registration attestations are only valid for approx 24 hours +const maxDeregistrationAttestationValidity = 24 * 60 * 60 // Deregistration attestations are only valid for approx 24 hours func (s *Server) isValidRegisterNodeAttestation(ctx context.Context, tx *core_proto.SignedTransaction, signers []string, blockHeight int64) error { vr := tx.GetAttestation().GetValidatorRegistration() @@ -119,7 +120,57 @@ func (s *Server) finalizeRegisterNodeAttestation(ctx context.Context, tx *core_p return nil } -func (s *Server) isValidDeregisterNodeTx(tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) error { +func (s *Server) isValidDeregisterNodeAttestation(ctx context.Context, tx *core_proto.SignedTransaction, signers []string, blockHeight int64) error { + att := tx.GetAttestation() + if att == nil { + return fmt.Errorf("unknown attestation fell into isValidDeregisterNodeAttestation: %v", tx) + } + dereg := att.GetValidatorDeregistration() + if dereg == nil { + return fmt.Errorf("unknown attestation fell into isValidDeregisterNodeAttestation: %v", tx) + } + + addr := dereg.GetCometAddress() + + if len(dereg.GetPubKey()) == 0 { + return fmt.Errorf("public Key missing from deregistration attestation: %v", tx) + } + vdPubKey := ed25519.PubKey(dereg.GetPubKey()) + if vdPubKey.Address().String() != addr { + return fmt.Errorf("address does not match public key: %s %s", vdPubKey.Address(), addr) + } + + // validate age of request + if dereg.Deadline < blockHeight || dereg.Deadline > blockHeight+maxDeregistrationAttestationValidity { + return fmt.Errorf("Registration request for '%s' with deadline %d is too new/old (current height is %d)", addr, dereg.Deadline, blockHeight) + } + + // validate signers + enough, err := s.attestationHasEnoughSigners(ctx, signers, vdPubKey.Bytes(), s.config.AttDeregistrationRSize, s.config.AttDeregistrationMin) + if err != nil { + return fmt.Errorf("Error checking attestors against validators: %v", err) + } else if !enough { + return fmt.Errorf("Not enough attestations provided to deregister validator '%s'", addr) + } + + return nil +} + +func (s *Server) finalizeDeregisterValidatorAttestation(ctx context.Context, tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) error { + dereg := tx.GetAttestation().GetValidatorDeregistration() + if dereg == nil { + return fmt.Errorf("unknown attestation fell into isValidDeregisterNodeAttestation: %v", tx) + } + qtx := s.getDb() + err := qtx.DeleteRegisteredNode(ctx, dereg.GetCometAddress()) + if err != nil { + return fmt.Errorf("error deleting registered node: %v", err) + } + + return nil +} + +func (s *Server) isValidDeregisterMisbehavingNodeTx(tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) error { sig := tx.GetSignature() if sig == "" { return fmt.Errorf("no signature provided for deregistration tx: %v", tx) @@ -127,7 +178,7 @@ func (s *Server) isValidDeregisterNodeTx(tx *core_proto.SignedTransaction, misbe vd := tx.GetValidatorDeregistration() if vd == nil { - return fmt.Errorf("unknown tx fell into isValidDeregisterNodeTx: %v", tx) + return fmt.Errorf("unknown tx fell into isValidDeregisterMisbehavingNodeTx: %v", tx) } addr := vd.GetCometAddress() @@ -155,8 +206,8 @@ func (s *Server) isValidDeregisterNodeTx(tx *core_proto.SignedTransaction, misbe return fmt.Errorf("no misbehavior found matching deregistration tx: %v", tx) } -func (s *Server) finalizeDeregisterNode(ctx context.Context, tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) (*core_proto.ValidatorDeregistration, error) { - if err := s.isValidDeregisterNodeTx(tx, misbehavior); err != nil { +func (s *Server) finalizeDeregisterMisbehavingNode(ctx context.Context, tx *core_proto.SignedTransaction, misbehavior []abcitypes.Misbehavior) (*core_proto.ValidatorMisbehaviorDeregistration, error) { + if err := s.isValidDeregisterMisbehavingNodeTx(tx, misbehavior); err != nil { return nil, fmt.Errorf("invalid deregister node tx: %v", err) } @@ -179,7 +230,7 @@ func (s *Server) createDeregisterTransaction(address types.Address) ([]byte, err if err != nil { return []byte{}, fmt.Errorf("could not decode public key '%s' as base64 encoded string: %v", node.CometPubKey, err) } - deregistrationTx := &core_proto.ValidatorDeregistration{ + deregistrationTx := &core_proto.ValidatorMisbehaviorDeregistration{ PubKey: pubkeyEnc, CometAddress: address.String(), } diff --git a/pkg/core/server/registry_bridge.go b/pkg/core/server/registry_bridge.go index b38e71e6..bedd6d05 100644 --- a/pkg/core/server/registry_bridge.go +++ b/pkg/core/server/registry_bridge.go @@ -14,6 +14,7 @@ import ( "github.com/AudiusProject/audiusd/pkg/core/gen/core_openapi/protocol" "github.com/AudiusProject/audiusd/pkg/core/gen/core_proto" "github.com/AudiusProject/audiusd/pkg/logger" + "github.com/cometbft/cometbft/crypto/ed25519" "github.com/ethereum/go-ethereum/accounts/abi/bind" geth "github.com/ethereum/go-ethereum/common" @@ -381,3 +382,76 @@ func (s *Server) isDuplicateDelegateOwnerWallet(delegateOwnerWallet string) erro return nil } + +func (s *Server) deregisterMissingNode(ctx context.Context, ethAddress string) { + node, err := s.db.GetRegisteredNodeByEthAddress(ctx, ethAddress) + if err != nil { + s.logger.Error("could not deregister missing node", "address", ethAddress, "error", err) + return + } + + addrs, err := s.db.GetAllEthAddressesOfRegisteredNodes(ctx) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + s.logger.Error("could not deregister node: failed to get currently registered nodes", "address", ethAddress, "error", err) + return + } + pubKey := ed25519.PubKey(node.CometPubKey) + rendezvous := common.GetAttestorRendezvous(addrs, pubKey.Bytes(), s.config.AttDeregistrationRSize) + attestations := make([]string, 0, s.config.AttRegistrationRSize) + dereg := &core_proto.ValidatorDeregistration{ + CometAddress: s.config.ProposerAddress, + PubKey: s.config.CometKey.PubKey().Bytes(), + Deadline: s.cache.currentHeight.Load() + 120, + } + + peers := s.GetPeers() + params := protocol.NewProtocolGetDeregistrationAttestationParams() + params.SetDeregistration(common.ValidatorDeregistrationIntoOapi(dereg)) + for addr, _ := range rendezvous { + if peer, ok := peers[addr]; ok { + resp, err := peer.ProtocolGetDeregistrationAttestation(params) + if err != nil { + s.logger.Error("failed to get deregistration attestation from %s: %v", peer.OAPIEndpoint, err) + continue + } + attestations = append(attestations, resp.Payload.Signature) + } + } + + deregistrationAtt := &core_proto.Attestation{ + Signatures: attestations, + Body: &core_proto.Attestation_ValidatorDeregistration{dereg}, + } + + txBytes, err := proto.Marshal(deregistrationAtt) + if err != nil { + s.logger.Error("failure to marshal deregister tx", "error", err) + return + } + + sig, err := common.EthSign(s.config.EthereumKey, txBytes) + if err != nil { + s.logger.Error("could not sign deregister tx", "error", err) + return + } + + tx := &core_proto.SignedTransaction{ + Signature: sig, + RequestId: uuid.NewString(), + Transaction: &core_proto.SignedTransaction_Attestation{ + Attestation: deregistrationAtt, + }, + } + + txreq := &core_proto.SendTransactionRequest{ + Transaction: tx, + } + + txhash, err := s.SendTransaction(context.Background(), txreq) + if err != nil { + s.logger.Error("send deregister tx failed", "error", err) + return + } + + s.logger.Infof("deregistered node %s in tx %s", s.config.NodeEndpoint, txhash) +} diff --git a/pkg/core/server/server.go b/pkg/core/server/server.go index 2ef4f5dd..84e73232 100644 --- a/pkg/core/server/server.go +++ b/pkg/core/server/server.go @@ -51,6 +51,7 @@ type Server struct { ethNodes []*contracts.Node duplicateEthNodes []*contracts.Node + missingEthNodes []string ethNodeMU sync.RWMutex awaitHttpServerReady chan struct{} @@ -100,6 +101,7 @@ func NewServer(config *config.Config, cconfig *cconfig.Config, logger *common.Lo ethNodes: ethNodes, duplicateEthNodes: duplicateEthNodes, + missingEthNodes: []string{}, awaitHttpServerReady: make(chan struct{}), awaitGrpcServerReady: make(chan struct{}),