diff --git a/go/common/enclave.go b/go/common/enclave.go index 0185a23a83..94bb74a03a 100644 --- a/go/common/enclave.go +++ b/go/common/enclave.go @@ -86,6 +86,8 @@ type Enclave interface { // GetCode returns the code stored at the given address in the state for the given rollup hash. GetCode(ctx context.Context, address gethcommon.Address, rollupHash *gethcommon.Hash) ([]byte, SystemError) + GetStorageSlot(ctx context.Context, encryptedParams EncryptedParamsGetStorageSlot) (*responses.EnclaveResponse, SystemError) + // Subscribe adds a log subscription to the enclave under the given ID, provided the request is authenticated // correctly. The events will be populated in the BlockSubmissionResponse. If there is an existing subscription // with the given ID, it is overwritten. diff --git a/go/common/privacy/whitelist.go b/go/common/privacy/whitelist.go new file mode 100644 index 0000000000..e48fcee45e --- /dev/null +++ b/go/common/privacy/whitelist.go @@ -0,0 +1,40 @@ +package privacy + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/crypto" +) + +type Whitelist struct { + AllowedStorageSlots map[string]bool +} + +func NewWhitelist() *Whitelist { + whitelistMap := make(map[string]bool) + whitelistMap[toEip1967HashHex("eip1967.proxy.beacon")] = true + whitelistMap[toEip1967HashHex("eip1967.proxy.implementation")] = true + whitelistMap[toEip1967FallbackHashHex("org.zeppelinos.proxy.implementation")] = true + whitelistMap[toEip1967HashHex("eip1967.proxy.admin")] = true + whitelistMap[toEip1967FallbackHashHex("org.zeppelinos.proxy.admin")] = true + + return &Whitelist{ + AllowedStorageSlots: whitelistMap, + } +} + +func toEip1967HashHex(key string) string { + hash := crypto.Keccak256Hash([]byte(key)) + hashAsBig := hash.Big() + eipHashHex := "0x" + hashAsBig.Sub(hashAsBig, big.NewInt(1)).Text(16) + + return eipHashHex +} + +func toEip1967FallbackHashHex(key string) string { + hash := crypto.Keccak256Hash([]byte(key)) + hashAsBig := hash.Big() + eipHashHex := "0x" + hashAsBig.Text(16) + + return eipHashHex +} diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index 721c3db445..6fcfefa80b 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -2804,6 +2804,108 @@ func (x *GetBalanceResponse) GetSystemError() *SystemError { return nil } +type GetStorageSlotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EncryptedParams []byte `protobuf:"bytes,1,opt,name=encryptedParams,proto3" json:"encryptedParams,omitempty"` +} + +func (x *GetStorageSlotRequest) Reset() { + *x = GetStorageSlotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_enclave_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStorageSlotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStorageSlotRequest) ProtoMessage() {} + +func (x *GetStorageSlotRequest) ProtoReflect() protoreflect.Message { + mi := &file_enclave_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStorageSlotRequest.ProtoReflect.Descriptor instead. +func (*GetStorageSlotRequest) Descriptor() ([]byte, []int) { + return file_enclave_proto_rawDescGZIP(), []int{56} +} + +func (x *GetStorageSlotRequest) GetEncryptedParams() []byte { + if x != nil { + return x.EncryptedParams + } + return nil +} + +type GetStorageSlotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EncodedEnclaveResponse []byte `protobuf:"bytes,1,opt,name=encodedEnclaveResponse,proto3" json:"encodedEnclaveResponse,omitempty"` + SystemError *SystemError `protobuf:"bytes,2,opt,name=systemError,proto3" json:"systemError,omitempty"` +} + +func (x *GetStorageSlotResponse) Reset() { + *x = GetStorageSlotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_enclave_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStorageSlotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStorageSlotResponse) ProtoMessage() {} + +func (x *GetStorageSlotResponse) ProtoReflect() protoreflect.Message { + mi := &file_enclave_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStorageSlotResponse.ProtoReflect.Descriptor instead. +func (*GetStorageSlotResponse) Descriptor() ([]byte, []int) { + return file_enclave_proto_rawDescGZIP(), []int{57} +} + +func (x *GetStorageSlotResponse) GetEncodedEnclaveResponse() []byte { + if x != nil { + return x.EncodedEnclaveResponse + } + return nil +} + +func (x *GetStorageSlotResponse) GetSystemError() *SystemError { + if x != nil { + return x.SystemError + } + return nil +} + type GetCodeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2816,7 +2918,7 @@ type GetCodeRequest struct { func (x *GetCodeRequest) Reset() { *x = GetCodeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[56] + mi := &file_enclave_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2829,7 +2931,7 @@ func (x *GetCodeRequest) String() string { func (*GetCodeRequest) ProtoMessage() {} func (x *GetCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[56] + mi := &file_enclave_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2842,7 +2944,7 @@ func (x *GetCodeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCodeRequest.ProtoReflect.Descriptor instead. func (*GetCodeRequest) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{56} + return file_enclave_proto_rawDescGZIP(), []int{58} } func (x *GetCodeRequest) GetAddress() []byte { @@ -2871,7 +2973,7 @@ type GetCodeResponse struct { func (x *GetCodeResponse) Reset() { *x = GetCodeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[57] + mi := &file_enclave_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2884,7 +2986,7 @@ func (x *GetCodeResponse) String() string { func (*GetCodeResponse) ProtoMessage() {} func (x *GetCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[57] + mi := &file_enclave_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2897,7 +2999,7 @@ func (x *GetCodeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCodeResponse.ProtoReflect.Descriptor instead. func (*GetCodeResponse) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{57} + return file_enclave_proto_rawDescGZIP(), []int{59} } func (x *GetCodeResponse) GetCode() []byte { @@ -2926,7 +3028,7 @@ type SubscribeRequest struct { func (x *SubscribeRequest) Reset() { *x = SubscribeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[58] + mi := &file_enclave_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2939,7 +3041,7 @@ func (x *SubscribeRequest) String() string { func (*SubscribeRequest) ProtoMessage() {} func (x *SubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[58] + mi := &file_enclave_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2952,7 +3054,7 @@ func (x *SubscribeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead. func (*SubscribeRequest) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{58} + return file_enclave_proto_rawDescGZIP(), []int{60} } func (x *SubscribeRequest) GetId() []byte { @@ -2980,7 +3082,7 @@ type SubscribeResponse struct { func (x *SubscribeResponse) Reset() { *x = SubscribeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[59] + mi := &file_enclave_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2993,7 +3095,7 @@ func (x *SubscribeResponse) String() string { func (*SubscribeResponse) ProtoMessage() {} func (x *SubscribeResponse) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[59] + mi := &file_enclave_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3006,7 +3108,7 @@ func (x *SubscribeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead. func (*SubscribeResponse) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{59} + return file_enclave_proto_rawDescGZIP(), []int{61} } func (x *SubscribeResponse) GetSystemError() *SystemError { @@ -3027,7 +3129,7 @@ type UnsubscribeRequest struct { func (x *UnsubscribeRequest) Reset() { *x = UnsubscribeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[60] + mi := &file_enclave_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3040,7 +3142,7 @@ func (x *UnsubscribeRequest) String() string { func (*UnsubscribeRequest) ProtoMessage() {} func (x *UnsubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[60] + mi := &file_enclave_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3053,7 +3155,7 @@ func (x *UnsubscribeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnsubscribeRequest.ProtoReflect.Descriptor instead. func (*UnsubscribeRequest) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{60} + return file_enclave_proto_rawDescGZIP(), []int{62} } func (x *UnsubscribeRequest) GetId() []byte { @@ -3074,7 +3176,7 @@ type UnsubscribeResponse struct { func (x *UnsubscribeResponse) Reset() { *x = UnsubscribeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[61] + mi := &file_enclave_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3087,7 +3189,7 @@ func (x *UnsubscribeResponse) String() string { func (*UnsubscribeResponse) ProtoMessage() {} func (x *UnsubscribeResponse) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[61] + mi := &file_enclave_proto_msgTypes[63] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3100,7 +3202,7 @@ func (x *UnsubscribeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UnsubscribeResponse.ProtoReflect.Descriptor instead. func (*UnsubscribeResponse) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{61} + return file_enclave_proto_rawDescGZIP(), []int{63} } func (x *UnsubscribeResponse) GetSystemError() *SystemError { @@ -3121,7 +3223,7 @@ type EstimateGasRequest struct { func (x *EstimateGasRequest) Reset() { *x = EstimateGasRequest{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[62] + mi := &file_enclave_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3134,7 +3236,7 @@ func (x *EstimateGasRequest) String() string { func (*EstimateGasRequest) ProtoMessage() {} func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[62] + mi := &file_enclave_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3147,7 +3249,7 @@ func (x *EstimateGasRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateGasRequest.ProtoReflect.Descriptor instead. func (*EstimateGasRequest) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{62} + return file_enclave_proto_rawDescGZIP(), []int{64} } func (x *EstimateGasRequest) GetEncryptedParams() []byte { @@ -3169,7 +3271,7 @@ type EstimateGasResponse struct { func (x *EstimateGasResponse) Reset() { *x = EstimateGasResponse{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[63] + mi := &file_enclave_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3182,7 +3284,7 @@ func (x *EstimateGasResponse) String() string { func (*EstimateGasResponse) ProtoMessage() {} func (x *EstimateGasResponse) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[63] + mi := &file_enclave_proto_msgTypes[65] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3195,7 +3297,7 @@ func (x *EstimateGasResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EstimateGasResponse.ProtoReflect.Descriptor instead. func (*EstimateGasResponse) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{63} + return file_enclave_proto_rawDescGZIP(), []int{65} } func (x *EstimateGasResponse) GetEncodedEnclaveResponse() []byte { @@ -3223,7 +3325,7 @@ type GetLogsRequest struct { func (x *GetLogsRequest) Reset() { *x = GetLogsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[64] + mi := &file_enclave_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3236,7 +3338,7 @@ func (x *GetLogsRequest) String() string { func (*GetLogsRequest) ProtoMessage() {} func (x *GetLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[64] + mi := &file_enclave_proto_msgTypes[66] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3249,7 +3351,7 @@ func (x *GetLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLogsRequest.ProtoReflect.Descriptor instead. func (*GetLogsRequest) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{64} + return file_enclave_proto_rawDescGZIP(), []int{66} } func (x *GetLogsRequest) GetEncryptedParams() []byte { @@ -3271,7 +3373,7 @@ type GetLogsResponse struct { func (x *GetLogsResponse) Reset() { *x = GetLogsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[65] + mi := &file_enclave_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3284,7 +3386,7 @@ func (x *GetLogsResponse) String() string { func (*GetLogsResponse) ProtoMessage() {} func (x *GetLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[65] + mi := &file_enclave_proto_msgTypes[67] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3297,7 +3399,7 @@ func (x *GetLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLogsResponse.ProtoReflect.Descriptor instead. func (*GetLogsResponse) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{65} + return file_enclave_proto_rawDescGZIP(), []int{67} } func (x *GetLogsResponse) GetEncodedEnclaveResponse() []byte { @@ -3326,7 +3428,7 @@ type HealthCheckResponse struct { func (x *HealthCheckResponse) Reset() { *x = HealthCheckResponse{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[66] + mi := &file_enclave_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3339,7 +3441,7 @@ func (x *HealthCheckResponse) String() string { func (*HealthCheckResponse) ProtoMessage() {} func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[66] + mi := &file_enclave_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3352,7 +3454,7 @@ func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead. func (*HealthCheckResponse) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{66} + return file_enclave_proto_rawDescGZIP(), []int{68} } func (x *HealthCheckResponse) GetStatus() bool { @@ -3378,7 +3480,7 @@ type EmptyArgs struct { func (x *EmptyArgs) Reset() { *x = EmptyArgs{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[67] + mi := &file_enclave_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3391,7 +3493,7 @@ func (x *EmptyArgs) String() string { func (*EmptyArgs) ProtoMessage() {} func (x *EmptyArgs) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[67] + mi := &file_enclave_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3404,7 +3506,7 @@ func (x *EmptyArgs) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyArgs.ProtoReflect.Descriptor instead. func (*EmptyArgs) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{67} + return file_enclave_proto_rawDescGZIP(), []int{69} } type AttestationReportMsg struct { @@ -3422,7 +3524,7 @@ type AttestationReportMsg struct { func (x *AttestationReportMsg) Reset() { *x = AttestationReportMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[68] + mi := &file_enclave_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3435,7 +3537,7 @@ func (x *AttestationReportMsg) String() string { func (*AttestationReportMsg) ProtoMessage() {} func (x *AttestationReportMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[68] + mi := &file_enclave_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3448,7 +3550,7 @@ func (x *AttestationReportMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use AttestationReportMsg.ProtoReflect.Descriptor instead. func (*AttestationReportMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{68} + return file_enclave_proto_rawDescGZIP(), []int{70} } func (x *AttestationReportMsg) GetReport() []byte { @@ -3498,7 +3600,7 @@ type BlockSubmissionResponseMsg struct { func (x *BlockSubmissionResponseMsg) Reset() { *x = BlockSubmissionResponseMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[69] + mi := &file_enclave_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3511,7 +3613,7 @@ func (x *BlockSubmissionResponseMsg) String() string { func (*BlockSubmissionResponseMsg) ProtoMessage() {} func (x *BlockSubmissionResponseMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[69] + mi := &file_enclave_proto_msgTypes[71] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3524,7 +3626,7 @@ func (x *BlockSubmissionResponseMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockSubmissionResponseMsg.ProtoReflect.Descriptor instead. func (*BlockSubmissionResponseMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{69} + return file_enclave_proto_rawDescGZIP(), []int{71} } func (x *BlockSubmissionResponseMsg) GetProducedSecretResponses() []*SecretResponseMsg { @@ -3553,7 +3655,7 @@ type BlockSubmissionErrorMsg struct { func (x *BlockSubmissionErrorMsg) Reset() { *x = BlockSubmissionErrorMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[70] + mi := &file_enclave_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3566,7 +3668,7 @@ func (x *BlockSubmissionErrorMsg) String() string { func (*BlockSubmissionErrorMsg) ProtoMessage() {} func (x *BlockSubmissionErrorMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[70] + mi := &file_enclave_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3579,7 +3681,7 @@ func (x *BlockSubmissionErrorMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockSubmissionErrorMsg.ProtoReflect.Descriptor instead. func (*BlockSubmissionErrorMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{70} + return file_enclave_proto_rawDescGZIP(), []int{72} } func (x *BlockSubmissionErrorMsg) GetCause() string { @@ -3611,7 +3713,7 @@ type CrossChainMsg struct { func (x *CrossChainMsg) Reset() { *x = CrossChainMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[71] + mi := &file_enclave_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3624,7 +3726,7 @@ func (x *CrossChainMsg) String() string { func (*CrossChainMsg) ProtoMessage() {} func (x *CrossChainMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[71] + mi := &file_enclave_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3637,7 +3739,7 @@ func (x *CrossChainMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use CrossChainMsg.ProtoReflect.Descriptor instead. func (*CrossChainMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{71} + return file_enclave_proto_rawDescGZIP(), []int{73} } func (x *CrossChainMsg) GetSender() []byte { @@ -3688,7 +3790,7 @@ type ExtBatchMsg struct { func (x *ExtBatchMsg) Reset() { *x = ExtBatchMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[72] + mi := &file_enclave_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3701,7 +3803,7 @@ func (x *ExtBatchMsg) String() string { func (*ExtBatchMsg) ProtoMessage() {} func (x *ExtBatchMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[72] + mi := &file_enclave_proto_msgTypes[74] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3714,7 +3816,7 @@ func (x *ExtBatchMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtBatchMsg.ProtoReflect.Descriptor instead. func (*ExtBatchMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{72} + return file_enclave_proto_rawDescGZIP(), []int{74} } func (x *ExtBatchMsg) GetHeader() *BatchHeaderMsg { @@ -3767,7 +3869,7 @@ type BatchHeaderMsg struct { func (x *BatchHeaderMsg) Reset() { *x = BatchHeaderMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[73] + mi := &file_enclave_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3780,7 +3882,7 @@ func (x *BatchHeaderMsg) String() string { func (*BatchHeaderMsg) ProtoMessage() {} func (x *BatchHeaderMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[73] + mi := &file_enclave_proto_msgTypes[75] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3793,7 +3895,7 @@ func (x *BatchHeaderMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use BatchHeaderMsg.ProtoReflect.Descriptor instead. func (*BatchHeaderMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{73} + return file_enclave_proto_rawDescGZIP(), []int{75} } func (x *BatchHeaderMsg) GetParentHash() []byte { @@ -3942,7 +4044,7 @@ type ExtRollupMsg struct { func (x *ExtRollupMsg) Reset() { *x = ExtRollupMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[74] + mi := &file_enclave_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3955,7 +4057,7 @@ func (x *ExtRollupMsg) String() string { func (*ExtRollupMsg) ProtoMessage() {} func (x *ExtRollupMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[74] + mi := &file_enclave_proto_msgTypes[76] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3968,7 +4070,7 @@ func (x *ExtRollupMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtRollupMsg.ProtoReflect.Descriptor instead. func (*ExtRollupMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{74} + return file_enclave_proto_rawDescGZIP(), []int{76} } func (x *ExtRollupMsg) GetHeader() *RollupHeaderMsg { @@ -4011,7 +4113,7 @@ type RollupHeaderMsg struct { func (x *RollupHeaderMsg) Reset() { *x = RollupHeaderMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[75] + mi := &file_enclave_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4024,7 +4126,7 @@ func (x *RollupHeaderMsg) String() string { func (*RollupHeaderMsg) ProtoMessage() {} func (x *RollupHeaderMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[75] + mi := &file_enclave_proto_msgTypes[77] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4037,7 +4139,7 @@ func (x *RollupHeaderMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use RollupHeaderMsg.ProtoReflect.Descriptor instead. func (*RollupHeaderMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{75} + return file_enclave_proto_rawDescGZIP(), []int{77} } func (x *RollupHeaderMsg) GetParentHash() []byte { @@ -4118,7 +4220,7 @@ type SecretResponseMsg struct { func (x *SecretResponseMsg) Reset() { *x = SecretResponseMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[76] + mi := &file_enclave_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4131,7 +4233,7 @@ func (x *SecretResponseMsg) String() string { func (*SecretResponseMsg) ProtoMessage() {} func (x *SecretResponseMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[76] + mi := &file_enclave_proto_msgTypes[78] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4144,7 +4246,7 @@ func (x *SecretResponseMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use SecretResponseMsg.ProtoReflect.Descriptor instead. func (*SecretResponseMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{76} + return file_enclave_proto_rawDescGZIP(), []int{78} } func (x *SecretResponseMsg) GetSecret() []byte { @@ -4195,7 +4297,7 @@ type WithdrawalMsg struct { func (x *WithdrawalMsg) Reset() { *x = WithdrawalMsg{} if protoimpl.UnsafeEnabled { - mi := &file_enclave_proto_msgTypes[77] + mi := &file_enclave_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4208,7 +4310,7 @@ func (x *WithdrawalMsg) String() string { func (*WithdrawalMsg) ProtoMessage() {} func (x *WithdrawalMsg) ProtoReflect() protoreflect.Message { - mi := &file_enclave_proto_msgTypes[77] + mi := &file_enclave_proto_msgTypes[79] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4221,7 +4323,7 @@ func (x *WithdrawalMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use WithdrawalMsg.ProtoReflect.Descriptor instead. func (*WithdrawalMsg) Descriptor() ([]byte, []int) { - return file_enclave_proto_rawDescGZIP(), []int{77} + return file_enclave_proto_rawDescGZIP(), []int{79} } func (x *WithdrawalMsg) GetAmount() []byte { @@ -4547,6 +4649,19 @@ var file_enclave_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, + 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, + 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, @@ -4745,7 +4860,7 @@ var file_enclave_proto_rawDesc = []byte{ 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xab, 0x15, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0x84, 0x16, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, @@ -4821,104 +4936,109 @@ var file_enclave_proto_rawDesc = []byte{ 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, - 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, - 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, - 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, - 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, - 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, - 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, - 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, + 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, + 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, + 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, - 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, - 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, - 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, + 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, + 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, + 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, - 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, - 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x45, - 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, + 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, - 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, + 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4933,7 +5053,7 @@ func file_enclave_proto_rawDescGZIP() []byte { return file_enclave_proto_rawDescData } -var file_enclave_proto_msgTypes = make([]protoimpl.MessageInfo, 78) +var file_enclave_proto_msgTypes = make([]protoimpl.MessageInfo, 80) var file_enclave_proto_goTypes = []interface{}{ (*EnclavePublicConfigRequest)(nil), // 0: generated.EnclavePublicConfigRequest (*EnclavePublicConfigResponse)(nil), // 1: generated.EnclavePublicConfigResponse @@ -4991,28 +5111,30 @@ var file_enclave_proto_goTypes = []interface{}{ (*GetTransactionReceiptResponse)(nil), // 53: generated.GetTransactionReceiptResponse (*GetBalanceRequest)(nil), // 54: generated.GetBalanceRequest (*GetBalanceResponse)(nil), // 55: generated.GetBalanceResponse - (*GetCodeRequest)(nil), // 56: generated.GetCodeRequest - (*GetCodeResponse)(nil), // 57: generated.GetCodeResponse - (*SubscribeRequest)(nil), // 58: generated.SubscribeRequest - (*SubscribeResponse)(nil), // 59: generated.SubscribeResponse - (*UnsubscribeRequest)(nil), // 60: generated.UnsubscribeRequest - (*UnsubscribeResponse)(nil), // 61: generated.UnsubscribeResponse - (*EstimateGasRequest)(nil), // 62: generated.EstimateGasRequest - (*EstimateGasResponse)(nil), // 63: generated.EstimateGasResponse - (*GetLogsRequest)(nil), // 64: generated.GetLogsRequest - (*GetLogsResponse)(nil), // 65: generated.GetLogsResponse - (*HealthCheckResponse)(nil), // 66: generated.HealthCheckResponse - (*EmptyArgs)(nil), // 67: generated.EmptyArgs - (*AttestationReportMsg)(nil), // 68: generated.AttestationReportMsg - (*BlockSubmissionResponseMsg)(nil), // 69: generated.BlockSubmissionResponseMsg - (*BlockSubmissionErrorMsg)(nil), // 70: generated.BlockSubmissionErrorMsg - (*CrossChainMsg)(nil), // 71: generated.CrossChainMsg - (*ExtBatchMsg)(nil), // 72: generated.ExtBatchMsg - (*BatchHeaderMsg)(nil), // 73: generated.BatchHeaderMsg - (*ExtRollupMsg)(nil), // 74: generated.ExtRollupMsg - (*RollupHeaderMsg)(nil), // 75: generated.RollupHeaderMsg - (*SecretResponseMsg)(nil), // 76: generated.SecretResponseMsg - (*WithdrawalMsg)(nil), // 77: generated.WithdrawalMsg + (*GetStorageSlotRequest)(nil), // 56: generated.GetStorageSlotRequest + (*GetStorageSlotResponse)(nil), // 57: generated.GetStorageSlotResponse + (*GetCodeRequest)(nil), // 58: generated.GetCodeRequest + (*GetCodeResponse)(nil), // 59: generated.GetCodeResponse + (*SubscribeRequest)(nil), // 60: generated.SubscribeRequest + (*SubscribeResponse)(nil), // 61: generated.SubscribeResponse + (*UnsubscribeRequest)(nil), // 62: generated.UnsubscribeRequest + (*UnsubscribeResponse)(nil), // 63: generated.UnsubscribeResponse + (*EstimateGasRequest)(nil), // 64: generated.EstimateGasRequest + (*EstimateGasResponse)(nil), // 65: generated.EstimateGasResponse + (*GetLogsRequest)(nil), // 66: generated.GetLogsRequest + (*GetLogsResponse)(nil), // 67: generated.GetLogsResponse + (*HealthCheckResponse)(nil), // 68: generated.HealthCheckResponse + (*EmptyArgs)(nil), // 69: generated.EmptyArgs + (*AttestationReportMsg)(nil), // 70: generated.AttestationReportMsg + (*BlockSubmissionResponseMsg)(nil), // 71: generated.BlockSubmissionResponseMsg + (*BlockSubmissionErrorMsg)(nil), // 72: generated.BlockSubmissionErrorMsg + (*CrossChainMsg)(nil), // 73: generated.CrossChainMsg + (*ExtBatchMsg)(nil), // 74: generated.ExtBatchMsg + (*BatchHeaderMsg)(nil), // 75: generated.BatchHeaderMsg + (*ExtRollupMsg)(nil), // 76: generated.ExtRollupMsg + (*RollupHeaderMsg)(nil), // 77: generated.RollupHeaderMsg + (*SecretResponseMsg)(nil), // 78: generated.SecretResponseMsg + (*WithdrawalMsg)(nil), // 79: generated.WithdrawalMsg } var file_enclave_proto_depIdxs = []int32{ 13, // 0: generated.EnclavePublicConfigResponse.systemError:type_name -> generated.SystemError @@ -5023,19 +5145,19 @@ var file_enclave_proto_depIdxs = []int32{ 13, // 5: generated.GetTotalContractCountResponse.systemError:type_name -> generated.SystemError 13, // 6: generated.DebugEventLogRelevancyResponse.systemError:type_name -> generated.SystemError 13, // 7: generated.DebugTraceTransactionResponse.systemError:type_name -> generated.SystemError - 74, // 8: generated.CreateRollupResponse.msg:type_name -> generated.ExtRollupMsg + 76, // 8: generated.CreateRollupResponse.msg:type_name -> generated.ExtRollupMsg 13, // 9: generated.CreateRollupResponse.systemError:type_name -> generated.SystemError 13, // 10: generated.StatusResponse.systemError:type_name -> generated.SystemError - 68, // 11: generated.AttestationResponse.attestationReportMsg:type_name -> generated.AttestationReportMsg + 70, // 11: generated.AttestationResponse.attestationReportMsg:type_name -> generated.AttestationReportMsg 13, // 12: generated.AttestationResponse.systemError:type_name -> generated.SystemError 13, // 13: generated.GenerateSecretResponse.systemError:type_name -> generated.SystemError 13, // 14: generated.InitEnclaveResponse.systemError:type_name -> generated.SystemError 13, // 15: generated.EnclaveIDResponse.systemError:type_name -> generated.SystemError 13, // 16: generated.StartResponse.systemError:type_name -> generated.SystemError - 69, // 17: generated.SubmitBlockResponse.blockSubmissionResponse:type_name -> generated.BlockSubmissionResponseMsg + 71, // 17: generated.SubmitBlockResponse.blockSubmissionResponse:type_name -> generated.BlockSubmissionResponseMsg 13, // 18: generated.SubmitBlockResponse.systemError:type_name -> generated.SystemError 13, // 19: generated.SubmitTxResponse.systemError:type_name -> generated.SystemError - 72, // 20: generated.SubmitBatchRequest.batch:type_name -> generated.ExtBatchMsg + 74, // 20: generated.SubmitBatchRequest.batch:type_name -> generated.ExtBatchMsg 13, // 21: generated.SubmitBatchResponse.systemError:type_name -> generated.SystemError 13, // 22: generated.ObsCallResponse.systemError:type_name -> generated.SystemError 13, // 23: generated.GetTransactionCountResponse.systemError:type_name -> generated.SystemError @@ -5043,89 +5165,92 @@ var file_enclave_proto_depIdxs = []int32{ 13, // 25: generated.GetTransactionResponse.systemError:type_name -> generated.SystemError 13, // 26: generated.GetTransactionReceiptResponse.systemError:type_name -> generated.SystemError 13, // 27: generated.GetBalanceResponse.systemError:type_name -> generated.SystemError - 13, // 28: generated.GetCodeResponse.systemError:type_name -> generated.SystemError - 13, // 29: generated.SubscribeResponse.systemError:type_name -> generated.SystemError - 13, // 30: generated.UnsubscribeResponse.systemError:type_name -> generated.SystemError - 13, // 31: generated.EstimateGasResponse.systemError:type_name -> generated.SystemError - 13, // 32: generated.GetLogsResponse.systemError:type_name -> generated.SystemError - 13, // 33: generated.HealthCheckResponse.systemError:type_name -> generated.SystemError - 13, // 34: generated.AttestationReportMsg.systemError:type_name -> generated.SystemError - 76, // 35: generated.BlockSubmissionResponseMsg.producedSecretResponses:type_name -> generated.SecretResponseMsg - 70, // 36: generated.BlockSubmissionResponseMsg.error:type_name -> generated.BlockSubmissionErrorMsg - 73, // 37: generated.ExtBatchMsg.header:type_name -> generated.BatchHeaderMsg - 71, // 38: generated.BatchHeaderMsg.CrossChainMessages:type_name -> generated.CrossChainMsg - 75, // 39: generated.ExtRollupMsg.header:type_name -> generated.RollupHeaderMsg - 71, // 40: generated.RollupHeaderMsg.CrossChainMessages:type_name -> generated.CrossChainMsg - 13, // 41: generated.SecretResponseMsg.systemError:type_name -> generated.SystemError - 26, // 42: generated.EnclaveProto.Status:input_type -> generated.StatusRequest - 28, // 43: generated.EnclaveProto.Attestation:input_type -> generated.AttestationRequest - 30, // 44: generated.EnclaveProto.GenerateSecret:input_type -> generated.GenerateSecretRequest - 32, // 45: generated.EnclaveProto.InitEnclave:input_type -> generated.InitEnclaveRequest - 34, // 46: generated.EnclaveProto.EnclaveID:input_type -> generated.EnclaveIDRequest - 38, // 47: generated.EnclaveProto.SubmitL1Block:input_type -> generated.SubmitBlockRequest - 40, // 48: generated.EnclaveProto.SubmitTx:input_type -> generated.SubmitTxRequest - 42, // 49: generated.EnclaveProto.SubmitBatch:input_type -> generated.SubmitBatchRequest - 44, // 50: generated.EnclaveProto.ObsCall:input_type -> generated.ObsCallRequest - 46, // 51: generated.EnclaveProto.GetTransactionCount:input_type -> generated.GetTransactionCountRequest - 48, // 52: generated.EnclaveProto.Stop:input_type -> generated.StopRequest - 50, // 53: generated.EnclaveProto.GetTransaction:input_type -> generated.GetTransactionRequest - 52, // 54: generated.EnclaveProto.GetTransactionReceipt:input_type -> generated.GetTransactionReceiptRequest - 54, // 55: generated.EnclaveProto.GetBalance:input_type -> generated.GetBalanceRequest - 56, // 56: generated.EnclaveProto.GetCode:input_type -> generated.GetCodeRequest - 58, // 57: generated.EnclaveProto.Subscribe:input_type -> generated.SubscribeRequest - 60, // 58: generated.EnclaveProto.Unsubscribe:input_type -> generated.UnsubscribeRequest - 62, // 59: generated.EnclaveProto.EstimateGas:input_type -> generated.EstimateGasRequest - 64, // 60: generated.EnclaveProto.GetLogs:input_type -> generated.GetLogsRequest - 67, // 61: generated.EnclaveProto.HealthCheck:input_type -> generated.EmptyArgs - 4, // 62: generated.EnclaveProto.GetBatch:input_type -> generated.GetBatchRequest - 5, // 63: generated.EnclaveProto.GetBatchBySeqNo:input_type -> generated.GetBatchBySeqNoRequest - 7, // 64: generated.EnclaveProto.GetRollupData:input_type -> generated.GetRollupDataRequest - 20, // 65: generated.EnclaveProto.CreateBatch:input_type -> generated.CreateBatchRequest - 22, // 66: generated.EnclaveProto.CreateRollup:input_type -> generated.CreateRollupRequest - 24, // 67: generated.EnclaveProto.ExportCrossChainData:input_type -> generated.ExportCrossChainDataRequest - 18, // 68: generated.EnclaveProto.DebugTraceTransaction:input_type -> generated.DebugTraceTransactionRequest - 10, // 69: generated.EnclaveProto.StreamL2Updates:input_type -> generated.StreamL2UpdatesRequest - 16, // 70: generated.EnclaveProto.DebugEventLogRelevancy:input_type -> generated.DebugEventLogRelevancyRequest - 14, // 71: generated.EnclaveProto.GetTotalContractCount:input_type -> generated.GetTotalContractCountRequest - 2, // 72: generated.EnclaveProto.GetPrivateTransactions:input_type -> generated.GetReceiptsByAddressRequest - 0, // 73: generated.EnclaveProto.EnclavePublicConfig:input_type -> generated.EnclavePublicConfigRequest - 27, // 74: generated.EnclaveProto.Status:output_type -> generated.StatusResponse - 29, // 75: generated.EnclaveProto.Attestation:output_type -> generated.AttestationResponse - 31, // 76: generated.EnclaveProto.GenerateSecret:output_type -> generated.GenerateSecretResponse - 33, // 77: generated.EnclaveProto.InitEnclave:output_type -> generated.InitEnclaveResponse - 35, // 78: generated.EnclaveProto.EnclaveID:output_type -> generated.EnclaveIDResponse - 39, // 79: generated.EnclaveProto.SubmitL1Block:output_type -> generated.SubmitBlockResponse - 41, // 80: generated.EnclaveProto.SubmitTx:output_type -> generated.SubmitTxResponse - 43, // 81: generated.EnclaveProto.SubmitBatch:output_type -> generated.SubmitBatchResponse - 45, // 82: generated.EnclaveProto.ObsCall:output_type -> generated.ObsCallResponse - 47, // 83: generated.EnclaveProto.GetTransactionCount:output_type -> generated.GetTransactionCountResponse - 49, // 84: generated.EnclaveProto.Stop:output_type -> generated.StopResponse - 51, // 85: generated.EnclaveProto.GetTransaction:output_type -> generated.GetTransactionResponse - 53, // 86: generated.EnclaveProto.GetTransactionReceipt:output_type -> generated.GetTransactionReceiptResponse - 55, // 87: generated.EnclaveProto.GetBalance:output_type -> generated.GetBalanceResponse - 57, // 88: generated.EnclaveProto.GetCode:output_type -> generated.GetCodeResponse - 59, // 89: generated.EnclaveProto.Subscribe:output_type -> generated.SubscribeResponse - 61, // 90: generated.EnclaveProto.Unsubscribe:output_type -> generated.UnsubscribeResponse - 63, // 91: generated.EnclaveProto.EstimateGas:output_type -> generated.EstimateGasResponse - 65, // 92: generated.EnclaveProto.GetLogs:output_type -> generated.GetLogsResponse - 66, // 93: generated.EnclaveProto.HealthCheck:output_type -> generated.HealthCheckResponse - 6, // 94: generated.EnclaveProto.GetBatch:output_type -> generated.GetBatchResponse - 6, // 95: generated.EnclaveProto.GetBatchBySeqNo:output_type -> generated.GetBatchResponse - 8, // 96: generated.EnclaveProto.GetRollupData:output_type -> generated.GetRollupDataResponse - 21, // 97: generated.EnclaveProto.CreateBatch:output_type -> generated.CreateBatchResponse - 23, // 98: generated.EnclaveProto.CreateRollup:output_type -> generated.CreateRollupResponse - 25, // 99: generated.EnclaveProto.ExportCrossChainData:output_type -> generated.ExportCrossChainDataResponse - 19, // 100: generated.EnclaveProto.DebugTraceTransaction:output_type -> generated.DebugTraceTransactionResponse - 11, // 101: generated.EnclaveProto.StreamL2Updates:output_type -> generated.EncodedUpdateResponse - 17, // 102: generated.EnclaveProto.DebugEventLogRelevancy:output_type -> generated.DebugEventLogRelevancyResponse - 15, // 103: generated.EnclaveProto.GetTotalContractCount:output_type -> generated.GetTotalContractCountResponse - 3, // 104: generated.EnclaveProto.GetPrivateTransactions:output_type -> generated.GetReceiptsByAddressResponse - 1, // 105: generated.EnclaveProto.EnclavePublicConfig:output_type -> generated.EnclavePublicConfigResponse - 74, // [74:106] is the sub-list for method output_type - 42, // [42:74] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 13, // 28: generated.GetStorageSlotResponse.systemError:type_name -> generated.SystemError + 13, // 29: generated.GetCodeResponse.systemError:type_name -> generated.SystemError + 13, // 30: generated.SubscribeResponse.systemError:type_name -> generated.SystemError + 13, // 31: generated.UnsubscribeResponse.systemError:type_name -> generated.SystemError + 13, // 32: generated.EstimateGasResponse.systemError:type_name -> generated.SystemError + 13, // 33: generated.GetLogsResponse.systemError:type_name -> generated.SystemError + 13, // 34: generated.HealthCheckResponse.systemError:type_name -> generated.SystemError + 13, // 35: generated.AttestationReportMsg.systemError:type_name -> generated.SystemError + 78, // 36: generated.BlockSubmissionResponseMsg.producedSecretResponses:type_name -> generated.SecretResponseMsg + 72, // 37: generated.BlockSubmissionResponseMsg.error:type_name -> generated.BlockSubmissionErrorMsg + 75, // 38: generated.ExtBatchMsg.header:type_name -> generated.BatchHeaderMsg + 73, // 39: generated.BatchHeaderMsg.CrossChainMessages:type_name -> generated.CrossChainMsg + 77, // 40: generated.ExtRollupMsg.header:type_name -> generated.RollupHeaderMsg + 73, // 41: generated.RollupHeaderMsg.CrossChainMessages:type_name -> generated.CrossChainMsg + 13, // 42: generated.SecretResponseMsg.systemError:type_name -> generated.SystemError + 26, // 43: generated.EnclaveProto.Status:input_type -> generated.StatusRequest + 28, // 44: generated.EnclaveProto.Attestation:input_type -> generated.AttestationRequest + 30, // 45: generated.EnclaveProto.GenerateSecret:input_type -> generated.GenerateSecretRequest + 32, // 46: generated.EnclaveProto.InitEnclave:input_type -> generated.InitEnclaveRequest + 34, // 47: generated.EnclaveProto.EnclaveID:input_type -> generated.EnclaveIDRequest + 38, // 48: generated.EnclaveProto.SubmitL1Block:input_type -> generated.SubmitBlockRequest + 40, // 49: generated.EnclaveProto.SubmitTx:input_type -> generated.SubmitTxRequest + 42, // 50: generated.EnclaveProto.SubmitBatch:input_type -> generated.SubmitBatchRequest + 44, // 51: generated.EnclaveProto.ObsCall:input_type -> generated.ObsCallRequest + 46, // 52: generated.EnclaveProto.GetTransactionCount:input_type -> generated.GetTransactionCountRequest + 48, // 53: generated.EnclaveProto.Stop:input_type -> generated.StopRequest + 50, // 54: generated.EnclaveProto.GetTransaction:input_type -> generated.GetTransactionRequest + 52, // 55: generated.EnclaveProto.GetTransactionReceipt:input_type -> generated.GetTransactionReceiptRequest + 54, // 56: generated.EnclaveProto.GetBalance:input_type -> generated.GetBalanceRequest + 58, // 57: generated.EnclaveProto.GetCode:input_type -> generated.GetCodeRequest + 56, // 58: generated.EnclaveProto.GetStorageSlot:input_type -> generated.GetStorageSlotRequest + 60, // 59: generated.EnclaveProto.Subscribe:input_type -> generated.SubscribeRequest + 62, // 60: generated.EnclaveProto.Unsubscribe:input_type -> generated.UnsubscribeRequest + 64, // 61: generated.EnclaveProto.EstimateGas:input_type -> generated.EstimateGasRequest + 66, // 62: generated.EnclaveProto.GetLogs:input_type -> generated.GetLogsRequest + 69, // 63: generated.EnclaveProto.HealthCheck:input_type -> generated.EmptyArgs + 4, // 64: generated.EnclaveProto.GetBatch:input_type -> generated.GetBatchRequest + 5, // 65: generated.EnclaveProto.GetBatchBySeqNo:input_type -> generated.GetBatchBySeqNoRequest + 7, // 66: generated.EnclaveProto.GetRollupData:input_type -> generated.GetRollupDataRequest + 20, // 67: generated.EnclaveProto.CreateBatch:input_type -> generated.CreateBatchRequest + 22, // 68: generated.EnclaveProto.CreateRollup:input_type -> generated.CreateRollupRequest + 24, // 69: generated.EnclaveProto.ExportCrossChainData:input_type -> generated.ExportCrossChainDataRequest + 18, // 70: generated.EnclaveProto.DebugTraceTransaction:input_type -> generated.DebugTraceTransactionRequest + 10, // 71: generated.EnclaveProto.StreamL2Updates:input_type -> generated.StreamL2UpdatesRequest + 16, // 72: generated.EnclaveProto.DebugEventLogRelevancy:input_type -> generated.DebugEventLogRelevancyRequest + 14, // 73: generated.EnclaveProto.GetTotalContractCount:input_type -> generated.GetTotalContractCountRequest + 2, // 74: generated.EnclaveProto.GetReceiptsByAddress:input_type -> generated.GetReceiptsByAddressRequest + 0, // 75: generated.EnclaveProto.EnclavePublicConfig:input_type -> generated.EnclavePublicConfigRequest + 27, // 76: generated.EnclaveProto.Status:output_type -> generated.StatusResponse + 29, // 77: generated.EnclaveProto.Attestation:output_type -> generated.AttestationResponse + 31, // 78: generated.EnclaveProto.GenerateSecret:output_type -> generated.GenerateSecretResponse + 33, // 79: generated.EnclaveProto.InitEnclave:output_type -> generated.InitEnclaveResponse + 35, // 80: generated.EnclaveProto.EnclaveID:output_type -> generated.EnclaveIDResponse + 39, // 81: generated.EnclaveProto.SubmitL1Block:output_type -> generated.SubmitBlockResponse + 41, // 82: generated.EnclaveProto.SubmitTx:output_type -> generated.SubmitTxResponse + 43, // 83: generated.EnclaveProto.SubmitBatch:output_type -> generated.SubmitBatchResponse + 45, // 84: generated.EnclaveProto.ObsCall:output_type -> generated.ObsCallResponse + 47, // 85: generated.EnclaveProto.GetTransactionCount:output_type -> generated.GetTransactionCountResponse + 49, // 86: generated.EnclaveProto.Stop:output_type -> generated.StopResponse + 51, // 87: generated.EnclaveProto.GetTransaction:output_type -> generated.GetTransactionResponse + 53, // 88: generated.EnclaveProto.GetTransactionReceipt:output_type -> generated.GetTransactionReceiptResponse + 55, // 89: generated.EnclaveProto.GetBalance:output_type -> generated.GetBalanceResponse + 59, // 90: generated.EnclaveProto.GetCode:output_type -> generated.GetCodeResponse + 57, // 91: generated.EnclaveProto.GetStorageSlot:output_type -> generated.GetStorageSlotResponse + 61, // 92: generated.EnclaveProto.Subscribe:output_type -> generated.SubscribeResponse + 63, // 93: generated.EnclaveProto.Unsubscribe:output_type -> generated.UnsubscribeResponse + 65, // 94: generated.EnclaveProto.EstimateGas:output_type -> generated.EstimateGasResponse + 67, // 95: generated.EnclaveProto.GetLogs:output_type -> generated.GetLogsResponse + 68, // 96: generated.EnclaveProto.HealthCheck:output_type -> generated.HealthCheckResponse + 6, // 97: generated.EnclaveProto.GetBatch:output_type -> generated.GetBatchResponse + 6, // 98: generated.EnclaveProto.GetBatchBySeqNo:output_type -> generated.GetBatchResponse + 8, // 99: generated.EnclaveProto.GetRollupData:output_type -> generated.GetRollupDataResponse + 21, // 100: generated.EnclaveProto.CreateBatch:output_type -> generated.CreateBatchResponse + 23, // 101: generated.EnclaveProto.CreateRollup:output_type -> generated.CreateRollupResponse + 25, // 102: generated.EnclaveProto.ExportCrossChainData:output_type -> generated.ExportCrossChainDataResponse + 19, // 103: generated.EnclaveProto.DebugTraceTransaction:output_type -> generated.DebugTraceTransactionResponse + 11, // 104: generated.EnclaveProto.StreamL2Updates:output_type -> generated.EncodedUpdateResponse + 17, // 105: generated.EnclaveProto.DebugEventLogRelevancy:output_type -> generated.DebugEventLogRelevancyResponse + 15, // 106: generated.EnclaveProto.GetTotalContractCount:output_type -> generated.GetTotalContractCountResponse + 3, // 107: generated.EnclaveProto.GetReceiptsByAddress:output_type -> generated.GetReceiptsByAddressResponse + 1, // 108: generated.EnclaveProto.EnclavePublicConfig:output_type -> generated.EnclavePublicConfigResponse + 76, // [76:109] is the sub-list for method output_type + 43, // [43:76] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name } func init() { file_enclave_proto_init() } @@ -5807,7 +5932,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCodeRequest); i { + switch v := v.(*GetStorageSlotRequest); i { case 0: return &v.state case 1: @@ -5819,7 +5944,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCodeResponse); i { + switch v := v.(*GetStorageSlotResponse); i { case 0: return &v.state case 1: @@ -5831,7 +5956,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscribeRequest); i { + switch v := v.(*GetCodeRequest); i { case 0: return &v.state case 1: @@ -5843,7 +5968,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscribeResponse); i { + switch v := v.(*GetCodeResponse); i { case 0: return &v.state case 1: @@ -5855,7 +5980,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubscribeRequest); i { + switch v := v.(*SubscribeRequest); i { case 0: return &v.state case 1: @@ -5867,7 +5992,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubscribeResponse); i { + switch v := v.(*SubscribeResponse); i { case 0: return &v.state case 1: @@ -5879,7 +6004,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateGasRequest); i { + switch v := v.(*UnsubscribeRequest); i { case 0: return &v.state case 1: @@ -5891,7 +6016,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EstimateGasResponse); i { + switch v := v.(*UnsubscribeResponse); i { case 0: return &v.state case 1: @@ -5903,7 +6028,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLogsRequest); i { + switch v := v.(*EstimateGasRequest); i { case 0: return &v.state case 1: @@ -5915,7 +6040,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLogsResponse); i { + switch v := v.(*EstimateGasResponse); i { case 0: return &v.state case 1: @@ -5927,7 +6052,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckResponse); i { + switch v := v.(*GetLogsRequest); i { case 0: return &v.state case 1: @@ -5939,7 +6064,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyArgs); i { + switch v := v.(*GetLogsResponse); i { case 0: return &v.state case 1: @@ -5951,7 +6076,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttestationReportMsg); i { + switch v := v.(*HealthCheckResponse); i { case 0: return &v.state case 1: @@ -5963,7 +6088,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockSubmissionResponseMsg); i { + switch v := v.(*EmptyArgs); i { case 0: return &v.state case 1: @@ -5975,7 +6100,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockSubmissionErrorMsg); i { + switch v := v.(*AttestationReportMsg); i { case 0: return &v.state case 1: @@ -5987,7 +6112,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CrossChainMsg); i { + switch v := v.(*BlockSubmissionResponseMsg); i { case 0: return &v.state case 1: @@ -5999,7 +6124,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtBatchMsg); i { + switch v := v.(*BlockSubmissionErrorMsg); i { case 0: return &v.state case 1: @@ -6011,7 +6136,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BatchHeaderMsg); i { + switch v := v.(*CrossChainMsg); i { case 0: return &v.state case 1: @@ -6023,7 +6148,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtRollupMsg); i { + switch v := v.(*ExtBatchMsg); i { case 0: return &v.state case 1: @@ -6035,7 +6160,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RollupHeaderMsg); i { + switch v := v.(*BatchHeaderMsg); i { case 0: return &v.state case 1: @@ -6047,7 +6172,7 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretResponseMsg); i { + switch v := v.(*ExtRollupMsg); i { case 0: return &v.state case 1: @@ -6059,6 +6184,30 @@ func file_enclave_proto_init() { } } file_enclave_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollupHeaderMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_enclave_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretResponseMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_enclave_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WithdrawalMsg); i { case 0: return &v.state @@ -6078,7 +6227,7 @@ func file_enclave_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_enclave_proto_rawDesc, NumEnums: 0, - NumMessages: 78, + NumMessages: 80, NumExtensions: 0, NumServices: 1, }, diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index 6ea5be4800..4ed20ae996 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -59,6 +59,9 @@ service EnclaveProto { // GetCode returns the code stored at the given address in the state for the given rollup height or rollup hash rpc GetCode(GetCodeRequest) returns (GetCodeResponse) {} + rpc GetStorageSlot(GetStorageSlotRequest) returns (GetStorageSlotResponse) {} + + rpc Subscribe(SubscribeRequest) returns (SubscribeResponse) {} rpc Unsubscribe(UnsubscribeRequest) returns (UnsubscribeResponse) {} @@ -320,6 +323,14 @@ message GetBalanceResponse { SystemError systemError = 2; } +message GetStorageSlotRequest { + bytes encryptedParams = 1; +} +message GetStorageSlotResponse { + bytes encodedEnclaveResponse = 1; + SystemError systemError = 2; +} + message GetCodeRequest { bytes address = 1; bytes rollupHash = 2; diff --git a/go/common/rpc/generated/enclave_grpc.pb.go b/go/common/rpc/generated/enclave_grpc.pb.go index 5dba3f31ee..748bced462 100644 --- a/go/common/rpc/generated/enclave_grpc.pb.go +++ b/go/common/rpc/generated/enclave_grpc.pb.go @@ -34,6 +34,7 @@ const ( EnclaveProto_GetTransactionReceipt_FullMethodName = "/generated.EnclaveProto/GetTransactionReceipt" EnclaveProto_GetBalance_FullMethodName = "/generated.EnclaveProto/GetBalance" EnclaveProto_GetCode_FullMethodName = "/generated.EnclaveProto/GetCode" + EnclaveProto_GetStorageSlot_FullMethodName = "/generated.EnclaveProto/GetStorageSlot" EnclaveProto_Subscribe_FullMethodName = "/generated.EnclaveProto/Subscribe" EnclaveProto_Unsubscribe_FullMethodName = "/generated.EnclaveProto/Unsubscribe" EnclaveProto_EstimateGas_FullMethodName = "/generated.EnclaveProto/EstimateGas" @@ -49,7 +50,7 @@ const ( EnclaveProto_StreamL2Updates_FullMethodName = "/generated.EnclaveProto/StreamL2Updates" EnclaveProto_DebugEventLogRelevancy_FullMethodName = "/generated.EnclaveProto/DebugEventLogRelevancy" EnclaveProto_GetTotalContractCount_FullMethodName = "/generated.EnclaveProto/GetTotalContractCount" - EnclaveProto_GetReceiptsByAddress_FullMethodName = "/generated.EnclaveProto/GetPrivateTransactions" + EnclaveProto_GetReceiptsByAddress_FullMethodName = "/generated.EnclaveProto/GetReceiptsByAddress" EnclaveProto_EnclavePublicConfig_FullMethodName = "/generated.EnclaveProto/EnclavePublicConfig" ) @@ -97,6 +98,7 @@ type EnclaveProtoClient interface { GetBalance(ctx context.Context, in *GetBalanceRequest, opts ...grpc.CallOption) (*GetBalanceResponse, error) // GetCode returns the code stored at the given address in the state for the given rollup height or rollup hash GetCode(ctx context.Context, in *GetCodeRequest, opts ...grpc.CallOption) (*GetCodeResponse, error) + GetStorageSlot(ctx context.Context, in *GetStorageSlotRequest, opts ...grpc.CallOption) (*GetStorageSlotResponse, error) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) Unsubscribe(ctx context.Context, in *UnsubscribeRequest, opts ...grpc.CallOption) (*UnsubscribeResponse, error) // EstimateGas returns the estimation of gas used for the given transactions @@ -265,6 +267,15 @@ func (c *enclaveProtoClient) GetCode(ctx context.Context, in *GetCodeRequest, op return out, nil } +func (c *enclaveProtoClient) GetStorageSlot(ctx context.Context, in *GetStorageSlotRequest, opts ...grpc.CallOption) (*GetStorageSlotResponse, error) { + out := new(GetStorageSlotResponse) + err := c.cc.Invoke(ctx, EnclaveProto_GetStorageSlot_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *enclaveProtoClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) { out := new(SubscribeResponse) err := c.cc.Invoke(ctx, EnclaveProto_Subscribe_FullMethodName, in, out, opts...) @@ -485,6 +496,7 @@ type EnclaveProtoServer interface { GetBalance(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error) // GetCode returns the code stored at the given address in the state for the given rollup height or rollup hash GetCode(context.Context, *GetCodeRequest) (*GetCodeResponse, error) + GetStorageSlot(context.Context, *GetStorageSlotRequest) (*GetStorageSlotResponse, error) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) Unsubscribe(context.Context, *UnsubscribeRequest) (*UnsubscribeResponse, error) // EstimateGas returns the estimation of gas used for the given transactions @@ -560,6 +572,9 @@ func (UnimplementedEnclaveProtoServer) GetBalance(context.Context, *GetBalanceRe func (UnimplementedEnclaveProtoServer) GetCode(context.Context, *GetCodeRequest) (*GetCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCode not implemented") } +func (UnimplementedEnclaveProtoServer) GetStorageSlot(context.Context, *GetStorageSlotRequest) (*GetStorageSlotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStorageSlot not implemented") +} func (UnimplementedEnclaveProtoServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } @@ -606,7 +621,7 @@ func (UnimplementedEnclaveProtoServer) GetTotalContractCount(context.Context, *G return nil, status.Errorf(codes.Unimplemented, "method GetTotalContractCount not implemented") } func (UnimplementedEnclaveProtoServer) GetReceiptsByAddress(context.Context, *GetReceiptsByAddressRequest) (*GetReceiptsByAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPrivateTransactions not implemented") + return nil, status.Errorf(codes.Unimplemented, "method GetReceiptsByAddress not implemented") } func (UnimplementedEnclaveProtoServer) EnclavePublicConfig(context.Context, *EnclavePublicConfigRequest) (*EnclavePublicConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EnclavePublicConfig not implemented") @@ -894,6 +909,24 @@ func _EnclaveProto_GetCode_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _EnclaveProto_GetStorageSlot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStorageSlotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnclaveProtoServer).GetStorageSlot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EnclaveProto_GetStorageSlot_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnclaveProtoServer).GetStorageSlot(ctx, req.(*GetStorageSlotRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _EnclaveProto_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SubscribeRequest) if err := dec(in); err != nil { @@ -1270,6 +1303,10 @@ var EnclaveProto_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetCode", Handler: _EnclaveProto_GetCode_Handler, }, + { + MethodName: "GetStorageSlot", + Handler: _EnclaveProto_GetStorageSlot_Handler, + }, { MethodName: "Subscribe", Handler: _EnclaveProto_Subscribe_Handler, @@ -1327,7 +1364,7 @@ var EnclaveProto_ServiceDesc = grpc.ServiceDesc{ Handler: _EnclaveProto_GetTotalContractCount_Handler, }, { - MethodName: "GetPrivateTransactions", + MethodName: "GetReceiptsByAddress", Handler: _EnclaveProto_GetReceiptsByAddress_Handler, }, { diff --git a/go/common/types.go b/go/common/types.go index 4455dd126e..33654c3ea7 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -73,6 +73,7 @@ type ( EncryptedParamsEstimateGas []byte // As above, but for an RPC estimateGas request. EncryptedParamsGetLogs []byte // As above, but for an RPC getLogs request. EncryptedParamsGetPersonalTransactions []byte + EncryptedParamsGetStorageSlot []byte Nonce = uint64 EncodedRollup []byte diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 96f64a10d5..ea2b930956 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -698,6 +698,14 @@ func (e *enclaveImpl) GetCode(ctx context.Context, address gethcommon.Address, b return stateDB.GetCode(address), nil } +func (e *enclaveImpl) GetStorageSlot(ctx context.Context, encryptedParams common.EncryptedParamsGetStorageSlot) (*responses.EnclaveResponse, common.SystemError) { + if e.stopControl.IsStopping() { + return nil, responses.ToInternalError(fmt.Errorf("requested GetCode with the enclave stopping")) + } + + return rpc.WithVKEncryption(ctx, e.rpcEncryptionManager, encryptedParams, rpc.TenStorageReadValidate, rpc.TenStorageReadExecute) +} + func (e *enclaveImpl) Subscribe(ctx context.Context, id gethrpc.ID, encryptedSubscription common.EncryptedParamsLogSubscription) common.SystemError { if e.stopControl.IsStopping() { return responses.ToInternalError(fmt.Errorf("requested SubscribeForExecutedBatches with the enclave stopping")) diff --git a/go/enclave/rpc/TenStorageRead.go b/go/enclave/rpc/TenStorageRead.go new file mode 100644 index 0000000000..0de76e6470 --- /dev/null +++ b/go/enclave/rpc/TenStorageRead.go @@ -0,0 +1,113 @@ +package rpc + +import ( + "errors" + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ten-protocol/go-ten/go/common/gethencoding" + "github.com/ten-protocol/go-ten/go/common/log" + "github.com/ten-protocol/go-ten/go/common/syserr" + gethrpc "github.com/ten-protocol/go-ten/lib/gethfork/rpc" +) + +type storageReadWithBlock struct { + address *common.Address + storageSlot string + block *gethrpc.BlockNumberOrHash +} + +func TenStorageReadValidate(reqParams []any, builder *CallBuilder[storageReadWithBlock, string], rpc *EncryptionManager) error { + if len(reqParams) < 2 || len(reqParams) > 3 { + builder.Err = fmt.Errorf("unexpected number of parameters") + return nil + } + + address, err := gethencoding.ExtractAddress(reqParams[0]) + if err != nil { + builder.Err = fmt.Errorf("error extracting address - %w", err) + return nil + } + + slot, ok := reqParams[1].(string) + if !ok { + builder.Err = fmt.Errorf("storage slot not provided in parameters") + return nil + } + + if !rpc.whitelist.AllowedStorageSlots[slot] { + builder.Err = fmt.Errorf("eth_getStorageAt is not supported on TEN") + return nil + } + + blkNumber, err := gethencoding.ExtractBlockNumber(reqParams[2]) + if err != nil { + builder.Err = fmt.Errorf("unable to extract requested block number - %w", err) + return nil + } + + builder.Param = &storageReadWithBlock{address, slot, blkNumber} + + return nil +} + +func TenStorageReadExecute(builder *CallBuilder[storageReadWithBlock, string], rpc *EncryptionManager) error { + var err error + var stateDb *state.StateDB + blkNumber := builder.Param.block + hash := blkNumber.BlockHash + if hash != nil { + stateDb, err = rpc.registry.GetBatchState(builder.ctx, hash) + } + + number := blkNumber.BlockNumber + if number != nil { + stateDb, err = rpc.registry.GetBatchStateAtHeight(builder.ctx, number) + } + if err != nil { + builder.Err = err + return nil + } + + storageSlot, err := common.ParseHexOrString(builder.Param.storageSlot) + if err != nil { + builder.Err = err + return nil + } + + account, err := stateDb.GetTrie().GetAccount(*builder.Param.address) + if err != nil { + builder.Err = err + return nil + } + + trie, err := stateDb.Database().OpenTrie(account.Root) + if err != nil { + builder.Err = err + return nil + } + + value, err := trie.GetStorage(*builder.Param.address, storageSlot) + if err != nil { + rpc.logger.Debug("Failed eth_getStorageAt.", log.ErrKey, err) + + // return system errors to the host + if errors.Is(err, syserr.InternalError{}) { + return err + } + + builder.Err = err + return nil + } + + if len(value) == 0 { + builder.ReturnValue = nil + return nil + } + + encodedResult := hexutil.Encode(value) + builder.ReturnValue = &encodedResult + return nil +} diff --git a/go/enclave/rpc/rpc_encryption_manager.go b/go/enclave/rpc/rpc_encryption_manager.go index a974a9389f..2c94d76a99 100644 --- a/go/enclave/rpc/rpc_encryption_manager.go +++ b/go/enclave/rpc/rpc_encryption_manager.go @@ -3,6 +3,7 @@ package rpc import ( "fmt" + "github.com/ten-protocol/go-ten/go/common/privacy" "github.com/ten-protocol/go-ten/go/config" "github.com/ten-protocol/go-ten/go/enclave/gas" @@ -29,6 +30,7 @@ type EncryptionManager struct { l1BlockProcessor components.L1BlockProcessor config *config.EnclaveConfig logger gethlog.Logger + whitelist *privacy.Whitelist } func NewEncryptionManager(enclavePrivateKeyECIES *ecies.PrivateKey, storage storage.Storage, registry components.BatchRegistry, processors *crosschain.Processors, service nodetype.NodeType, config *config.EnclaveConfig, oracle gas.Oracle, blockResolver storage.BlockResolver, l1BlockProcessor components.L1BlockProcessor, chain l2chain.ObscuroChain, logger gethlog.Logger) *EncryptionManager { @@ -44,6 +46,7 @@ func NewEncryptionManager(enclavePrivateKeyECIES *ecies.PrivateKey, storage stor gasOracle: oracle, logger: logger, enclavePrivateKeyECIES: enclavePrivateKeyECIES, + whitelist: privacy.NewWhitelist(), } } diff --git a/go/enclave/rpc_server.go b/go/enclave/rpc_server.go index a29be9c27e..f2f0ad6a50 100644 --- a/go/enclave/rpc_server.go +++ b/go/enclave/rpc_server.go @@ -214,6 +214,15 @@ func (s *RPCServer) GetTransactionReceipt(ctx context.Context, request *generate return &generated.GetTransactionReceiptResponse{EncodedEnclaveResponse: enclaveResponse.Encode()}, nil } +func (s *RPCServer) GetStorageSlot(ctx context.Context, request *generated.GetStorageSlotRequest) (*generated.GetStorageSlotResponse, error) { + enclaveResp, sysError := s.enclave.GetStorageSlot(ctx, request.EncryptedParams) + if sysError != nil { + s.logger.Error("Error getting storage slot", log.ErrKey, sysError) + return &generated.GetStorageSlotResponse{SystemError: toRPCError(sysError)}, nil + } + return &generated.GetStorageSlotResponse{EncodedEnclaveResponse: enclaveResp.Encode()}, nil +} + func (s *RPCServer) GetBalance(ctx context.Context, request *generated.GetBalanceRequest) (*generated.GetBalanceResponse, error) { enclaveResp, sysError := s.enclave.GetBalance(ctx, request.EncryptedParams) if sysError != nil { diff --git a/go/host/rpc/clientapi/client_api_eth.go b/go/host/rpc/clientapi/client_api_eth.go index 2b721b0c7b..ded05e75e7 100644 --- a/go/host/rpc/clientapi/client_api_eth.go +++ b/go/host/rpc/clientapi/client_api_eth.go @@ -179,8 +179,12 @@ func (api *EthereumAPI) GetTransactionByHash(ctx context.Context, encryptedParam } // GetStorageAt is not currently supported (some narrow version of it may be supported in the future for proxy contracts). -func (api *EthereumAPI) GetStorageAt(ctx context.Context, encryptedParams common.EncryptedParamsGetPersonalTransactions) (*responses.Receipts, error) { - return nil, fmt.Errorf("GetStorageAt is not supported on TEN") +func (api *EthereumAPI) GetStorageAt(ctx context.Context, encryptedParams common.EncryptedParamsGetStorageSlot) (responses.EnclaveResponse, error) { + enclaveResponse, sysError := api.host.EnclaveClient().GetStorageSlot(ctx, encryptedParams) + if sysError != nil { + return api.handleSysError("GetStorageAt", sysError) + } + return *enclaveResponse, nil } // FeeHistory is a placeholder for an RPC method required by MetaMask/Remix. diff --git a/go/host/rpc/enclaverpc/enclave_client.go b/go/host/rpc/enclaverpc/enclave_client.go index 5c1c71e9f4..cef24fb274 100644 --- a/go/host/rpc/enclaverpc/enclave_client.go +++ b/go/host/rpc/enclaverpc/enclave_client.go @@ -74,6 +74,21 @@ func NewClient(enclaveRPCAddress string, enclaveRPCTimeout time.Duration, logger } } +func (c *Client) GetStorageSlot(ctx context.Context, encryptedParams common.EncryptedParamsGetStorageSlot) (*responses.EnclaveResponse, common.SystemError) { + timeoutCtx, cancel := context.WithTimeout(ctx, c.enclaveRPCTimeout) + defer cancel() + + response, err := c.protoClient.GetStorageSlot(timeoutCtx, &generated.GetStorageSlotRequest{EncryptedParams: encryptedParams}) + if err != nil { + return nil, syserr.NewRPCError(err) + } + if response != nil && response.SystemError != nil { + return nil, syserr.NewInternalError(fmt.Errorf("%s", response.SystemError.ErrorString)) + } + + return responses.ToEnclaveResponse(response.EncodedEnclaveResponse), nil +} + func (c *Client) ExportCrossChainData(ctx context.Context, from uint64, to uint64) (*common.ExtCrossChainBundle, common.SystemError) { timeoutCtx, cancel := context.WithTimeout(ctx, c.enclaveRPCTimeout) defer cancel() diff --git a/go/responses/types.go b/go/responses/types.go index 9138e44a3c..7489f6bfd9 100644 --- a/go/responses/types.go +++ b/go/responses/types.go @@ -34,6 +34,7 @@ type ( Logs = EnclaveResponse Receipts = EnclaveResponse PersonalTransactionsResponse = EnclaveResponse + StorageSlotResponse = EnclaveResponse ) // Data Types diff --git a/integration/obscurogateway/tengateway_test.go b/integration/obscurogateway/tengateway_test.go index 72f25c9b56..f411d35a4b 100644 --- a/integration/obscurogateway/tengateway_test.go +++ b/integration/obscurogateway/tengateway_test.go @@ -737,6 +737,12 @@ func testGetStorageAtForReturningUserID(t *testing.T, httpURL, wsURL string, w w t.Error("eth_getStorageAt did not respond with not found error") } + err = user.RegisterAccounts() + if err != nil { + t.Errorf("Failed to register accounts: %s", err) + return + } + // make a request to GetStorageAt with wrong parameters to get userID, but correct userID respBody3 := makeHTTPEthJSONReq(httpURL, tenrpc.GetStorageAt, user.tgClient.UserID(), []interface{}{"0x0000000000000000000000000000000000000007", "0", nil}) expectedErr := "not supported" diff --git a/tools/walletextension/rpcapi/blockchain_api.go b/tools/walletextension/rpcapi/blockchain_api.go index 600d417c40..aeb6a01ed9 100644 --- a/tools/walletextension/rpcapi/blockchain_api.go +++ b/tools/walletextension/rpcapi/blockchain_api.go @@ -11,15 +11,21 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ten-protocol/go-ten/go/common" "github.com/ten-protocol/go-ten/go/common/gethapi" + "github.com/ten-protocol/go-ten/go/common/privacy" "github.com/ten-protocol/go-ten/lib/gethfork/rpc" ) type BlockChainAPI struct { - we *Services + we *Services + storageWhitelist *privacy.Whitelist } func NewBlockChainAPI(we *Services) *BlockChainAPI { - return &BlockChainAPI{we} + whitelist := privacy.NewWhitelist() + return &BlockChainAPI{ + we: we, + storageWhitelist: whitelist, + } } func (api *BlockChainAPI) ChainId() *hexutil.Big { //nolint:stylecheck @@ -176,7 +182,20 @@ func (api *BlockChainAPI) GetStorageAt(ctx context.Context, address gethcommon.A } return serialised, nil default: // address was not a recognised custom query method address - return nil, fmt.Errorf("eth_getStorageAt is not supported on TEN") + resp, err := ExecAuthRPC[any](ctx, api.we, &ExecCfg{tryUntilAuthorised: true}, "eth_getStorageAt", address, params, nil) + if err != nil { + return nil, fmt.Errorf("unable to execute eth_getStorageAt: %w", err) + } + if resp == nil { + return nil, nil + } + + respHex, ok := (*resp).(string) + if !ok { + return nil, fmt.Errorf("unable to decode response") + } + // turn resp object into hexutil.Bytes + return hexutil.MustDecode(respHex), nil } }