From 3a7943a5aa3040f54b3a424c2cda50f60f593376 Mon Sep 17 00:00:00 2001 From: rkapka Date: Wed, 16 Mar 2022 16:49:35 +0100 Subject: [PATCH 01/12] protos --- proto/eth/v1/beacon_chain.pb.go | 605 ++++++++++++++++++------------ proto/eth/v1/beacon_chain.proto | 11 + proto/eth/v1/validator.pb.go | 343 +++++++++-------- proto/eth/v1/validator.proto | 2 + proto/eth/v2/beacon_block.pb.go | 395 +++++++++---------- proto/eth/v2/beacon_block.proto | 1 + proto/eth/v2/beacon_state.pb.go | 80 ++-- proto/eth/v2/beacon_state.proto | 1 + proto/eth/v2/sync_committee.pb.go | 83 ++-- proto/eth/v2/sync_committee.proto | 1 + proto/eth/v2/validator.pb.go | 271 ++++++------- proto/eth/v2/validator.proto | 1 + 12 files changed, 1001 insertions(+), 793 deletions(-) diff --git a/proto/eth/v1/beacon_chain.pb.go b/proto/eth/v1/beacon_chain.pb.go index e0e084b93b2d..04cf6adaa112 100755 --- a/proto/eth/v1/beacon_chain.pb.go +++ b/proto/eth/v1/beacon_chain.pb.go @@ -124,7 +124,8 @@ type StateRootResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *StateRootResponse_StateRoot `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *StateRootResponse_StateRoot `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateRootResponse) Reset() { @@ -166,12 +167,20 @@ func (x *StateRootResponse) GetData() *StateRootResponse_StateRoot { return nil } +func (x *StateRootResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type StateForkResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *Fork `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *Fork `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateForkResponse) Reset() { @@ -213,12 +222,20 @@ func (x *StateForkResponse) GetData() *Fork { return nil } +func (x *StateForkResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type StateFinalityCheckpointResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *StateFinalityCheckpointResponse_StateFinalityCheckpoint `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *StateFinalityCheckpointResponse_StateFinalityCheckpoint `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateFinalityCheckpointResponse) Reset() { @@ -260,6 +277,13 @@ func (x *StateFinalityCheckpointResponse) GetData() *StateFinalityCheckpointResp return nil } +func (x *StateFinalityCheckpointResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type StateValidatorsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -383,7 +407,8 @@ type StateValidatorsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*ValidatorContainer `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*ValidatorContainer `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateValidatorsResponse) Reset() { @@ -425,12 +450,20 @@ func (x *StateValidatorsResponse) GetData() []*ValidatorContainer { return nil } +func (x *StateValidatorsResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type ValidatorBalancesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*ValidatorBalance `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*ValidatorBalance `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *ValidatorBalancesResponse) Reset() { @@ -472,6 +505,13 @@ func (x *ValidatorBalancesResponse) GetData() []*ValidatorBalance { return nil } +func (x *ValidatorBalancesResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type ValidatorBalance struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -587,7 +627,8 @@ type StateValidatorResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *ValidatorContainer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *ValidatorContainer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateValidatorResponse) Reset() { @@ -629,6 +670,13 @@ func (x *StateValidatorResponse) GetData() *ValidatorContainer { return nil } +func (x *StateValidatorResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type StateCommitteesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -705,7 +753,8 @@ type StateCommitteesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*Committee `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*Committee `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateCommitteesResponse) Reset() { @@ -747,12 +796,20 @@ func (x *StateCommitteesResponse) GetData() []*Committee { return nil } +func (x *StateCommitteesResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BlockAttestationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*Attestation `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*Attestation `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *BlockAttestationsResponse) Reset() { @@ -794,6 +851,13 @@ func (x *BlockAttestationsResponse) GetData() []*Attestation { return nil } +func (x *BlockAttestationsResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BlockRootContainer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -846,7 +910,8 @@ type BlockRootResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *BlockRootContainer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *BlockRootContainer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *BlockRootResponse) Reset() { @@ -888,6 +953,13 @@ func (x *BlockRootResponse) GetData() *BlockRootContainer { return nil } +func (x *BlockRootResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BlockHeadersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -948,7 +1020,8 @@ type BlockHeadersResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*BlockHeaderContainer `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*BlockHeaderContainer `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *BlockHeadersResponse) Reset() { @@ -990,6 +1063,13 @@ func (x *BlockHeadersResponse) GetData() []*BlockHeaderContainer { return nil } +func (x *BlockHeadersResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BlockRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1042,7 +1122,8 @@ type BlockHeaderResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *BlockHeaderContainer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *BlockHeaderContainer `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *BlockHeaderResponse) Reset() { @@ -1084,6 +1165,13 @@ func (x *BlockHeaderResponse) GetData() *BlockHeaderContainer { return nil } +func (x *BlockHeaderResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BlockHeaderContainer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2050,120 +2138,149 @@ var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{ 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x49, 0x64, 0x22, 0x7e, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x27, 0x0a, 0x09, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, - 0x6f, 0x6f, 0x74, 0x22, 0x3e, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x6f, 0x72, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xec, 0x02, 0x0a, 0x1f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xea, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x4a, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, - 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, - 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x48, 0x0a, - 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, - 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x22, 0x7d, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x45, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x52, 0x0a, 0x19, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x7a, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x15, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x49, 0x64, 0x22, 0x51, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb4, 0x02, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x05, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, - 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, - 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x51, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x65, 0x49, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x1a, 0x27, + 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x04, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x71, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, + 0x6b, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0x9f, 0x03, 0x0a, 0x1f, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x1a, + 0xea, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x12, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, + 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x12, 0x39, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x7d, 0x0a, 0x16, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x45, 0x0a, 0x18, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0x85, 0x01, 0x0a, 0x19, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x22, 0x7a, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x01, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x02, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x88, 0x01, 0x01, - 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x49, 0x0a, - 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4d, 0x0a, 0x19, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x30, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1a, 0x0a, - 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x4c, 0x0a, 0x11, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, + 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x55, + 0x0a, 0x15, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xb4, 0x02, 0x0a, + 0x16, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x48, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x51, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x48, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, + 0x45, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, + 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, + 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x02, 0x52, 0x04, 0x73, + 0x6c, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, + 0x6c, 0x6f, 0x74, 0x22, 0x7c, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, + 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x22, 0x80, 0x01, 0x0a, 0x19, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x22, 0x30, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x7f, 0x0a, 0x11, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, @@ -2173,124 +2290,130 @@ var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{ 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x42, 0x0e, 0x0a, - 0x0c, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x51, 0x0a, - 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x29, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x13, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x95, 0x01, - 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, - 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, - 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x80, 0x01, 0x0a, 0x1a, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x4a, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x74, 0x0a, 0x14, - 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x17, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, - 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, - 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, - 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, - 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, - 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x73, 0x6c, 0x6f, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x4d, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4c, 0x0a, 0x18, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x1d, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, - 0x1c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x1a, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, - 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, - 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x14, - 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x84, 0x01, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, - 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x17, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x46, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x64, 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, 0x42, - 0x7a, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x0c, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x84, 0x01, + 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x22, 0x29, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x22, + 0x83, 0x01, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0x95, 0x01, 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, + 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, + 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x80, 0x01, + 0x0a, 0x1a, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x22, 0x4a, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x74, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x17, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, + 0x6f, 0x74, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x01, + 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x42, 0x12, 0x0a, 0x10, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x4d, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x4c, 0x0a, 0x18, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, + 0x1d, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x1a, + 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, + 0x6b, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, + 0x0a, 0x17, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x46, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 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, 0x42, 0x7a, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x10, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, + 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, + 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/eth/v1/beacon_chain.proto b/proto/eth/v1/beacon_chain.proto index ea54a1edf636..7627633cf5e4 100644 --- a/proto/eth/v1/beacon_chain.proto +++ b/proto/eth/v1/beacon_chain.proto @@ -54,6 +54,7 @@ message StateRequest { message StateRootResponse { StateRoot data = 1; + bool execution_optimistic = 2; message StateRoot { // SSZ encoded state root for the requested state. @@ -63,10 +64,12 @@ message StateRootResponse { message StateForkResponse { Fork data = 1; + bool execution_optimistic = 2; } message StateFinalityCheckpointResponse { StateFinalityCheckpoint data = 1; + bool execution_optimistic = 2; message StateFinalityCheckpoint { ethereum.eth.v1.Checkpoint previous_justified = 1; @@ -100,10 +103,12 @@ message ValidatorBalancesRequest { message StateValidatorsResponse { repeated ValidatorContainer data = 1; + bool execution_optimistic = 2; } message ValidatorBalancesResponse { repeated ValidatorBalance data = 1; + bool execution_optimistic = 2; } message ValidatorBalance { @@ -125,6 +130,7 @@ message StateValidatorRequest { message StateValidatorResponse { ValidatorContainer data = 1; + bool execution_optimistic = 2; } message StateCommitteesRequest { @@ -144,12 +150,14 @@ message StateCommitteesRequest { message StateCommitteesResponse { repeated Committee data = 1; + bool execution_optimistic = 2; } // Beacon Block API related messages. message BlockAttestationsResponse { repeated ethereum.eth.v1.Attestation data = 1; + bool execution_optimistic = 2; } message BlockRootContainer { @@ -159,6 +167,7 @@ message BlockRootContainer { message BlockRootResponse { BlockRootContainer data = 1; + bool execution_optimistic = 2; } message BlockHeadersRequest { @@ -171,6 +180,7 @@ message BlockHeadersRequest { message BlockHeadersResponse { repeated BlockHeaderContainer data = 1; + bool execution_optimistic = 2; } message BlockRequest { @@ -181,6 +191,7 @@ message BlockRequest { message BlockHeaderResponse { BlockHeaderContainer data = 1; + bool execution_optimistic = 2; } message BlockHeaderContainer { diff --git a/proto/eth/v1/validator.pb.go b/proto/eth/v1/validator.pb.go index b59e23b06664..ed24e7f530f5 100755 --- a/proto/eth/v1/validator.pb.go +++ b/proto/eth/v1/validator.pb.go @@ -337,8 +337,9 @@ type AttesterDutiesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DependentRoot []byte `protobuf:"bytes,1,opt,name=dependent_root,json=dependentRoot,proto3" json:"dependent_root,omitempty" ssz-size:"32"` - Data []*AttesterDuty `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + DependentRoot []byte `protobuf:"bytes,1,opt,name=dependent_root,json=dependentRoot,proto3" json:"dependent_root,omitempty" ssz-size:"32"` + Data []*AttesterDuty `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,3,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *AttesterDutiesResponse) Reset() { @@ -387,6 +388,13 @@ func (x *AttesterDutiesResponse) GetData() []*AttesterDuty { return nil } +func (x *AttesterDutiesResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type AttesterDuty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -534,8 +542,9 @@ type ProposerDutiesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DependentRoot []byte `protobuf:"bytes,1,opt,name=dependent_root,json=dependentRoot,proto3" json:"dependent_root,omitempty" ssz-size:"32"` - Data []*ProposerDuty `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + DependentRoot []byte `protobuf:"bytes,1,opt,name=dependent_root,json=dependentRoot,proto3" json:"dependent_root,omitempty" ssz-size:"32"` + Data []*ProposerDuty `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,3,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *ProposerDutiesResponse) Reset() { @@ -584,6 +593,13 @@ func (x *ProposerDutiesResponse) GetData() []*ProposerDuty { return nil } +func (x *ProposerDutiesResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type ProposerDuty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1186,7 +1202,7 @@ type PrepareBeaconProposerRequest_FeeRecipientContainer struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FeeRecipient []byte `protobuf:"bytes,1,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty"` + FeeRecipient []byte `protobuf:"bytes,1,opt,name=fee_recipient,json=feeRecipient,proto3" json:"fee_recipient,omitempty" ssz-size:"20"` ValidatorIndex github_com_prysmaticlabs_eth2_types.ValidatorIndex `protobuf:"varint,2,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.ValidatorIndex"` } @@ -1311,171 +1327,178 @@ var file_proto_eth_v1_validator_proto_rawDesc = []byte{ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x22, 0x7a, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, - 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0d, - 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x31, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x44, 0x75, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0xff, 0x03, 0x0a, 0x0c, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x44, 0x75, 0x74, - 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, - 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, - 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2c, - 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x5f, - 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x41, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x72, 0x0a, 0x19, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x6e, 0x64, 0x65, 0x78, 0x22, 0xad, 0x01, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2d, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x0d, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x31, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x44, 0x75, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x22, 0xff, 0x03, 0x0a, 0x0c, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x44, 0x75, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, + 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, + 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, + 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, + 0x5f, 0x61, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x41, 0x74, 0x53, 0x6c, 0x6f, 0x74, + 0x12, 0x72, 0x0a, 0x19, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, + 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x5c, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x43, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, + 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, + 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x22, 0xad, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2d, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x0d, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x31, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x44, 0x75, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x22, 0xd1, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x44, 0x75, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, + 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, + 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, + 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x22, 0x5c, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x44, 0x75, - 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x22, 0x7a, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x44, 0x75, 0x74, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0e, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x44, 0x75, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd1, 0x01, 0x0a, - 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x44, 0x75, 0x74, 0x79, 0x12, 0x1e, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, - 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x5f, 0x0a, - 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x40, - 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, - 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, + 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, + 0x65, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, + 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, + 0x27, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x48, 0x00, 0x52, 0x08, 0x67, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x74, 0x69, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x74, 0x69, 0x22, 0x48, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, + 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0xc2, 0x01, 0x0a, 0x1d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, + 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, + 0x6c, 0x6f, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, + 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x22, 0xba, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x22, 0x56, 0x0a, 0x1e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9b, 0x01, 0x0a, + 0x1b, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x15, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x13, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, - 0x32, 0x48, 0x00, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x88, 0x01, 0x01, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x22, 0x48, 0x0a, - 0x14, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xc2, 0x01, 0x0a, 0x1d, 0x50, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, - 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x56, 0x0a, 0x1e, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x9b, 0x01, 0x0a, 0x1b, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x15, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x13, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6f, 0x74, - 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, - 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, - 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x22, 0x50, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x6a, 0x0a, 0x1f, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x67, + 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0x50, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x6a, 0x0a, 0x29, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf1, 0x02, 0x0a, - 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2c, 0x0a, 0x12, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x73, 0x6c, 0x6f, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x73, 0x41, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, - 0x73, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0xa3, 0x02, 0x0a, 0x1c, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x63, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x9d, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x65, 0x52, 0x65, - 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6a, 0x0a, 0x1f, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, + 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x47, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6a, 0x0a, 0x29, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xf1, 0x02, 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x41, 0x74, 0x53, 0x6c, 0x6f, + 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, + 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, + 0x6c, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xab, 0x02, 0x0a, 0x1c, 0x50, 0x72, 0x65, + 0x70, 0x61, 0x72, 0x65, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x0a, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x65, 0x65, + 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xa5, + 0x01, 0x0a, 0x15, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x32, 0x30, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, diff --git a/proto/eth/v1/validator.proto b/proto/eth/v1/validator.proto index d5e8de93b008..a3af32a431e3 100644 --- a/proto/eth/v1/validator.proto +++ b/proto/eth/v1/validator.proto @@ -99,6 +99,7 @@ message AttesterDutiesRequest { message AttesterDutiesResponse { bytes dependent_root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; repeated AttesterDuty data = 2; + bool execution_optimistic = 3; } message AttesterDuty { @@ -132,6 +133,7 @@ message ProposerDutiesRequest { message ProposerDutiesResponse { bytes dependent_root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; repeated ProposerDuty data = 2; + bool execution_optimistic = 3; } message ProposerDuty { diff --git a/proto/eth/v2/beacon_block.pb.go b/proto/eth/v2/beacon_block.pb.go index 75b831dd962e..e0856ad08a40 100755 --- a/proto/eth/v2/beacon_block.pb.go +++ b/proto/eth/v2/beacon_block.pb.go @@ -77,8 +77,9 @@ type BlockResponseV2 struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version Version `protobuf:"varint,1,opt,name=version,proto3,enum=ethereum.eth.v2.Version" json:"version,omitempty"` - Data *SignedBeaconBlockContainerV2 `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Version Version `protobuf:"varint,1,opt,name=version,proto3,enum=ethereum.eth.v2.Version" json:"version,omitempty"` + Data *SignedBeaconBlockContainerV2 `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,3,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *BlockResponseV2) Reset() { @@ -127,6 +128,13 @@ func (x *BlockResponseV2) GetData() *SignedBeaconBlockContainerV2 { return nil } +func (x *BlockResponseV2) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BlockSSZResponseV2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -895,7 +903,7 @@ var file_proto_eth_v2_beacon_block_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x64, 0x22, 0x88, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, @@ -903,199 +911,202 @@ var file_proto_eth_v2_beacon_block_proto_rawDesc = []byte{ 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5c, 0x0a, 0x12, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x56, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xff, 0x01, 0x0a, 0x16, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x56, 0x32, 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x30, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x61, - 0x69, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, - 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, - 0x69, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x50, 0x0a, 0x0f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, - 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xad, 0x02, 0x0a, - 0x1c, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, 0x12, 0x41, 0x0a, - 0x0c, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x6c, - 0x74, 0x61, 0x69, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x0f, 0x62, 0x65, 0x6c, - 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x65, 0x6c, - 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x83, 0x01, 0x0a, - 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x3f, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, - 0x72, 0x69, 0x78, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0x7d, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x3c, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, - 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, - 0x69, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, - 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x0e, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, - 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, + 0x5c, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x56, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xff, 0x01, + 0x0a, 0x16, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x30, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0b, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x47, 0x0a, 0x0c, 0x61, + 0x6c, 0x74, 0x61, 0x69, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, + 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x0f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, + 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, + 0xad, 0x02, 0x0a, 0x1c, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, + 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x47, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xc0, 0x02, 0x0a, 0x11, 0x42, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, + 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x0f, + 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, + 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0x83, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x3f, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, + 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x7d, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, - 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, - 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, - 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, - 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, - 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xd0, 0x05, - 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, - 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, - 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x74, 0x69, 0x12, 0x58, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x57, 0x0a, - 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, - 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, + 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, + 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x40, 0x0a, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, + 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, + 0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, + 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3d, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, + 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xc0, 0x02, + 0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, + 0x61, 0x69, 0x72, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5d, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, + 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, + 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x22, 0xd0, 0x05, 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x2b, 0x0a, + 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, + 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x65, 0x74, + 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x58, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x57, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, - 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, - 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x55, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, - 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, - 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, - 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, - 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x51, 0x0a, - 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x22, 0xfa, 0x04, 0x0a, 0x15, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, - 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x74, 0x69, 0x12, 0x58, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, - 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x57, 0x0a, - 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, - 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, + 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, + 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, + 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, + 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x12, 0x51, 0x0a, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x22, 0xfa, 0x04, 0x0a, 0x15, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x2b, 0x0a, + 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, + 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x65, 0x74, + 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x58, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x57, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, - 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, - 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x55, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, - 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, - 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, - 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, - 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x42, 0x80, 0x01, - 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, - 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, - 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, + 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, + 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, + 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, + 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x42, 0x80, 0x01, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, + 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, + 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, + 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/eth/v2/beacon_block.proto b/proto/eth/v2/beacon_block.proto index 6109ad28bfcb..fbf2f1b907e2 100644 --- a/proto/eth/v2/beacon_block.proto +++ b/proto/eth/v2/beacon_block.proto @@ -37,6 +37,7 @@ message BlockRequestV2 { message BlockResponseV2 { v2.Version version = 1; SignedBeaconBlockContainerV2 data = 2; + bool execution_optimistic = 3; } message BlockSSZResponseV2 { diff --git a/proto/eth/v2/beacon_state.pb.go b/proto/eth/v2/beacon_state.pb.go index 759a5118e41d..0cdacc70b69e 100755 --- a/proto/eth/v2/beacon_state.pb.go +++ b/proto/eth/v2/beacon_state.pb.go @@ -698,8 +698,9 @@ type BeaconStateResponseV2 struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version Version `protobuf:"varint,1,opt,name=version,proto3,enum=ethereum.eth.v2.Version" json:"version,omitempty"` - Data *BeaconStateContainer `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Version Version `protobuf:"varint,1,opt,name=version,proto3,enum=ethereum.eth.v2.Version" json:"version,omitempty"` + Data *BeaconStateContainer `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,3,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *BeaconStateResponseV2) Reset() { @@ -748,6 +749,13 @@ func (x *BeaconStateResponseV2) GetData() *BeaconStateContainer { return nil } +func (x *BeaconStateResponseV2) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type BeaconStateSSZResponseV2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1170,7 +1178,7 @@ var file_proto_eth_v2_beacon_state_proto_rawDesc = []byte{ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x2b, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x86, 0x01, 0x0a, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, @@ -1179,37 +1187,41 @@ var file_proto_eth_v2_beacon_state_proto_rawDesc = []byte{ 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x62, 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, - 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf9, 0x01, 0x0a, 0x14, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, 0x0b, 0x61, - 0x6c, 0x74, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x62, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x07, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x80, 0x01, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, - 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, - 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0x62, 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x56, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf9, 0x01, 0x0a, + 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0c, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, + 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x30, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x61, + 0x69, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x56, 0x32, 0x48, 0x00, + 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, + 0x0f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, + 0x0e, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, + 0x07, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x80, 0x01, 0x0a, 0x13, 0x6f, 0x72, 0x67, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, + 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/proto/eth/v2/beacon_state.proto b/proto/eth/v2/beacon_state.proto index 8506f3415eeb..18abf35a0337 100644 --- a/proto/eth/v2/beacon_state.proto +++ b/proto/eth/v2/beacon_state.proto @@ -149,6 +149,7 @@ message StateRequestV2 { message BeaconStateResponseV2 { Version version = 1; BeaconStateContainer data = 2; + bool execution_optimistic = 3; } message BeaconStateSSZResponseV2 { diff --git a/proto/eth/v2/sync_committee.pb.go b/proto/eth/v2/sync_committee.pb.go index 08bc4e537e9d..5b66ee4e3f79 100755 --- a/proto/eth/v2/sync_committee.pb.go +++ b/proto/eth/v2/sync_committee.pb.go @@ -303,7 +303,8 @@ type StateSyncCommitteesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *SyncCommitteeValidators `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data *SyncCommitteeValidators `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *StateSyncCommitteesResponse) Reset() { @@ -345,6 +346,13 @@ func (x *StateSyncCommitteesResponse) GetData() *SyncCommitteeValidators { return nil } +func (x *StateSyncCommitteesResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type SyncCommitteeValidators struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -500,42 +508,45 @@ var file_proto_eth_v2_sync_committee_proto_rawDesc = []byte{ 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x22, 0x5b, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0xd1, 0x01, 0x0a, 0x17, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, - 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, - 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x13, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x56, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x80, 0x01, 0x0a, 0x13, 0x6f, 0x72, - 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x32, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x68, 0x22, 0x8e, 0x01, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x22, 0xd1, 0x01, 0x0a, 0x17, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, + 0x56, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, - 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0a, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x53, + 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x80, 0x01, + 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, + 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/eth/v2/sync_committee.proto b/proto/eth/v2/sync_committee.proto index 67f0abe0ac6b..63c104cb0b40 100644 --- a/proto/eth/v2/sync_committee.proto +++ b/proto/eth/v2/sync_committee.proto @@ -64,6 +64,7 @@ message StateSyncCommitteesRequest { message StateSyncCommitteesResponse { SyncCommitteeValidators data = 1; + bool execution_optimistic = 2; } message SyncCommitteeValidators { diff --git a/proto/eth/v2/validator.pb.go b/proto/eth/v2/validator.pb.go index 1ae0b6c6fad9..dedfc5ea168f 100755 --- a/proto/eth/v2/validator.pb.go +++ b/proto/eth/v2/validator.pb.go @@ -84,7 +84,8 @@ type SyncCommitteeDutiesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []*SyncCommitteeDuty `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + Data []*SyncCommitteeDuty `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *SyncCommitteeDutiesResponse) Reset() { @@ -126,6 +127,13 @@ func (x *SyncCommitteeDutiesResponse) GetData() []*SyncCommitteeDuty { return nil } +func (x *SyncCommitteeDutiesResponse) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type SyncCommitteeDuty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -730,138 +738,141 @@ var file_proto_eth_v2_validator_proto_rawDesc = []byte{ 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x55, 0x0a, 0x1b, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x44, 0x75, 0x74, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x44, 0x75, 0x74, 0x79, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xdd, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x65, 0x44, 0x75, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x47, 0x0a, 0x20, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x04, 0x52, 0x1d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x79, - 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, - 0x65, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x32, 0x12, 0x32, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, - 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x69, - 0x0a, 0x27, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, 0x02, 0x0a, 0x19, 0x53, 0x79, - 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, - 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x79, 0x6e, 0x63, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x14, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4e, - 0x0a, 0x0b, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x52, 0x0a, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xce, - 0x01, 0x0a, 0x27, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, - 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x2d, 0x0a, 0x12, - 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11, 0x62, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, - 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x22, - 0x6a, 0x0a, 0x28, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x88, 0x01, 0x0a, 0x1b, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x44, 0x75, 0x74, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xce, 0x02, 0x0a, 0x19, - 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x44, 0x75, 0x74, 0x79, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xdd, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x44, 0x75, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x5f, 0x0a, 0x0f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x47, 0x0a, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x1d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, + 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, + 0x32, 0x12, 0x32, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x56, 0x32, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x69, 0x0a, 0x27, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, 0x02, + 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, 0x16, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, + 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x14, 0x73, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x32, 0x0a, 0x11, 0x62, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, - 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, - 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x75, 0x62, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x66, - 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, - 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3b, 0x8a, 0xb5, 0x18, 0x02, 0x31, 0x36, - 0x82, 0xb5, 0x18, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, - 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x31, 0x32, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, - 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x65, 0x0a, 0x22, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xfa, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x61, 0x0a, 0x10, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0f, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x4e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, - 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, - 0x3f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x7c, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, - 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, - 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, - 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, - 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x0a, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x22, 0xce, 0x01, 0x0a, 0x27, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, + 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x75, + 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x6f, 0x6f, 0x74, 0x22, 0x6a, 0x0a, 0x28, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x53, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0xce, 0x02, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, + 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, + 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x11, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x66, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3b, 0x8a, 0xb5, + 0x18, 0x02, 0x31, 0x36, 0x82, 0xb5, 0x18, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x31, 0x32, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x22, 0x65, 0x0a, 0x22, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xfa, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x12, 0x61, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x36, 0x82, 0xb5, 0x18, 0x32, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x4e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x39, 0x36, 0x52, 0x0e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x83, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x12, 0x3f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x7c, 0x0a, 0x13, 0x6f, 0x72, + 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x32, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, + 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/eth/v2/validator.proto b/proto/eth/v2/validator.proto index 38da953f0fca..167284a3ac5c 100644 --- a/proto/eth/v2/validator.proto +++ b/proto/eth/v2/validator.proto @@ -36,6 +36,7 @@ message SyncCommitteeDutiesRequest { message SyncCommitteeDutiesResponse { repeated SyncCommitteeDuty data = 1; + bool execution_optimistic = 2; } message SyncCommitteeDuty { From b63b1e8be27fd6b79b61ef4b703501d4af9ecc0e Mon Sep 17 00:00:00 2001 From: rkapka Date: Thu, 17 Mar 2022 17:39:00 +0100 Subject: [PATCH 02/12] grpc --- beacon-chain/rpc/eth/beacon/blocks.go | 40 ++- beacon-chain/rpc/eth/beacon/blocks_test.go | 272 ++++++++++++++---- beacon-chain/rpc/eth/beacon/state.go | 17 +- beacon-chain/rpc/eth/beacon/state_test.go | 48 ++++ beacon-chain/rpc/eth/beacon/sync_committee.go | 6 + .../rpc/eth/beacon/sync_committee_test.go | 16 ++ beacon-chain/rpc/eth/beacon/validator.go | 31 +- beacon-chain/rpc/eth/beacon/validator_test.go | 83 ++++++ beacon-chain/rpc/eth/debug/debug.go | 8 + beacon-chain/rpc/eth/debug/debug_test.go | 17 ++ beacon-chain/rpc/eth/validator/validator.go | 26 +- .../rpc/eth/validator/validator_test.go | 62 +++- 12 files changed, 546 insertions(+), 80 deletions(-) diff --git a/beacon-chain/rpc/eth/beacon/blocks.go b/beacon-chain/rpc/eth/beacon/blocks.go index eb625f2446d7..ef7e83e132b7 100644 --- a/beacon-chain/rpc/eth/beacon/blocks.go +++ b/beacon-chain/rpc/eth/beacon/blocks.go @@ -67,6 +67,10 @@ func (bs *Server) GetBlockHeader(ctx context.Context, req *ethpbv1.BlockRequest) if err != nil { return nil, status.Errorf(codes.Internal, "Could not determine if block root is canonical: %v", err) } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } return ðpbv1.BlockHeaderResponse{ Data: ðpbv1.BlockHeaderContainer{ @@ -77,6 +81,7 @@ func (bs *Server) GetBlockHeader(ctx context.Context, req *ethpbv1.BlockRequest) Signature: header.Signature, }, }, + ExecutionOptimistic: isOptimistic, }, nil } @@ -136,7 +141,12 @@ func (bs *Server) ListBlockHeaders(ctx context.Context, req *ethpbv1.BlockHeader } } - return ðpbv1.BlockHeadersResponse{Data: blkHdrs}, nil + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + + return ðpbv1.BlockHeadersResponse{Data: blkHdrs, ExecutionOptimistic: isOptimistic}, nil } // SubmitBlock instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be @@ -315,6 +325,11 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( return nil, err } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + _, err = blk.PbPhase0Block() if err == nil { v1Blk, err := migration.SignedBeaconBlock(blk) @@ -327,6 +342,7 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( Message: ðpbv2.SignedBeaconBlockContainerV2_Phase0Block{Phase0Block: v1Blk.Block}, Signature: v1Blk.Signature, }, + ExecutionOptimistic: isOptimistic, }, nil } // ErrUnsupportedPhase0Block means that we have another block type @@ -349,6 +365,7 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( Message: ðpbv2.SignedBeaconBlockContainerV2_AltairBlock{AltairBlock: v2Blk}, Signature: blk.Signature(), }, + ExecutionOptimistic: isOptimistic, }, nil } // ErrUnsupportedAltairBlock means that we have another block type @@ -371,6 +388,7 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( Message: ðpbv2.SignedBeaconBlockContainerV2_BellatrixBlock{BellatrixBlock: v2Blk}, Signature: blk.Signature(), }, + ExecutionOptimistic: isOptimistic, }, nil } // ErrUnsupportedBellatrixBlock means that we have another block type @@ -532,10 +550,16 @@ func (bs *Server) GetBlockRoot(ctx context.Context, req *ethpbv1.BlockRequest) ( } } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + return ðpbv1.BlockRootResponse{ Data: ðpbv1.BlockRootContainer{ Root: root, }, + ExecutionOptimistic: isOptimistic, }, nil } @@ -550,6 +574,11 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR return nil, err } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + _, err = blk.PbPhase0Block() if err != nil && !errors.Is(err, wrapper.ErrUnsupportedPhase0Block) { return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) @@ -560,7 +589,8 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) } return ðpbv1.BlockAttestationsResponse{ - Data: v1Blk.Block.Body.Attestations, + Data: v1Blk.Block.Body.Attestations, + ExecutionOptimistic: isOptimistic, }, nil } @@ -577,7 +607,8 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) } return ðpbv1.BlockAttestationsResponse{ - Data: v2Blk.Body.Attestations, + Data: v2Blk.Body.Attestations, + ExecutionOptimistic: isOptimistic, }, nil } @@ -594,7 +625,8 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) } return ðpbv1.BlockAttestationsResponse{ - Data: v2Blk.Body.Attestations, + Data: v2Blk.Body.Attestations, + ExecutionOptimistic: isOptimistic, }, nil } diff --git a/beacon-chain/rpc/eth/beacon/blocks_test.go b/beacon-chain/rpc/eth/beacon/blocks_test.go index b9c1672fedb7..68bfeea94f03 100644 --- a/beacon-chain/rpc/eth/beacon/blocks_test.go +++ b/beacon-chain/rpc/eth/beacon/blocks_test.go @@ -170,14 +170,16 @@ func TestServer_GetBlockHeader(t *testing.T) { b3.Block.ParentRoot = bytesutil.PadTo([]byte{4}, 32) require.NoError(t, beaconDB.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(b3))) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } tests := []struct { @@ -248,6 +250,24 @@ func TestServer_GetBlockHeader(t *testing.T) { assert.Equal(t, tt.want.Block.ProposerIndex, header.Data.Header.Message.ProposerIndex) }) } + + t.Run("execution optimistic", func(t *testing.T) { + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + Optimistic: true, + } + bs := &Server{ + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, + } + header, err := bs.GetBlockHeader(ctx, ðpbv1.BlockRequest{BlockId: []byte("head")}) + require.NoError(t, err) + assert.Equal(t, true, header.ExecutionOptimistic) + }) } func TestServer_ListBlockHeaders(t *testing.T) { @@ -256,14 +276,16 @@ func TestServer_ListBlockHeaders(t *testing.T) { _, blkContainers := fillDBTestBlocks(ctx, t, beaconDB) headBlock := blkContainers[len(blkContainers)-1] + mockChainFetcher := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainFetcher, + HeadFetcher: mockChainFetcher, } b2 := util.NewBeaconBlock() @@ -330,6 +352,27 @@ func TestServer_ListBlockHeaders(t *testing.T) { } }) } + + t.Run("execution optimistic", func(t *testing.T) { + mockChainFetcher := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + Optimistic: true, + } + bs := &Server{ + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainFetcher, + HeadFetcher: mockChainFetcher, + } + slot := types.Slot(30) + headers, err := bs.ListBlockHeaders(ctx, ðpbv1.BlockHeadersRequest{ + Slot: &slot, + }) + require.NoError(t, err) + assert.Equal(t, true, headers.ExecutionOptimistic) + }) } func TestServer_ProposeBlock_OK(t *testing.T) { @@ -578,14 +621,16 @@ func TestServer_GetBlockV2(t *testing.T) { b3.Block.ParentRoot = bytesutil.PadTo([]byte{4}, 32) require.NoError(t, beaconDB.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(b3))) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } genBlk, blkContainers := fillDBTestBlocks(ctx, t, beaconDB) @@ -695,14 +740,16 @@ func TestServer_GetBlockV2(t *testing.T) { chainBlk, err := wrapper.WrappedAltairSignedBeaconBlock(headBlock.GetAltairBlock()) require.NoError(t, err) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: chainBlk, + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: chainBlk, - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } genBlk, blkContainers := fillDBTestBlocksAltair(ctx, t, beaconDB) @@ -812,14 +859,16 @@ func TestServer_GetBlockV2(t *testing.T) { chainBlk, err := wrapper.WrappedBellatrixSignedBeaconBlock(headBlock.GetBellatrixBlock()) require.NoError(t, err) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: chainBlk, + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: chainBlk, - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } genBlk, blkContainers := fillDBTestBlocksBellatrix(ctx, t, beaconDB) @@ -906,6 +955,48 @@ func TestServer_GetBlockV2(t *testing.T) { }) } }) + + t.Run("execution optimistic", func(t *testing.T) { + beaconDB := dbTest.SetupDB(t) + ctx := context.Background() + + _, blkContainers := fillDBTestBlocksBellatrix(ctx, t, beaconDB) + headBlock := blkContainers[len(blkContainers)-1] + + b2 := util.NewBeaconBlockBellatrix() + b2.Block.Slot = 30 + b2.Block.ParentRoot = bytesutil.PadTo([]byte{1}, 32) + signedBlk, err := wrapper.WrappedBellatrixSignedBeaconBlock(b2) + require.NoError(t, err) + require.NoError(t, beaconDB.SaveBlock(ctx, signedBlk)) + b3 := util.NewBeaconBlockBellatrix() + b3.Block.Slot = 30 + b3.Block.ParentRoot = bytesutil.PadTo([]byte{4}, 32) + signedBlk, err = wrapper.WrappedBellatrixSignedBeaconBlock(b2) + require.NoError(t, err) + require.NoError(t, beaconDB.SaveBlock(ctx, signedBlk)) + + chainBlk, err := wrapper.WrappedBellatrixSignedBeaconBlock(headBlock.GetBellatrixBlock()) + require.NoError(t, err) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: chainBlk, + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + Optimistic: true, + } + bs := &Server{ + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, + } + + blk, err := bs.GetBlockV2(ctx, ðpbv2.BlockRequestV2{ + BlockId: []byte("head"), + }) + require.NoError(t, err) + assert.Equal(t, true, blk.ExecutionOptimistic) + }) } func TestServer_GetBlockSSZ(t *testing.T) { @@ -1072,14 +1163,16 @@ func TestServer_GetBlockRoot(t *testing.T) { b3.Block.ParentRoot = bytesutil.PadTo([]byte{4}, 32) require.NoError(t, beaconDB.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(b3))) + mockChainFetcher := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainFetcher, + HeadFetcher: mockChainFetcher, } root, err := genBlk.Block.HashTreeRoot() @@ -1155,6 +1248,26 @@ func TestServer_GetBlockRoot(t *testing.T) { assert.DeepEqual(t, tt.want, blockRootResp.Data.Root) }) } + + t.Run("execution optimistic", func(t *testing.T) { + mockChainFetcher := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + Optimistic: true, + } + bs := &Server{ + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainFetcher, + HeadFetcher: mockChainFetcher, + } + blockRootResp, err := bs.GetBlockRoot(ctx, ðpbv1.BlockRequest{ + BlockId: []byte("head"), + }) + require.NoError(t, err) + assert.Equal(t, true, blockRootResp.ExecutionOptimistic) + }) } func TestServer_ListBlockAttestations(t *testing.T) { @@ -1164,14 +1277,16 @@ func TestServer_ListBlockAttestations(t *testing.T) { _, blkContainers := fillDBTestBlocks(ctx, t, beaconDB) headBlock := blkContainers[len(blkContainers)-1] + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: wrapper.WrappedPhase0SignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_Phase0Block).Phase0Block), - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } genBlk, blkContainers := fillDBTestBlocks(ctx, t, beaconDB) @@ -1264,14 +1379,16 @@ func TestServer_ListBlockAttestations(t *testing.T) { headBlock := blkContainers[len(blkContainers)-1] blk, err := wrapper.WrappedAltairSignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_AltairBlock).AltairBlock) require.NoError(t, err) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: blk, + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: blk, - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } genBlk, blkContainers := fillDBTestBlocksAltair(ctx, t, beaconDB) @@ -1364,14 +1481,16 @@ func TestServer_ListBlockAttestations(t *testing.T) { headBlock := blkContainers[len(blkContainers)-1] blk, err := wrapper.WrappedBellatrixSignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_BellatrixBlock).BellatrixBlock) require.NoError(t, err) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: blk, + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + } bs := &Server{ - BeaconDB: beaconDB, - ChainInfoFetcher: &mock.ChainService{ - DB: beaconDB, - Block: blk, - Root: headBlock.BlockRoot, - FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, - }, + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, } genBlk, blkContainers := fillDBTestBlocksBellatrix(ctx, t, beaconDB) @@ -1455,4 +1574,31 @@ func TestServer_ListBlockAttestations(t *testing.T) { }) } }) + + t.Run("execution optimistic", func(t *testing.T) { + beaconDB := dbTest.SetupDB(t) + ctx := context.Background() + + _, blkContainers := fillDBTestBlocksBellatrix(ctx, t, beaconDB) + headBlock := blkContainers[len(blkContainers)-1] + blk, err := wrapper.WrappedBellatrixSignedBeaconBlock(headBlock.Block.(*ethpbalpha.BeaconBlockContainer_BellatrixBlock).BellatrixBlock) + require.NoError(t, err) + mockChainService := &mock.ChainService{ + DB: beaconDB, + Block: blk, + Root: headBlock.BlockRoot, + FinalizedCheckPoint: ðpbalpha.Checkpoint{Root: blkContainers[64].BlockRoot}, + Optimistic: true, + } + bs := &Server{ + BeaconDB: beaconDB, + ChainInfoFetcher: mockChainService, + HeadFetcher: mockChainService, + } + resp, err := bs.ListBlockAttestations(ctx, ðpbv1.BlockRequest{ + BlockId: []byte("head"), + }) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } diff --git a/beacon-chain/rpc/eth/beacon/state.go b/beacon-chain/rpc/eth/beacon/state.go index 5b1befbb88f1..f665f94972d7 100644 --- a/beacon-chain/rpc/eth/beacon/state.go +++ b/beacon-chain/rpc/eth/beacon/state.go @@ -71,11 +71,16 @@ func (bs *Server) GetStateRoot(ctx context.Context, req *ethpb.StateRequest) (*e } return nil, status.Errorf(codes.Internal, "Could not get state root: %v", err) } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } return ðpb.StateRootResponse{ Data: ðpb.StateRootResponse_StateRoot{ Root: root, }, + ExecutionOptimistic: isOptimistic, }, nil } @@ -93,14 +98,19 @@ func (bs *Server) GetStateFork(ctx context.Context, req *ethpb.StateRequest) (*e if err != nil { return nil, helpers.PrepareStateFetchGRPCError(err) } - fork := st.Fork() + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + return ðpb.StateForkResponse{ Data: ðpb.Fork{ PreviousVersion: fork.PreviousVersion, CurrentVersion: fork.CurrentVersion, Epoch: fork.Epoch, }, + ExecutionOptimistic: isOptimistic, }, nil } @@ -124,6 +134,10 @@ func (bs *Server) GetFinalityCheckpoints(ctx context.Context, req *ethpb.StateRe } return nil, status.Errorf(codes.Internal, "Could not get state: %v", err) } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } return ðpb.StateFinalityCheckpointResponse{ Data: ðpb.StateFinalityCheckpointResponse_StateFinalityCheckpoint{ @@ -131,6 +145,7 @@ func (bs *Server) GetFinalityCheckpoints(ctx context.Context, req *ethpb.StateRe CurrentJustified: checkpoint(st.CurrentJustifiedCheckpoint()), Finalized: checkpoint(st.FinalizedCheckpoint()), }, + ExecutionOptimistic: isOptimistic, }, nil } diff --git a/beacon-chain/rpc/eth/beacon/state_test.go b/beacon-chain/rpc/eth/beacon/state_test.go index 6389f52ecbc3..1f03911784ab 100644 --- a/beacon-chain/rpc/eth/beacon/state_test.go +++ b/beacon-chain/rpc/eth/beacon/state_test.go @@ -80,6 +80,7 @@ func TestGetStateRoot(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconStateRoot: stateRoot[:], }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ @@ -88,6 +89,21 @@ func TestGetStateRoot(t *testing.T) { require.NoError(t, err) assert.NotNil(t, resp) assert.DeepEqual(t, stateRoot[:], resp.Data.Root) + + t.Run("execution optimistic", func(t *testing.T) { + server := &Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconStateRoot: stateRoot[:], + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ + StateId: make([]byte, 0), + }) + require.NoError(t, err) + assert.NotNil(t, resp) + assert.DeepEqual(t, true, resp.ExecutionOptimistic) + }) } func TestGetStateFork(t *testing.T) { @@ -105,6 +121,7 @@ func TestGetStateFork(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := server.GetStateFork(context.Background(), ð.StateRequest{ @@ -116,6 +133,21 @@ func TestGetStateFork(t *testing.T) { assert.Equal(t, expectedFork.Epoch, resp.Data.Epoch) assert.DeepEqual(t, expectedFork.CurrentVersion, resp.Data.CurrentVersion) assert.DeepEqual(t, expectedFork.PreviousVersion, resp.Data.PreviousVersion) + + t.Run("execution optimistic", func(t *testing.T) { + server := &Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: fakeState, + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + resp, err := server.GetStateFork(context.Background(), ð.StateRequest{ + StateId: make([]byte, 0), + }) + require.NoError(t, err) + assert.NotNil(t, resp) + assert.DeepEqual(t, true, resp.ExecutionOptimistic) + }) } func TestGetFinalityCheckpoints(t *testing.T) { @@ -140,6 +172,7 @@ func TestGetFinalityCheckpoints(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := server.GetFinalityCheckpoints(context.Background(), ð.StateRequest{ @@ -153,4 +186,19 @@ func TestGetFinalityCheckpoints(t *testing.T) { assert.DeepEqual(t, fakeState.CurrentJustifiedCheckpoint().Root, resp.Data.CurrentJustified.Root) assert.Equal(t, fakeState.PreviousJustifiedCheckpoint().Epoch, resp.Data.PreviousJustified.Epoch) assert.DeepEqual(t, fakeState.PreviousJustifiedCheckpoint().Root, resp.Data.PreviousJustified.Root) + + t.Run("execution optimistic", func(t *testing.T) { + server := &Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: fakeState, + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + resp, err := server.GetFinalityCheckpoints(context.Background(), ð.StateRequest{ + StateId: make([]byte, 0), + }) + require.NoError(t, err) + assert.NotNil(t, resp) + assert.DeepEqual(t, true, resp.ExecutionOptimistic) + }) } diff --git a/beacon-chain/rpc/eth/beacon/sync_committee.go b/beacon-chain/rpc/eth/beacon/sync_committee.go index 65df6fbc3302..5e9f86255ed6 100644 --- a/beacon-chain/rpc/eth/beacon/sync_committee.go +++ b/beacon-chain/rpc/eth/beacon/sync_committee.go @@ -91,11 +91,17 @@ func (bs *Server) ListSyncCommittees(ctx context.Context, req *ethpbv2.StateSync return nil, status.Errorf(codes.Internal, "Could not extract sync subcommittees: %v", err) } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + return ðpbv2.StateSyncCommitteesResponse{ Data: ðpbv2.SyncCommitteeValidators{ Validators: committeeIndices, ValidatorAggregates: subcommittees, }, + ExecutionOptimistic: isOptimistic, }, nil } diff --git a/beacon-chain/rpc/eth/beacon/sync_committee_test.go b/beacon-chain/rpc/eth/beacon/sync_committee_test.go index 93f225e5cc6d..ae2bd747b141 100644 --- a/beacon-chain/rpc/eth/beacon/sync_committee_test.go +++ b/beacon-chain/rpc/eth/beacon/sync_committee_test.go @@ -166,6 +166,7 @@ func TestListSyncCommittees(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &mock.ChainService{}, } req := ðpbv2.StateSyncCommitteesRequest{StateId: stRoot[:]} resp, err := s.ListSyncCommittees(ctx, req) @@ -188,6 +189,21 @@ func TestListSyncCommittees(t *testing.T) { j++ } } + + t.Run("execution optimistic", func(t *testing.T) { + s := &Server{ + GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ + Genesis: time.Now(), + }, + StateFetcher: &testutil.MockFetcher{ + BeaconState: st, + }, + HeadFetcher: &mock.ChainService{Optimistic: true}, + } + resp, err := s.ListSyncCommittees(ctx, req) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } type futureSyncMockFetcher struct { diff --git a/beacon-chain/rpc/eth/beacon/validator.go b/beacon-chain/rpc/eth/beacon/validator.go index 438d2fac51df..c7fb00d7ee26 100644 --- a/beacon-chain/rpc/eth/beacon/validator.go +++ b/beacon-chain/rpc/eth/beacon/validator.go @@ -56,7 +56,12 @@ func (bs *Server) GetValidator(ctx context.Context, req *ethpb.StateValidatorReq if len(valContainer) == 0 { return nil, status.Error(codes.NotFound, "Could not find validator") } - return ðpb.StateValidatorResponse{Data: valContainer[0]}, nil + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + + return ðpb.StateValidatorResponse{Data: valContainer[0], ExecutionOptimistic: isOptimistic}, nil } // ListValidators returns filterable list of validators with their balance, status and index. @@ -74,9 +79,14 @@ func (bs *Server) ListValidators(ctx context.Context, req *ethpb.StateValidators return nil, handleValContainerErr(err) } + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + // Exit early if no matching validators we found or we don't want to further filter validators by status. if len(valContainers) == 0 || len(req.Status) == 0 { - return ðpb.StateValidatorsResponse{Data: valContainers}, nil + return ðpb.StateValidatorsResponse{Data: valContainers, ExecutionOptimistic: isOptimistic}, nil } filterStatus := make(map[ethpb.ValidatorStatus]bool, len(req.Status)) @@ -106,7 +116,8 @@ func (bs *Server) ListValidators(ctx context.Context, req *ethpb.StateValidators filteredVals = append(filteredVals, vc) } } - return ðpb.StateValidatorsResponse{Data: filteredVals}, nil + + return ðpb.StateValidatorsResponse{Data: filteredVals, ExecutionOptimistic: isOptimistic}, nil } // ListValidatorBalances returns a filterable list of validator balances. @@ -130,7 +141,12 @@ func (bs *Server) ListValidatorBalances(ctx context.Context, req *ethpb.Validato Balance: valContainers[i].Balance, } } - return ðpb.ValidatorBalancesResponse{Data: valBalances}, nil + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + + return ðpb.ValidatorBalancesResponse{Data: valBalances, ExecutionOptimistic: isOptimistic}, nil } // ListCommittees retrieves the committees for the given state at the given epoch. @@ -183,7 +199,12 @@ func (bs *Server) ListCommittees(ctx context.Context, req *ethpb.StateCommittees committees = append(committees, committeeContainer) } } - return ðpb.StateCommitteesResponse{Data: committees}, nil + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + + return ðpb.StateCommitteesResponse{Data: committees, ExecutionOptimistic: isOptimistic}, nil } // This function returns the validator object based on the passed in ID. The validator ID could be its public key, diff --git a/beacon-chain/rpc/eth/beacon/validator_test.go b/beacon-chain/rpc/eth/beacon/validator_test.go index c582572f267d..20007a123c35 100644 --- a/beacon-chain/rpc/eth/beacon/validator_test.go +++ b/beacon-chain/rpc/eth/beacon/validator_test.go @@ -34,6 +34,7 @@ func TestGetValidator(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.GetValidator(ctx, ðpb.StateValidatorRequest{ @@ -49,6 +50,7 @@ func TestGetValidator(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } pubKey := st.PubkeyAtIndex(types.ValidatorIndex(20)) @@ -66,12 +68,28 @@ func TestGetValidator(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } _, err := s.GetValidator(ctx, ðpb.StateValidatorRequest{ StateId: []byte("head"), }) require.ErrorContains(t, "Validator ID is required", err) }) + + t.Run("execution optimistic", func(t *testing.T) { + s := Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: st, + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + resp, err := s.GetValidator(ctx, ðpb.StateValidatorRequest{ + StateId: []byte("head"), + ValidatorId: []byte("15"), + }) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestListValidators(t *testing.T) { @@ -85,6 +103,7 @@ func TestListValidators(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -102,6 +121,7 @@ func TestListValidators(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } ids := [][]byte{[]byte("15"), []byte("26"), []byte("400")} @@ -122,6 +142,7 @@ func TestListValidators(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } idNums := []types.ValidatorIndex{20, 66, 90, 100} pubkey1 := st.PubkeyAtIndex(types.ValidatorIndex(20)) @@ -146,6 +167,7 @@ func TestListValidators(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } idNums := []types.ValidatorIndex{20, 90, 170, 129} @@ -172,6 +194,7 @@ func TestListValidators(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } existingKey := st.PubkeyAtIndex(types.ValidatorIndex(1)) @@ -190,6 +213,7 @@ func TestListValidators(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } ids := [][]byte{[]byte("1"), []byte("99999")} @@ -201,6 +225,20 @@ func TestListValidators(t *testing.T) { require.Equal(t, 1, len(resp.Data)) assert.Equal(t, types.ValidatorIndex(1), resp.Data[0].Index) }) + + t.Run("execution optimistic", func(t *testing.T) { + s := Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: st, + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ + StateId: []byte("head"), + }) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestListValidators_Status(t *testing.T) { @@ -279,6 +317,7 @@ func TestListValidators_Status(t *testing.T) { StateFetcher: &statefetcher.StateProvider{ ChainInfoFetcher: &chainMock.ChainService{State: st}, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -312,6 +351,7 @@ func TestListValidators_Status(t *testing.T) { StateFetcher: &statefetcher.StateProvider{ ChainInfoFetcher: &chainMock.ChainService{State: st}, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -344,6 +384,7 @@ func TestListValidators_Status(t *testing.T) { StateFetcher: &statefetcher.StateProvider{ ChainInfoFetcher: &chainMock.ChainService{State: st}, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -375,6 +416,7 @@ func TestListValidators_Status(t *testing.T) { StateFetcher: &statefetcher.StateProvider{ ChainInfoFetcher: &chainMock.ChainService{State: st}, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -406,6 +448,7 @@ func TestListValidators_Status(t *testing.T) { StateFetcher: &statefetcher.StateProvider{ ChainInfoFetcher: &chainMock.ChainService{State: st}, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -451,6 +494,7 @@ func TestListValidatorBalances(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } ids := [][]byte{[]byte("15"), []byte("26"), []byte("400")} @@ -471,6 +515,7 @@ func TestListValidatorBalances(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } idNums := []types.ValidatorIndex{20, 66, 90, 100} pubkey1 := st.PubkeyAtIndex(types.ValidatorIndex(20)) @@ -494,6 +539,7 @@ func TestListValidatorBalances(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } idNums := []types.ValidatorIndex{20, 90, 170, 129} @@ -510,6 +556,23 @@ func TestListValidatorBalances(t *testing.T) { assert.Equal(t, balances[val.Index], val.Balance) } }) + + t.Run("execution optimistic", func(t *testing.T) { + s := Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: st, + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + + ids := [][]byte{[]byte("15"), []byte("26"), []byte("400")} + resp, err := s.ListValidatorBalances(ctx, ðpb.ValidatorBalancesRequest{ + StateId: []byte("head"), + Id: ids, + }) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestListCommittees(t *testing.T) { @@ -524,6 +587,7 @@ func TestListCommittees(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } resp, err := s.ListCommittees(ctx, ðpb.StateCommitteesRequest{ @@ -542,6 +606,7 @@ func TestListCommittees(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } epoch := types.Epoch(10) resp, err := s.ListCommittees(ctx, ðpb.StateCommitteesRequest{ @@ -559,6 +624,7 @@ func TestListCommittees(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } slot := types.Slot(4) @@ -582,6 +648,7 @@ func TestListCommittees(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } index := types.CommitteeIndex(1) @@ -605,6 +672,7 @@ func TestListCommittees(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, + HeadFetcher: &chainMock.ChainService{}, } index := types.CommitteeIndex(1) @@ -622,4 +690,19 @@ func TestListCommittees(t *testing.T) { assert.Equal(t, index, datum.Index) } }) + + t.Run("execution optimistic", func(t *testing.T) { + s := Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: st, + }, + HeadFetcher: &chainMock.ChainService{Optimistic: true}, + } + + resp, err := s.ListCommittees(ctx, ðpb.StateCommitteesRequest{ + StateId: []byte("head"), + }) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } diff --git a/beacon-chain/rpc/eth/debug/debug.go b/beacon-chain/rpc/eth/debug/debug.go index e3d28fadb555..5e32a672b121 100644 --- a/beacon-chain/rpc/eth/debug/debug.go +++ b/beacon-chain/rpc/eth/debug/debug.go @@ -61,6 +61,11 @@ func (ds *Server) GetBeaconStateV2(ctx context.Context, req *ethpbv2.StateReques ctx, span := trace.StartSpan(ctx, "debug.GetBeaconStateV2") defer span.End() + isOptimistic, err := ds.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + beaconSt, err := ds.StateFetcher.State(ctx, req.StateId) if err != nil { return nil, helpers.PrepareStateFetchGRPCError(err) @@ -76,6 +81,7 @@ func (ds *Server) GetBeaconStateV2(ctx context.Context, req *ethpbv2.StateReques Data: ðpbv2.BeaconStateContainer{ State: ðpbv2.BeaconStateContainer_Phase0State{Phase0State: protoSt}, }, + ExecutionOptimistic: isOptimistic, }, nil case version.Altair: altairState, ok := beaconSt.(state.BeaconStateAltair) @@ -91,6 +97,7 @@ func (ds *Server) GetBeaconStateV2(ctx context.Context, req *ethpbv2.StateReques Data: ðpbv2.BeaconStateContainer{ State: ðpbv2.BeaconStateContainer_AltairState{AltairState: protoState}, }, + ExecutionOptimistic: isOptimistic, }, nil case version.Bellatrix: bellatrixState, ok := beaconSt.(state.BeaconStateBellatrix) @@ -106,6 +113,7 @@ func (ds *Server) GetBeaconStateV2(ctx context.Context, req *ethpbv2.StateReques Data: ðpbv2.BeaconStateContainer{ State: ðpbv2.BeaconStateContainer_BellatrixState{BellatrixState: protoState}, }, + ExecutionOptimistic: isOptimistic, }, nil default: return nil, status.Error(codes.Internal, "Unsupported state version") diff --git a/beacon-chain/rpc/eth/debug/debug_test.go b/beacon-chain/rpc/eth/debug/debug_test.go index 5fcf9a79b88e..7cc4eebd4bc0 100644 --- a/beacon-chain/rpc/eth/debug/debug_test.go +++ b/beacon-chain/rpc/eth/debug/debug_test.go @@ -39,6 +39,7 @@ func TestGetBeaconStateV2(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, + HeadFetcher: &blockchainmock.ChainService{}, } resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ StateId: make([]byte, 0), @@ -53,6 +54,7 @@ func TestGetBeaconStateV2(t *testing.T) { StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, + HeadFetcher: &blockchainmock.ChainService{}, } resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ StateId: make([]byte, 0), @@ -61,6 +63,21 @@ func TestGetBeaconStateV2(t *testing.T) { assert.NotNil(t, resp) assert.Equal(t, ethpbv2.Version_ALTAIR, resp.Version) }) + t.Run("execution optimistic", func(t *testing.T) { + fakeState, _ := util.DeterministicGenesisStateBellatrix(t, 1) + server := &Server{ + StateFetcher: &testutil.MockFetcher{ + BeaconState: fakeState, + }, + HeadFetcher: &blockchainmock.ChainService{Optimistic: true}, + } + resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ + StateId: make([]byte, 0), + }) + require.NoError(t, err) + assert.NotNil(t, resp) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestGetBeaconStateSSZ(t *testing.T) { diff --git a/beacon-chain/rpc/eth/validator/validator.go b/beacon-chain/rpc/eth/validator/validator.go index 5e43de1b2ef7..9e0619927589 100644 --- a/beacon-chain/rpc/eth/validator/validator.go +++ b/beacon-chain/rpc/eth/validator/validator.go @@ -105,10 +105,15 @@ func (vs *Server) GetAttesterDuties(ctx context.Context, req *ethpbv1.AttesterDu if err != nil { return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } + isOptimistic, err := vs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } return ðpbv1.AttesterDutiesResponse{ - DependentRoot: root, - Data: duties, + DependentRoot: root, + Data: duties, + ExecutionOptimistic: isOptimistic, }, nil } @@ -167,10 +172,15 @@ func (vs *Server) GetProposerDuties(ctx context.Context, req *ethpbv1.ProposerDu if err != nil { return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } + isOptimistic, err := vs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } return ðpbv1.ProposerDutiesResponse{ - DependentRoot: root, - Data: duties, + DependentRoot: root, + Data: duties, + ExecutionOptimistic: isOptimistic, }, nil } @@ -242,8 +252,14 @@ func (vs *Server) GetSyncCommitteeDuties(ctx context.Context, req *ethpbv2.SyncC } else if err != nil { return nil, status.Errorf(codes.Internal, "Could not get duties: %v", err) } + isOptimistic, err := vs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + return ðpbv2.SyncCommitteeDutiesResponse{ - Data: duties, + Data: duties, + ExecutionOptimistic: isOptimistic, }, nil } diff --git a/beacon-chain/rpc/eth/validator/validator_test.go b/beacon-chain/rpc/eth/validator/validator_test.go index fcfefe58dbe2..79a9cb5d6c5e 100644 --- a/beacon-chain/rpc/eth/validator/validator_test.go +++ b/beacon-chain/rpc/eth/validator/validator_test.go @@ -212,6 +212,25 @@ func TestGetAttesterDuties(t *testing.T) { require.NoError(t, err) assert.Equal(t, 0, len(resp.Data)) }) + + t.Run("execution optimistic", func(t *testing.T) { + chainSlot := types.Slot(0) + chain := &mockChain.ChainService{ + State: bs, Root: genesisRoot[:], Slot: &chainSlot, Optimistic: true, + } + vs := &Server{ + HeadFetcher: chain, + TimeFetcher: chain, + SyncChecker: &mockSync.Sync{IsSyncing: false}, + } + req := ðpbv1.AttesterDutiesRequest{ + Epoch: 0, + Index: []types.ValidatorIndex{0}, + } + resp, err := vs.GetAttesterDuties(ctx, req) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestGetAttesterDuties_SyncNotReady(t *testing.T) { @@ -336,6 +355,24 @@ func TestGetProposerDuties(t *testing.T) { require.NotNil(t, err) assert.ErrorContains(t, fmt.Sprintf("Request epoch %d can not be greater than current epoch %d", currentEpoch+1, currentEpoch), err) }) + + t.Run("execution optimistic", func(t *testing.T) { + chainSlot := types.Slot(0) + chain := &mockChain.ChainService{ + State: bs, Root: genesisRoot[:], Slot: &chainSlot, Optimistic: true, + } + vs := &Server{ + HeadFetcher: chain, + TimeFetcher: chain, + SyncChecker: &mockSync.Sync{IsSyncing: false}, + } + req := ðpbv1.ProposerDutiesRequest{ + Epoch: 0, + } + resp, err := vs.GetProposerDuties(ctx, req) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestGetProposerDuties_SyncNotReady(t *testing.T) { @@ -369,10 +406,12 @@ func TestGetSyncCommitteeDuties(t *testing.T) { } require.NoError(t, st.SetNextSyncCommittee(nextCommittee)) + mockChainService := &mockChain.ChainService{Genesis: genesisTime} vs := &Server{ StateFetcher: &testutil.MockFetcher{BeaconState: st}, SyncChecker: &mockSync.Sync{IsSyncing: false}, - TimeFetcher: &mockChain.ChainService{Genesis: genesisTime}, + TimeFetcher: mockChainService, + HeadFetcher: mockChainService, } t.Run("Single validator", func(t *testing.T) { @@ -505,10 +544,12 @@ func TestGetSyncCommitteeDuties(t *testing.T) { return newSyncPeriodSt } } + mockChainService := &mockChain.ChainService{Genesis: genesisTime, Slot: &newSyncPeriodStartSlot} vs := &Server{ StateFetcher: &testutil.MockFetcher{BeaconState: stateFetchFn(newSyncPeriodStartSlot)}, SyncChecker: &mockSync.Sync{IsSyncing: false}, - TimeFetcher: &mockChain.ChainService{Genesis: genesisTime, Slot: &newSyncPeriodStartSlot}, + TimeFetcher: mockChainService, + HeadFetcher: mockChainService, } req := ðpbv2.SyncCommitteeDutiesRequest{ @@ -526,6 +567,23 @@ func TestGetSyncCommitteeDuties(t *testing.T) { require.Equal(t, 1, len(duty.ValidatorSyncCommitteeIndices)) assert.Equal(t, uint64(3), duty.ValidatorSyncCommitteeIndices[0]) }) + + t.Run("execution optimistic", func(t *testing.T) { + mockChainService := &mockChain.ChainService{Genesis: genesisTime, Optimistic: true} + vs := &Server{ + StateFetcher: &testutil.MockFetcher{BeaconState: st}, + SyncChecker: &mockSync.Sync{IsSyncing: false}, + TimeFetcher: mockChainService, + HeadFetcher: mockChainService, + } + req := ðpbv2.SyncCommitteeDutiesRequest{ + Epoch: 0, + Index: []types.ValidatorIndex{1}, + } + resp, err := vs.GetSyncCommitteeDuties(ctx, req) + require.NoError(t, err) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) } func TestGetSyncCommitteeDuties_SyncNotReady(t *testing.T) { From 28d8270938fc5468b4b70d96b28b67692f5bb373 Mon Sep 17 00:00:00 2001 From: rkapka Date: Thu, 17 Mar 2022 17:53:42 +0100 Subject: [PATCH 03/12] middleware --- beacon-chain/rpc/apimiddleware/structs.go | 59 +++++++++++++++-------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index ef5887933a83..8fb61253276a 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -21,7 +21,8 @@ type genesisResponse_GenesisJson struct { // stateRootResponseJson is used in /beacon/states/{state_id}/root API endpoint. type stateRootResponseJson struct { - Data *stateRootResponse_StateRootJson `json:"data"` + Data *stateRootResponse_StateRootJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // stateRootResponse_StateRootJson is used in /beacon/states/{state_id}/root API endpoint. @@ -31,12 +32,14 @@ type stateRootResponse_StateRootJson struct { // stateForkResponseJson is used in /beacon/states/{state_id}/fork API endpoint. type stateForkResponseJson struct { - Data *forkJson `json:"data"` + Data *forkJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // stateFinalityCheckpointResponseJson is used in /beacon/states/{state_id}/finality_checkpoints API endpoint. type stateFinalityCheckpointResponseJson struct { - Data *stateFinalityCheckpointResponse_StateFinalityCheckpointJson `json:"data"` + Data *stateFinalityCheckpointResponse_StateFinalityCheckpointJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // stateFinalityCheckpointResponse_StateFinalityCheckpointJson is used in /beacon/states/{state_id}/finality_checkpoints API endpoint. @@ -48,37 +51,44 @@ type stateFinalityCheckpointResponse_StateFinalityCheckpointJson struct { // stateValidatorResponseJson is used in /beacon/states/{state_id}/validators API endpoint. type stateValidatorsResponseJson struct { - Data []*validatorContainerJson `json:"data"` + Data []*validatorContainerJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // stateValidatorResponseJson is used in /beacon/states/{state_id}/validators/{validator_id} API endpoint. type stateValidatorResponseJson struct { - Data *validatorContainerJson `json:"data"` + Data *validatorContainerJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // validatorBalancesResponseJson is used in /beacon/states/{state_id}/validator_balances API endpoint. type validatorBalancesResponseJson struct { - Data []*validatorBalanceJson `json:"data"` + Data []*validatorBalanceJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // stateCommitteesResponseJson is used in /beacon/states/{state_id}/committees API endpoint. type stateCommitteesResponseJson struct { - Data []*committeeJson `json:"data"` + Data []*committeeJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // syncCommitteesResponseJson is used in /beacon/states/{state_id}/sync_committees API endpoint. type syncCommitteesResponseJson struct { - Data *syncCommitteeValidatorsJson `json:"data"` + Data *syncCommitteeValidatorsJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // blockHeadersResponseJson is used in /beacon/headers API endpoint. type blockHeadersResponseJson struct { - Data []*blockHeaderContainerJson `json:"data"` + Data []*blockHeaderContainerJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // blockHeaderResponseJson is used in /beacon/headers/{block_id} API endpoint. type blockHeaderResponseJson struct { - Data *blockHeaderContainerJson `json:"data"` + Data *blockHeaderContainerJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // blockResponseJson is used in /beacon/blocks/{block_id} API endpoint. @@ -88,18 +98,21 @@ type blockResponseJson struct { // blockV2ResponseJson is used in /v2/beacon/blocks/{block_id} API endpoint. type blockV2ResponseJson struct { - Version string `json:"version" enum:"true"` - Data *signedBeaconBlockContainerV2Json `json:"data"` + Version string `json:"version" enum:"true"` + Data *signedBeaconBlockContainerV2Json `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // blockRootResponseJson is used in /beacon/blocks/{block_id}/root API endpoint. type blockRootResponseJson struct { - Data *blockRootContainerJson `json:"data"` + Data *blockRootContainerJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // blockAttestationsResponseJson is used in /beacon/blocks/{block_id}/attestations API endpoint. type blockAttestationsResponseJson struct { - Data []*attestationJson `json:"data"` + Data []*attestationJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // attestationsPoolResponseJson is used in /beacon/pool/attestations GET API endpoint. @@ -177,8 +190,9 @@ type beaconStateResponseJson struct { // beaconStateV2ResponseJson is used in /v2/debug/beacon/states/{state_id} API endpoint. type beaconStateV2ResponseJson struct { - Version string `json:"version" enum:"true"` - Data *beaconStateContainerV2Json `json:"data"` + Version string `json:"version" enum:"true"` + Data *beaconStateContainerV2Json `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // forkChoiceHeadsResponseJson is used in /debug/beacon/heads API endpoint. @@ -208,19 +222,22 @@ type dutiesRequestJson struct { // attesterDutiesResponseJson is used in /validator/duties/attester/{epoch} API endpoint. type attesterDutiesResponseJson struct { - DependentRoot string `json:"dependent_root" hex:"true"` - Data []*attesterDutyJson `json:"data"` + DependentRoot string `json:"dependent_root" hex:"true"` + Data []*attesterDutyJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // proposerDutiesResponseJson is used in /validator/duties/proposer/{epoch} API endpoint. type proposerDutiesResponseJson struct { - DependentRoot string `json:"dependent_root" hex:"true"` - Data []*proposerDutyJson `json:"data"` + DependentRoot string `json:"dependent_root" hex:"true"` + Data []*proposerDutyJson `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // syncCommitteeDutiesResponseJson is used in /validator/duties/sync/{epoch} API endpoint. type syncCommitteeDutiesResponseJson struct { - Data []*syncCommitteeDuty `json:"data"` + Data []*syncCommitteeDuty `json:"data"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // produceBlockResponseJson is used in /validator/blocks/{slot} API endpoint. From 93ce171332a1d2df901fec22020f7616eaafc81a Mon Sep 17 00:00:00 2001 From: rkapka Date: Thu, 17 Mar 2022 18:13:16 +0100 Subject: [PATCH 04/12] event protos --- proto/eth/v1/events.pb.go | 159 ++++++++++++++++++++++++-------------- proto/eth/v1/events.proto | 12 +++ 2 files changed, 114 insertions(+), 57 deletions(-) diff --git a/proto/eth/v1/events.pb.go b/proto/eth/v1/events.pb.go index bd543173b75c..8501f2865c44 100755 --- a/proto/eth/v1/events.pb.go +++ b/proto/eth/v1/events.pb.go @@ -82,6 +82,7 @@ type EventHead struct { EpochTransition bool `protobuf:"varint,4,opt,name=epoch_transition,json=epochTransition,proto3" json:"epoch_transition,omitempty"` PreviousDutyDependentRoot []byte `protobuf:"bytes,5,opt,name=previous_duty_dependent_root,json=previousDutyDependentRoot,proto3" json:"previous_duty_dependent_root,omitempty" ssz-size:"32"` CurrentDutyDependentRoot []byte `protobuf:"bytes,6,opt,name=current_duty_dependent_root,json=currentDutyDependentRoot,proto3" json:"current_duty_dependent_root,omitempty" ssz-size:"32"` + ExecutionOptimistic bool `protobuf:"varint,7,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *EventHead) Reset() { @@ -158,13 +159,21 @@ func (x *EventHead) GetCurrentDutyDependentRoot() []byte { return nil } +func (x *EventHead) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type EventBlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"` - Block []byte `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty" ssz-size:"32"` + Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"` + Block []byte `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty" ssz-size:"32"` + ExecutionOptimistic bool `protobuf:"varint,3,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *EventBlock) Reset() { @@ -213,18 +222,26 @@ func (x *EventBlock) GetBlock() []byte { return nil } +func (x *EventBlock) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type EventChainReorg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"` - Depth uint64 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"` - OldHeadBlock []byte `protobuf:"bytes,3,opt,name=old_head_block,json=oldHeadBlock,proto3" json:"old_head_block,omitempty" ssz-size:"32"` - NewHeadBlock []byte `protobuf:"bytes,4,opt,name=new_head_block,json=newHeadBlock,proto3" json:"new_head_block,omitempty" ssz-size:"32"` - OldHeadState []byte `protobuf:"bytes,5,opt,name=old_head_state,json=oldHeadState,proto3" json:"old_head_state,omitempty" ssz-size:"32"` - NewHeadState []byte `protobuf:"bytes,6,opt,name=new_head_state,json=newHeadState,proto3" json:"new_head_state,omitempty" ssz-size:"32"` - Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,7,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"` + Slot github_com_prysmaticlabs_eth2_types.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Slot"` + Depth uint64 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"` + OldHeadBlock []byte `protobuf:"bytes,3,opt,name=old_head_block,json=oldHeadBlock,proto3" json:"old_head_block,omitempty" ssz-size:"32"` + NewHeadBlock []byte `protobuf:"bytes,4,opt,name=new_head_block,json=newHeadBlock,proto3" json:"new_head_block,omitempty" ssz-size:"32"` + OldHeadState []byte `protobuf:"bytes,5,opt,name=old_head_state,json=oldHeadState,proto3" json:"old_head_state,omitempty" ssz-size:"32"` + NewHeadState []byte `protobuf:"bytes,6,opt,name=new_head_state,json=newHeadState,proto3" json:"new_head_state,omitempty" ssz-size:"32"` + Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,7,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"` + ExecutionOptimistic bool `protobuf:"varint,8,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *EventChainReorg) Reset() { @@ -308,14 +325,22 @@ func (x *EventChainReorg) GetEpoch() github_com_prysmaticlabs_eth2_types.Epoch { return github_com_prysmaticlabs_eth2_types.Epoch(0) } +func (x *EventChainReorg) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + type EventFinalizedCheckpoint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty" ssz-size:"32"` - State []byte `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty" ssz-size:"32"` - Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"` + Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty" ssz-size:"32"` + State []byte `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty" ssz-size:"32"` + Epoch github_com_prysmaticlabs_eth2_types.Epoch `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/eth2-types.Epoch"` + ExecutionOptimistic bool `protobuf:"varint,4,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` } func (x *EventFinalizedCheckpoint) Reset() { @@ -371,6 +396,13 @@ func (x *EventFinalizedCheckpoint) GetEpoch() github_com_prysmaticlabs_eth2_type return github_com_prysmaticlabs_eth2_types.Epoch(0) } +func (x *EventFinalizedCheckpoint) GetExecutionOptimistic() bool { + if x != nil { + return x.ExecutionOptimistic + } + return false +} + var File_proto_eth_v1_events_proto protoreflect.FileDescriptor var file_proto_eth_v1_events_proto_rawDesc = []byte{ @@ -383,7 +415,7 @@ var file_proto_eth_v1_events_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0xc4, 0x02, 0x0a, 0x09, 0x45, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0xf7, 0x02, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, @@ -404,54 +436,67 @@ var file_proto_eth_v1_events_proto_rawDesc = []byte{ 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, - 0x74, 0x22, 0x6c, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, - 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, - 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, - 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, - 0xe6, 0x02, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x6f, 0x72, 0x67, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x74, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x22, 0x9f, 0x01, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, - 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x0e, 0x6f, - 0x6c, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6f, 0x6c, 0x64, - 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x48, 0x65, - 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x48, 0x65, 0x61, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, - 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x48, 0x65, 0x61, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x9b, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, - 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x42, 0x7b, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, - 0x73, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, - 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, - 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0x99, 0x03, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x12, 0x40, 0x0a, 0x04, 0x73, 0x6c, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2c, 0x82, 0xb5, 0x18, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, + 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x64, 0x65, 0x70, + 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x2c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, + 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, + 0x6f, 0x6c, 0x64, 0x48, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x0e, + 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6e, 0x65, + 0x77, 0x48, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, + 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x22, 0xce, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x2d, 0x82, 0xb5, 0x18, 0x29, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x65, 0x74, 0x68, 0x32, 0x2d, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x42, 0x7b, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/eth/v1/events.proto b/proto/eth/v1/events.proto index 235a1a981871..06c231ddb515 100644 --- a/proto/eth/v1/events.proto +++ b/proto/eth/v1/events.proto @@ -49,6 +49,9 @@ message EventHead { // The current dependent root. bytes current_duty_dependent_root = 6 [(ethereum.eth.ext.ssz_size) = "32"]; + + // Information about optimistic sync. + bool execution_optimistic = 7; } message EventBlock { @@ -57,6 +60,9 @@ message EventBlock { // The root of the observed block. bytes block = 2 [(ethereum.eth.ext.ssz_size) = "32"]; + + // Information about optimistic sync. + bool execution_optimistic = 3; } message EventChainReorg { @@ -80,6 +86,9 @@ message EventChainReorg { // Epoch of the observed reorg. uint64 epoch = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; + + // Information about optimistic sync. + bool execution_optimistic = 8; } message EventFinalizedCheckpoint { @@ -91,4 +100,7 @@ message EventFinalizedCheckpoint { // Epoch the checkpoint references. uint64 epoch = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/eth2-types.Epoch"]; + + // Information about optimistic sync. + bool execution_optimistic = 4; } From 45c97b27b142e9325e0e16b767056e330c3fa516 Mon Sep 17 00:00:00 2001 From: rkapka Date: Thu, 17 Mar 2022 18:47:13 +0100 Subject: [PATCH 05/12] event backend --- beacon-chain/blockchain/head.go | 27 +++++++++++++------ beacon-chain/blockchain/head_test.go | 4 +-- beacon-chain/blockchain/process_block.go | 11 +++++--- beacon-chain/core/feed/block/events.go | 3 ++- beacon-chain/rpc/eth/beacon/blocks.go | 11 +++++--- beacon-chain/rpc/eth/beacon/blocks_test.go | 3 +++ beacon-chain/rpc/eth/events/events.go | 5 ++-- beacon-chain/rpc/eth/events/events_test.go | 31 +++++++++++++--------- 8 files changed, 63 insertions(+), 32 deletions(-) diff --git a/beacon-chain/blockchain/head.go b/beacon-chain/blockchain/head.go index 2e2c31692198..c4f889fbb8b6 100644 --- a/beacon-chain/blockchain/head.go +++ b/beacon-chain/blockchain/head.go @@ -153,16 +153,21 @@ func (s *Service) saveHead(ctx context.Context, headRoot [32]byte) error { "oldSlot": fmt.Sprintf("%d", headSlot), }).Debug("Chain reorg occurred") absoluteSlotDifference := slots.AbsoluteValueSlotDifference(newHeadSlot, headSlot) + isOptimistic, err := s.IsOptimistic(ctx) + if err != nil { + return errors.Wrap(err, "could not check if node is optimistically synced") + } s.cfg.StateNotifier.StateFeed().Send(&feed.Event{ Type: statefeed.Reorg, Data: ðpbv1.EventChainReorg{ - Slot: newHeadSlot, - Depth: absoluteSlotDifference, - OldHeadBlock: oldHeadRoot[:], - NewHeadBlock: headRoot[:], - OldHeadState: oldStateRoot, - NewHeadState: newStateRoot, - Epoch: slots.ToEpoch(newHeadSlot), + Slot: newHeadSlot, + Depth: absoluteSlotDifference, + OldHeadBlock: oldHeadRoot[:], + NewHeadBlock: headRoot[:], + OldHeadState: oldStateRoot, + NewHeadState: newStateRoot, + Epoch: slots.ToEpoch(newHeadSlot), + ExecutionOptimistic: isOptimistic, }, }) @@ -184,7 +189,7 @@ func (s *Service) saveHead(ctx context.Context, headRoot [32]byte) error { // Forward an event capturing a new chain head over a common event feed // done in a goroutine to avoid blocking the critical runtime main routine. go func() { - if err := s.notifyNewHeadEvent(newHeadSlot, newHeadState, newStateRoot, headRoot[:]); err != nil { + if err := s.notifyNewHeadEvent(ctx, newHeadSlot, newHeadState, newStateRoot, headRoot[:]); err != nil { log.WithError(err).Error("Could not notify event feed of new chain head") } }() @@ -304,6 +309,7 @@ func (s *Service) hasHeadState() bool { // Notifies a common event feed of a new chain head event. Called right after a new // chain head is determined, set, and saved to disk. func (s *Service) notifyNewHeadEvent( + ctx context.Context, newHeadSlot types.Slot, newHeadState state.BeaconState, newHeadStateRoot, @@ -337,6 +343,10 @@ func (s *Service) notifyNewHeadEvent( return errors.Wrap(err, "could not get duty dependent root") } } + isOptimistic, err := s.IsOptimistic(ctx) + if err != nil { + return errors.Wrap(err, "could not check if node is optimistically synced") + } s.cfg.StateNotifier.StateFeed().Send(&feed.Event{ Type: statefeed.NewHead, Data: ðpbv1.EventHead{ @@ -346,6 +356,7 @@ func (s *Service) notifyNewHeadEvent( EpochTransition: slots.IsEpochStart(newHeadSlot), PreviousDutyDependentRoot: previousDutyDependentRoot, CurrentDutyDependentRoot: currentDutyDependentRoot, + ExecutionOptimistic: isOptimistic, }, }) return nil diff --git a/beacon-chain/blockchain/head_test.go b/beacon-chain/blockchain/head_test.go index 3ef7454dc4ed..c5c08ebf2778 100644 --- a/beacon-chain/blockchain/head_test.go +++ b/beacon-chain/blockchain/head_test.go @@ -162,7 +162,7 @@ func Test_notifyNewHeadEvent(t *testing.T) { } newHeadStateRoot := [32]byte{2} newHeadRoot := [32]byte{3} - err := srv.notifyNewHeadEvent(1, bState, newHeadStateRoot[:], newHeadRoot[:]) + err := srv.notifyNewHeadEvent(context.Background(), 1, bState, newHeadStateRoot[:], newHeadRoot[:]) require.NoError(t, err) events := notifier.ReceivedEvents() require.Equal(t, 1, len(events)) @@ -197,7 +197,7 @@ func Test_notifyNewHeadEvent(t *testing.T) { newHeadStateRoot := [32]byte{2} newHeadRoot := [32]byte{3} - err = srv.notifyNewHeadEvent(epoch2Start, bState, newHeadStateRoot[:], newHeadRoot[:]) + err = srv.notifyNewHeadEvent(context.Background(), epoch2Start, bState, newHeadStateRoot[:], newHeadRoot[:]) require.NoError(t, err) events := notifier.ReceivedEvents() require.Equal(t, 1, len(events)) diff --git a/beacon-chain/blockchain/process_block.go b/beacon-chain/blockchain/process_block.go index ca19fb09c963..a470eb7e92bc 100644 --- a/beacon-chain/blockchain/process_block.go +++ b/beacon-chain/blockchain/process_block.go @@ -229,14 +229,19 @@ func (s *Service) onBlock(ctx context.Context, signed block.SignedBeaconBlock, b if err := s.cfg.ForkChoiceStore.Prune(ctx, fRoot); err != nil { return errors.Wrap(err, "could not prune proto array fork choice nodes") } + isOptimistic, err := s.cfg.ForkChoiceStore.IsOptimistic(ctx, s.headRoot()) + if err != nil { + return errors.Wrap(err, "could not check if node is optimistically synced") + } go func() { // Send an event regarding the new finalized checkpoint over a common event feed. s.cfg.StateNotifier.StateFeed().Send(&feed.Event{ Type: statefeed.FinalizedCheckpoint, Data: ðpbv1.EventFinalizedCheckpoint{ - Epoch: postState.FinalizedCheckpoint().Epoch, - Block: postState.FinalizedCheckpoint().Root, - State: signed.Block().StateRoot(), + Epoch: postState.FinalizedCheckpoint().Epoch, + Block: postState.FinalizedCheckpoint().Root, + State: signed.Block().StateRoot(), + ExecutionOptimistic: isOptimistic, }, }) diff --git a/beacon-chain/core/feed/block/events.go b/beacon-chain/core/feed/block/events.go index 2e5fb18bc1cf..e07fc6c11bfa 100644 --- a/beacon-chain/core/feed/block/events.go +++ b/beacon-chain/core/feed/block/events.go @@ -13,5 +13,6 @@ const ( // ReceivedBlockData is the data sent with ReceivedBlock events. type ReceivedBlockData struct { - SignedBlock block.SignedBeaconBlock + SignedBlock block.SignedBeaconBlock + IsOptimistic bool } diff --git a/beacon-chain/rpc/eth/beacon/blocks.go b/beacon-chain/rpc/eth/beacon/blocks.go index ef7e83e132b7..d58202bd7dfb 100644 --- a/beacon-chain/rpc/eth/beacon/blocks.go +++ b/beacon-chain/rpc/eth/beacon/blocks.go @@ -158,6 +158,11 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc ctx, span := trace.StartSpan(ctx, "beacon.SubmitBlock") defer span.End() + isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + } + phase0BlkContainer, ok := req.Message.(*ethpbv2.SignedBeaconBlockContainerV2_Phase0Block) if ok { phase0Blk := phase0BlkContainer.Phase0Block @@ -178,7 +183,7 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedPhase0Blk}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedPhase0Blk, IsOptimistic: isOptimistic}, }) }() @@ -215,7 +220,7 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedAltairBlk}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedAltairBlk, IsOptimistic: isOptimistic}, }) }() @@ -252,7 +257,7 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk, IsOptimistic: isOptimistic}, }) }() diff --git a/beacon-chain/rpc/eth/beacon/blocks_test.go b/beacon-chain/rpc/eth/beacon/blocks_test.go index 68bfeea94f03..cbb776ec02dc 100644 --- a/beacon-chain/rpc/eth/beacon/blocks_test.go +++ b/beacon-chain/rpc/eth/beacon/blocks_test.go @@ -398,6 +398,7 @@ func TestServer_ProposeBlock_OK(t *testing.T) { ChainInfoFetcher: c, BlockNotifier: c.BlockNotifier(), Broadcaster: mockp2p.NewTestP2P(t), + HeadFetcher: c, } req := util.NewBeaconBlock() req.Block.Slot = 5 @@ -437,6 +438,7 @@ func TestServer_ProposeBlock_OK(t *testing.T) { ChainInfoFetcher: c, BlockNotifier: c.BlockNotifier(), Broadcaster: mockp2p.NewTestP2P(t), + HeadFetcher: c, } req := util.NewBeaconBlockAltair() req.Block.Slot = 5 @@ -478,6 +480,7 @@ func TestServer_ProposeBlock_OK(t *testing.T) { ChainInfoFetcher: c, BlockNotifier: c.BlockNotifier(), Broadcaster: mockp2p.NewTestP2P(t), + HeadFetcher: c, } req := util.NewBeaconBlockBellatrix() req.Block.Slot = 5 diff --git a/beacon-chain/rpc/eth/events/events.go b/beacon-chain/rpc/eth/events/events.go index cf43f2b1723d..83e861fb75a8 100644 --- a/beacon-chain/rpc/eth/events/events.go +++ b/beacon-chain/rpc/eth/events/events.go @@ -124,8 +124,9 @@ func handleBlockEvents( return errors.Wrap(err, "could not hash tree root block") } eventBlock := ðpb.EventBlock{ - Slot: v1Data.Message.Slot, - Block: item[:], + Slot: v1Data.Message.Slot, + Block: item[:], + ExecutionOptimistic: blkData.IsOptimistic, } return streamData(stream, BlockTopic, eventBlock) default: diff --git a/beacon-chain/rpc/eth/events/events_test.go b/beacon-chain/rpc/eth/events/events_test.go index 65f8513ea788..46730ce35cc5 100644 --- a/beacon-chain/rpc/eth/events/events_test.go +++ b/beacon-chain/rpc/eth/events/events_test.go @@ -57,8 +57,9 @@ func TestStreamEvents_BlockEvents(t *testing.T) { wantedBlockRoot, err := wantedBlock.HashTreeRoot() require.NoError(t, err) genericResponse, err := anypb.New(ðpb.EventBlock{ - Slot: 8, - Block: wantedBlockRoot[:], + Slot: 8, + Block: wantedBlockRoot[:], + ExecutionOptimistic: true, }) require.NoError(t, err) wantedMessage := &gateway.EventSource{ @@ -75,7 +76,8 @@ func TestStreamEvents_BlockEvents(t *testing.T) { itemToSend: &feed.Event{ Type: blockfeed.ReceivedBlock, Data: &blockfeed.ReceivedBlockData{ - SignedBlock: wrapper.WrappedPhase0SignedBeaconBlock(wantedBlock), + SignedBlock: wrapper.WrappedPhase0SignedBeaconBlock(wantedBlock), + IsOptimistic: true, }, }, feed: srv.BlockNotifier.BlockFeed(), @@ -244,6 +246,7 @@ func TestStreamEvents_StateEvents(t *testing.T) { EpochTransition: true, PreviousDutyDependentRoot: make([]byte, 32), CurrentDutyDependentRoot: make([]byte, 32), + ExecutionOptimistic: true, } genericResponse, err := anypb.New(wantedHead) require.NoError(t, err) @@ -271,9 +274,10 @@ func TestStreamEvents_StateEvents(t *testing.T) { defer ctrl.Finish() wantedCheckpoint := ðpb.EventFinalizedCheckpoint{ - Block: make([]byte, 32), - State: make([]byte, 32), - Epoch: 8, + Block: make([]byte, 32), + State: make([]byte, 32), + Epoch: 8, + ExecutionOptimistic: true, } genericResponse, err := anypb.New(wantedCheckpoint) require.NoError(t, err) @@ -301,13 +305,14 @@ func TestStreamEvents_StateEvents(t *testing.T) { defer ctrl.Finish() wantedReorg := ðpb.EventChainReorg{ - Slot: 8, - Depth: 1, - OldHeadBlock: make([]byte, 32), - NewHeadBlock: make([]byte, 32), - OldHeadState: make([]byte, 32), - NewHeadState: make([]byte, 32), - Epoch: 0, + Slot: 8, + Depth: 1, + OldHeadBlock: make([]byte, 32), + NewHeadBlock: make([]byte, 32), + OldHeadState: make([]byte, 32), + NewHeadState: make([]byte, 32), + Epoch: 0, + ExecutionOptimistic: true, } genericResponse, err := anypb.New(wantedReorg) require.NoError(t, err) From 7164fe322441fc7258db36767d3cabda34531f48 Mon Sep 17 00:00:00 2001 From: rkapka Date: Thu, 17 Mar 2022 18:48:56 +0100 Subject: [PATCH 06/12] event middleware --- beacon-chain/rpc/apimiddleware/structs.go | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index 8fb61253276a..e75a66542660 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -834,13 +834,15 @@ type eventHeadJson struct { Block string `json:"block" hex:"true"` State string `json:"state" hex:"true"` EpochTransition bool `json:"epoch_transition"` + ExecutionOptimistic bool `json:"execution_optimistic"` PreviousDutyDependentRoot string `json:"previous_duty_dependent_root" hex:"true"` CurrentDutyDependentRoot string `json:"current_duty_dependent_root" hex:"true"` } type receivedBlockDataJson struct { - Slot string `json:"slot"` - Block string `json:"block" hex:"true"` + Slot string `json:"slot"` + Block string `json:"block" hex:"true"` + ExecutionOptimistic bool `json:"execution_optimistic"` } type aggregatedAttReceivedDataJson struct { @@ -848,19 +850,21 @@ type aggregatedAttReceivedDataJson struct { } type eventFinalizedCheckpointJson struct { - Block string `json:"block" hex:"true"` - State string `json:"state" hex:"true"` - Epoch string `json:"epoch"` + Block string `json:"block" hex:"true"` + State string `json:"state" hex:"true"` + Epoch string `json:"epoch"` + ExecutionOptimistic bool `json:"execution_optimistic"` } type eventChainReorgJson struct { - Slot string `json:"slot"` - Depth string `json:"depth"` - OldHeadBlock string `json:"old_head_block" hex:"true"` - NewHeadBlock string `json:"old_head_state" hex:"true"` - OldHeadState string `json:"new_head_block" hex:"true"` - NewHeadState string `json:"new_head_state" hex:"true"` - Epoch string `json:"epoch"` + Slot string `json:"slot"` + Depth string `json:"depth"` + OldHeadBlock string `json:"old_head_block" hex:"true"` + NewHeadBlock string `json:"old_head_state" hex:"true"` + OldHeadState string `json:"new_head_block" hex:"true"` + NewHeadState string `json:"new_head_state" hex:"true"` + Epoch string `json:"epoch"` + ExecutionOptimistic bool `json:"execution_optimistic"` } // --------------- From 67be852749bdc84c0ce2ec2378e6274ea46ead87 Mon Sep 17 00:00:00 2001 From: rkapka Date: Thu, 17 Mar 2022 20:37:52 +0100 Subject: [PATCH 07/12] fix tests --- beacon-chain/rpc/apimiddleware/custom_handlers_test.go | 4 ++-- beacon-chain/rpc/eth/beacon/sync_committee_test.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon-chain/rpc/apimiddleware/custom_handlers_test.go b/beacon-chain/rpc/apimiddleware/custom_handlers_test.go index fa04e77c5fd5..9809a81b640b 100644 --- a/beacon-chain/rpc/apimiddleware/custom_handlers_test.go +++ b/beacon-chain/rpc/apimiddleware/custom_handlers_test.go @@ -249,7 +249,7 @@ func TestReceiveEvents_TrailingSpace(t *testing.T) { errJson := receiveEvents(ch, w, req) assert.Equal(t, true, errJson == nil) assert.Equal(t, `event: finalized_checkpoint -data: {"block":"0x666f6f","state":"0x666f6f","epoch":"1"} +data: {"block":"0x666f6f","state":"0x666f6f","epoch":"1","execution_optimistic":false} `, w.Body.String()) } @@ -273,5 +273,5 @@ func TestWriteEvent(t *testing.T) { errJson := writeEvent(msg, w, &eventFinalizedCheckpointJson{}) require.Equal(t, true, errJson == nil) written := w.Body.String() - assert.Equal(t, "event: test_event\ndata: {\"block\":\"0x666f6f\",\"state\":\"0x666f6f\",\"epoch\":\"1\"}\n\n", written) + assert.Equal(t, "event: test_event\ndata: {\"block\":\"0x666f6f\",\"state\":\"0x666f6f\",\"epoch\":\"1\",\"execution_optimistic\":false}\n\n", written) } diff --git a/beacon-chain/rpc/eth/beacon/sync_committee_test.go b/beacon-chain/rpc/eth/beacon/sync_committee_test.go index ae2bd747b141..e69cf011d213 100644 --- a/beacon-chain/rpc/eth/beacon/sync_committee_test.go +++ b/beacon-chain/rpc/eth/beacon/sync_committee_test.go @@ -252,6 +252,7 @@ func TestListSyncCommitteesFuture(t *testing.T) { StateFetcher: &futureSyncMockFetcher{ BeaconState: st, }, + HeadFetcher: &mock.ChainService{}, } req := ðpbv2.StateSyncCommitteesRequest{} epoch := 2 * params.BeaconConfig().EpochsPerSyncCommitteePeriod From 25722c6d0357ab0db53153f08174199aaf5d9751 Mon Sep 17 00:00:00 2001 From: rkapka Date: Fri, 18 Mar 2022 14:25:06 +0100 Subject: [PATCH 08/12] use `IsOptimisticForRoot` with proper block instead of header --- beacon-chain/blockchain/process_block.go | 2 +- beacon-chain/rpc/eth/beacon/blocks.go | 113 +++++++++++------- beacon-chain/rpc/eth/beacon/state.go | 57 +++++++-- beacon-chain/rpc/eth/beacon/state_test.go | 46 ++++++- beacon-chain/rpc/eth/beacon/sync_committee.go | 8 +- .../rpc/eth/beacon/sync_committee_test.go | 15 +++ beacon-chain/rpc/eth/beacon/validator.go | 35 ++++-- beacon-chain/rpc/eth/beacon/validator_test.go | 65 ++++++++++ beacon-chain/rpc/eth/debug/BUILD.bazel | 4 + beacon-chain/rpc/eth/debug/debug.go | 35 +++++- beacon-chain/rpc/eth/debug/debug_test.go | 17 +++ beacon-chain/rpc/eth/validator/BUILD.bazel | 2 + beacon-chain/rpc/eth/validator/server.go | 2 + beacon-chain/rpc/eth/validator/validator.go | 47 +++++++- .../rpc/eth/validator/validator_test.go | 38 ++++++ beacon-chain/rpc/service.go | 1 + 16 files changed, 408 insertions(+), 79 deletions(-) diff --git a/beacon-chain/blockchain/process_block.go b/beacon-chain/blockchain/process_block.go index d29fbd7c9276..b2c6660b196c 100644 --- a/beacon-chain/blockchain/process_block.go +++ b/beacon-chain/blockchain/process_block.go @@ -229,7 +229,7 @@ func (s *Service) onBlock(ctx context.Context, signed block.SignedBeaconBlock, b if err := s.cfg.ForkChoiceStore.Prune(ctx, fRoot); err != nil { return errors.Wrap(err, "could not prune proto array fork choice nodes") } - isOptimistic, err := s.cfg.ForkChoiceStore.IsOptimistic(ctx, s.headRoot()) + isOptimistic, err := s.cfg.ForkChoiceStore.IsOptimistic(ctx, fRoot) if err != nil { return errors.Wrap(err, "could not check if node is optimistically synced") } diff --git a/beacon-chain/rpc/eth/beacon/blocks.go b/beacon-chain/rpc/eth/beacon/blocks.go index d58202bd7dfb..687e41920185 100644 --- a/beacon-chain/rpc/eth/beacon/blocks.go +++ b/beacon-chain/rpc/eth/beacon/blocks.go @@ -67,9 +67,9 @@ func (bs *Server) GetBlockHeader(ctx context.Context, req *ethpbv1.BlockRequest) if err != nil { return nil, status.Errorf(codes.Internal, "Could not determine if block root is canonical: %v", err) } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, blkRoot) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) } return ðpbv1.BlockHeaderResponse{ @@ -116,6 +116,7 @@ func (bs *Server) ListBlockHeaders(ctx context.Context, req *ethpbv1.BlockHeader return nil, status.Error(codes.NotFound, "Could not find requested blocks") } + isOptimistic := false blkHdrs := make([]*ethpbv1.BlockHeaderContainer, len(blks)) for i, bl := range blks { v1alpha1Header, err := bl.Header() @@ -131,6 +132,12 @@ func (bs *Server) ListBlockHeaders(ctx context.Context, req *ethpbv1.BlockHeader if err != nil { return nil, status.Errorf(codes.Internal, "Could not determine if block root is canonical: %v", err) } + if !isOptimistic { + isOptimistic, err = bs.HeadFetcher.IsOptimisticForRoot(ctx, blkRoots[i]) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) + } + } blkHdrs[i] = ðpbv1.BlockHeaderContainer{ Root: headerRoot[:], Canonical: canonical, @@ -141,11 +148,6 @@ func (bs *Server) ListBlockHeaders(ctx context.Context, req *ethpbv1.BlockHeader } } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) - } - return ðpbv1.BlockHeadersResponse{Data: blkHdrs, ExecutionOptimistic: isOptimistic}, nil } @@ -158,11 +160,6 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc ctx, span := trace.StartSpan(ctx, "beacon.SubmitBlock") defer span.End() - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) - } - phase0BlkContainer, ok := req.Message.(*ethpbv2.SignedBeaconBlockContainerV2_Phase0Block) if ok { phase0Blk := phase0BlkContainer.Phase0Block @@ -177,6 +174,21 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc return nil, status.Errorf(codes.InvalidArgument, "Could not tree hash block: %v", err) } + // Broadcast the new block to the network. + if err := bs.Broadcaster.Broadcast(ctx, wrappedPhase0Blk.Proto()); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) + } + + if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedPhase0Blk, root); err != nil { + return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) + } + // IsOptimisticForRoot has to be called after ReceiveBlock because the latter saves the block, + // and optimistic checks are performed against saved blocks. + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) + if err != nil { + return nil, errors.Wrap(err, "could not check if block is optimistic") + } + // Do not block proposal critical path with debug logging or block feed updates. defer func() { log.WithField("blockRoot", fmt.Sprintf("%#x", bytesutil.Trunc(root[:]))).Debugf( @@ -186,15 +198,6 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedPhase0Blk, IsOptimistic: isOptimistic}, }) }() - - // Broadcast the new block to the network. - if err := bs.Broadcaster.Broadcast(ctx, wrappedPhase0Blk.Proto()); err != nil { - return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) - } - - if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedPhase0Blk, root); err != nil { - return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) - } } altairBlkContainer, ok := req.Message.(*ethpbv2.SignedBeaconBlockContainerV2_AltairBlock) @@ -214,6 +217,21 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc return nil, status.Errorf(codes.InvalidArgument, "Could not tree hash block: %v", err) } + // Broadcast the new block to the network. + if err := bs.Broadcaster.Broadcast(ctx, wrappedAltairBlk.Proto()); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) + } + + if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedAltairBlk, root); err != nil { + return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) + } + // IsOptimisticForRoot has to be called after ReceiveBlock because the latter saves the block, + // and optimistic checks are performed against saved blocks. + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) + if err != nil { + return nil, errors.Wrap(err, "could not check if block is optimistic") + } + // Do not block proposal critical path with debug logging or block feed updates. defer func() { log.WithField("blockRoot", fmt.Sprintf("%#x", bytesutil.Trunc(root[:]))).Debugf( @@ -223,15 +241,6 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedAltairBlk, IsOptimistic: isOptimistic}, }) }() - - // Broadcast the new block to the network. - if err := bs.Broadcaster.Broadcast(ctx, wrappedAltairBlk.Proto()); err != nil { - return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) - } - - if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedAltairBlk, root); err != nil { - return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) - } } bellatrixBlkContainer, ok := req.Message.(*ethpbv2.SignedBeaconBlockContainerV2_BellatrixBlock) @@ -251,6 +260,21 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc return nil, status.Errorf(codes.InvalidArgument, "Could not tree hash block: %v", err) } + // Broadcast the new block to the network. + if err := bs.Broadcaster.Broadcast(ctx, wrappedBellatrixBlk.Proto()); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) + } + + if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedBellatrixBlk, root); err != nil { + return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) + } + // IsOptimisticForRoot has to be called after ReceiveBlock because the latter saves the block, + // and optimistic checks are performed against saved blocks. + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) + if err != nil { + return nil, errors.Wrap(err, "could not check if block is optimistic") + } + // Do not block proposal critical path with debug logging or block feed updates. defer func() { log.WithField("blockRoot", fmt.Sprintf("%#x", bytesutil.Trunc(root[:]))).Debugf( @@ -260,15 +284,6 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk, IsOptimistic: isOptimistic}, }) }() - - // Broadcast the new block to the network. - if err := bs.Broadcaster.Broadcast(ctx, wrappedBellatrixBlk.Proto()); err != nil { - return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) - } - - if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedBellatrixBlk, root); err != nil { - return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) - } } return &emptypb.Empty{}, nil @@ -330,9 +345,13 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( return nil, err } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + root, err := blk.Block().HashTreeRoot() if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get block root: %v", err) + } + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) } _, err = blk.PbPhase0Block() @@ -555,9 +574,9 @@ func (bs *Server) GetBlockRoot(ctx context.Context, req *ethpbv1.BlockRequest) ( } } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, bytesutil.ToBytes32(root)) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) } return ðpbv1.BlockRootResponse{ @@ -579,9 +598,13 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR return nil, err } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + root, err := blk.Block().HashTreeRoot() + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get block root: %v", err) + } + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) } _, err = blk.PbPhase0Block() diff --git a/beacon-chain/rpc/eth/beacon/state.go b/beacon-chain/rpc/eth/beacon/state.go index f665f94972d7..3200a621e6ce 100644 --- a/beacon-chain/rpc/eth/beacon/state.go +++ b/beacon-chain/rpc/eth/beacon/state.go @@ -5,6 +5,7 @@ import ( "context" "strconv" + "github.com/pkg/errors" types "github.com/prysmaticlabs/eth2-types" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/eth/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/statefetcher" @@ -12,6 +13,7 @@ import ( "github.com/prysmaticlabs/prysm/config/params" ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/time/slots" "go.opencensus.io/trace" "google.golang.org/grpc/codes" @@ -58,11 +60,11 @@ func (bs *Server) GetStateRoot(ctx context.Context, req *ethpb.StateRequest) (*e defer span.End() var ( - root []byte - err error + stateRoot []byte + err error ) - root, err = bs.StateFetcher.StateRoot(ctx, req.StateId) + stateRoot, err = bs.StateFetcher.StateRoot(ctx, req.StateId) if err != nil { if rootNotFoundErr, ok := err.(*statefetcher.StateRootNotFoundError); ok { return nil, status.Errorf(codes.NotFound, "State root not found: %v", rootNotFoundErr) @@ -71,14 +73,22 @@ func (bs *Server) GetStateRoot(ctx context.Context, req *ethpb.StateRequest) (*e } return nil, status.Errorf(codes.Internal, "Could not get state root: %v", err) } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + st, err := bs.StateFetcher.State(ctx, req.StateId) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get state: %v", err) + } + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpb.StateRootResponse{ Data: ðpb.StateRootResponse_StateRoot{ - Root: root, + Root: stateRoot, }, ExecutionOptimistic: isOptimistic, }, nil @@ -99,9 +109,13 @@ func (bs *Server) GetStateFork(ctx context.Context, req *ethpb.StateRequest) (*e return nil, helpers.PrepareStateFetchGRPCError(err) } fork := st.Fork() - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpb.StateForkResponse{ @@ -134,9 +148,13 @@ func (bs *Server) GetFinalityCheckpoints(ctx context.Context, req *ethpb.StateRe } return nil, status.Errorf(codes.Internal, "Could not get state: %v", err) } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpb.StateFinalityCheckpointResponse{ @@ -186,3 +204,22 @@ func checkpoint(sourceCheckpoint *eth.Checkpoint) *ethpb.Checkpoint { Root: params.BeaconConfig().ZeroHash[:], } } + +func (bs *Server) blocksAreOptimistic(ctx context.Context, blocks []block.SignedBeaconBlock) (bool, error) { + isOptimistic := false + for _, b := range blocks { + if isOptimistic { + break + } + blockRoot, err := b.Block().HashTreeRoot() + if err != nil { + return false, errors.Wrap(err, "could not get block root") + } + isOptimistic, err = bs.HeadFetcher.IsOptimisticForRoot(ctx, blockRoot) + if err != nil { + return false, errors.Wrap(err, "could not check if block is optimistic") + } + + } + return isOptimistic, nil +} diff --git a/beacon-chain/rpc/eth/beacon/state_test.go b/beacon-chain/rpc/eth/beacon/state_test.go index 1f03911784ab..79c66a18e49f 100644 --- a/beacon-chain/rpc/eth/beacon/state_test.go +++ b/beacon-chain/rpc/eth/beacon/state_test.go @@ -6,11 +6,13 @@ import ( "time" chainMock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" + dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/testutil" "github.com/prysmaticlabs/prysm/config/params" "github.com/prysmaticlabs/prysm/encoding/bytesutil" eth "github.com/prysmaticlabs/prysm/proto/eth/v1" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/testing/assert" "github.com/prysmaticlabs/prysm/testing/require" "github.com/prysmaticlabs/prysm/testing/util" @@ -76,11 +78,15 @@ func TestGetStateRoot(t *testing.T) { require.NoError(t, err) stateRoot, err := fakeState.HashTreeRoot(ctx) require.NoError(t, err) + db := dbTest.SetupDB(t) + server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconStateRoot: stateRoot[:], + BeaconState: fakeState, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ @@ -91,11 +97,21 @@ func TestGetStateRoot(t *testing.T) { assert.DeepEqual(t, stateRoot[:], resp.Data.Root) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconStateRoot: stateRoot[:], + BeaconState: fakeState, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ StateId: make([]byte, 0), @@ -107,6 +123,7 @@ func TestGetStateRoot(t *testing.T) { } func TestGetStateFork(t *testing.T) { + ctx := context.Background() fillFork := func(state *ethpb.BeaconState) error { state.Fork = ðpb.Fork{ PreviousVersion: []byte("prev"), @@ -117,14 +134,17 @@ func TestGetStateFork(t *testing.T) { } fakeState, err := util.NewBeaconState(fillFork) require.NoError(t, err) + db := dbTest.SetupDB(t) + server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } - resp, err := server.GetStateFork(context.Background(), ð.StateRequest{ + resp, err := server.GetStateFork(ctx, ð.StateRequest{ StateId: make([]byte, 0), }) require.NoError(t, err) @@ -135,11 +155,20 @@ func TestGetStateFork(t *testing.T) { assert.DeepEqual(t, expectedFork.PreviousVersion, resp.Data.PreviousVersion) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := server.GetStateFork(context.Background(), ð.StateRequest{ StateId: make([]byte, 0), @@ -151,6 +180,7 @@ func TestGetStateFork(t *testing.T) { } func TestGetFinalityCheckpoints(t *testing.T) { + ctx := context.Background() fillCheckpoints := func(state *ethpb.BeaconState) error { state.PreviousJustifiedCheckpoint = ðpb.Checkpoint{ Root: bytesutil.PadTo([]byte("previous"), 32), @@ -168,14 +198,17 @@ func TestGetFinalityCheckpoints(t *testing.T) { } fakeState, err := util.NewBeaconState(fillCheckpoints) require.NoError(t, err) + db := dbTest.SetupDB(t) + server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } - resp, err := server.GetFinalityCheckpoints(context.Background(), ð.StateRequest{ + resp, err := server.GetFinalityCheckpoints(ctx, ð.StateRequest{ StateId: make([]byte, 0), }) require.NoError(t, err) @@ -188,11 +221,20 @@ func TestGetFinalityCheckpoints(t *testing.T) { assert.DeepEqual(t, fakeState.PreviousJustifiedCheckpoint().Root, resp.Data.PreviousJustified.Root) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := server.GetFinalityCheckpoints(context.Background(), ð.StateRequest{ StateId: make([]byte, 0), diff --git a/beacon-chain/rpc/eth/beacon/sync_committee.go b/beacon-chain/rpc/eth/beacon/sync_committee.go index 5e9f86255ed6..ca19927b5b8e 100644 --- a/beacon-chain/rpc/eth/beacon/sync_committee.go +++ b/beacon-chain/rpc/eth/beacon/sync_committee.go @@ -91,9 +91,13 @@ func (bs *Server) ListSyncCommittees(ctx context.Context, req *ethpbv2.StateSync return nil, status.Errorf(codes.Internal, "Could not extract sync subcommittees: %v", err) } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpbv2.StateSyncCommitteesResponse{ diff --git a/beacon-chain/rpc/eth/beacon/sync_committee_test.go b/beacon-chain/rpc/eth/beacon/sync_committee_test.go index e69cf011d213..39659f1c0d16 100644 --- a/beacon-chain/rpc/eth/beacon/sync_committee_test.go +++ b/beacon-chain/rpc/eth/beacon/sync_committee_test.go @@ -12,6 +12,7 @@ import ( types "github.com/prysmaticlabs/eth2-types" grpcutil "github.com/prysmaticlabs/prysm/api/grpc" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" + dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" "github.com/prysmaticlabs/prysm/beacon-chain/operations/synccommittee" mockp2p "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/prysm/v1alpha1/validator" @@ -21,6 +22,7 @@ import ( "github.com/prysmaticlabs/prysm/encoding/bytesutil" ethpbv2 "github.com/prysmaticlabs/prysm/proto/eth/v2" ethpbalpha "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/testing/assert" "github.com/prysmaticlabs/prysm/testing/require" "github.com/prysmaticlabs/prysm/testing/util" @@ -158,6 +160,7 @@ func TestListSyncCommittees(t *testing.T) { })) stRoot, err := st.HashTreeRoot(ctx) require.NoError(t, err) + db := dbTest.SetupDB(t) s := &Server{ GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ @@ -167,6 +170,7 @@ func TestListSyncCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &mock.ChainService{}, + BeaconDB: db, } req := ðpbv2.StateSyncCommitteesRequest{StateId: stRoot[:]} resp, err := s.ListSyncCommittees(ctx, req) @@ -191,6 +195,14 @@ func TestListSyncCommittees(t *testing.T) { } t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + s := &Server{ GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ Genesis: time.Now(), @@ -199,6 +211,7 @@ func TestListSyncCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &mock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := s.ListSyncCommittees(ctx, req) require.NoError(t, err) @@ -244,6 +257,7 @@ func TestListSyncCommitteesFuture(t *testing.T) { Pubkeys: syncCommittee, AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), })) + db := dbTest.SetupDB(t) s := &Server{ GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ @@ -253,6 +267,7 @@ func TestListSyncCommitteesFuture(t *testing.T) { BeaconState: st, }, HeadFetcher: &mock.ChainService{}, + BeaconDB: db, } req := ðpbv2.StateSyncCommitteesRequest{} epoch := 2 * params.BeaconConfig().EpochsPerSyncCommitteePeriod diff --git a/beacon-chain/rpc/eth/beacon/validator.go b/beacon-chain/rpc/eth/beacon/validator.go index c7fb00d7ee26..347971c16a66 100644 --- a/beacon-chain/rpc/eth/beacon/validator.go +++ b/beacon-chain/rpc/eth/beacon/validator.go @@ -56,9 +56,14 @@ func (bs *Server) GetValidator(ctx context.Context, req *ethpb.StateValidatorReq if len(valContainer) == 0 { return nil, status.Error(codes.NotFound, "Could not find validator") } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpb.StateValidatorResponse{Data: valContainer[0], ExecutionOptimistic: isOptimistic}, nil @@ -79,9 +84,13 @@ func (bs *Server) ListValidators(ctx context.Context, req *ethpb.StateValidators return nil, handleValContainerErr(err) } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } // Exit early if no matching validators we found or we don't want to further filter validators by status. @@ -141,9 +150,14 @@ func (bs *Server) ListValidatorBalances(ctx context.Context, req *ethpb.Validato Balance: valContainers[i].Balance, } } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpb.ValidatorBalancesResponse{Data: valBalances, ExecutionOptimistic: isOptimistic}, nil @@ -199,9 +213,14 @@ func (bs *Server) ListCommittees(ctx context.Context, req *ethpb.StateCommittees committees = append(committees, committeeContainer) } } - isOptimistic, err := bs.HeadFetcher.IsOptimistic(ctx) + + _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpb.StateCommitteesResponse{Data: committees, ExecutionOptimistic: isOptimistic}, nil diff --git a/beacon-chain/rpc/eth/beacon/validator_test.go b/beacon-chain/rpc/eth/beacon/validator_test.go index 20007a123c35..63ca8dda5e5d 100644 --- a/beacon-chain/rpc/eth/beacon/validator_test.go +++ b/beacon-chain/rpc/eth/beacon/validator_test.go @@ -8,6 +8,7 @@ import ( types "github.com/prysmaticlabs/eth2-types" chainMock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" + dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" rpchelpers "github.com/prysmaticlabs/prysm/beacon-chain/rpc/eth/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/statefetcher" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/testutil" @@ -17,6 +18,7 @@ import ( ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1" "github.com/prysmaticlabs/prysm/proto/migration" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/testing/assert" "github.com/prysmaticlabs/prysm/testing/require" "github.com/prysmaticlabs/prysm/testing/util" @@ -25,6 +27,7 @@ import ( func TestGetValidator(t *testing.T) { ctx := context.Background() + db := dbTest.SetupDB(t) var st state.BeaconState st, _ = util.DeterministicGenesisState(t, 8192) @@ -35,6 +38,7 @@ func TestGetValidator(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.GetValidator(ctx, ðpb.StateValidatorRequest{ @@ -51,6 +55,7 @@ func TestGetValidator(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } pubKey := st.PubkeyAtIndex(types.ValidatorIndex(20)) @@ -69,6 +74,7 @@ func TestGetValidator(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } _, err := s.GetValidator(ctx, ðpb.StateValidatorRequest{ StateId: []byte("head"), @@ -77,11 +83,20 @@ func TestGetValidator(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + s := Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := s.GetValidator(ctx, ðpb.StateValidatorRequest{ StateId: []byte("head"), @@ -94,6 +109,7 @@ func TestGetValidator(t *testing.T) { func TestListValidators(t *testing.T) { ctx := context.Background() + db := dbTest.SetupDB(t) var st state.BeaconState st, _ = util.DeterministicGenesisState(t, 8192) @@ -104,6 +120,7 @@ func TestListValidators(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -122,6 +139,7 @@ func TestListValidators(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } ids := [][]byte{[]byte("15"), []byte("26"), []byte("400")} @@ -143,6 +161,7 @@ func TestListValidators(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } idNums := []types.ValidatorIndex{20, 66, 90, 100} pubkey1 := st.PubkeyAtIndex(types.ValidatorIndex(20)) @@ -168,6 +187,7 @@ func TestListValidators(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } idNums := []types.ValidatorIndex{20, 90, 170, 129} @@ -195,6 +215,7 @@ func TestListValidators(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } existingKey := st.PubkeyAtIndex(types.ValidatorIndex(1)) @@ -214,6 +235,7 @@ func TestListValidators(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } ids := [][]byte{[]byte("1"), []byte("99999")} @@ -227,11 +249,20 @@ func TestListValidators(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + s := Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ StateId: []byte("head"), @@ -243,6 +274,7 @@ func TestListValidators(t *testing.T) { func TestListValidators_Status(t *testing.T) { ctx := context.Background() + db := dbTest.SetupDB(t) var st state.BeaconState st, _ = util.DeterministicGenesisState(t, 8192) @@ -318,6 +350,7 @@ func TestListValidators_Status(t *testing.T) { ChainInfoFetcher: &chainMock.ChainService{State: st}, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -352,6 +385,7 @@ func TestListValidators_Status(t *testing.T) { ChainInfoFetcher: &chainMock.ChainService{State: st}, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -385,6 +419,7 @@ func TestListValidators_Status(t *testing.T) { ChainInfoFetcher: &chainMock.ChainService{State: st}, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -417,6 +452,7 @@ func TestListValidators_Status(t *testing.T) { ChainInfoFetcher: &chainMock.ChainService{State: st}, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -449,6 +485,7 @@ func TestListValidators_Status(t *testing.T) { ChainInfoFetcher: &chainMock.ChainService{State: st}, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListValidators(ctx, ðpb.StateValidatorsRequest{ @@ -479,6 +516,7 @@ func TestListValidators_Status(t *testing.T) { } func TestListValidatorBalances(t *testing.T) { ctx := context.Background() + db := dbTest.SetupDB(t) var st state.BeaconState count := uint64(8192) @@ -495,6 +533,7 @@ func TestListValidatorBalances(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } ids := [][]byte{[]byte("15"), []byte("26"), []byte("400")} @@ -516,6 +555,7 @@ func TestListValidatorBalances(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } idNums := []types.ValidatorIndex{20, 66, 90, 100} pubkey1 := st.PubkeyAtIndex(types.ValidatorIndex(20)) @@ -540,6 +580,7 @@ func TestListValidatorBalances(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } idNums := []types.ValidatorIndex{20, 90, 170, 129} @@ -558,11 +599,20 @@ func TestListValidatorBalances(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + s := Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } ids := [][]byte{[]byte("15"), []byte("26"), []byte("400")} @@ -577,6 +627,7 @@ func TestListValidatorBalances(t *testing.T) { func TestListCommittees(t *testing.T) { ctx := context.Background() + db := dbTest.SetupDB(t) var st state.BeaconState st, _ = util.DeterministicGenesisState(t, 8192) @@ -588,6 +639,7 @@ func TestListCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } resp, err := s.ListCommittees(ctx, ðpb.StateCommitteesRequest{ @@ -607,6 +659,7 @@ func TestListCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } epoch := types.Epoch(10) resp, err := s.ListCommittees(ctx, ðpb.StateCommitteesRequest{ @@ -625,6 +678,7 @@ func TestListCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } slot := types.Slot(4) @@ -649,6 +703,7 @@ func TestListCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } index := types.CommitteeIndex(1) @@ -673,6 +728,7 @@ func TestListCommittees(t *testing.T) { BeaconState: st, }, HeadFetcher: &chainMock.ChainService{}, + BeaconDB: db, } index := types.CommitteeIndex(1) @@ -692,11 +748,20 @@ func TestListCommittees(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + s := Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: st, }, HeadFetcher: &chainMock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := s.ListCommittees(ctx, ðpb.StateCommitteesRequest{ diff --git a/beacon-chain/rpc/eth/debug/BUILD.bazel b/beacon-chain/rpc/eth/debug/BUILD.bazel index 24d603958b76..5c2092daa169 100644 --- a/beacon-chain/rpc/eth/debug/BUILD.bazel +++ b/beacon-chain/rpc/eth/debug/BUILD.bazel @@ -17,7 +17,9 @@ go_library( "//proto/eth/v1:go_default_library", "//proto/eth/v2:go_default_library", "//proto/migration:go_default_library", + "//proto/prysm/v1alpha1/block:go_default_library", "//runtime/version:go_default_library", + "@com_github_pkg_errors//:go_default_library", "@io_opencensus_go//trace:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", @@ -31,10 +33,12 @@ go_test( embed = [":go_default_library"], deps = [ "//beacon-chain/blockchain/testing:go_default_library", + "//beacon-chain/db/testing:go_default_library", "//beacon-chain/rpc/testutil:go_default_library", "//encoding/bytesutil:go_default_library", "//proto/eth/v1:go_default_library", "//proto/eth/v2:go_default_library", + "//proto/prysm/v1alpha1/wrapper:go_default_library", "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", diff --git a/beacon-chain/rpc/eth/debug/debug.go b/beacon-chain/rpc/eth/debug/debug.go index 5e32a672b121..8b1cc9fc62ba 100644 --- a/beacon-chain/rpc/eth/debug/debug.go +++ b/beacon-chain/rpc/eth/debug/debug.go @@ -3,11 +3,13 @@ package debug import ( "context" + "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/eth/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/state" ethpbv1 "github.com/prysmaticlabs/prysm/proto/eth/v1" ethpbv2 "github.com/prysmaticlabs/prysm/proto/eth/v2" "github.com/prysmaticlabs/prysm/proto/migration" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/runtime/version" "go.opencensus.io/trace" "google.golang.org/grpc/codes" @@ -61,15 +63,19 @@ func (ds *Server) GetBeaconStateV2(ctx context.Context, req *ethpbv2.StateReques ctx, span := trace.StartSpan(ctx, "debug.GetBeaconStateV2") defer span.End() - isOptimistic, err := ds.HeadFetcher.IsOptimistic(ctx) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) - } - beaconSt, err := ds.StateFetcher.State(ctx, req.StateId) if err != nil { return nil, helpers.PrepareStateFetchGRPCError(err) } + _, blocks, err := ds.BeaconDB.BlocksBySlot(ctx, beaconSt.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := ds.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + } + switch beaconSt.Version() { case version.Phase0: protoSt, err := migration.BeaconStateToProto(beaconSt) @@ -156,3 +162,22 @@ func (ds *Server) ListForkChoiceHeads(ctx context.Context, _ *emptypb.Empty) (*e return resp, nil } + +func (ds *Server) blocksAreOptimistic(ctx context.Context, blocks []block.SignedBeaconBlock) (bool, error) { + isOptimistic := false + for _, b := range blocks { + if isOptimistic { + break + } + blockRoot, err := b.Block().HashTreeRoot() + if err != nil { + return false, errors.Wrap(err, "could not get block root") + } + isOptimistic, err = ds.HeadFetcher.IsOptimisticForRoot(ctx, blockRoot) + if err != nil { + return false, errors.Wrap(err, "could not check if block is optimistic") + } + + } + return isOptimistic, nil +} diff --git a/beacon-chain/rpc/eth/debug/debug_test.go b/beacon-chain/rpc/eth/debug/debug_test.go index 2029531e4964..804da9c74272 100644 --- a/beacon-chain/rpc/eth/debug/debug_test.go +++ b/beacon-chain/rpc/eth/debug/debug_test.go @@ -6,10 +6,12 @@ import ( types "github.com/prysmaticlabs/eth2-types" blockchainmock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" + dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/testutil" "github.com/prysmaticlabs/prysm/encoding/bytesutil" ethpbv1 "github.com/prysmaticlabs/prysm/proto/eth/v1" ethpbv2 "github.com/prysmaticlabs/prysm/proto/eth/v2" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/testing/assert" "github.com/prysmaticlabs/prysm/testing/require" "github.com/prysmaticlabs/prysm/testing/util" @@ -32,6 +34,9 @@ func TestGetBeaconState(t *testing.T) { } func TestGetBeaconStateV2(t *testing.T) { + ctx := context.Background() + db := dbTest.SetupDB(t) + t.Run("Phase 0", func(t *testing.T) { fakeState, err := util.NewBeaconState() require.NoError(t, err) @@ -40,6 +45,7 @@ func TestGetBeaconStateV2(t *testing.T) { BeaconState: fakeState, }, HeadFetcher: &blockchainmock.ChainService{}, + BeaconDB: db, } resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ StateId: make([]byte, 0), @@ -55,6 +61,7 @@ func TestGetBeaconStateV2(t *testing.T) { BeaconState: fakeState, }, HeadFetcher: &blockchainmock.ChainService{}, + BeaconDB: db, } resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ StateId: make([]byte, 0), @@ -70,6 +77,7 @@ func TestGetBeaconStateV2(t *testing.T) { BeaconState: fakeState, }, HeadFetcher: &blockchainmock.ChainService{}, + BeaconDB: db, } resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ StateId: make([]byte, 0), @@ -79,12 +87,21 @@ func TestGetBeaconStateV2(t *testing.T) { assert.Equal(t, ethpbv2.Version_BELLATRIX, resp.Version) }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + fakeState, _ := util.DeterministicGenesisStateBellatrix(t, 1) server := &Server{ StateFetcher: &testutil.MockFetcher{ BeaconState: fakeState, }, HeadFetcher: &blockchainmock.ChainService{Optimistic: true}, + BeaconDB: db, } resp, err := server.GetBeaconStateV2(context.Background(), ðpbv2.StateRequestV2{ StateId: make([]byte, 0), diff --git a/beacon-chain/rpc/eth/validator/BUILD.bazel b/beacon-chain/rpc/eth/validator/BUILD.bazel index 90fbb2e7fe8f..94e20a4d03ec 100644 --- a/beacon-chain/rpc/eth/validator/BUILD.bazel +++ b/beacon-chain/rpc/eth/validator/BUILD.bazel @@ -13,6 +13,7 @@ go_library( "//beacon-chain/cache:go_default_library", "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/transition:go_default_library", + "//beacon-chain/db:go_default_library", "//beacon-chain/operations/attestations:go_default_library", "//beacon-chain/operations/synccommittee:go_default_library", "//beacon-chain/p2p:go_default_library", @@ -29,6 +30,7 @@ go_library( "//proto/eth/v2:go_default_library", "//proto/migration:go_default_library", "//proto/prysm/v1alpha1:go_default_library", + "//proto/prysm/v1alpha1/block:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", diff --git a/beacon-chain/rpc/eth/validator/server.go b/beacon-chain/rpc/eth/validator/server.go index 6ee01620afec..3e48d7d35219 100644 --- a/beacon-chain/rpc/eth/validator/server.go +++ b/beacon-chain/rpc/eth/validator/server.go @@ -2,6 +2,7 @@ package validator import ( "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" + "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations" "github.com/prysmaticlabs/prysm/beacon-chain/operations/synccommittee" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" @@ -13,6 +14,7 @@ import ( // Server defines a server implementation of the gRPC Validator service, // providing RPC endpoints intended for validator clients. type Server struct { + BeaconDB db.ReadOnlyDatabase HeadFetcher blockchain.HeadFetcher TimeFetcher blockchain.TimeFetcher SyncChecker sync.Checker diff --git a/beacon-chain/rpc/eth/validator/validator.go b/beacon-chain/rpc/eth/validator/validator.go index cb1bc1119cc9..bf87a14d792e 100644 --- a/beacon-chain/rpc/eth/validator/validator.go +++ b/beacon-chain/rpc/eth/validator/validator.go @@ -26,6 +26,7 @@ import ( ethpbv2 "github.com/prysmaticlabs/prysm/proto/eth/v2" "github.com/prysmaticlabs/prysm/proto/migration" ethpbalpha "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/time/slots" log "github.com/sirupsen/logrus" "go.opencensus.io/trace" @@ -108,9 +109,14 @@ func (vs *Server) GetAttesterDuties(ctx context.Context, req *ethpbv1.AttesterDu if err != nil { return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } - isOptimistic, err := vs.HeadFetcher.IsOptimistic(ctx) + + _, blocks, err := vs.BeaconDB.BlocksBySlot(ctx, s.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := vs.blocksAreOptimistic(ctx, blocks) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpbv1.AttesterDutiesResponse{ @@ -175,9 +181,14 @@ func (vs *Server) GetProposerDuties(ctx context.Context, req *ethpbv1.ProposerDu if err != nil { return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } - isOptimistic, err := vs.HeadFetcher.IsOptimistic(ctx) + + _, blocks, err := vs.BeaconDB.BlocksBySlot(ctx, s.Slot()) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := vs.blocksAreOptimistic(ctx, blocks) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpbv1.ProposerDutiesResponse{ @@ -255,9 +266,14 @@ func (vs *Server) GetSyncCommitteeDuties(ctx context.Context, req *ethpbv2.SyncC } else if err != nil { return nil, status.Errorf(codes.Internal, "Could not get duties: %v", err) } - isOptimistic, err := vs.HeadFetcher.IsOptimistic(ctx) + + _, blocks, err := vs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) + } + isOptimistic, err := vs.blocksAreOptimistic(ctx, blocks) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if node is optimistically synced: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) } return ðpbv2.SyncCommitteeDutiesResponse{ @@ -799,3 +815,22 @@ func syncCommitteeDuties( } return duties, nil } + +func (vs *Server) blocksAreOptimistic(ctx context.Context, blocks []block.SignedBeaconBlock) (bool, error) { + isOptimistic := false + for _, b := range blocks { + if isOptimistic { + break + } + blockRoot, err := b.Block().HashTreeRoot() + if err != nil { + return false, errors.Wrap(err, "could not get block root") + } + isOptimistic, err = vs.HeadFetcher.IsOptimisticForRoot(ctx, blockRoot) + if err != nil { + return false, errors.Wrap(err, "could not check if block is optimistic") + } + + } + return isOptimistic, nil +} diff --git a/beacon-chain/rpc/eth/validator/validator_test.go b/beacon-chain/rpc/eth/validator/validator_test.go index 8298c510de9a..4244c02f0f99 100644 --- a/beacon-chain/rpc/eth/validator/validator_test.go +++ b/beacon-chain/rpc/eth/validator/validator_test.go @@ -66,6 +66,7 @@ func TestGetAttesterDuties(t *testing.T) { roots := make([][]byte, fieldparams.BlockRootsLength) roots[0] = genesisRoot[:] require.NoError(t, bs.SetBlockRoots(roots)) + db := dbutil.SetupDB(t) // Deactivate last validator. vals := bs.Validators() @@ -85,6 +86,7 @@ func TestGetAttesterDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, + BeaconDB: db, } t.Run("Single validator", func(t *testing.T) { @@ -163,6 +165,7 @@ func TestGetAttesterDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, + BeaconDB: db, } req := ðpbv1.AttesterDutiesRequest{ @@ -215,6 +218,15 @@ func TestGetAttesterDuties(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + blk.Block.Slot = 31 + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + chainSlot := types.Slot(0) chain := &mockChain.ChainService{ State: bs, Root: genesisRoot[:], Slot: &chainSlot, Optimistic: true, @@ -223,6 +235,7 @@ func TestGetAttesterDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, + BeaconDB: db, } req := ðpbv1.AttesterDutiesRequest{ Epoch: 0, @@ -262,6 +275,7 @@ func TestGetProposerDuties(t *testing.T) { roots := make([][]byte, fieldparams.BlockRootsLength) roots[0] = genesisRoot[:] require.NoError(t, bs.SetBlockRoots(roots)) + db := dbutil.SetupDB(t) pubKeys := make([][]byte, len(deposits)) for i := 0; i < len(deposits); i++ { @@ -276,6 +290,7 @@ func TestGetProposerDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, + BeaconDB: db, } t.Run("Ok", func(t *testing.T) { @@ -326,6 +341,7 @@ func TestGetProposerDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, + BeaconDB: db, } req := ðpbv1.ProposerDutiesRequest{ @@ -358,6 +374,15 @@ func TestGetProposerDuties(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + blk.Block.Slot = 31 + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + chainSlot := types.Slot(0) chain := &mockChain.ChainService{ State: bs, Root: genesisRoot[:], Slot: &chainSlot, Optimistic: true, @@ -366,6 +391,7 @@ func TestGetProposerDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, + BeaconDB: db, } req := ðpbv1.ProposerDutiesRequest{ Epoch: 0, @@ -406,6 +432,7 @@ func TestGetSyncCommitteeDuties(t *testing.T) { nextCommittee.Pubkeys = append(nextCommittee.Pubkeys, vals[i].PublicKey) } require.NoError(t, st.SetNextSyncCommittee(nextCommittee)) + db := dbutil.SetupDB(t) mockChainService := &mockChain.ChainService{Genesis: genesisTime} vs := &Server{ @@ -413,6 +440,7 @@ func TestGetSyncCommitteeDuties(t *testing.T) { SyncChecker: &mockSync.Sync{IsSyncing: false}, TimeFetcher: mockChainService, HeadFetcher: mockChainService, + BeaconDB: db, } t.Run("Single validator", func(t *testing.T) { @@ -551,6 +579,7 @@ func TestGetSyncCommitteeDuties(t *testing.T) { SyncChecker: &mockSync.Sync{IsSyncing: false}, TimeFetcher: mockChainService, HeadFetcher: mockChainService, + BeaconDB: db, } req := ðpbv2.SyncCommitteeDutiesRequest{ @@ -570,12 +599,21 @@ func TestGetSyncCommitteeDuties(t *testing.T) { }) t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wrapper.WrappedPhase0SignedBeaconBlock(blk))) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + mockChainService := &mockChain.ChainService{Genesis: genesisTime, Optimistic: true} vs := &Server{ StateFetcher: &testutil.MockFetcher{BeaconState: st}, SyncChecker: &mockSync.Sync{IsSyncing: false}, TimeFetcher: mockChainService, HeadFetcher: mockChainService, + BeaconDB: db, } req := ðpbv2.SyncCommitteeDutiesRequest{ Epoch: 0, diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index 0f4e4945a2fb..e7cf64bf99b8 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -209,6 +209,7 @@ func (s *Service) Start() { BeaconDB: s.cfg.BeaconDB, } validatorServerV1 := &validator.Server{ + BeaconDB: s.cfg.BeaconDB, HeadFetcher: s.cfg.HeadFetcher, TimeFetcher: s.cfg.GenesisTimeFetcher, SyncChecker: s.cfg.SyncService, From a663286d6602e3b0138ecadd8adec295e7fdc728 Mon Sep 17 00:00:00 2001 From: rkapka Date: Mon, 21 Mar 2022 18:16:39 +0100 Subject: [PATCH 09/12] better algorithm --- beacon-chain/rpc/eth/beacon/state.go | 44 +++---------------- beacon-chain/rpc/eth/beacon/sync_committee.go | 8 +--- beacon-chain/rpc/eth/beacon/validator.go | 32 ++++---------- beacon-chain/rpc/eth/debug/BUILD.bazel | 2 - beacon-chain/rpc/eth/debug/debug.go | 29 +----------- beacon-chain/rpc/eth/helpers/sync.go | 20 +++++++++ beacon-chain/rpc/eth/helpers/sync_test.go | 19 ++++++++ beacon-chain/rpc/eth/validator/BUILD.bazel | 2 - beacon-chain/rpc/eth/validator/server.go | 2 - beacon-chain/rpc/eth/validator/validator.go | 44 +++---------------- .../rpc/eth/validator/validator_test.go | 9 ---- beacon-chain/rpc/service.go | 1 - 12 files changed, 63 insertions(+), 149 deletions(-) diff --git a/beacon-chain/rpc/eth/beacon/state.go b/beacon-chain/rpc/eth/beacon/state.go index 3200a621e6ce..56d5a85167b4 100644 --- a/beacon-chain/rpc/eth/beacon/state.go +++ b/beacon-chain/rpc/eth/beacon/state.go @@ -13,7 +13,6 @@ import ( "github.com/prysmaticlabs/prysm/config/params" ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/time/slots" "go.opencensus.io/trace" "google.golang.org/grpc/codes" @@ -77,13 +76,9 @@ func (bs *Server) GetStateRoot(ctx context.Context, req *ethpb.StateRequest) (*e if err != nil { return nil, status.Errorf(codes.Internal, "Could not get state: %v", err) } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, errors.Wrap(err, "could not check if block is optimistic") } return ðpb.StateRootResponse{ @@ -109,13 +104,9 @@ func (bs *Server) GetStateFork(ctx context.Context, req *ethpb.StateRequest) (*e return nil, helpers.PrepareStateFetchGRPCError(err) } fork := st.Fork() - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpb.StateForkResponse{ @@ -148,13 +139,9 @@ func (bs *Server) GetFinalityCheckpoints(ctx context.Context, req *ethpb.StateRe } return nil, status.Errorf(codes.Internal, "Could not get state: %v", err) } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpb.StateFinalityCheckpointResponse{ @@ -204,22 +191,3 @@ func checkpoint(sourceCheckpoint *eth.Checkpoint) *ethpb.Checkpoint { Root: params.BeaconConfig().ZeroHash[:], } } - -func (bs *Server) blocksAreOptimistic(ctx context.Context, blocks []block.SignedBeaconBlock) (bool, error) { - isOptimistic := false - for _, b := range blocks { - if isOptimistic { - break - } - blockRoot, err := b.Block().HashTreeRoot() - if err != nil { - return false, errors.Wrap(err, "could not get block root") - } - isOptimistic, err = bs.HeadFetcher.IsOptimisticForRoot(ctx, blockRoot) - if err != nil { - return false, errors.Wrap(err, "could not check if block is optimistic") - } - - } - return isOptimistic, nil -} diff --git a/beacon-chain/rpc/eth/beacon/sync_committee.go b/beacon-chain/rpc/eth/beacon/sync_committee.go index ca19927b5b8e..1e7f7e6a106e 100644 --- a/beacon-chain/rpc/eth/beacon/sync_committee.go +++ b/beacon-chain/rpc/eth/beacon/sync_committee.go @@ -91,13 +91,9 @@ func (bs *Server) ListSyncCommittees(ctx context.Context, req *ethpbv2.StateSync return nil, status.Errorf(codes.Internal, "Could not extract sync subcommittees: %v", err) } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpbv2.StateSyncCommitteesResponse{ diff --git a/beacon-chain/rpc/eth/beacon/validator.go b/beacon-chain/rpc/eth/beacon/validator.go index 347971c16a66..cd06072d80d0 100644 --- a/beacon-chain/rpc/eth/beacon/validator.go +++ b/beacon-chain/rpc/eth/beacon/validator.go @@ -57,13 +57,9 @@ func (bs *Server) GetValidator(ctx context.Context, req *ethpb.StateValidatorReq return nil, status.Error(codes.NotFound, "Could not find validator") } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpb.StateValidatorResponse{Data: valContainer[0], ExecutionOptimistic: isOptimistic}, nil @@ -84,13 +80,9 @@ func (bs *Server) ListValidators(ctx context.Context, req *ethpb.StateValidators return nil, handleValContainerErr(err) } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } // Exit early if no matching validators we found or we don't want to further filter validators by status. @@ -151,13 +143,9 @@ func (bs *Server) ListValidatorBalances(ctx context.Context, req *ethpb.Validato } } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpb.ValidatorBalancesResponse{Data: valBalances, ExecutionOptimistic: isOptimistic}, nil @@ -214,13 +202,9 @@ func (bs *Server) ListCommittees(ctx context.Context, req *ethpb.StateCommittees } } - _, blocks, err := bs.BeaconDB.BlocksBySlot(ctx, st.Slot()) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := bs.blocksAreOptimistic(ctx, blocks) + isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpb.StateCommitteesResponse{Data: committees, ExecutionOptimistic: isOptimistic}, nil diff --git a/beacon-chain/rpc/eth/debug/BUILD.bazel b/beacon-chain/rpc/eth/debug/BUILD.bazel index 5c2092daa169..05f181f79e27 100644 --- a/beacon-chain/rpc/eth/debug/BUILD.bazel +++ b/beacon-chain/rpc/eth/debug/BUILD.bazel @@ -17,9 +17,7 @@ go_library( "//proto/eth/v1:go_default_library", "//proto/eth/v2:go_default_library", "//proto/migration:go_default_library", - "//proto/prysm/v1alpha1/block:go_default_library", "//runtime/version:go_default_library", - "@com_github_pkg_errors//:go_default_library", "@io_opencensus_go//trace:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", diff --git a/beacon-chain/rpc/eth/debug/debug.go b/beacon-chain/rpc/eth/debug/debug.go index 8b1cc9fc62ba..728471aaa314 100644 --- a/beacon-chain/rpc/eth/debug/debug.go +++ b/beacon-chain/rpc/eth/debug/debug.go @@ -3,13 +3,11 @@ package debug import ( "context" - "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/eth/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/state" ethpbv1 "github.com/prysmaticlabs/prysm/proto/eth/v1" ethpbv2 "github.com/prysmaticlabs/prysm/proto/eth/v2" "github.com/prysmaticlabs/prysm/proto/migration" - "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/runtime/version" "go.opencensus.io/trace" "google.golang.org/grpc/codes" @@ -67,13 +65,9 @@ func (ds *Server) GetBeaconStateV2(ctx context.Context, req *ethpbv2.StateReques if err != nil { return nil, helpers.PrepareStateFetchGRPCError(err) } - _, blocks, err := ds.BeaconDB.BlocksBySlot(ctx, beaconSt.Slot()) + isOptimistic, err := helpers.IsOptimistic(ctx, beaconSt, ds.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := ds.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } switch beaconSt.Version() { @@ -162,22 +156,3 @@ func (ds *Server) ListForkChoiceHeads(ctx context.Context, _ *emptypb.Empty) (*e return resp, nil } - -func (ds *Server) blocksAreOptimistic(ctx context.Context, blocks []block.SignedBeaconBlock) (bool, error) { - isOptimistic := false - for _, b := range blocks { - if isOptimistic { - break - } - blockRoot, err := b.Block().HashTreeRoot() - if err != nil { - return false, errors.Wrap(err, "could not get block root") - } - isOptimistic, err = ds.HeadFetcher.IsOptimisticForRoot(ctx, blockRoot) - if err != nil { - return false, errors.Wrap(err, "could not check if block is optimistic") - } - - } - return isOptimistic, nil -} diff --git a/beacon-chain/rpc/eth/helpers/sync.go b/beacon-chain/rpc/eth/helpers/sync.go index a22f0e729c9c..bd616c1b6b6f 100644 --- a/beacon-chain/rpc/eth/helpers/sync.go +++ b/beacon-chain/rpc/eth/helpers/sync.go @@ -4,8 +4,10 @@ import ( "context" "strconv" + "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/api/grpc" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" + "github.com/prysmaticlabs/prysm/beacon-chain/state" "github.com/prysmaticlabs/prysm/beacon-chain/sync" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -35,3 +37,21 @@ func ValidateSync(ctx context.Context, syncChecker sync.Checker, headFetcher blo } return status.Error(codes.Unavailable, "Syncing to latest head, not ready to respond") } + +func IsOptimistic(ctx context.Context, st state.BeaconState, headFetcher blockchain.HeadFetcher) (bool, error) { + root, err := st.HashTreeRoot(ctx) + if err != nil { + return false, errors.Wrap(err, "could not get state root") + } + header := st.LatestBlockHeader() + header.StateRoot = root[:] + headRoot, err := header.HashTreeRoot() + if err != nil { + return false, errors.Wrap(err, "could not get header root") + } + isOptimistic, err := headFetcher.IsOptimisticForRoot(ctx, headRoot) + if err != nil { + return false, errors.Wrap(err, "could not check if block is optimistic") + } + return isOptimistic, nil +} diff --git a/beacon-chain/rpc/eth/helpers/sync_test.go b/beacon-chain/rpc/eth/helpers/sync_test.go index 051fc842652f..a13273bb74e2 100644 --- a/beacon-chain/rpc/eth/helpers/sync_test.go +++ b/beacon-chain/rpc/eth/helpers/sync_test.go @@ -51,3 +51,22 @@ func TestValidateSync(t *testing.T) { require.NoError(t, err) }) } + +func TestIsOptimistic(t *testing.T) { + ctx := context.Background() + st, err := util.NewBeaconState() + require.NoError(t, err) + + t.Run("optimistic", func(t *testing.T) { + mockHeadFetcher := &chainmock.ChainService{Optimistic: true} + o, err := IsOptimistic(ctx, st, mockHeadFetcher) + require.NoError(t, err) + assert.Equal(t, true, o) + }) + t.Run("not optimistic", func(t *testing.T) { + mockHeadFetcher := &chainmock.ChainService{Optimistic: false} + o, err := IsOptimistic(ctx, st, mockHeadFetcher) + require.NoError(t, err) + assert.Equal(t, false, o) + }) +} diff --git a/beacon-chain/rpc/eth/validator/BUILD.bazel b/beacon-chain/rpc/eth/validator/BUILD.bazel index 94e20a4d03ec..90fbb2e7fe8f 100644 --- a/beacon-chain/rpc/eth/validator/BUILD.bazel +++ b/beacon-chain/rpc/eth/validator/BUILD.bazel @@ -13,7 +13,6 @@ go_library( "//beacon-chain/cache:go_default_library", "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/transition:go_default_library", - "//beacon-chain/db:go_default_library", "//beacon-chain/operations/attestations:go_default_library", "//beacon-chain/operations/synccommittee:go_default_library", "//beacon-chain/p2p:go_default_library", @@ -30,7 +29,6 @@ go_library( "//proto/eth/v2:go_default_library", "//proto/migration:go_default_library", "//proto/prysm/v1alpha1:go_default_library", - "//proto/prysm/v1alpha1/block:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", diff --git a/beacon-chain/rpc/eth/validator/server.go b/beacon-chain/rpc/eth/validator/server.go index 3e48d7d35219..6ee01620afec 100644 --- a/beacon-chain/rpc/eth/validator/server.go +++ b/beacon-chain/rpc/eth/validator/server.go @@ -2,7 +2,6 @@ package validator import ( "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" - "github.com/prysmaticlabs/prysm/beacon-chain/db" "github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations" "github.com/prysmaticlabs/prysm/beacon-chain/operations/synccommittee" "github.com/prysmaticlabs/prysm/beacon-chain/p2p" @@ -14,7 +13,6 @@ import ( // Server defines a server implementation of the gRPC Validator service, // providing RPC endpoints intended for validator clients. type Server struct { - BeaconDB db.ReadOnlyDatabase HeadFetcher blockchain.HeadFetcher TimeFetcher blockchain.TimeFetcher SyncChecker sync.Checker diff --git a/beacon-chain/rpc/eth/validator/validator.go b/beacon-chain/rpc/eth/validator/validator.go index bf87a14d792e..2264bcf96405 100644 --- a/beacon-chain/rpc/eth/validator/validator.go +++ b/beacon-chain/rpc/eth/validator/validator.go @@ -26,7 +26,6 @@ import ( ethpbv2 "github.com/prysmaticlabs/prysm/proto/eth/v2" "github.com/prysmaticlabs/prysm/proto/migration" ethpbalpha "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/time/slots" log "github.com/sirupsen/logrus" "go.opencensus.io/trace" @@ -110,13 +109,9 @@ func (vs *Server) GetAttesterDuties(ctx context.Context, req *ethpbv1.AttesterDu return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } - _, blocks, err := vs.BeaconDB.BlocksBySlot(ctx, s.Slot()) + isOptimistic, err := rpchelpers.IsOptimistic(ctx, s, vs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := vs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpbv1.AttesterDutiesResponse{ @@ -182,13 +177,9 @@ func (vs *Server) GetProposerDuties(ctx context.Context, req *ethpbv1.ProposerDu return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } - _, blocks, err := vs.BeaconDB.BlocksBySlot(ctx, s.Slot()) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := vs.blocksAreOptimistic(ctx, blocks) + isOptimistic, err := rpchelpers.IsOptimistic(ctx, s, vs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpbv1.ProposerDutiesResponse{ @@ -267,13 +258,9 @@ func (vs *Server) GetSyncCommitteeDuties(ctx context.Context, req *ethpbv2.SyncC return nil, status.Errorf(codes.Internal, "Could not get duties: %v", err) } - _, blocks, err := vs.BeaconDB.BlocksBySlot(ctx, st.Slot()) + isOptimistic, err := rpchelpers.IsOptimistic(ctx, st, vs.HeadFetcher) if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get blocks for state slot: %v", err) - } - isOptimistic, err := vs.blocksAreOptimistic(ctx, blocks) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if blocks are optimistic: %v", err) + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpbv2.SyncCommitteeDutiesResponse{ @@ -815,22 +802,3 @@ func syncCommitteeDuties( } return duties, nil } - -func (vs *Server) blocksAreOptimistic(ctx context.Context, blocks []block.SignedBeaconBlock) (bool, error) { - isOptimistic := false - for _, b := range blocks { - if isOptimistic { - break - } - blockRoot, err := b.Block().HashTreeRoot() - if err != nil { - return false, errors.Wrap(err, "could not get block root") - } - isOptimistic, err = vs.HeadFetcher.IsOptimisticForRoot(ctx, blockRoot) - if err != nil { - return false, errors.Wrap(err, "could not check if block is optimistic") - } - - } - return isOptimistic, nil -} diff --git a/beacon-chain/rpc/eth/validator/validator_test.go b/beacon-chain/rpc/eth/validator/validator_test.go index 4244c02f0f99..f3010a129d20 100644 --- a/beacon-chain/rpc/eth/validator/validator_test.go +++ b/beacon-chain/rpc/eth/validator/validator_test.go @@ -86,7 +86,6 @@ func TestGetAttesterDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, - BeaconDB: db, } t.Run("Single validator", func(t *testing.T) { @@ -165,7 +164,6 @@ func TestGetAttesterDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, - BeaconDB: db, } req := ðpbv1.AttesterDutiesRequest{ @@ -235,7 +233,6 @@ func TestGetAttesterDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, - BeaconDB: db, } req := ðpbv1.AttesterDutiesRequest{ Epoch: 0, @@ -290,7 +287,6 @@ func TestGetProposerDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, - BeaconDB: db, } t.Run("Ok", func(t *testing.T) { @@ -341,7 +337,6 @@ func TestGetProposerDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, - BeaconDB: db, } req := ðpbv1.ProposerDutiesRequest{ @@ -391,7 +386,6 @@ func TestGetProposerDuties(t *testing.T) { HeadFetcher: chain, TimeFetcher: chain, SyncChecker: &mockSync.Sync{IsSyncing: false}, - BeaconDB: db, } req := ðpbv1.ProposerDutiesRequest{ Epoch: 0, @@ -440,7 +434,6 @@ func TestGetSyncCommitteeDuties(t *testing.T) { SyncChecker: &mockSync.Sync{IsSyncing: false}, TimeFetcher: mockChainService, HeadFetcher: mockChainService, - BeaconDB: db, } t.Run("Single validator", func(t *testing.T) { @@ -579,7 +572,6 @@ func TestGetSyncCommitteeDuties(t *testing.T) { SyncChecker: &mockSync.Sync{IsSyncing: false}, TimeFetcher: mockChainService, HeadFetcher: mockChainService, - BeaconDB: db, } req := ðpbv2.SyncCommitteeDutiesRequest{ @@ -613,7 +605,6 @@ func TestGetSyncCommitteeDuties(t *testing.T) { SyncChecker: &mockSync.Sync{IsSyncing: false}, TimeFetcher: mockChainService, HeadFetcher: mockChainService, - BeaconDB: db, } req := ðpbv2.SyncCommitteeDutiesRequest{ Epoch: 0, diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index e7cf64bf99b8..0f4e4945a2fb 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -209,7 +209,6 @@ func (s *Service) Start() { BeaconDB: s.cfg.BeaconDB, } validatorServerV1 := &validator.Server{ - BeaconDB: s.cfg.BeaconDB, HeadFetcher: s.cfg.HeadFetcher, TimeFetcher: s.cfg.GenesisTimeFetcher, SyncChecker: s.cfg.SyncService, From 1cbcd47839672ba4177955918456d6a3b7080862 Mon Sep 17 00:00:00 2001 From: rkapka Date: Mon, 21 Mar 2022 18:21:30 +0100 Subject: [PATCH 10/12] return proper error --- beacon-chain/rpc/eth/beacon/state.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beacon-chain/rpc/eth/beacon/state.go b/beacon-chain/rpc/eth/beacon/state.go index 56d5a85167b4..afca59ef9372 100644 --- a/beacon-chain/rpc/eth/beacon/state.go +++ b/beacon-chain/rpc/eth/beacon/state.go @@ -5,7 +5,6 @@ import ( "context" "strconv" - "github.com/pkg/errors" types "github.com/prysmaticlabs/eth2-types" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/eth/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/rpc/statefetcher" @@ -78,7 +77,7 @@ func (bs *Server) GetStateRoot(ctx context.Context, req *ethpb.StateRequest) (*e } isOptimistic, err := helpers.IsOptimistic(ctx, st, bs.HeadFetcher) if err != nil { - return nil, errors.Wrap(err, "could not check if block is optimistic") + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) } return ðpb.StateRootResponse{ From 2bfafc708f111885c127f377bf1e40c7ab9e98d4 Mon Sep 17 00:00:00 2001 From: rkapka Date: Tue, 22 Mar 2022 15:44:09 +0100 Subject: [PATCH 11/12] review --- beacon-chain/rpc/eth/beacon/blocks.go | 110 ++++++++------------ beacon-chain/rpc/eth/helpers/sync.go | 1 + beacon-chain/rpc/eth/validator/validator.go | 20 ++-- 3 files changed, 56 insertions(+), 75 deletions(-) diff --git a/beacon-chain/rpc/eth/beacon/blocks.go b/beacon-chain/rpc/eth/beacon/blocks.go index 687e41920185..621a01bb002d 100644 --- a/beacon-chain/rpc/eth/beacon/blocks.go +++ b/beacon-chain/rpc/eth/beacon/blocks.go @@ -174,30 +174,24 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc return nil, status.Errorf(codes.InvalidArgument, "Could not tree hash block: %v", err) } - // Broadcast the new block to the network. - if err := bs.Broadcaster.Broadcast(ctx, wrappedPhase0Blk.Proto()); err != nil { - return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) - } - - if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedPhase0Blk, root); err != nil { - return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) - } - // IsOptimisticForRoot has to be called after ReceiveBlock because the latter saves the block, - // and optimistic checks are performed against saved blocks. - isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) - if err != nil { - return nil, errors.Wrap(err, "could not check if block is optimistic") - } - // Do not block proposal critical path with debug logging or block feed updates. defer func() { log.WithField("blockRoot", fmt.Sprintf("%#x", bytesutil.Trunc(root[:]))).Debugf( "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedPhase0Blk, IsOptimistic: isOptimistic}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedPhase0Blk, IsOptimistic: false}, }) }() + + // Broadcast the new block to the network. + if err := bs.Broadcaster.Broadcast(ctx, wrappedPhase0Blk.Proto()); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) + } + + if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedPhase0Blk, root); err != nil { + return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) + } } altairBlkContainer, ok := req.Message.(*ethpbv2.SignedBeaconBlockContainerV2_AltairBlock) @@ -217,30 +211,24 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc return nil, status.Errorf(codes.InvalidArgument, "Could not tree hash block: %v", err) } - // Broadcast the new block to the network. - if err := bs.Broadcaster.Broadcast(ctx, wrappedAltairBlk.Proto()); err != nil { - return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) - } - - if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedAltairBlk, root); err != nil { - return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) - } - // IsOptimisticForRoot has to be called after ReceiveBlock because the latter saves the block, - // and optimistic checks are performed against saved blocks. - isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) - if err != nil { - return nil, errors.Wrap(err, "could not check if block is optimistic") - } - // Do not block proposal critical path with debug logging or block feed updates. defer func() { log.WithField("blockRoot", fmt.Sprintf("%#x", bytesutil.Trunc(root[:]))).Debugf( "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedAltairBlk, IsOptimistic: isOptimistic}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedAltairBlk, IsOptimistic: false}, }) }() + + // Broadcast the new block to the network. + if err := bs.Broadcaster.Broadcast(ctx, wrappedAltairBlk.Proto()); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) + } + + if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedAltairBlk, root); err != nil { + return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) + } } bellatrixBlkContainer, ok := req.Message.(*ethpbv2.SignedBeaconBlockContainerV2_BellatrixBlock) @@ -265,25 +253,19 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc return nil, status.Errorf(codes.Internal, "Could not broadcast block: %v", err) } - if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedBellatrixBlk, root); err != nil { - return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) - } - // IsOptimisticForRoot has to be called after ReceiveBlock because the latter saves the block, - // and optimistic checks are performed against saved blocks. - isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) - if err != nil { - return nil, errors.Wrap(err, "could not check if block is optimistic") - } - // Do not block proposal critical path with debug logging or block feed updates. defer func() { log.WithField("blockRoot", fmt.Sprintf("%#x", bytesutil.Trunc(root[:]))).Debugf( "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk, IsOptimistic: isOptimistic}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk, IsOptimistic: false}, }) }() + + if err := bs.BlockReceiver.ReceiveBlock(ctx, wrappedBellatrixBlk, root); err != nil { + return nil, status.Errorf(codes.Internal, "Could not process beacon block: %v", err) + } } return &emptypb.Empty{}, nil @@ -345,15 +327,6 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( return nil, err } - root, err := blk.Block().HashTreeRoot() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get block root: %v", err) - } - isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) - } - _, err = blk.PbPhase0Block() if err == nil { v1Blk, err := migration.SignedBeaconBlock(blk) @@ -366,7 +339,7 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( Message: ðpbv2.SignedBeaconBlockContainerV2_Phase0Block{Phase0Block: v1Blk.Block}, Signature: v1Blk.Signature, }, - ExecutionOptimistic: isOptimistic, + ExecutionOptimistic: false, }, nil } // ErrUnsupportedPhase0Block means that we have another block type @@ -389,7 +362,7 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( Message: ðpbv2.SignedBeaconBlockContainerV2_AltairBlock{AltairBlock: v2Blk}, Signature: blk.Signature(), }, - ExecutionOptimistic: isOptimistic, + ExecutionOptimistic: false, }, nil } // ErrUnsupportedAltairBlock means that we have another block type @@ -406,6 +379,14 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) ( if err != nil { return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) } + root, err := blk.Block().HashTreeRoot() + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get block root: %v", err) + } + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) + } return ðpbv2.BlockResponseV2{ Version: ethpbv2.Version_BELLATRIX, Data: ðpbv2.SignedBeaconBlockContainerV2{ @@ -598,15 +579,6 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR return nil, err } - root, err := blk.Block().HashTreeRoot() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get block root: %v", err) - } - isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) - } - _, err = blk.PbPhase0Block() if err != nil && !errors.Is(err, wrapper.ErrUnsupportedPhase0Block) { return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) @@ -618,7 +590,7 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR } return ðpbv1.BlockAttestationsResponse{ Data: v1Blk.Block.Body.Attestations, - ExecutionOptimistic: isOptimistic, + ExecutionOptimistic: false, }, nil } @@ -636,7 +608,7 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR } return ðpbv1.BlockAttestationsResponse{ Data: v2Blk.Body.Attestations, - ExecutionOptimistic: isOptimistic, + ExecutionOptimistic: false, }, nil } @@ -652,6 +624,14 @@ func (bs *Server) ListBlockAttestations(ctx context.Context, req *ethpbv1.BlockR if err != nil { return nil, status.Errorf(codes.Internal, "Could not get signed beacon block: %v", err) } + root, err := blk.Block().HashTreeRoot() + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get block root: %v", err) + } + isOptimistic, err := bs.HeadFetcher.IsOptimisticForRoot(ctx, root) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if block is optimistic: %v", err) + } return ðpbv1.BlockAttestationsResponse{ Data: v2Blk.Body.Attestations, ExecutionOptimistic: isOptimistic, diff --git a/beacon-chain/rpc/eth/helpers/sync.go b/beacon-chain/rpc/eth/helpers/sync.go index bd616c1b6b6f..fd520a82a266 100644 --- a/beacon-chain/rpc/eth/helpers/sync.go +++ b/beacon-chain/rpc/eth/helpers/sync.go @@ -38,6 +38,7 @@ func ValidateSync(ctx context.Context, syncChecker sync.Checker, headFetcher blo return status.Error(codes.Unavailable, "Syncing to latest head, not ready to respond") } +// IsOptimistic checks whether the latest block header of the passed in beacon state is the header of an optimistic block. func IsOptimistic(ctx context.Context, st state.BeaconState, headFetcher blockchain.HeadFetcher) (bool, error) { root, err := st.HashTreeRoot(ctx) if err != nil { diff --git a/beacon-chain/rpc/eth/validator/validator.go b/beacon-chain/rpc/eth/validator/validator.go index 2264bcf96405..d48177761557 100644 --- a/beacon-chain/rpc/eth/validator/validator.go +++ b/beacon-chain/rpc/eth/validator/validator.go @@ -58,6 +58,11 @@ func (vs *Server) GetAttesterDuties(ctx context.Context, req *ethpbv1.AttesterDu return nil, status.Errorf(codes.Internal, "Could not get head state: %v", err) } + isOptimistic, err := rpchelpers.IsOptimistic(ctx, s, vs.HeadFetcher) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) + } + s, err = advanceState(ctx, s, req.Epoch, currentEpoch) if err != nil { return nil, status.Errorf(codes.Internal, "Could not advance state to requested epoch start slot: %v", err) @@ -109,11 +114,6 @@ func (vs *Server) GetAttesterDuties(ctx context.Context, req *ethpbv1.AttesterDu return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } - isOptimistic, err := rpchelpers.IsOptimistic(ctx, s, vs.HeadFetcher) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) - } - return ðpbv1.AttesterDutiesResponse{ DependentRoot: root, Data: duties, @@ -142,6 +142,11 @@ func (vs *Server) GetProposerDuties(ctx context.Context, req *ethpbv1.ProposerDu return nil, status.Errorf(codes.Internal, "Could not get head state: %v", err) } + isOptimistic, err := rpchelpers.IsOptimistic(ctx, s, vs.HeadFetcher) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) + } + s, err = advanceState(ctx, s, req.Epoch, currentEpoch) if err != nil { return nil, status.Errorf(codes.Internal, "Could not advance state to requested epoch start slot: %v", err) @@ -177,11 +182,6 @@ func (vs *Server) GetProposerDuties(ctx context.Context, req *ethpbv1.ProposerDu return nil, status.Errorf(codes.Internal, "Could not get dependent root: %v", err) } - isOptimistic, err := rpchelpers.IsOptimistic(ctx, s, vs.HeadFetcher) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) - } - return ðpbv1.ProposerDutiesResponse{ DependentRoot: root, Data: duties, From a77362b8dceb21743843da29b294c9ac986023d3 Mon Sep 17 00:00:00 2001 From: rkapka Date: Wed, 23 Mar 2022 12:35:08 +0100 Subject: [PATCH 12/12] optimistic return on bellatrix proposal --- beacon-chain/rpc/eth/beacon/blocks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/rpc/eth/beacon/blocks.go b/beacon-chain/rpc/eth/beacon/blocks.go index 697bae177824..7fb05db6fda9 100644 --- a/beacon-chain/rpc/eth/beacon/blocks.go +++ b/beacon-chain/rpc/eth/beacon/blocks.go @@ -259,7 +259,7 @@ func (bs *Server) SubmitBlock(ctx context.Context, req *ethpbv2.SignedBeaconBloc "Block proposal received via RPC") bs.BlockNotifier.BlockFeed().Send(&feed.Event{ Type: blockfeed.ReceivedBlock, - Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk, IsOptimistic: false}, + Data: &blockfeed.ReceivedBlockData{SignedBlock: wrappedBellatrixBlk, IsOptimistic: true}, }) }()