From 823aed325c0379ec21d99f1f10a3788473aaffec Mon Sep 17 00:00:00 2001 From: Srinivasan Muralidharan Date: Tue, 17 Jan 2017 21:07:27 -0500 Subject: [PATCH] consolidate protos/peer proto files https://jira.hyperledger.org/browse/FAB-1716 remove "fabric_" from filnames. consolidate files so we don't have so many. remove unused entries in "fabric.proto". remove message.proto remove properties from core.yaml not in use Change-Id: I0ee8d1bb87bf5cf3ebf9fb8b5e4c7aa30e8c7dcb Signed-off-by: Srinivasan Muralidharan --- core/peer/config.go | 8 +- .../peer/{server_admin.pb.go => admin.pb.go} | 161 ++++++++---- .../peer/{server_admin.proto => admin.proto} | 0 protos/peer/chaincode.pb.go | 206 ++++++++-------- protos/peer/chaincode_proposal.pb.go | 110 --------- protos/peer/chaincode_proposal.proto | 137 ----------- protos/peer/chaincode_transaction.pb.go | 95 -------- protos/peer/chaincode_transaction.proto | 57 ----- protos/peer/chaincodeevent.pb.go | 97 +------- protos/peer/configuration.pb.go | 34 +-- protos/peer/events.pb.go | 91 +++---- protos/peer/events.proto | 2 +- protos/peer/fabric.pb.go | 155 ------------ protos/peer/fabric_message.pb.go | 81 ------ protos/peer/fabric_message.proto | 48 ---- protos/peer/fabric_proposal.pb.go | 112 --------- protos/peer/fabric_service.pb.go | 108 -------- protos/peer/fabric_service.proto | 28 --- protos/peer/fabric_transaction.pb.go | 167 ------------- protos/peer/peer.pb.go | 161 ++++++++++++ protos/peer/{fabric.proto => peer.proto} | 27 +- protos/peer/proposal.pb.go | 190 +++++++++++++++ .../{fabric_proposal.proto => proposal.proto} | 118 +++++++++ ...response.pb.go => proposal_response.pb.go} | 68 +++--- ...response.proto => proposal_response.proto} | 0 protos/peer/transaction.pb.go | 230 ++++++++++++++++++ ...ic_transaction.proto => transaction.proto} | 37 +++ 27 files changed, 1071 insertions(+), 1457 deletions(-) rename protos/peer/{server_admin.pb.go => admin.pb.go} (66%) rename protos/peer/{server_admin.proto => admin.proto} (100%) delete mode 100644 protos/peer/chaincode_proposal.pb.go delete mode 100644 protos/peer/chaincode_proposal.proto delete mode 100644 protos/peer/chaincode_transaction.pb.go delete mode 100644 protos/peer/chaincode_transaction.proto delete mode 100644 protos/peer/fabric.pb.go delete mode 100644 protos/peer/fabric_message.pb.go delete mode 100644 protos/peer/fabric_message.proto delete mode 100644 protos/peer/fabric_proposal.pb.go delete mode 100644 protos/peer/fabric_service.pb.go delete mode 100644 protos/peer/fabric_service.proto delete mode 100644 protos/peer/fabric_transaction.pb.go create mode 100644 protos/peer/peer.pb.go rename protos/peer/{fabric.proto => peer.proto} (76%) create mode 100644 protos/peer/proposal.pb.go rename protos/peer/{fabric_proposal.proto => proposal.proto} (54%) rename protos/peer/{fabric_proposal_response.pb.go => proposal_response.pb.go} (73%) rename protos/peer/{fabric_proposal_response.proto => proposal_response.proto} (100%) create mode 100644 protos/peer/transaction.pb.go rename protos/peer/{fabric_transaction.proto => transaction.proto} (65%) diff --git a/core/peer/config.go b/core/peer/config.go index bbab1a089ba..13edd8f88d8 100644 --- a/core/peer/config.go +++ b/core/peer/config.go @@ -85,17 +85,11 @@ func CacheConfiguration() (err error) { // getPeerEndpoint returns the PeerEndpoint for this Peer instance. Affected by env:peer.addressAutoDetect getPeerEndpoint := func() (*pb.PeerEndpoint, error) { var peerAddress string - var peerType pb.PeerEndpoint_Type peerAddress, err := getLocalAddress() if err != nil { return nil, err } - if viper.GetBool("peer.validator.enabled") { - peerType = pb.PeerEndpoint_VALIDATOR - } else { - peerType = pb.PeerEndpoint_NON_VALIDATOR - } - return &pb.PeerEndpoint{ID: &pb.PeerID{Name: viper.GetString("peer.id")}, Address: peerAddress, Type: peerType}, nil + return &pb.PeerEndpoint{ID: &pb.PeerID{Name: viper.GetString("peer.id")}, Address: peerAddress}, nil } localAddress, localAddressError = getLocalAddress() diff --git a/protos/peer/server_admin.pb.go b/protos/peer/admin.pb.go similarity index 66% rename from protos/peer/server_admin.pb.go rename to protos/peer/admin.pb.go index 38b0cf19d18..83f8af5e188 100644 --- a/protos/peer/server_admin.pb.go +++ b/protos/peer/admin.pb.go @@ -1,13 +1,72 @@ // Code generated by protoc-gen-go. -// source: peer/server_admin.proto +// source: peer/admin.proto // DO NOT EDIT! +/* +Package peer is a generated protocol buffer package. + +It is generated from these files: + peer/admin.proto + peer/chaincode.proto + peer/chaincodeevent.proto + peer/configuration.proto + peer/events.proto + peer/peer.proto + peer/proposal.proto + peer/proposal_response.proto + peer/transaction.proto + +It has these top-level messages: + ServerStatus + LogLevelRequest + LogLevelResponse + ChaincodeID + ChaincodeInput + ChaincodeSpec + ChaincodeDeploymentSpec + ChaincodeInvocationSpec + ChaincodeProposalContext + ChaincodeMessage + PutStateInfo + RangeQueryState + RangeQueryStateNext + RangeQueryStateClose + RangeQueryStateKeyValue + RangeQueryStateResponse + ChaincodeEvent + AnchorPeers + AnchorPeer + ChaincodeReg + Interest + Register + Rejection + Unregister + Event + PeerID + PeerEndpoint + BlockchainInfo + SignedProposal + Proposal + ChaincodeHeaderExtension + ChaincodeProposalPayload + ChaincodeAction + ProposalResponse + Response + ProposalResponsePayload + Endorsement + SignedTransaction + InvalidTransaction + Transaction + TransactionAction + ChaincodeActionPayload + ChaincodeEndorsedAction +*/ package peer import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" +import google_protobuf "github.com/golang/protobuf/ptypes/empty" import ( context "golang.org/x/net/context" @@ -19,6 +78,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type ServerStatus_StatusCode int32 const ( @@ -50,7 +115,7 @@ var ServerStatus_StatusCode_value = map[string]int32{ func (x ServerStatus_StatusCode) String() string { return proto.EnumName(ServerStatus_StatusCode_name, int32(x)) } -func (ServerStatus_StatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor12, []int{0, 0} } +func (ServerStatus_StatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } type ServerStatus struct { Status ServerStatus_StatusCode `protobuf:"varint,1,opt,name=status,enum=protos.ServerStatus_StatusCode" json:"status,omitempty"` @@ -59,7 +124,7 @@ type ServerStatus struct { func (m *ServerStatus) Reset() { *m = ServerStatus{} } func (m *ServerStatus) String() string { return proto.CompactTextString(m) } func (*ServerStatus) ProtoMessage() {} -func (*ServerStatus) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{0} } +func (*ServerStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } type LogLevelRequest struct { LogModule string `protobuf:"bytes,1,opt,name=logModule" json:"logModule,omitempty"` @@ -69,7 +134,7 @@ type LogLevelRequest struct { func (m *LogLevelRequest) Reset() { *m = LogLevelRequest{} } func (m *LogLevelRequest) String() string { return proto.CompactTextString(m) } func (*LogLevelRequest) ProtoMessage() {} -func (*LogLevelRequest) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{1} } +func (*LogLevelRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } type LogLevelResponse struct { LogModule string `protobuf:"bytes,1,opt,name=logModule" json:"logModule,omitempty"` @@ -79,7 +144,7 @@ type LogLevelResponse struct { func (m *LogLevelResponse) Reset() { *m = LogLevelResponse{} } func (m *LogLevelResponse) String() string { return proto.CompactTextString(m) } func (*LogLevelResponse) ProtoMessage() {} -func (*LogLevelResponse) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{2} } +func (*LogLevelResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } func init() { proto.RegisterType((*ServerStatus)(nil), "protos.ServerStatus") @@ -100,9 +165,9 @@ const _ = grpc.SupportPackageIsVersion3 type AdminClient interface { // Return the serve status. - GetStatus(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerStatus, error) - StartServer(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerStatus, error) - StopServer(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerStatus, error) + GetStatus(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) + StartServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) + StopServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) GetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error) SetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error) } @@ -115,7 +180,7 @@ func NewAdminClient(cc *grpc.ClientConn) AdminClient { return &adminClient{cc} } -func (c *adminClient) GetStatus(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerStatus, error) { +func (c *adminClient) GetStatus(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) { out := new(ServerStatus) err := grpc.Invoke(ctx, "/protos.Admin/GetStatus", in, out, c.cc, opts...) if err != nil { @@ -124,7 +189,7 @@ func (c *adminClient) GetStatus(ctx context.Context, in *google_protobuf1.Empty, return out, nil } -func (c *adminClient) StartServer(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerStatus, error) { +func (c *adminClient) StartServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) { out := new(ServerStatus) err := grpc.Invoke(ctx, "/protos.Admin/StartServer", in, out, c.cc, opts...) if err != nil { @@ -133,7 +198,7 @@ func (c *adminClient) StartServer(ctx context.Context, in *google_protobuf1.Empt return out, nil } -func (c *adminClient) StopServer(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ServerStatus, error) { +func (c *adminClient) StopServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) { out := new(ServerStatus) err := grpc.Invoke(ctx, "/protos.Admin/StopServer", in, out, c.cc, opts...) if err != nil { @@ -164,9 +229,9 @@ func (c *adminClient) SetModuleLogLevel(ctx context.Context, in *LogLevelRequest type AdminServer interface { // Return the serve status. - GetStatus(context.Context, *google_protobuf1.Empty) (*ServerStatus, error) - StartServer(context.Context, *google_protobuf1.Empty) (*ServerStatus, error) - StopServer(context.Context, *google_protobuf1.Empty) (*ServerStatus, error) + GetStatus(context.Context, *google_protobuf.Empty) (*ServerStatus, error) + StartServer(context.Context, *google_protobuf.Empty) (*ServerStatus, error) + StopServer(context.Context, *google_protobuf.Empty) (*ServerStatus, error) GetModuleLogLevel(context.Context, *LogLevelRequest) (*LogLevelResponse, error) SetModuleLogLevel(context.Context, *LogLevelRequest) (*LogLevelResponse, error) } @@ -176,7 +241,7 @@ func RegisterAdminServer(s *grpc.Server, srv AdminServer) { } func _Admin_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf1.Empty) + in := new(google_protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -188,13 +253,13 @@ func _Admin_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/protos.Admin/GetStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServer).GetStatus(ctx, req.(*google_protobuf1.Empty)) + return srv.(AdminServer).GetStatus(ctx, req.(*google_protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Admin_StartServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf1.Empty) + in := new(google_protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -206,13 +271,13 @@ func _Admin_StartServer_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/protos.Admin/StartServer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServer).StartServer(ctx, req.(*google_protobuf1.Empty)) + return srv.(AdminServer).StartServer(ctx, req.(*google_protobuf.Empty)) } return interceptor(ctx, in, info, handler) } func _Admin_StopServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf1.Empty) + in := new(google_protobuf.Empty) if err := dec(in); err != nil { return nil, err } @@ -224,7 +289,7 @@ func _Admin_StopServer_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/protos.Admin/StopServer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServer).StopServer(ctx, req.(*google_protobuf1.Empty)) + return srv.(AdminServer).StopServer(ctx, req.(*google_protobuf.Empty)) } return interceptor(ctx, in, info, handler) } @@ -291,35 +356,35 @@ var _Admin_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: fileDescriptor12, + Metadata: fileDescriptor0, } -func init() { proto.RegisterFile("peer/server_admin.proto", fileDescriptor12) } +func init() { proto.RegisterFile("peer/admin.proto", fileDescriptor0) } -var fileDescriptor12 = []byte{ +var fileDescriptor0 = []byte{ // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x92, 0xcf, 0x4e, 0xea, 0x40, - 0x14, 0xc6, 0x29, 0xf7, 0xc2, 0xbd, 0x3d, 0xdc, 0xab, 0x75, 0x62, 0x84, 0x54, 0x13, 0x4d, 0x57, - 0x1a, 0x93, 0x36, 0xc1, 0x85, 0x0b, 0x75, 0x81, 0x52, 0xff, 0x04, 0x2c, 0xa4, 0x85, 0x18, 0xdd, - 0x18, 0x4a, 0x0f, 0x85, 0xa4, 0x30, 0xb5, 0x33, 0x25, 0xe1, 0x75, 0x7c, 0x27, 0xdf, 0xc7, 0xb6, - 0x03, 0x62, 0xd4, 0x8d, 0xc4, 0xd5, 0x9c, 0xef, 0xcc, 0x77, 0x4e, 0x66, 0x7e, 0xf9, 0xa0, 0x1c, - 0x22, 0x46, 0x06, 0xc3, 0x68, 0x8a, 0xd1, 0x63, 0xcf, 0x1b, 0x8f, 0x26, 0x7a, 0x18, 0x51, 0x4e, - 0x49, 0x31, 0x3b, 0x98, 0xba, 0xed, 0x53, 0xea, 0x07, 0x68, 0x64, 0xd2, 0x8d, 0x07, 0x06, 0x8e, - 0x43, 0x3e, 0x13, 0x26, 0xed, 0x59, 0x82, 0x7f, 0x4e, 0x36, 0xeb, 0xf0, 0x1e, 0x8f, 0x19, 0x39, - 0x86, 0x22, 0xcb, 0xaa, 0x8a, 0xb4, 0x27, 0xed, 0xaf, 0x55, 0x77, 0x85, 0x91, 0xe9, 0xef, 0x5d, - 0xba, 0x38, 0x2e, 0xa8, 0x87, 0xf6, 0xdc, 0xae, 0xdd, 0x03, 0x2c, 0xbb, 0xe4, 0x3f, 0xc8, 0x5d, - 0xab, 0x6e, 0x5e, 0xde, 0x58, 0x66, 0x5d, 0xc9, 0x91, 0x12, 0xfc, 0x71, 0x3a, 0x35, 0xbb, 0x93, - 0x08, 0x49, 0x88, 0x56, 0xbb, 0x9d, 0x88, 0x3c, 0x01, 0x28, 0xb6, 0x6b, 0x5d, 0x27, 0xa9, 0x7f, - 0x11, 0x19, 0x0a, 0xa6, 0x6d, 0xb7, 0x6c, 0xe5, 0x77, 0xea, 0xe9, 0x5a, 0x0d, 0xab, 0x75, 0x67, - 0x29, 0x05, 0xad, 0x01, 0xeb, 0x4d, 0xea, 0x37, 0x71, 0x8a, 0x81, 0x8d, 0x4f, 0x31, 0x32, 0x4e, - 0x76, 0x40, 0x0e, 0xa8, 0x7f, 0x4b, 0xbd, 0x38, 0xc0, 0xec, 0xa5, 0xb2, 0xbd, 0x6c, 0x10, 0x15, - 0xfe, 0x06, 0xf3, 0x81, 0x4a, 0x3e, 0xbb, 0x7c, 0xd3, 0x5a, 0x13, 0x94, 0xe5, 0x32, 0x16, 0xd2, - 0x09, 0xc3, 0xd5, 0xb7, 0x55, 0x5f, 0xf2, 0x50, 0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bc, 0xef, 0xcd, 0x1e, 0x90, 0xad, 0x99, 0xc8, 0xd8, + 0x42, 0xe0, 0xee, 0x6e, 0xad, 0xdb, 0x2a, 0xd4, 0xda, 0x05, 0x74, 0xba, 0x0f, 0x7a, 0x07, 0xe5, + 0x9a, 0xe2, 0x37, 0x4b, 0x41, 0xb7, 0x36, 0xd0, 0x2d, 0xb7, 0x80, 0x6e, 0x7c, 0x7d, 0x8e, 0xa6, + 0x59, 0xa1, 0x87, 0xd0, 0x08, 0x64, 0xc8, 0xa5, 0x1a, 0xbf, 0xf8, 0xfc, 0xa0, 0x60, 0xcf, 0xb2, + 0x1d, 0xaf, 0x4f, 0xe1, 0x4b, 0x07, 0xa5, 0x7a, 0xec, 0x06, 0x0d, 0xfd, 0xbe, 0x11, 0x3f, 0x22, + 0x6f, 0x34, 0x9f, 0x2e, 0x14, 0x45, 0xe5, 0x14, 0xbc, 0x8a, 0xd3, 0xd1, 0xbf, 0xab, 0xbf, 0xc9, + 0x4c, 0x4e, 0xf3, 0xc8, 0x1a, 0xb3, 0xb9, 0x3d, 0x5d, 0x65, 0xc8, 0x53, 0x8c, 0x13, 0xe4, 0xf6, + 0x24, 0x8c, 0xf8, 0x6c, 0xac, 0xd2, 0x2c, 0xec, 0x22, 0xf5, 0x91, 0x4a, 0xfa, 0xff, 0xbb, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x9c, 0x1f, 0x0c, 0x90, 0x04, 0x03, 0x00, 0x00, } diff --git a/protos/peer/server_admin.proto b/protos/peer/admin.proto similarity index 100% rename from protos/peer/server_admin.proto rename to protos/peer/admin.proto diff --git a/protos/peer/chaincode.pb.go b/protos/peer/chaincode.pb.go index 473d8466609..f9e8b5cd3d5 100644 --- a/protos/peer/chaincode.pb.go +++ b/protos/peer/chaincode.pb.go @@ -7,7 +7,7 @@ package peer import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp" import ( context "golang.org/x/net/context" @@ -39,7 +39,7 @@ var ConfidentialityLevel_value = map[string]int32{ func (x ConfidentialityLevel) String() string { return proto.EnumName(ConfidentialityLevel_name, int32(x)) } -func (ConfidentialityLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (ConfidentialityLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } type ChaincodeSpec_Type int32 @@ -69,7 +69,7 @@ var ChaincodeSpec_Type_value = map[string]int32{ func (x ChaincodeSpec_Type) String() string { return proto.EnumName(ChaincodeSpec_Type_name, int32(x)) } -func (ChaincodeSpec_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{2, 0} } +func (ChaincodeSpec_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{2, 0} } type ChaincodeDeploymentSpec_ExecutionEnvironment int32 @@ -91,7 +91,7 @@ func (x ChaincodeDeploymentSpec_ExecutionEnvironment) String() string { return proto.EnumName(ChaincodeDeploymentSpec_ExecutionEnvironment_name, int32(x)) } func (ChaincodeDeploymentSpec_ExecutionEnvironment) EnumDescriptor() ([]byte, []int) { - return fileDescriptor2, []int{3, 0} + return fileDescriptor1, []int{3, 0} } type ChaincodeMessage_Type int32 @@ -158,7 +158,7 @@ var ChaincodeMessage_Type_value = map[string]int32{ func (x ChaincodeMessage_Type) String() string { return proto.EnumName(ChaincodeMessage_Type_name, int32(x)) } -func (ChaincodeMessage_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{6, 0} } +func (ChaincodeMessage_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{6, 0} } // ChaincodeID contains the path as specified by the deploy transaction // that created it as well as the hashCode that is generated by the @@ -178,7 +178,7 @@ type ChaincodeID struct { func (m *ChaincodeID) Reset() { *m = ChaincodeID{} } func (m *ChaincodeID) String() string { return proto.CompactTextString(m) } func (*ChaincodeID) ProtoMessage() {} -func (*ChaincodeID) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (*ChaincodeID) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } // Carries the chaincode function and its arguments. // UnmarshalJSON in transaction.go converts the string-based REST/JSON input to @@ -190,7 +190,7 @@ type ChaincodeInput struct { func (m *ChaincodeInput) Reset() { *m = ChaincodeInput{} } func (m *ChaincodeInput) String() string { return proto.CompactTextString(m) } func (*ChaincodeInput) ProtoMessage() {} -func (*ChaincodeInput) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } +func (*ChaincodeInput) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } // Carries the chaincode specification. This is the actual metadata required for // defining a chaincode. @@ -207,7 +207,7 @@ type ChaincodeSpec struct { func (m *ChaincodeSpec) Reset() { *m = ChaincodeSpec{} } func (m *ChaincodeSpec) String() string { return proto.CompactTextString(m) } func (*ChaincodeSpec) ProtoMessage() {} -func (*ChaincodeSpec) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} } +func (*ChaincodeSpec) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } func (m *ChaincodeSpec) GetChaincodeID() *ChaincodeID { if m != nil { @@ -228,7 +228,7 @@ func (m *ChaincodeSpec) GetCtorMsg() *ChaincodeInput { type ChaincodeDeploymentSpec struct { ChaincodeSpec *ChaincodeSpec `protobuf:"bytes,1,opt,name=chaincodeSpec" json:"chaincodeSpec,omitempty"` // Controls when the chaincode becomes executable. - EffectiveDate *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=effectiveDate" json:"effectiveDate,omitempty"` + EffectiveDate *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=effectiveDate" json:"effectiveDate,omitempty"` CodePackage []byte `protobuf:"bytes,3,opt,name=codePackage,proto3" json:"codePackage,omitempty"` ExecEnv ChaincodeDeploymentSpec_ExecutionEnvironment `protobuf:"varint,4,opt,name=execEnv,enum=protos.ChaincodeDeploymentSpec_ExecutionEnvironment" json:"execEnv,omitempty"` } @@ -236,7 +236,7 @@ type ChaincodeDeploymentSpec struct { func (m *ChaincodeDeploymentSpec) Reset() { *m = ChaincodeDeploymentSpec{} } func (m *ChaincodeDeploymentSpec) String() string { return proto.CompactTextString(m) } func (*ChaincodeDeploymentSpec) ProtoMessage() {} -func (*ChaincodeDeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} } +func (*ChaincodeDeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } func (m *ChaincodeDeploymentSpec) GetChaincodeSpec() *ChaincodeSpec { if m != nil { @@ -245,7 +245,7 @@ func (m *ChaincodeDeploymentSpec) GetChaincodeSpec() *ChaincodeSpec { return nil } -func (m *ChaincodeDeploymentSpec) GetEffectiveDate() *google_protobuf.Timestamp { +func (m *ChaincodeDeploymentSpec) GetEffectiveDate() *google_protobuf1.Timestamp { if m != nil { return m.EffectiveDate } @@ -268,7 +268,7 @@ type ChaincodeInvocationSpec struct { func (m *ChaincodeInvocationSpec) Reset() { *m = ChaincodeInvocationSpec{} } func (m *ChaincodeInvocationSpec) String() string { return proto.CompactTextString(m) } func (*ChaincodeInvocationSpec) ProtoMessage() {} -func (*ChaincodeInvocationSpec) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} } +func (*ChaincodeInvocationSpec) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } func (m *ChaincodeInvocationSpec) GetChaincodeSpec() *ChaincodeSpec { if m != nil { @@ -293,14 +293,14 @@ type ChaincodeProposalContext struct { func (m *ChaincodeProposalContext) Reset() { *m = ChaincodeProposalContext{} } func (m *ChaincodeProposalContext) String() string { return proto.CompactTextString(m) } func (*ChaincodeProposalContext) ProtoMessage() {} -func (*ChaincodeProposalContext) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} } +func (*ChaincodeProposalContext) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } type ChaincodeMessage struct { - Type ChaincodeMessage_Type `protobuf:"varint,1,opt,name=type,enum=protos.ChaincodeMessage_Type" json:"type,omitempty"` - Timestamp *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` - Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` - Txid string `protobuf:"bytes,4,opt,name=txid" json:"txid,omitempty"` - ProposalContext *ChaincodeProposalContext `protobuf:"bytes,5,opt,name=proposalContext" json:"proposalContext,omitempty"` + Type ChaincodeMessage_Type `protobuf:"varint,1,opt,name=type,enum=protos.ChaincodeMessage_Type" json:"type,omitempty"` + Timestamp *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + Txid string `protobuf:"bytes,4,opt,name=txid" json:"txid,omitempty"` + ProposalContext *ChaincodeProposalContext `protobuf:"bytes,5,opt,name=proposalContext" json:"proposalContext,omitempty"` // event emmited by chaincode. Used only with Init or Invoke. // This event is then stored (currently) // with Block.NonHashData.TransactionResult @@ -310,9 +310,9 @@ type ChaincodeMessage struct { func (m *ChaincodeMessage) Reset() { *m = ChaincodeMessage{} } func (m *ChaincodeMessage) String() string { return proto.CompactTextString(m) } func (*ChaincodeMessage) ProtoMessage() {} -func (*ChaincodeMessage) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} } +func (*ChaincodeMessage) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } -func (m *ChaincodeMessage) GetTimestamp() *google_protobuf.Timestamp { +func (m *ChaincodeMessage) GetTimestamp() *google_protobuf1.Timestamp { if m != nil { return m.Timestamp } @@ -341,7 +341,7 @@ type PutStateInfo struct { func (m *PutStateInfo) Reset() { *m = PutStateInfo{} } func (m *PutStateInfo) String() string { return proto.CompactTextString(m) } func (*PutStateInfo) ProtoMessage() {} -func (*PutStateInfo) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{7} } +func (*PutStateInfo) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } type RangeQueryState struct { StartKey string `protobuf:"bytes,1,opt,name=startKey" json:"startKey,omitempty"` @@ -351,7 +351,7 @@ type RangeQueryState struct { func (m *RangeQueryState) Reset() { *m = RangeQueryState{} } func (m *RangeQueryState) String() string { return proto.CompactTextString(m) } func (*RangeQueryState) ProtoMessage() {} -func (*RangeQueryState) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{8} } +func (*RangeQueryState) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } type RangeQueryStateNext struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` @@ -360,7 +360,7 @@ type RangeQueryStateNext struct { func (m *RangeQueryStateNext) Reset() { *m = RangeQueryStateNext{} } func (m *RangeQueryStateNext) String() string { return proto.CompactTextString(m) } func (*RangeQueryStateNext) ProtoMessage() {} -func (*RangeQueryStateNext) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{9} } +func (*RangeQueryStateNext) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } type RangeQueryStateClose struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` @@ -369,7 +369,7 @@ type RangeQueryStateClose struct { func (m *RangeQueryStateClose) Reset() { *m = RangeQueryStateClose{} } func (m *RangeQueryStateClose) String() string { return proto.CompactTextString(m) } func (*RangeQueryStateClose) ProtoMessage() {} -func (*RangeQueryStateClose) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{10} } +func (*RangeQueryStateClose) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} } type RangeQueryStateKeyValue struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` @@ -379,7 +379,7 @@ type RangeQueryStateKeyValue struct { func (m *RangeQueryStateKeyValue) Reset() { *m = RangeQueryStateKeyValue{} } func (m *RangeQueryStateKeyValue) String() string { return proto.CompactTextString(m) } func (*RangeQueryStateKeyValue) ProtoMessage() {} -func (*RangeQueryStateKeyValue) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{11} } +func (*RangeQueryStateKeyValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{11} } type RangeQueryStateResponse struct { KeysAndValues []*RangeQueryStateKeyValue `protobuf:"bytes,1,rep,name=keysAndValues" json:"keysAndValues,omitempty"` @@ -390,7 +390,7 @@ type RangeQueryStateResponse struct { func (m *RangeQueryStateResponse) Reset() { *m = RangeQueryStateResponse{} } func (m *RangeQueryStateResponse) String() string { return proto.CompactTextString(m) } func (*RangeQueryStateResponse) ProtoMessage() {} -func (*RangeQueryStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{12} } +func (*RangeQueryStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{12} } func (m *RangeQueryStateResponse) GetKeysAndValues() []*RangeQueryStateKeyValue { if m != nil { @@ -520,81 +520,81 @@ var _ChaincodeSupport_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: fileDescriptor2, -} - -func init() { proto.RegisterFile("peer/chaincode.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 1111 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x14, 0x8d, 0x1e, 0xb6, 0xac, 0xab, 0x87, 0x99, 0x89, 0xe2, 0xa8, 0x6a, 0xda, 0x18, 0x44, 0x5b, - 0xb8, 0x5d, 0x48, 0xa9, 0x9a, 0x16, 0x05, 0x0a, 0x04, 0x65, 0xc8, 0x89, 0xca, 0x58, 0xa6, 0x94, - 0x11, 0x6d, 0xc4, 0xdd, 0x18, 0x63, 0x6a, 0x24, 0x13, 0x91, 0x48, 0x82, 0x1c, 0x19, 0xd6, 0xae, - 0xeb, 0xae, 0xfa, 0x0f, 0xfd, 0x8b, 0xfe, 0x4c, 0x7f, 0xa5, 0x33, 0xa4, 0x28, 0xeb, 0x65, 0x20, - 0x40, 0x57, 0x9a, 0x3b, 0xf7, 0x9c, 0x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fc, 0x4d, 0xd7, 0xd4, 0x45, 0x3f, 0x2b, 0x50, 0xd6, 0x7b, 0xd6, - 0x5b, 0xd3, 0xc0, 0x96, 0x6d, 0x6a, 0x5d, 0x25, 0xd3, 0xfe, 0xb0, 0xb2, 0x34, 0x06, 0xb3, 0x20, - 0xf0, 0x43, 0x8e, 0x0c, 0xd1, 0x54, 0x6c, 0xec, 0x46, 0x9c, 0x85, 0xa8, 0xfe, 0xd0, 0xca, 0x68, - 0x3c, 0xa8, 0x51, 0x1f, 0x9d, 0x64, 0x5e, 0x66, 0xde, 0xe8, 0x70, 0xe4, 0x87, 0xe3, 0xe6, 0x8d, - 0x18, 0xab, 0x70, 0xc2, 0x86, 0x63, 0x16, 0x2e, 0x08, 0xbf, 0x7f, 0x3b, 0x76, 0xf9, 0xcd, 0xec, - 0xba, 0xe9, 0xf8, 0xd3, 0xd6, 0x8a, 0xba, 0x35, 0xa2, 0xd7, 0xa1, 0xeb, 0x24, 0xff, 0x72, 0xa2, - 0x96, 0xfc, 0x3b, 0x74, 0x9d, 0xfc, 0x39, 0xfa, 0xe1, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, - 0xee, 0x4d, 0x7b, 0x3b, 0x09, 0x00, 0x00, + Metadata: fileDescriptor1, +} + +func init() { proto.RegisterFile("peer/chaincode.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 1117 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x56, 0xdb, 0x6e, 0xdb, 0x46, + 0x13, 0x0e, 0x25, 0xf9, 0xa0, 0x91, 0x2c, 0x6f, 0x36, 0x8a, 0xa3, 0x5f, 0x7f, 0xda, 0x08, 0x44, + 0x5b, 0xa8, 0xbd, 0x90, 0x53, 0x35, 0x29, 0x0a, 0x14, 0x08, 0xca, 0x90, 0x1b, 0x97, 0xb1, 0x4c, + 0x29, 0x2b, 0xda, 0x48,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0x67, 0xfa, 0x49, 0xad, 0x74, 0x9f, 0xe5, 0x37, 0xf2, 0x13, 0xef, 0xa6, 0xab, + 0x2c, 0x35, 0x53, 0x37, 0x2c, 0x3e, 0x13, 0x51, 0xfa, 0xea, 0x7d, 0x9a, 0x8b, 0x59, 0x3e, 0xc5, + 0x3c, 0x9f, 0xef, 0x5e, 0x40, 0x7d, 0xdb, 0xd7, 0x4b, 0xad, 0xbe, 0xc1, 0xf9, 0xeb, 0x9e, 0x6d, + 0xa2, 0x07, 0x18, 0x41, 0xd5, 0xec, 0x3b, 0x6f, 0x6c, 0x8b, 0x38, 0xae, 0x6d, 0xf4, 0x90, 0xd6, + 0x7d, 0xbf, 0xb4, 0x34, 0x86, 0xd3, 0x30, 0x14, 0x91, 0xc4, 0x16, 0xec, 0x53, 0x3e, 0xf6, 0x63, + 0xc9, 0x23, 0xdc, 0xf8, 0xd4, 0xca, 0x68, 0x7e, 0xd2, 0xa2, 0x3f, 0x68, 0x6b, 0xcf, 0xb5, 0xd7, + 0x26, 0x1c, 0x89, 0x68, 0xdc, 0xb9, 0x99, 0x87, 0x3c, 0x9a, 0xf0, 0xd1, 0x98, 0x47, 0x19, 0xe1, + 0xb7, 0x6f, 0xc7, 0xbe, 0xbc, 0x99, 0x5e, 0x75, 0x3c, 0x71, 0x7b, 0xbc, 0x64, 0x3e, 0xbe, 0x66, + 0x57, 0x91, 0xef, 0xa5, 0x7f, 0x39, 0xf1, 0xb1, 0xfa, 0x1d, 0xba, 0x4a, 0x7f, 0x8e, 0x7e, 0xf8, + 0x37, 0x00, 0x00, 0xff, 0xff, 0x94, 0xee, 0x4d, 0x7b, 0x3b, 0x09, 0x00, 0x00, } diff --git a/protos/peer/chaincode_proposal.pb.go b/protos/peer/chaincode_proposal.pb.go deleted file mode 100644 index 1b17da12e71..00000000000 --- a/protos/peer/chaincode_proposal.pb.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/chaincode_proposal.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// ChaincodeHeaderExtension is the Header's extentions message to be used when -// the Header's type is CHAINCODE. This extensions is used to specify which -// chaincode to invoke and what should appear on the ledger. -type ChaincodeHeaderExtension struct { - // The PayloadVisibility field controls to what extent the Proposal's payload - // (recall that for the type CHAINCODE, it is ChaincodeProposalPayload - // message) field will be visible in the final transaction and in the ledger. - // Ideally, it would be configurable, supporting at least 3 main “visibility - // modes”: - // 1. all bytes of the payload are visible; - // 2. only a hash of the payload is visible; - // 3. nothing is visible. - // Notice that the visibility function may be potentially part of the ESCC. - // In that case it overrides PayloadVisibility field. Finally notice that - // this field impacts the content of ProposalResponsePayload.proposalHash. - PayloadVisibility []byte `protobuf:"bytes,1,opt,name=payloadVisibility,proto3" json:"payloadVisibility,omitempty"` - // The ID of the chaincode to target. - ChaincodeID *ChaincodeID `protobuf:"bytes,2,opt,name=chaincodeID" json:"chaincodeID,omitempty"` -} - -func (m *ChaincodeHeaderExtension) Reset() { *m = ChaincodeHeaderExtension{} } -func (m *ChaincodeHeaderExtension) String() string { return proto.CompactTextString(m) } -func (*ChaincodeHeaderExtension) ProtoMessage() {} -func (*ChaincodeHeaderExtension) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } - -func (m *ChaincodeHeaderExtension) GetChaincodeID() *ChaincodeID { - if m != nil { - return m.ChaincodeID - } - return nil -} - -// ChaincodeProposalPayload is the Proposal's payload message to be used when -// the Header's type is CHAINCODE. It contains the arguments for this -// invocation. -type ChaincodeProposalPayload struct { - // Input contains the arguments for this invocation. If this invocation - // deploys a new chaincode, ESCC/VSCC are part of this field. - Input []byte `protobuf:"bytes,1,opt,name=Input,proto3" json:"Input,omitempty"` - // Transient contains data (e.g. cryptographic material) that might be used - // to implement some form of application-level confidentiality. The contents - // of this field are supposed to always be omitted from the transaction and - // excluded from the ledger. - Transient []byte `protobuf:"bytes,2,opt,name=Transient,proto3" json:"Transient,omitempty"` -} - -func (m *ChaincodeProposalPayload) Reset() { *m = ChaincodeProposalPayload{} } -func (m *ChaincodeProposalPayload) String() string { return proto.CompactTextString(m) } -func (*ChaincodeProposalPayload) ProtoMessage() {} -func (*ChaincodeProposalPayload) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } - -// ChaincodeAction contains the actions the events generated by the execution -// of the chaincode. -type ChaincodeAction struct { - // This field contains the read set and the write set produced by the - // chaincode executing this invocation. - Results []byte `protobuf:"bytes,1,opt,name=results,proto3" json:"results,omitempty"` - // This field contains the events generated by the chaincode executing this - // invocation. - Events []byte `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty"` -} - -func (m *ChaincodeAction) Reset() { *m = ChaincodeAction{} } -func (m *ChaincodeAction) String() string { return proto.CompactTextString(m) } -func (*ChaincodeAction) ProtoMessage() {} -func (*ChaincodeAction) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } - -func init() { - proto.RegisterType((*ChaincodeHeaderExtension)(nil), "protos.ChaincodeHeaderExtension") - proto.RegisterType((*ChaincodeProposalPayload)(nil), "protos.ChaincodeProposalPayload") - proto.RegisterType((*ChaincodeAction)(nil), "protos.ChaincodeAction") -} - -func init() { proto.RegisterFile("peer/chaincode_proposal.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 263 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x50, 0xd1, 0x4a, 0xc3, 0x30, - 0x14, 0x65, 0x82, 0x13, 0xef, 0x06, 0x62, 0x1c, 0x52, 0x44, 0x41, 0xfa, 0xa4, 0x28, 0x2d, 0x28, - 0x7e, 0x80, 0x56, 0xc1, 0xbd, 0xc8, 0x28, 0xe2, 0x83, 0x2f, 0x92, 0xa6, 0xd7, 0x35, 0x10, 0x93, - 0x90, 0xa4,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02, 0xeb, 0xb9, 0xef, 0xef, 0x93, 0x56, 0x86, 0xb3, - 0x3c, 0x5c, 0x95, 0x2f, 0x2a, 0xad, 0x42, 0xc1, 0xb7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x97, - 0xb9, 0x42, 0xce, 0x88, 0x01, 0x00, 0x00, -} diff --git a/protos/peer/chaincode_proposal.proto b/protos/peer/chaincode_proposal.proto deleted file mode 100644 index b5d30cd28ce..00000000000 --- a/protos/peer/chaincode_proposal.proto +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright IBM Corp. 2016 All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -syntax = "proto3"; - -option go_package = "github.com/hyperledger/fabric/protos/peer"; - -package protos; - -import "peer/chaincode.proto"; - -/* -The flow to get a CHAINCODE transaction approved goes as follows: - -1. client sends proposal to endorser -==================================== - -The proposal is basically a request to do something on a chaincode, that will -result on some action - some change in the state of a chaincode and/or some -data to be committed to the ledger; a proposal in general contains a header -(with some metadata describing it, such as the type, the identity of the -invoker, the time, the ID of the chain, a cryptographic nonce..) and a payload -(the chaincode ID, invocation arguments..). Optionally, it may contain actions -that the endorser may be asked to endorse, to emulate a submitting peer. A -chaincode proposal contains the following messages: - -SignedProposal -|\_ Signature (signature on the Proposal message by the creator specified in the header) - \_ Proposal - |\_ Header (the header for this proposal) - |\_ ChaincodeProposalPayload (the payload for this proposal) - \_ ChaincodeAction (the actions for this proposal - optional for a proposal) - -2. endorser sends proposal response back to client -================================================== - -The proposal response contains an endorser's response to a client's proposal. A -proposal response contains a success/error code, a response payload and a -signature (also referred to as endorsement) over the response payload. The -response payload contains a hash of the proposal (to securely link this -response to the corresponding proposal), a description of the action resulting -from the proposal and the endorser's signature over its payload. Formally, a -chaincode proposal response contains the following messages: - -ProposalResponse -|\_ Endorsement (the endorser's signature over the whole response payload) - \_ ProposalResponsePayload - \_ ChaincodeAction (the actions for this proposal) - -3. client assembles endorsements into a transaction -=================================================== - -A transaction message assembles one or more proposals and corresponding -responses into a message to be sent to orderers. After ordering, (batches of) -transactions are delivered to committing peers for validation and final -delivery into the ledger. A transaction contains one or more actions. Each of -them contains a header (same as that of the proposal that requested it), a -proposal payload (same as that of the proposal that requested it), a -description of the resulting action and signatures from each of the endorsers -that endorsed the action. - -SignedTransaction -|\_ Signature (signature on the Transaction message by the creator specified in the header) - \_ Transaction - \_ TransactionAction (1...n) - |\_ Header (1) (the header of the proposal that requested this action) - \_ ChaincodeActionPayload (1) - |\_ ChaincodeProposalPayload (1) (payload of the proposal that requested this action) - \_ ChaincodeEndorsedAction (1) - |\_ Endorsement (1...n) (endorsers' signatures over the whole response payload) - \_ ProposalResponsePayload - \_ ChaincodeAction (the actions for this proposal) -*/ - -// ChaincodeHeaderExtension is the Header's extentions message to be used when -// the Header's type is CHAINCODE. This extensions is used to specify which -// chaincode to invoke and what should appear on the ledger. -message ChaincodeHeaderExtension { - - // The PayloadVisibility field controls to what extent the Proposal's payload - // (recall that for the type CHAINCODE, it is ChaincodeProposalPayload - // message) field will be visible in the final transaction and in the ledger. - // Ideally, it would be configurable, supporting at least 3 main “visibility - // modes”: - // 1. all bytes of the payload are visible; - // 2. only a hash of the payload is visible; - // 3. nothing is visible. - // Notice that the visibility function may be potentially part of the ESCC. - // In that case it overrides PayloadVisibility field. Finally notice that - // this field impacts the content of ProposalResponsePayload.proposalHash. - bytes payloadVisibility = 1; - - // The ID of the chaincode to target. - ChaincodeID chaincodeID = 2; -} - -// ChaincodeProposalPayload is the Proposal's payload message to be used when -// the Header's type is CHAINCODE. It contains the arguments for this -// invocation. -message ChaincodeProposalPayload { - - // Input contains the arguments for this invocation. If this invocation - // deploys a new chaincode, ESCC/VSCC are part of this field. - bytes Input = 1; - - // Transient contains data (e.g. cryptographic material) that might be used - // to implement some form of application-level confidentiality. The contents - // of this field are supposed to always be omitted from the transaction and - // excluded from the ledger. - bytes Transient = 2; -} - -// ChaincodeAction contains the actions the events generated by the execution -// of the chaincode. -message ChaincodeAction { - - // This field contains the read set and the write set produced by the - // chaincode executing this invocation. - bytes results = 1; - - // This field contains the events generated by the chaincode executing this - // invocation. - bytes events = 2; -} diff --git a/protos/peer/chaincode_transaction.pb.go b/protos/peer/chaincode_transaction.pb.go deleted file mode 100644 index 95d3c4b69af..00000000000 --- a/protos/peer/chaincode_transaction.pb.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/chaincode_transaction.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// ChaincodeActionPayload is the message to be used for the TransactionAction's -// payload when the Header's type is set to CHAINCODE. It carries the -// chaincodeProposalPayload and an endorsed action to apply to the ledger. -type ChaincodeActionPayload struct { - // This field contains the bytes of the ChaincodeProposalPayload message from - // the original invocation (essentially the arguments) after the application - // of the visibility function. The main visibility modes are "full" (the - // entire ChaincodeProposalPayload message is included here), "hash" (only - // the hash of the ChaincodeProposalPayload message is included) or - // "nothing". This field will be used to check the consistency of - // ProposalResponsePayload.proposalHash. For the CHAINCODE type, - // ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader || - // f(ChaincodeProposalPayload)) where f is the visibility function. - ChaincodeProposalPayload []byte `protobuf:"bytes,1,opt,name=chaincodeProposalPayload,proto3" json:"chaincodeProposalPayload,omitempty"` - // The list of actions to apply to the ledger - Action *ChaincodeEndorsedAction `protobuf:"bytes,2,opt,name=action" json:"action,omitempty"` -} - -func (m *ChaincodeActionPayload) Reset() { *m = ChaincodeActionPayload{} } -func (m *ChaincodeActionPayload) String() string { return proto.CompactTextString(m) } -func (*ChaincodeActionPayload) ProtoMessage() {} -func (*ChaincodeActionPayload) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } - -func (m *ChaincodeActionPayload) GetAction() *ChaincodeEndorsedAction { - if m != nil { - return m.Action - } - return nil -} - -// ChaincodeEndorsedAction carries information about the endorsement of a -// specific proposal -type ChaincodeEndorsedAction struct { - // This is the bytes of the ProposalResponsePayload message signed by the - // endorsers. Recall that for the CHAINCODE type, the - // ProposalResponsePayload's extenstion field carries a ChaincodeAction - ProposalResponsePayload []byte `protobuf:"bytes,1,opt,name=proposalResponsePayload,proto3" json:"proposalResponsePayload,omitempty"` - // The endorsement of the proposal, basically the endorser's signature over - // proposalResponsePayload - Endorsements []*Endorsement `protobuf:"bytes,2,rep,name=endorsements" json:"endorsements,omitempty"` -} - -func (m *ChaincodeEndorsedAction) Reset() { *m = ChaincodeEndorsedAction{} } -func (m *ChaincodeEndorsedAction) String() string { return proto.CompactTextString(m) } -func (*ChaincodeEndorsedAction) ProtoMessage() {} -func (*ChaincodeEndorsedAction) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } - -func (m *ChaincodeEndorsedAction) GetEndorsements() []*Endorsement { - if m != nil { - return m.Endorsements - } - return nil -} - -func init() { - proto.RegisterType((*ChaincodeActionPayload)(nil), "protos.ChaincodeActionPayload") - proto.RegisterType((*ChaincodeEndorsedAction)(nil), "protos.ChaincodeEndorsedAction") -} - -func init() { proto.RegisterFile("peer/chaincode_transaction.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4f, 0xc3, 0x30, - 0x14, 0x84, 0x15, 0x90, 0x3a, 0x98, 0x4e, 0x41, 0xa2, 0x11, 0x0b, 0x55, 0x59, 0x40, 0x48, 0x89, - 0x04, 0x03, 0x88, 0x0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16, 0x5c, 0x07, 0x6a, 0x3f, 0xee, 0x5a, - 0xc5, 0x84, 0xea, 0x7f, 0xea, 0x26, 0x0e, 0xff, 0xf4, 0x17, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xa1, - 0x56, 0xa7, 0xa3, 0x01, 0x00, 0x00, -} diff --git a/protos/peer/chaincode_transaction.proto b/protos/peer/chaincode_transaction.proto deleted file mode 100644 index 43a1c3563a2..00000000000 --- a/protos/peer/chaincode_transaction.proto +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright IBM Corp. 2016 All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -syntax = "proto3"; - -package protos; - -option go_package = "github.com/hyperledger/fabric/protos/peer"; - -import "peer/fabric_proposal_response.proto"; - -// ChaincodeActionPayload is the message to be used for the TransactionAction's -// payload when the Header's type is set to CHAINCODE. It carries the -// chaincodeProposalPayload and an endorsed action to apply to the ledger. -message ChaincodeActionPayload { - - // This field contains the bytes of the ChaincodeProposalPayload message from - // the original invocation (essentially the arguments) after the application - // of the visibility function. The main visibility modes are "full" (the - // entire ChaincodeProposalPayload message is included here), "hash" (only - // the hash of the ChaincodeProposalPayload message is included) or - // "nothing". This field will be used to check the consistency of - // ProposalResponsePayload.proposalHash. For the CHAINCODE type, - // ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader || - // f(ChaincodeProposalPayload)) where f is the visibility function. - bytes chaincodeProposalPayload = 1; - - // The list of actions to apply to the ledger - ChaincodeEndorsedAction action = 2; -} - -// ChaincodeEndorsedAction carries information about the endorsement of a -// specific proposal -message ChaincodeEndorsedAction { - - // This is the bytes of the ProposalResponsePayload message signed by the - // endorsers. Recall that for the CHAINCODE type, the - // ProposalResponsePayload's extenstion field carries a ChaincodeAction - bytes proposalResponsePayload = 1; - - // The endorsement of the proposal, basically the endorser's signature over - // proposalResponsePayload - repeated Endorsement endorsements = 2; -} diff --git a/protos/peer/chaincodeevent.pb.go b/protos/peer/chaincodeevent.pb.go index 08ba1c89f1e..168f9c36cd3 100644 --- a/protos/peer/chaincodeevent.pb.go +++ b/protos/peer/chaincodeevent.pb.go @@ -2,73 +2,6 @@ // source: peer/chaincodeevent.proto // DO NOT EDIT! -/* -Package peer is a generated protocol buffer package. - -It is generated from these files: - peer/chaincodeevent.proto - peer/chaincode_proposal.proto - peer/chaincode.proto - peer/chaincode_transaction.proto - peer/configuration.proto - peer/events.proto - peer/fabric_message.proto - peer/fabric_proposal.proto - peer/fabric_proposal_response.proto - peer/fabric.proto - peer/fabric_service.proto - peer/fabric_transaction.proto - peer/server_admin.proto - -It has these top-level messages: - ChaincodeEvent - ChaincodeHeaderExtension - ChaincodeProposalPayload - ChaincodeAction - ChaincodeID - ChaincodeInput - ChaincodeSpec - ChaincodeDeploymentSpec - ChaincodeInvocationSpec - ChaincodeProposalContext - ChaincodeMessage - PutStateInfo - RangeQueryState - RangeQueryStateNext - RangeQueryStateClose - RangeQueryStateKeyValue - RangeQueryStateResponse - ChaincodeActionPayload - ChaincodeEndorsedAction - AnchorPeers - AnchorPeer - ChaincodeReg - Interest - Register - Rejection - Unregister - Event - Message - SignedProposal - Proposal - ProposalResponse - Response - ProposalResponsePayload - Endorsement - PeerAddress - PeerID - PeerEndpoint - PeersMessage - PeersAddresses - BlockchainInfo - SignedTransaction - InvalidTransaction - Transaction - TransactionAction - ServerStatus - LogLevelRequest - LogLevelResponse -*/ package peer import proto "github.com/golang/protobuf/proto" @@ -80,12 +13,6 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - // ChaincodeEvent is used for events and registrations that are specific to chaincode // string type - "chaincode" type ChaincodeEvent struct { @@ -98,26 +25,26 @@ type ChaincodeEvent struct { func (m *ChaincodeEvent) Reset() { *m = ChaincodeEvent{} } func (m *ChaincodeEvent) String() string { return proto.CompactTextString(m) } func (*ChaincodeEvent) ProtoMessage() {} -func (*ChaincodeEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*ChaincodeEvent) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } func init() { proto.RegisterType((*ChaincodeEvent)(nil), "protos.ChaincodeEvent") } -func init() { proto.RegisterFile("peer/chaincodeevent.proto", fileDescriptor0) } +func init() { proto.RegisterFile("peer/chaincodeevent.proto", fileDescriptor2) } -var fileDescriptor0 = []byte{ - // 184 bytes of a gzipped FileDescriptorProto +var fileDescriptor2 = []byte{ + // 186 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x48, 0x4d, 0x2d, 0xd2, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0x4b, 0xce, 0x4f, 0x49, 0x4d, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x4a, 0x75, 0x5c, 0x7c, 0xce, 0x30, 0x79, 0x57, 0x90, 0xbc, 0x90, 0x02, 0x17, 0x37, 0x5c, 0x87, 0xa7, 0x8b, 0x04, 0xa3, 0x02, 0xa3, - 0x06, 0x67, 0x10, 0xb2, 0x90, 0x90, 0x10, 0x17, 0x4b, 0x49, 0x05, 0x50, 0x8a, 0x09, 0x2c, 0x05, - 0x66, 0x0b, 0xc9, 0x70, 0x71, 0x82, 0x8d, 0xf7, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x06, 0x4b, 0x20, - 0x04, 0x84, 0x24, 0xb8, 0xd8, 0x0b, 0x12, 0x2b, 0x73, 0xf2, 0x13, 0x53, 0x24, 0x58, 0x80, 0x72, - 0x3c, 0x41, 0x30, 0xae, 0x93, 0x33, 0x97, 0x58, 0x7e, 0x51, 0xba, 0x5e, 0x46, 0x65, 0x41, 0x6a, - 0x51, 0x4e, 0x6a, 0x4a, 0x7a, 0x6a, 0x11, 0xc4, 0x81, 0xc5, 0x51, 0x9a, 0xe9, 0x99, 0x25, 0x19, - 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x48, 0xd2, 0xfa, 0x69, 0x89, 0x49, 0x45, 0x99, 0xc9, - 0xfa, 0x10, 0x55, 0xfa, 0x20, 0x1f, 0x26, 0x41, 0x3c, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x78, 0x83, 0xed, 0x60, 0xf0, 0x00, 0x00, 0x00, + 0x06, 0x67, 0x10, 0xb2, 0x90, 0x90, 0x10, 0x17, 0x4b, 0x49, 0x85, 0xa7, 0x8b, 0x04, 0x13, 0x58, + 0x0a, 0xcc, 0x16, 0x92, 0xe1, 0xe2, 0x04, 0x1b, 0xef, 0x97, 0x98, 0x9b, 0x2a, 0xc1, 0x0c, 0x96, + 0x40, 0x08, 0x08, 0x49, 0x70, 0xb1, 0x17, 0x24, 0x56, 0xe6, 0xe4, 0x27, 0xa6, 0x48, 0xb0, 0x28, + 0x30, 0x6a, 0xf0, 0x04, 0xc1, 0xb8, 0x4e, 0xce, 0x5c, 0x62, 0xf9, 0x45, 0xe9, 0x7a, 0x19, 0x95, + 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9, 0xa9, 0x45, 0x10, 0x07, 0x16, 0x47, 0x69, 0xa6, 0x67, + 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x23, 0x49, 0xeb, 0xa7, 0x25, 0x26, 0x15, + 0x65, 0x26, 0xeb, 0x43, 0x54, 0xe9, 0x83, 0x7c, 0x98, 0x04, 0xf1, 0x8c, 0x31, 0x20, 0x00, 0x00, + 0xff, 0xff, 0x78, 0x83, 0xed, 0x60, 0xf0, 0x00, 0x00, 0x00, } diff --git a/protos/peer/configuration.pb.go b/protos/peer/configuration.pb.go index 44b0b6d9f46..88219a17b04 100644 --- a/protos/peer/configuration.pb.go +++ b/protos/peer/configuration.pb.go @@ -21,7 +21,7 @@ type AnchorPeers struct { func (m *AnchorPeers) Reset() { *m = AnchorPeers{} } func (m *AnchorPeers) String() string { return proto.CompactTextString(m) } func (*AnchorPeers) ProtoMessage() {} -func (*AnchorPeers) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } +func (*AnchorPeers) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } func (m *AnchorPeers) GetAnchorPees() []*AnchorPeer { if m != nil { @@ -45,27 +45,27 @@ type AnchorPeer struct { func (m *AnchorPeer) Reset() { *m = AnchorPeer{} } func (m *AnchorPeer) String() string { return proto.CompactTextString(m) } func (*AnchorPeer) ProtoMessage() {} -func (*AnchorPeer) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } +func (*AnchorPeer) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } func init() { proto.RegisterType((*AnchorPeers)(nil), "protos.AnchorPeers") proto.RegisterType((*AnchorPeer)(nil), "protos.AnchorPeer") } -func init() { proto.RegisterFile("peer/configuration.proto", fileDescriptor4) } +func init() { proto.RegisterFile("peer/configuration.proto", fileDescriptor3) } -var fileDescriptor4 = []byte{ - // 183 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x0f, 0x82, 0x30, - 0x10, 0x85, 0x83, 0xa8, 0x89, 0x87, 0x53, 0x27, 0x46, 0xc3, 0x84, 0x31, 0xa1, 0x09, 0xfe, 0x02, - 0x74, 0x61, 0x24, 0x1d, 0xdd, 0xa0, 0x16, 0x68, 0xa2, 0x1c, 0xb9, 0x96, 0xc1, 0x7f, 0x6f, 0x29, - 0x31, 0x38, 0xdd, 0xbb, 0xef, 0xde, 0x4b, 0xee, 0x41, 0x3c, 0x2a, 0x45, 0x5c, 0xe2, 0xd0, 0xea, - 0x6e, 0xa2, 0xda, 0x6a, 0x1c, 0xb2, 0x91, 0xd0, 0x22, 0xdb, 0xfb, 0x61, 0x92, 0x02, 0xa2, 0x62, - 0x90, 0x3d, 0x52, 0xe5, 0x9c, 0x86, 0xe5, 0x00, 0xf5, 0x6f, 0x35, 0x71, 0x70, 0x0a, 0xd3, 0x28, - 0x67, 0x4b, 0xc4, 0x64, 0xab, 0x51, 0xfc, 0xb9, 0x92, 0x12, 0x60, 0xbd, 0x30, 0x06, 0xdb, 0x12, - 0x8d, 0x75, 0xd9, 0x20, 0x3d, 0x08, 0xaf, 0x67, 0x56, 0x21, 0xd9, 0x78, 0xe3, 0xd8, 0x4e, 0x78, - 0x3d, 0xb3, 0xbb, 0x72, 0x2c, 0x74, 0xec, 0x28, 0xbc, 0xbe, 0x5d, 0x1e, 0xe7, 0x4e, 0xdb, 0x7e, - 0x6a, 0x32, 0x89, 0x6f, 0xde, 0x7f, 0x46, 0x45, 0x2f, 0xf5, 0xec, 0x5c, 0x85, 0xb6, 0x6e, 0x48, - 0x4b, 0xbe, 0x3c, 0xc2, 0xe7, 0x56, 0xcd, 0xd2, 0xe0, 0xfa, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc2, - 0xa8, 0x53, 0x84, 0xe4, 0x00, 0x00, 0x00, +var fileDescriptor3 = []byte{ + // 188 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x6f, 0x83, 0x30, + 0x10, 0x85, 0xe5, 0xd2, 0x56, 0xaa, 0xe9, 0xe4, 0xc9, 0xa3, 0xc5, 0xe4, 0xaa, 0x12, 0x96, 0xe8, + 0x2f, 0xa0, 0x59, 0x18, 0x91, 0xc7, 0x6c, 0xe0, 0x1c, 0x60, 0x29, 0xe1, 0xd0, 0xd9, 0x0c, 0xf9, + 0xf7, 0x11, 0x46, 0x11, 0x99, 0xee, 0xbb, 0x77, 0xef, 0xa4, 0xf7, 0xb8, 0x5c, 0x00, 0xc8, 0x38, + 0x9c, 0x07, 0x3f, 0xae, 0xd4, 0x45, 0x8f, 0x73, 0xb9, 0x10, 0x46, 0x14, 0x9f, 0x69, 0x84, 0xa2, + 0xe6, 0x79, 0x3d, 0xbb, 0x09, 0xa9, 0x05, 0xa0, 0x20, 0x2a, 0xce, 0xbb, 0xe7, 0x1a, 0x24, 0x53, + 0x99, 0xce, 0x2b, 0xb1, 0xbf, 0x84, 0xf2, 0x30, 0xda, 0x17, 0x57, 0xd1, 0x70, 0x7e, 0x5c, 0x84, + 0xe0, 0xef, 0x0d, 0x86, 0x28, 0x99, 0x62, 0xfa, 0xcb, 0x26, 0xde, 0xb4, 0x16, 0x29, 0xca, 0x37, + 0xc5, 0xf4, 0x87, 0x4d, 0xbc, 0x69, 0x27, 0xa0, 0x28, 0x33, 0xc5, 0xf4, 0xb7, 0x4d, 0xfc, 0xff, + 0x7b, 0xfe, 0x19, 0x7d, 0x9c, 0xd6, 0xbe, 0x74, 0x78, 0x33, 0xd3, 0x7d, 0x01, 0xba, 0xc2, 0x65, + 0x04, 0x32, 0x43, 0xd7, 0x93, 0x77, 0x66, 0x0f, 0x62, 0xb6, 0x56, 0xfd, 0xde, 0xe0, 0xef, 0x11, + 0x00, 0x00, 0xff, 0xff, 0xc2, 0xa8, 0x53, 0x84, 0xe4, 0x00, 0x00, 0x00, } diff --git a/protos/peer/events.pb.go b/protos/peer/events.pb.go index 78cef3b9daa..f31b32bbae8 100644 --- a/protos/peer/events.pb.go +++ b/protos/peer/events.pb.go @@ -44,7 +44,7 @@ var EventType_value = map[string]int32{ func (x EventType) String() string { return proto.EnumName(EventType_name, int32(x)) } -func (EventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } +func (EventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } // ChaincodeReg is used for registering chaincode Interests // when EventType is CHAINCODE @@ -56,7 +56,7 @@ type ChaincodeReg struct { func (m *ChaincodeReg) Reset() { *m = ChaincodeReg{} } func (m *ChaincodeReg) String() string { return proto.CompactTextString(m) } func (*ChaincodeReg) ProtoMessage() {} -func (*ChaincodeReg) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } +func (*ChaincodeReg) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } type Interest struct { EventType EventType `protobuf:"varint,1,opt,name=eventType,enum=protos.EventType" json:"eventType,omitempty"` @@ -73,7 +73,7 @@ type Interest struct { func (m *Interest) Reset() { *m = Interest{} } func (m *Interest) String() string { return proto.CompactTextString(m) } func (*Interest) ProtoMessage() {} -func (*Interest) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} } +func (*Interest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } type isInterest_RegInfo interface { isInterest_RegInfo() @@ -164,7 +164,7 @@ type Register struct { func (m *Register) Reset() { *m = Register{} } func (m *Register) String() string { return proto.CompactTextString(m) } func (*Register) ProtoMessage() {} -func (*Register) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} } +func (*Register) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} } func (m *Register) GetEvents() []*Interest { if m != nil { @@ -183,7 +183,7 @@ type Rejection struct { func (m *Rejection) Reset() { *m = Rejection{} } func (m *Rejection) String() string { return proto.CompactTextString(m) } func (*Rejection) ProtoMessage() {} -func (*Rejection) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{3} } +func (*Rejection) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} } func (m *Rejection) GetTx() *Transaction { if m != nil { @@ -200,7 +200,7 @@ type Unregister struct { func (m *Unregister) Reset() { *m = Unregister{} } func (m *Unregister) String() string { return proto.CompactTextString(m) } func (*Unregister) ProtoMessage() {} -func (*Unregister) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{4} } +func (*Unregister) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} } func (m *Unregister) GetEvents() []*Interest { if m != nil { @@ -225,7 +225,7 @@ type Event struct { func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{5} } +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} } type isEvent_Event interface { isEvent_Event() @@ -539,42 +539,43 @@ var _Events_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: fileDescriptor5, -} - -func init() { proto.RegisterFile("peer/events.proto", fileDescriptor5) } - -var fileDescriptor5 = []byte{ - // 495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x53, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x6d, 0xda, 0xb5, 0x6b, 0x6e, 0xd7, 0x29, 0xbd, 0x43, 0x28, 0x54, 0x20, 0x4d, 0x41, 0x48, - 0x65, 0x48, 0x0d, 0x94, 0x8a, 0x67, 0x48, 0x16, 0xb1, 0xc0, 0x68, 0x25, 0x53, 0x5e, 0x78, 0x41, - 0x69, 0xe6, 0xb5, 0x81, 0x35, 0xa9, 0x1c, 0x0f, 0xc1, 0x2f, 0xf0, 0xc8, 0x17, 0xe3, 0x3a, 0x76, - 0x92, 0xd1, 0xa7, 0x3d, 0xc5, 0xf6, 0x39, 0xe7, 0xde, 0xe3, 0x13, 0x5f, 0x18, 0x6c, 0x29, 0x65, - 0x2e, 0xfd, 0x49, 0x53, 0x9e, 0x8f, 0xb7, 0x2c, 0xe3, 0x19, 0x76, 0xe4, 0x27, 0x1f, 0x9e, 0xc4, - 0xd9, 0x66, 0x93, 0xa5, 0x6e, 0x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x43, 0xaf, 0x56, 0xe5, 0x68, 0xb9, 0x85, 0xc6, 0xdd, 0x4d, 0xdb, 0xb2, 0x98, 0xd5, - 0xd7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xee, 0x26, 0x8f, 0xc7, 0x03, 0x00, 0x00, + Metadata: fileDescriptor4, +} + +func init() { proto.RegisterFile("peer/events.proto", fileDescriptor4) } + +var fileDescriptor4 = []byte{ + // 498 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x6f, 0xd3, 0x30, + 0x18, 0xc5, 0x93, 0x6e, 0xed, 0x92, 0xaf, 0xeb, 0x94, 0x7e, 0x43, 0x53, 0xa8, 0x38, 0x54, 0x41, + 0x48, 0x65, 0x48, 0x0d, 0x84, 0x8a, 0x33, 0x24, 0x8b, 0x48, 0x60, 0xb4, 0x92, 0x29, 0x17, 0x6e, + 0x69, 0xe6, 0xa5, 0x81, 0x35, 0xa9, 0x1c, 0x0f, 0x6d, 0xff, 0x02, 0x47, 0xfe, 0x62, 0x54, 0xc7, + 0x4e, 0x3a, 0x76, 0xe2, 0x94, 0xda, 0xef, 0xbd, 0xcf, 0xaf, 0x3f, 0xd9, 0x30, 0xdc, 0x52, 0xca, + 0x5c, 0xfa, 0x8b, 0x16, 0xbc, 0x9a, 0x6e, 0x59, 0xc9, 0x4b, 0xec, 0x89, 0x4f, 0x35, 0x3a, 0x4d, + 0xcb, 0xcd, 0xa6, 0x2c, 0xdc, 0xfa, 0x53, 0x8b, 0xa3, 0xa7, 0xc2, 0x9f, 0xae, 0x93, 0xbc, 0x48, + 0xcb, 0x2b, 0x2a, 0x82, 0x52, 0x3a, 0x13, 0x12, 0x67, 0x49, 0x51, 0x25, 0x29, 0xcf, 0x55, 0xc4, + 0x99, 0xc3, 0x71, 0xa0, 0xfc, 0x84, 0x66, 0x38, 0x86, 0x7e, 0x93, 0x8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91, 0x46, + 0x6a, 0x15, 0xdf, 0xc3, 0x49, 0xc3, 0x4e, 0x1c, 0x64, 0x1f, 0x08, 0xff, 0xd9, 0x23, 0xd2, 0x42, + 0x8d, 0x34, 0xf2, 0x8f, 0x1f, 0xdf, 0x80, 0xc9, 0x14, 0x28, 0xfb, 0x50, 0x84, 0x87, 0x6d, 0x33, + 0x29, 0x44, 0x1a, 0x69, 0x5d, 0x38, 0x03, 0xb8, 0x6d, 0x68, 0xd8, 0x5d, 0x91, 0x41, 0x95, 0x69, + 0x39, 0x45, 0x1a, 0xd9, 0xf3, 0xf9, 0x47, 0x12, 0xc5, 0xb9, 0x0f, 0x66, 0x73, 0x6f, 0xf0, 0x18, + 0x0c, 0x12, 0x7e, 0x8c, 0xbf, 0x2e, 0x43, 0x62, 0x69, 0x68, 0x42, 0xd7, 0xbf, 0x5c, 0x04, 0x9f, + 0x2d, 0x1d, 0x07, 0x60, 0x06, 0xd1, 0x87, 0x78, 0x1e, 0x2c, 0x2e, 0x42, 0xab, 0xb3, 0x5b, 0x92, + 0xf0, 0x53, 0x18, 0x2c, 0xe3, 0xc5, 0xdc, 0x3a, 0xf0, 0x66, 0xd0, 0x13, 0x33, 0x2a, 0x3c, 0x87, + 0xc3, 0x60, 0x9d, 0x70, 0x1c, 0x3c, 0xb8, 0x93, 0xa3, 0x87, 0x4b, 0x47, 0x9b, 0xe8, 0xaf, 0x75, + 0xff, 0xd5, 0xf7, 0x97, 0x59, 0xce, 0xd7, 0xb7, 0xab, 0x1d, 0x4d, 0x77, 0x7d, 0xbf, 0xa5, 0xec, + 0x86, 0x5e, 0x65, 0x94, 0xb9, 0xd7, 0xc9, 0x8a, 0xe5, 0xa9, 0x5b, 0x67, 0xdc, 0xdd, 0x33, 0x5b, + 0xd5, 0x8f, 0xf4, 0xed, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x71, 0xd9, 0x97, 0xc0, 0x03, + 0x00, 0x00, } diff --git a/protos/peer/events.proto b/protos/peer/events.proto index af2ea8ebac6..f3abf0a4946 100644 --- a/protos/peer/events.proto +++ b/protos/peer/events.proto @@ -18,7 +18,7 @@ syntax = "proto3"; import "common/common.proto"; import "peer/chaincodeevent.proto"; -import "peer/fabric_transaction.proto"; +import "peer/transaction.proto"; option go_package = "github.com/hyperledger/fabric/protos/peer"; diff --git a/protos/peer/fabric.pb.go b/protos/peer/fabric.pb.go deleted file mode 100644 index d1fc3521ed5..00000000000 --- a/protos/peer/fabric.pb.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/fabric.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type PeerEndpoint_Type int32 - -const ( - PeerEndpoint_UNDEFINED PeerEndpoint_Type = 0 - PeerEndpoint_VALIDATOR PeerEndpoint_Type = 1 - PeerEndpoint_NON_VALIDATOR PeerEndpoint_Type = 2 -) - -var PeerEndpoint_Type_name = map[int32]string{ - 0: "UNDEFINED", - 1: "VALIDATOR", - 2: "NON_VALIDATOR", -} -var PeerEndpoint_Type_value = map[string]int32{ - "UNDEFINED": 0, - "VALIDATOR": 1, - "NON_VALIDATOR": 2, -} - -func (x PeerEndpoint_Type) String() string { - return proto.EnumName(PeerEndpoint_Type_name, int32(x)) -} -func (PeerEndpoint_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor9, []int{2, 0} } - -type PeerAddress struct { - Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"` - Port int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` -} - -func (m *PeerAddress) Reset() { *m = PeerAddress{} } -func (m *PeerAddress) String() string { return proto.CompactTextString(m) } -func (*PeerAddress) ProtoMessage() {} -func (*PeerAddress) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{0} } - -type PeerID struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` -} - -func (m *PeerID) Reset() { *m = PeerID{} } -func (m *PeerID) String() string { return proto.CompactTextString(m) } -func (*PeerID) ProtoMessage() {} -func (*PeerID) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{1} } - -type PeerEndpoint struct { - ID *PeerID `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` - Type PeerEndpoint_Type `protobuf:"varint,3,opt,name=type,enum=protos.PeerEndpoint_Type" json:"type,omitempty"` - PkiID []byte `protobuf:"bytes,4,opt,name=pkiID,proto3" json:"pkiID,omitempty"` -} - -func (m *PeerEndpoint) Reset() { *m = PeerEndpoint{} } -func (m *PeerEndpoint) String() string { return proto.CompactTextString(m) } -func (*PeerEndpoint) ProtoMessage() {} -func (*PeerEndpoint) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{2} } - -func (m *PeerEndpoint) GetID() *PeerID { - if m != nil { - return m.ID - } - return nil -} - -type PeersMessage struct { - Peers []*PeerEndpoint `protobuf:"bytes,1,rep,name=peers" json:"peers,omitempty"` -} - -func (m *PeersMessage) Reset() { *m = PeersMessage{} } -func (m *PeersMessage) String() string { return proto.CompactTextString(m) } -func (*PeersMessage) ProtoMessage() {} -func (*PeersMessage) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{3} } - -func (m *PeersMessage) GetPeers() []*PeerEndpoint { - if m != nil { - return m.Peers - } - return nil -} - -type PeersAddresses struct { - Addresses []string `protobuf:"bytes,1,rep,name=addresses" json:"addresses,omitempty"` -} - -func (m *PeersAddresses) Reset() { *m = PeersAddresses{} } -func (m *PeersAddresses) String() string { return proto.CompactTextString(m) } -func (*PeersAddresses) ProtoMessage() {} -func (*PeersAddresses) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{4} } - -// Contains information about the blockchain ledger such as height, current -// block hash, and previous block hash. -type BlockchainInfo struct { - Height uint64 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"` - CurrentBlockHash []byte `protobuf:"bytes,2,opt,name=currentBlockHash,proto3" json:"currentBlockHash,omitempty"` - PreviousBlockHash []byte `protobuf:"bytes,3,opt,name=previousBlockHash,proto3" json:"previousBlockHash,omitempty"` -} - -func (m *BlockchainInfo) Reset() { *m = BlockchainInfo{} } -func (m *BlockchainInfo) String() string { return proto.CompactTextString(m) } -func (*BlockchainInfo) ProtoMessage() {} -func (*BlockchainInfo) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{5} } - -func init() { - proto.RegisterType((*PeerAddress)(nil), "protos.PeerAddress") - proto.RegisterType((*PeerID)(nil), "protos.PeerID") - proto.RegisterType((*PeerEndpoint)(nil), "protos.PeerEndpoint") - proto.RegisterType((*PeersMessage)(nil), "protos.PeersMessage") - proto.RegisterType((*PeersAddresses)(nil), "protos.PeersAddresses") - proto.RegisterType((*BlockchainInfo)(nil), "protos.BlockchainInfo") - proto.RegisterEnum("protos.PeerEndpoint_Type", PeerEndpoint_Type_name, PeerEndpoint_Type_value) -} - -func init() { proto.RegisterFile("peer/fabric.proto", fileDescriptor9) } - -var fileDescriptor9 = []byte{ - // 391 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x52, 0x5d, 0x6b, 0xe2, 0x40, - 0x14, 0xdd, 0x68, 0x74, 0xc9, 0x55, 0x83, 0x0e, 0xb2, 0x64, 0x41, 0x96, 0x25, 0x4f, 0xfb, 0x99, - 0x80, 0xcb, 0xb2, 0xb0, 0x6f, 0x4a, 0x5c, 0x36, 0xd0, 0xc6, 0x32, 0xd8, 0x3e, 0xf4, 0xa5, 0xc4, - 0x64, 0x4c, 0x82, 0x9a, 0x09, 0x33, 0xb1, 0xd0, 0xd7, 0xfe, 0xb8, 0xfe, 0xae, 0xce, 0x87, 0xa9, - 0x05, 0xfb, 0x34, 0xf7, 0x9c, 0x7b, 0xee, 0x9d, 0x7b, 0xee, 0x0c, 0x8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4b, 0x2c, 0xac, 0xb4, 0x85, 0x95, 0xf1, 0x5b, 0xe3, 0x60, 0x2d, 0x71, 0x3d, 0xb0, - 0x55, 0xed, 0x71, 0xb5, 0x84, 0xa3, 0x09, 0x58, 0x71, 0x03, 0x54, 0x07, 0x0b, 0x9f, 0x08, 0xf7, - 0xd1, 0x00, 0x7b, 0xbe, 0xa3, 0xc9, 0x36, 0xc9, 0xe3, 0xa2, 0x0c, 0xcb, 0x0d, 0x45, 0x1f, 0xa0, - 0x9b, 0x93, 0x22, 0xcb, 0xf5, 0x7b, 0x98, 0xf8, 0x88, 0xc4, 0x18, 0xc3, 0xe4, 0xc0, 0x18, 0x29, - 0x6b, 0x55, 0xf0, 0x3f, 0xe6, 0xb9, 0xda, 0x5b, 0x1f, 0x9f, 0xf1, 0xe8, 0x87, 0x78, 0x7d, 0x46, - 0xee, 0x0b, 0x7a, 0xe0, 0x27, 0x71, 0x5b, 0x89, 0xcf, 0x13, 0xf3, 0xef, 0xb7, 0x5f, 0xb3, 0xa2, - 0xce, 0x0f, 0x6b, 0x2f, 0xa1, 0x7b, 0x3f, 0x17, 0x4b, 0x63, 0x3b, 0x92, 0x66, 0x2f, 0xbf, 0xc7, - 0xd7, 0x86, 0x7d, 0x69, 0x71, 0xad, 0xff, 0xd0, 0xaf, 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, - 0x30, 0x01, 0x3f, 0x5f, 0x02, 0x00, 0x00, -} diff --git a/protos/peer/fabric_message.pb.go b/protos/peer/fabric_message.pb.go deleted file mode 100644 index effb15630ba..00000000000 --- a/protos/peer/fabric_message.pb.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/fabric_message.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Message_Type int32 - -const ( - // Undefined exists to prevent invalid message construction. - Message_UNDEFINED Message_Type = 0 - // Handshake messages. - Message_DISCOVERY Message_Type = 1 - // Sent to catch up with existing peers. - Message_SYNC Message_Type = 2 -) - -var Message_Type_name = map[int32]string{ - 0: "UNDEFINED", - 1: "DISCOVERY", - 2: "SYNC", -} -var Message_Type_value = map[string]int32{ - "UNDEFINED": 0, - "DISCOVERY": 1, - "SYNC": 2, -} - -func (x Message_Type) String() string { - return proto.EnumName(Message_Type_name, int32(x)) -} -func (Message_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor6, []int{0, 0} } - -// A Message encapsulates a payload of the indicated type in this message. -type Message struct { - // Type of this message. - Type Message_Type `protobuf:"varint,1,opt,name=type,enum=protos.Message_Type" json:"type,omitempty"` - // Version indicates message protocol version. - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` - // The payload in this message. The way it should be unmarshaled - // depends in the type field - Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } - -func init() { - proto.RegisterType((*Message)(nil), "protos.Message") - proto.RegisterEnum("protos.Message_Type", Message_Type_name, Message_Type_value) -} - -func init() { proto.RegisterFile("peer/fabric_message.proto", fileDescriptor6) } - -var fileDescriptor6 = []byte{ - // 208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x48, 0x4d, 0x2d, - 0xd2, 0x4f, 0x4b, 0x4c, 0x2a, 0xca, 0x4c, 0x8e, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x4a, 0xd3, 0x19, 0xb9, 0xd8, 0x7d, - 0x21, 0x32, 0x42, 0x1a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x7c, - 0x46, 0x22, 0x10, 0x95, 0xc5, 0x7a, 0x50, 0x69, 0xbd, 0x10, 0xa0, 0x5c, 0x10, 0x58, 0x85, 0x90, - 0x04, 0x17, 0x7b, 0x59, 0x6a, 0x51, 0x71, 0x66, 0x7e, 0x9e, 0x04, 0x13, 0x50, 0x31, 0x6b, 0x10, - 0x8c, 0x0b, 0x92, 0x29, 0x48, 0xac, 0xcc, 0xc9, 0x4f, 0x4c, 0x91, 0x60, 0x06, 0xca, 0xf0, 0x04, - 0xc1, 0xb8, 0x4a, 0x7a, 0x5c, 0x2c, 0x20, 0x13, 0x84, 0x78, 0xb9, 0x38, 0x43, 0xfd, 0x5c, 0x5c, - 0xdd, 0x3c, 0xfd, 0x5c, 0x5d, 0x04, 0x18, 0x40, 0x5c, 0x17, 0xcf, 0x60, 0x67, 0xff, 0x30, 0xd7, - 0xa0, 0x48, 0x01, 0x46, 0x21, 0x0e, 0x2e, 0x96, 0xe0, 0x48, 0x3f, 0x67, 0x01, 0x26, 0x27, 0xed, - 0x28, 0xcd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x0c, 0xa0, 0xd6, - 0xa2, 0x9c, 0xd4, 0x94, 0x74, 0xb8, 0x87, 0xf4, 0x21, 0xce, 0xd3, 0x07, 0xf9, 0x31, 0x09, 0xe2, - 0x1d, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x59, 0x84, 0x5f, 0xf2, 0x00, 0x00, 0x00, -} diff --git a/protos/peer/fabric_message.proto b/protos/peer/fabric_message.proto deleted file mode 100644 index 9bbcfe62927..00000000000 --- a/protos/peer/fabric_message.proto +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright IBM Corp. 2016 All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -syntax = "proto3"; - -option go_package = "github.com/hyperledger/fabric/protos/peer"; - -package protos; - -// A Message encapsulates a payload of the indicated type in this message. -message Message { - - enum Type { - - // Undefined exists to prevent invalid message construction. - UNDEFINED = 0; - - // Handshake messages. - DISCOVERY = 1; - - // Sent to catch up with existing peers. - SYNC = 2; - } - - // Type of this message. - Type type = 1; - - // Version indicates message protocol version. - int32 version = 2; - - // The payload in this message. The way it should be unmarshaled - // depends in the type field - bytes payload = 3; - -} diff --git a/protos/peer/fabric_proposal.pb.go b/protos/peer/fabric_proposal.pb.go deleted file mode 100644 index 3904e87fddf..00000000000 --- a/protos/peer/fabric_proposal.pb.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/fabric_proposal.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This structure is necessary to sign the proposal which contains the header -// and the payload. Without this structure, we would have to concatenate the -// header and the payload to verify the signature, which could be expensive -// with large payload -// -// When an endorser receives a SignedProposal message, it should verify the -// signature over the proposal bytes. This verification requires the following -// steps: -// 1. Verification of the validity of the certificate that was used to produce -// the signature. The certificate will be available once proposalBytes has -// been unmarshalled to a Proposal message, and Proposal.header has been -// unmarshalled to a Header message. While this unmarshalling-before-verifying -// might not be ideal, it is unavoidable because i) the signature needs to also -// protect the signing certificate; ii) it is desirable that Header is created -// once by the client and never changed (for the sake of accountability and -// non-repudiation). Note also that it is actually impossible to conclusively -// verify the validity of the certificate included in a Proposal, because the -// proposal needs to first be endorsed and ordered with respect to certificate -// expiration transactions. Still, it is useful to pre-filter expired -// certificates at this stage. -// 2. Verification that the certificate is trusted (signed by a trusted CA) and -// that it is allowed to transact with us (with respect to some ACLs); -// 3. Verification that the signature on proposalBytes is valid; -// 4. Detect replay attacks; -type SignedProposal struct { - // The bytes of Proposal - ProposalBytes []byte `protobuf:"bytes,1,opt,name=proposalBytes,proto3" json:"proposalBytes,omitempty"` - // Signaure over proposalBytes; this signature is to be verified against - // the creator identity contained in the header of the Proposal message - // marshaled as proposalBytes - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *SignedProposal) Reset() { *m = SignedProposal{} } -func (m *SignedProposal) String() string { return proto.CompactTextString(m) } -func (*SignedProposal) ProtoMessage() {} -func (*SignedProposal) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } - -// A Proposal is sent to an endorser for endorsement. The proposal contains: -// 1. A header which should be unmarshaled to a Header message. Note that -// Header is both the header of a Proposal and of a Transaction, in that i) -// both headers should be unmarshaled to this message; and ii) it is used to -// compute cryptographic hashes and signatures. The header has fields common -// to all proposals/transactions. In addition it has a type field for -// additional customization. An example of this is the ChaincodeHeaderExtension -// message used to extend the Header for type CHAINCODE. -// 2. A payload whose type depends on the header's type field. -// 3. An extension whose type depends on the header's type field. -// -// Let us see an example. For type CHAINCODE (see the Header message), -// we have the following: -// 1. The header is a Header message whose extensions field is a -// ChaincodeHeaderExtension message. -// 2. The payload is a ChaincodeProposalPayload message. -// 3. The extension is a ChaincodeAction that might be used to ask the -// endorsers to endorse a specific ChaincodeAction, thus emulating the -// submitting peer model. -type Proposal struct { - // The header of the proposal. It is the bytes of the Header - Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // The payload of the proposal as defined by the type in the proposal - // header. - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` - // Optional extensions to the proposal. Its content depends on the Header's - // type field. For the type CHAINCODE, it might be the bytes of a - // ChaincodeAction message. - Extension []byte `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` -} - -func (m *Proposal) Reset() { *m = Proposal{} } -func (m *Proposal) String() string { return proto.CompactTextString(m) } -func (*Proposal) ProtoMessage() {} -func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } - -func init() { - proto.RegisterType((*SignedProposal)(nil), "protos.SignedProposal") - proto.RegisterType((*Proposal)(nil), "protos.Proposal") -} - -func init() { proto.RegisterFile("peer/fabric_proposal.proto", fileDescriptor7) } - -var fileDescriptor7 = []byte{ - // 194 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x48, 0x4d, 0x2d, - 0xd2, 0x4f, 0x4b, 0x4c, 0x2a, 0xca, 0x4c, 0x8e, 0x2f, 0x28, 0xca, 0x2f, 0xc8, 0x2f, 0x4e, 0xcc, - 0xd1, 0x03, 0x32, 0x4a, 0xf2, 0x85, 0xd8, 0xc0, 0x54, 0xb1, 0x52, 0x08, 0x17, 0x5f, 0x70, 0x66, - 0x7a, 0x5e, 0x6a, 0x4a, 0x00, 0x54, 0x5e, 0x48, 0x85, 0x8b, 0x17, 0xa6, 0xd6, 0xa9, 0xb2, 0x24, - 0xb5, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, 0x27, 0x08, 0x55, 0x50, 0x48, 0x86, 0x8b, 0xb3, 0x18, - 0xa8, 0x2f, 0xb1, 0xa4, 0xb4, 0x28, 0x55, 0x82, 0x09, 0xac, 0x02, 0x21, 0xa0, 0x14, 0xc5, 0xc5, - 0x01, 0x37, 0x4f, 0x8c, 0x8b, 0x2d, 0x23, 0x35, 0x31, 0x25, 0xb5, 0x08, 0x6a, 0x10, 0x94, 0x27, - 0x24, 0xc1, 0xc5, 0x5e, 0x90, 0x58, 0x99, 0x93, 0x9f, 0x98, 0x02, 0xd5, 0x0f, 0xe3, 0x82, 0xcc, - 0x4e, 0xad, 0x28, 0x49, 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x86, 0x98, 0x0d, 0x17, 0x70, - 0xd2, 0x8e, 0xd2, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xa8, - 0x2c, 0x48, 0x2d, 0xca, 0x49, 0x4d, 0x49, 0x87, 0xfb, 0x54, 0x1f, 0xe2, 0x33, 0x7d, 0x90, 0xe7, - 0x93, 0x20, 0xde, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x5c, 0x58, 0xb9, 0x0b, 0x01, - 0x00, 0x00, -} diff --git a/protos/peer/fabric_service.pb.go b/protos/peer/fabric_service.pb.go deleted file mode 100644 index 82fb6d1a92f..00000000000 --- a/protos/peer/fabric_service.pb.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/fabric_service.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion3 - -// Client API for Endorser service - -type EndorserClient interface { - ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) -} - -type endorserClient struct { - cc *grpc.ClientConn -} - -func NewEndorserClient(cc *grpc.ClientConn) EndorserClient { - return &endorserClient{cc} -} - -func (c *endorserClient) ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) { - out := new(ProposalResponse) - err := grpc.Invoke(ctx, "/protos.Endorser/ProcessProposal", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Endorser service - -type EndorserServer interface { - ProcessProposal(context.Context, *SignedProposal) (*ProposalResponse, error) -} - -func RegisterEndorserServer(s *grpc.Server, srv EndorserServer) { - s.RegisterService(&_Endorser_serviceDesc, srv) -} - -func _Endorser_ProcessProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignedProposal) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EndorserServer).ProcessProposal(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/protos.Endorser/ProcessProposal", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EndorserServer).ProcessProposal(ctx, req.(*SignedProposal)) - } - return interceptor(ctx, in, info, handler) -} - -var _Endorser_serviceDesc = grpc.ServiceDesc{ - ServiceName: "protos.Endorser", - HandlerType: (*EndorserServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ProcessProposal", - Handler: _Endorser_ProcessProposal_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: fileDescriptor10, -} - -func init() { proto.RegisterFile("peer/fabric_service.proto", fileDescriptor10) } - -var fileDescriptor10 = []byte{ - // 170 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x48, 0x4d, 0x2d, - 0xd2, 0x4f, 0x4b, 0x4c, 0x2a, 0xca, 0x4c, 0x8e, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x52, 0x52, 0xc8, 0x4a, 0x80, 0x62, - 0x05, 0xf9, 0xc5, 0x89, 0x39, 0x10, 0x35, 0x52, 0xca, 0xd8, 0xe4, 0xe2, 0x8b, 0x52, 0x8b, 0x0b, - 0xf2, 0xf3, 0x8a, 0xa1, 0x06, 0x19, 0x05, 0x72, 0x71, 0xb8, 0xe6, 0xa5, 0xe4, 0x17, 0x01, 0x8d, - 0x17, 0x72, 0xe5, 0xe2, 0x0f, 0x28, 0xca, 0x4f, 0x4e, 0x2d, 0x2e, 0x0e, 0x80, 0xaa, 0x16, 0x12, - 0x83, 0x28, 0x2b, 0xd6, 0x0b, 0xce, 0x4c, 0xcf, 0x4b, 0x4d, 0x81, 0x89, 0x4b, 0x49, 0xc0, 0xc4, - 0x61, 0x22, 0x41, 0x50, 0x63, 0x95, 0x18, 0x9c, 0xb4, 0xa3, 0x34, 0xd3, 0x33, 0x4b, 0x32, 0x4a, - 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x33, 0x2a, 0x0b, 0x52, 0x8b, 0x72, 0x52, 0x53, 0xd2, 0xe1, - 0x6e, 0xd1, 0x87, 0x68, 0xd5, 0x07, 0x39, 0x2f, 0x09, 0xe2, 0x11, 0x63, 0x40, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x4e, 0xa5, 0x8a, 0xe0, 0xec, 0x00, 0x00, 0x00, -} diff --git a/protos/peer/fabric_service.proto b/protos/peer/fabric_service.proto deleted file mode 100644 index 51cbd4c02b2..00000000000 --- a/protos/peer/fabric_service.proto +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright IBM Corp. 2016 All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -syntax = "proto3"; - -option go_package = "github.com/hyperledger/fabric/protos/peer"; - -package protos; - -import "peer/fabric_proposal.proto"; -import "peer/fabric_proposal_response.proto"; - -service Endorser { - rpc ProcessProposal(SignedProposal) returns (ProposalResponse) {} -} diff --git a/protos/peer/fabric_transaction.pb.go b/protos/peer/fabric_transaction.pb.go deleted file mode 100644 index efee60ee7b3..00000000000 --- a/protos/peer/fabric_transaction.pb.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by protoc-gen-go. -// source: peer/fabric_transaction.proto -// DO NOT EDIT! - -package peer - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type InvalidTransaction_Cause int32 - -const ( - InvalidTransaction_TxIdAlreadyExists InvalidTransaction_Cause = 0 - InvalidTransaction_RWConflictDuringCommit InvalidTransaction_Cause = 1 -) - -var InvalidTransaction_Cause_name = map[int32]string{ - 0: "TxIdAlreadyExists", - 1: "RWConflictDuringCommit", -} -var InvalidTransaction_Cause_value = map[string]int32{ - "TxIdAlreadyExists": 0, - "RWConflictDuringCommit": 1, -} - -func (x InvalidTransaction_Cause) String() string { - return proto.EnumName(InvalidTransaction_Cause_name, int32(x)) -} -func (InvalidTransaction_Cause) EnumDescriptor() ([]byte, []int) { return fileDescriptor11, []int{1, 0} } - -// This message is necessary to facilitate the verification of the signature -// (in the signature field) over the bytes of the transaction (in the -// transactionBytes field). -type SignedTransaction struct { - // The bytes of the Transaction. NDD - TransactionBytes []byte `protobuf:"bytes,1,opt,name=transactionBytes,proto3" json:"transactionBytes,omitempty"` - // Signature of the transactionBytes The public key of the signature is in - // the header field of TransactionAction There might be multiple - // TransactionAction, so multiple headers, but there should be same - // transactor identity (cert) in all headers - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *SignedTransaction) Reset() { *m = SignedTransaction{} } -func (m *SignedTransaction) String() string { return proto.CompactTextString(m) } -func (*SignedTransaction) ProtoMessage() {} -func (*SignedTransaction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } - -// This is used to wrap an invalid Transaction with the cause -type InvalidTransaction struct { - Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` - Cause InvalidTransaction_Cause `protobuf:"varint,2,opt,name=cause,enum=protos.InvalidTransaction_Cause" json:"cause,omitempty"` -} - -func (m *InvalidTransaction) Reset() { *m = InvalidTransaction{} } -func (m *InvalidTransaction) String() string { return proto.CompactTextString(m) } -func (*InvalidTransaction) ProtoMessage() {} -func (*InvalidTransaction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{1} } - -func (m *InvalidTransaction) GetTransaction() *Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -// The transaction to be sent to the ordering service. A transaction contains -// one or more TransactionAction. Each TransactionAction binds a proposal to -// potentially multiple actions. The transaction is atomic meaning that either -// all actions in the transaction will be committed or none will. Note that -// while a Transaction might include more than one Header, the Header.creator -// field must be the same in each. -// A single client is free to issue a number of independent Proposal, each with -// their header (Header) and request payload (ChaincodeProposalPayload). Each -// proposal is independently endorsed generating an action -// (ProposalResponsePayload) with one signature per Endorser. Any number of -// independent proposals (and their action) might be included in a transaction -// to ensure that they are treated atomically. -type Transaction struct { - // Version indicates message protocol version. - Version int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` - // Timestamp is the local time that the - // message was created by the sender - Timestamp *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` - // The payload is an array of TransactionAction. An array is necessary to - // accommodate multiple actions per transaction - Actions []*TransactionAction `protobuf:"bytes,3,rep,name=actions" json:"actions,omitempty"` -} - -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{2} } - -func (m *Transaction) GetTimestamp() *google_protobuf.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *Transaction) GetActions() []*TransactionAction { - if m != nil { - return m.Actions - } - return nil -} - -// TransactionAction binds a proposal to its action. The type field in the -// header dictates the type of action to be applied to the ledger. -type TransactionAction struct { - // The header of the proposal action, which is the proposal header - Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` - // The payload of the action as defined by the type in the header For - // chaincode, it's the bytes of ChaincodeActionPayload - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *TransactionAction) Reset() { *m = TransactionAction{} } -func (m *TransactionAction) String() string { return proto.CompactTextString(m) } -func (*TransactionAction) ProtoMessage() {} -func (*TransactionAction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{3} } - -func init() { - proto.RegisterType((*SignedTransaction)(nil), "protos.SignedTransaction") - proto.RegisterType((*InvalidTransaction)(nil), "protos.InvalidTransaction") - proto.RegisterType((*Transaction)(nil), "protos.Transaction") - proto.RegisterType((*TransactionAction)(nil), "protos.TransactionAction") - proto.RegisterEnum("protos.InvalidTransaction_Cause", InvalidTransaction_Cause_name, InvalidTransaction_Cause_value) -} - -func init() { proto.RegisterFile("peer/fabric_transaction.proto", fileDescriptor11) } - -var fileDescriptor11 = []byte{ - // 370 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0xdf, 0x4a, 0xc3, 0x30, - 0x18, 0xc5, 0xad, 0x63, 0x1b, 0xfb, 0x2a, 0xb2, 0x45, 0x1c, 0x75, 0x28, 0x8e, 0x5e, 0xf9, 0x07, - 0x5a, 0xd8, 0x50, 0xc4, 0xbb, 0x6d, 0xee, 0x62, 0xb7, 0x75, 0x20, 0x08, 0x22, 0x69, 0x9b, 0x75, - 0x81, 0xb6, 0x29, 0x49, 0x3a, 0xd6, 0x17, 0xf1, 0x75, 0x7c, 0x35, 0xbb, 0x66, 0xdd, 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, 0xfc, 0xd2, 0x40, 0xaf, 0x46, 0x37, 0xa0, 0xb9, 0x22, 0x5c, 0x94, - 0xb1, 0xeb, 0x4e, 0x29, 0xd1, 0x13, 0xb4, 0x76, 0xed, 0x16, 0x09, 0xf5, 0x41, 0xcf, 0x52, 0xfd, - 0x5b, 0x65, 0xff, 0xd6, 0xbc, 0x24, 0x9c, 0x3d, 0x8c, 0x86, 0xd0, 0x54, 0xee, 0xc2, 0xa8, 0xf5, - 0x6b, 0xf9, 0xbe, 0x8b, 0x7f, 0xaa, 0x18, 0xa9, 0x42, 0x4a, 0xd2, 0x9c, 0xe6, 0x77, 0xf9, 0xfb, - 0x17, 0x75, 0xa1, 0xb1, 0xcc, 0xaf, 0x46, 0xf8, 0xf6, 0xbd, 0xb6, 0x6a, 0x93, 0x3a, 0xc1, 0x59, - 0xc8, 0xb0, 0xbf, 0x7d, 0xa3, 0x52, 0x8e, 0xef, 0xdf, 0x6f, 0x03, 0x2a, 0x97, 0xa9, 0x6b, 0x79, - 0x2c, 0xb2, 0x97, 0x59, 0x42, 0x78, 0x48, 0xfc, 0x60, 0x37, 0x5c, 0x6a, 0x74, 0x84, 0xbd, 0x99, - 0x37, 0x57, 0x8d, 0xd5, 0xf0, 0x27, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x48, 0x72, 0x86, 0x7e, 0x02, - 0x00, 0x00, -} diff --git a/protos/peer/peer.pb.go b/protos/peer/peer.pb.go new file mode 100644 index 00000000000..b808b543bd5 --- /dev/null +++ b/protos/peer/peer.pb.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-go. +// source: peer/peer.proto +// DO NOT EDIT! + +package peer + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type PeerID struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` +} + +func (m *PeerID) Reset() { *m = PeerID{} } +func (m *PeerID) String() string { return proto.CompactTextString(m) } +func (*PeerID) ProtoMessage() {} +func (*PeerID) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } + +type PeerEndpoint struct { + ID *PeerID `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` +} + +func (m *PeerEndpoint) Reset() { *m = PeerEndpoint{} } +func (m *PeerEndpoint) String() string { return proto.CompactTextString(m) } +func (*PeerEndpoint) ProtoMessage() {} +func (*PeerEndpoint) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} } + +func (m *PeerEndpoint) GetID() *PeerID { + if m != nil { + return m.ID + } + return nil +} + +// Contains information about the blockchain ledger such as height, current +// block hash, and previous block hash. +type BlockchainInfo struct { + Height uint64 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"` + CurrentBlockHash []byte `protobuf:"bytes,2,opt,name=currentBlockHash,proto3" json:"currentBlockHash,omitempty"` + PreviousBlockHash []byte `protobuf:"bytes,3,opt,name=previousBlockHash,proto3" json:"previousBlockHash,omitempty"` +} + +func (m *BlockchainInfo) Reset() { *m = BlockchainInfo{} } +func (m *BlockchainInfo) String() string { return proto.CompactTextString(m) } +func (*BlockchainInfo) ProtoMessage() {} +func (*BlockchainInfo) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} } + +func init() { + proto.RegisterType((*PeerID)(nil), "protos.PeerID") + proto.RegisterType((*PeerEndpoint)(nil), "protos.PeerEndpoint") + proto.RegisterType((*BlockchainInfo)(nil), "protos.BlockchainInfo") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion3 + +// Client API for Endorser service + +type EndorserClient interface { + ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) +} + +type endorserClient struct { + cc *grpc.ClientConn +} + +func NewEndorserClient(cc *grpc.ClientConn) EndorserClient { + return &endorserClient{cc} +} + +func (c *endorserClient) ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) { + out := new(ProposalResponse) + err := grpc.Invoke(ctx, "/protos.Endorser/ProcessProposal", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Endorser service + +type EndorserServer interface { + ProcessProposal(context.Context, *SignedProposal) (*ProposalResponse, error) +} + +func RegisterEndorserServer(s *grpc.Server, srv EndorserServer) { + s.RegisterService(&_Endorser_serviceDesc, srv) +} + +func _Endorser_ProcessProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignedProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EndorserServer).ProcessProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/protos.Endorser/ProcessProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EndorserServer).ProcessProposal(ctx, req.(*SignedProposal)) + } + return interceptor(ctx, in, info, handler) +} + +var _Endorser_serviceDesc = grpc.ServiceDesc{ + ServiceName: "protos.Endorser", + HandlerType: (*EndorserServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ProcessProposal", + Handler: _Endorser_ProcessProposal_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: fileDescriptor5, +} + +func init() { proto.RegisterFile("peer/peer.proto", fileDescriptor5) } + +var fileDescriptor5 = []byte{ + // 297 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x51, 0x4d, 0x6b, 0xf2, 0x40, + 0x10, 0x7e, 0xf5, 0x15, 0xdb, 0x4e, 0x45, 0xdb, 0x2d, 0x48, 0x10, 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ff, 0x4e, 0x7c, 0x4c, 0x4c, 0x9f, 0xe1, 0x74, 0x61, 0x72, 0x62, 0x41, 0x56, 0x0b, 0x18, + 0xac, 0x98, 0x32, 0x14, 0x59, 0xd5, 0xab, 0x51, 0xc3, 0x66, 0xa2, 0x17, 0x5d, 0x18, 0xcc, 0x1b, + 0x7c, 0x14, 0xfc, 0x4c, 0x5a, 0x23, 0x49, 0xbd, 0xc3, 0xf0, 0xdf, 0xec, 0xe1, 0xf5, 0xae, 0xd0, + 0x55, 0xb9, 0x5f, 0x4f, 0x32, 0xda, 0x45, 0xe5, 0xa7, 0x45, 0xde, 0x62, 0x5e, 0x20, 0x47, 0x9b, + 0x74, 0xcd, 0x3a, 0x8b, 0xbc, 0xd5, 0x5d, 0x6b, 0xed, 0xef, 0xf4, 0xf4, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0x33, 0xcf, 0xcc, 0xdb, 0xc1, 0x01, 0x00, 0x00, +} diff --git a/protos/peer/fabric.proto b/protos/peer/peer.proto similarity index 76% rename from protos/peer/fabric.proto rename to protos/peer/peer.proto index 0d7ac13fdda..ded24eaf483 100644 --- a/protos/peer/fabric.proto +++ b/protos/peer/peer.proto @@ -19,10 +19,8 @@ option go_package = "github.com/hyperledger/fabric/protos/peer"; package protos; -message PeerAddress { - string host = 1; - int32 port = 2; -} +import "peer/proposal.proto"; +import "peer/proposal_response.proto"; message PeerID { string name = 1; @@ -31,21 +29,6 @@ message PeerID { message PeerEndpoint { PeerID ID = 1; string address = 2; - enum Type { - UNDEFINED = 0; - VALIDATOR = 1; - NON_VALIDATOR = 2; - } - Type type = 3; - bytes pkiID = 4; -} - -message PeersMessage { - repeated PeerEndpoint peers = 1; -} - -message PeersAddresses { - repeated string addresses = 1; } // Contains information about the blockchain ledger such as height, current @@ -57,3 +40,9 @@ message BlockchainInfo { bytes previousBlockHash = 3; } + +//-------- the Endorser service ------------ + +service Endorser { + rpc ProcessProposal(SignedProposal) returns (ProposalResponse) {} +} diff --git a/protos/peer/proposal.pb.go b/protos/peer/proposal.pb.go new file mode 100644 index 00000000000..b8b5c8c1e71 --- /dev/null +++ b/protos/peer/proposal.pb.go @@ -0,0 +1,190 @@ +// Code generated by protoc-gen-go. +// source: peer/proposal.proto +// DO NOT EDIT! + +package peer + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This structure is necessary to sign the proposal which contains the header +// and the payload. Without this structure, we would have to concatenate the +// header and the payload to verify the signature, which could be expensive +// with large payload +// +// When an endorser receives a SignedProposal message, it should verify the +// signature over the proposal bytes. This verification requires the following +// steps: +// 1. Verification of the validity of the certificate that was used to produce +// the signature. The certificate will be available once proposalBytes has +// been unmarshalled to a Proposal message, and Proposal.header has been +// unmarshalled to a Header message. While this unmarshalling-before-verifying +// might not be ideal, it is unavoidable because i) the signature needs to also +// protect the signing certificate; ii) it is desirable that Header is created +// once by the client and never changed (for the sake of accountability and +// non-repudiation). Note also that it is actually impossible to conclusively +// verify the validity of the certificate included in a Proposal, because the +// proposal needs to first be endorsed and ordered with respect to certificate +// expiration transactions. Still, it is useful to pre-filter expired +// certificates at this stage. +// 2. Verification that the certificate is trusted (signed by a trusted CA) and +// that it is allowed to transact with us (with respect to some ACLs); +// 3. Verification that the signature on proposalBytes is valid; +// 4. Detect replay attacks; +type SignedProposal struct { + // The bytes of Proposal + ProposalBytes []byte `protobuf:"bytes,1,opt,name=proposalBytes,proto3" json:"proposalBytes,omitempty"` + // Signaure over proposalBytes; this signature is to be verified against + // the creator identity contained in the header of the Proposal message + // marshaled as proposalBytes + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *SignedProposal) Reset() { *m = SignedProposal{} } +func (m *SignedProposal) String() string { return proto.CompactTextString(m) } +func (*SignedProposal) ProtoMessage() {} +func (*SignedProposal) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } + +// A Proposal is sent to an endorser for endorsement. The proposal contains: +// 1. A header which should be unmarshaled to a Header message. Note that +// Header is both the header of a Proposal and of a Transaction, in that i) +// both headers should be unmarshaled to this message; and ii) it is used to +// compute cryptographic hashes and signatures. The header has fields common +// to all proposals/transactions. In addition it has a type field for +// additional customization. An example of this is the ChaincodeHeaderExtension +// message used to extend the Header for type CHAINCODE. +// 2. A payload whose type depends on the header's type field. +// 3. An extension whose type depends on the header's type field. +// +// Let us see an example. For type CHAINCODE (see the Header message), +// we have the following: +// 1. The header is a Header message whose extensions field is a +// ChaincodeHeaderExtension message. +// 2. The payload is a ChaincodeProposalPayload message. +// 3. The extension is a ChaincodeAction that might be used to ask the +// endorsers to endorse a specific ChaincodeAction, thus emulating the +// submitting peer model. +type Proposal struct { + // The header of the proposal. It is the bytes of the Header + Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The payload of the proposal as defined by the type in the proposal + // header. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + // Optional extensions to the proposal. Its content depends on the Header's + // type field. For the type CHAINCODE, it might be the bytes of a + // ChaincodeAction message. + Extension []byte `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` +} + +func (m *Proposal) Reset() { *m = Proposal{} } +func (m *Proposal) String() string { return proto.CompactTextString(m) } +func (*Proposal) ProtoMessage() {} +func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} } + +// ChaincodeHeaderExtension is the Header's extentions message to be used when +// the Header's type is CHAINCODE. This extensions is used to specify which +// chaincode to invoke and what should appear on the ledger. +type ChaincodeHeaderExtension struct { + // The PayloadVisibility field controls to what extent the Proposal's payload + // (recall that for the type CHAINCODE, it is ChaincodeProposalPayload + // message) field will be visible in the final transaction and in the ledger. + // Ideally, it would be configurable, supporting at least 3 main “visibility + // modes”: + // 1. all bytes of the payload are visible; + // 2. only a hash of the payload is visible; + // 3. nothing is visible. + // Notice that the visibility function may be potentially part of the ESCC. + // In that case it overrides PayloadVisibility field. Finally notice that + // this field impacts the content of ProposalResponsePayload.proposalHash. + PayloadVisibility []byte `protobuf:"bytes,1,opt,name=payloadVisibility,proto3" json:"payloadVisibility,omitempty"` + // The ID of the chaincode to target. + ChaincodeID *ChaincodeID `protobuf:"bytes,2,opt,name=chaincodeID" json:"chaincodeID,omitempty"` +} + +func (m *ChaincodeHeaderExtension) Reset() { *m = ChaincodeHeaderExtension{} } +func (m *ChaincodeHeaderExtension) String() string { return proto.CompactTextString(m) } +func (*ChaincodeHeaderExtension) ProtoMessage() {} +func (*ChaincodeHeaderExtension) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} } + +func (m *ChaincodeHeaderExtension) GetChaincodeID() *ChaincodeID { + if m != nil { + return m.ChaincodeID + } + return nil +} + +// ChaincodeProposalPayload is the Proposal's payload message to be used when +// the Header's type is CHAINCODE. It contains the arguments for this +// invocation. +type ChaincodeProposalPayload struct { + // Input contains the arguments for this invocation. If this invocation + // deploys a new chaincode, ESCC/VSCC are part of this field. + Input []byte `protobuf:"bytes,1,opt,name=Input,proto3" json:"Input,omitempty"` + // Transient contains data (e.g. cryptographic material) that might be used + // to implement some form of application-level confidentiality. The contents + // of this field are supposed to always be omitted from the transaction and + // excluded from the ledger. + Transient []byte `protobuf:"bytes,2,opt,name=Transient,proto3" json:"Transient,omitempty"` +} + +func (m *ChaincodeProposalPayload) Reset() { *m = ChaincodeProposalPayload{} } +func (m *ChaincodeProposalPayload) String() string { return proto.CompactTextString(m) } +func (*ChaincodeProposalPayload) ProtoMessage() {} +func (*ChaincodeProposalPayload) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{3} } + +// ChaincodeAction contains the actions the events generated by the execution +// of the chaincode. +type ChaincodeAction struct { + // This field contains the read set and the write set produced by the + // chaincode executing this invocation. + Results []byte `protobuf:"bytes,1,opt,name=results,proto3" json:"results,omitempty"` + // This field contains the events generated by the chaincode executing this + // invocation. + Events []byte `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty"` +} + +func (m *ChaincodeAction) Reset() { *m = ChaincodeAction{} } +func (m *ChaincodeAction) String() string { return proto.CompactTextString(m) } +func (*ChaincodeAction) ProtoMessage() {} +func (*ChaincodeAction) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{4} } + +func init() { + proto.RegisterType((*SignedProposal)(nil), "protos.SignedProposal") + proto.RegisterType((*Proposal)(nil), "protos.Proposal") + proto.RegisterType((*ChaincodeHeaderExtension)(nil), "protos.ChaincodeHeaderExtension") + proto.RegisterType((*ChaincodeProposalPayload)(nil), "protos.ChaincodeProposalPayload") + proto.RegisterType((*ChaincodeAction)(nil), "protos.ChaincodeAction") +} + +func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor6) } + +var fileDescriptor6 = []byte{ + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x92, 0xdf, 0x4b, 0xfb, 0x30, + 0x14, 0xc5, 0xd9, 0xf7, 0x8b, 0x9b, 0xde, 0xf9, 0x03, 0xb3, 0x21, 0x41, 0x7c, 0x90, 0xe2, 0x83, + 0xa2, 0xac, 0xa0, 0xf8, 0x07, 0xb8, 0x29, 0xb8, 0x17, 0x19, 0x73, 0xf8, 0xb0, 0xb7, 0xb4, 0xbd, + 0xb6, 0x81, 0x9a, 0x84, 0x24, 0x15, 0xfb, 0xe4, 0xbf, 0x2e, 0x6d, 0x92, 0x6e, 0xe2, 0x53, 0x39, + 0xf7, 0x34, 0x9f, 0xdc, 0x73, 0x08, 0x8c, 0x14, 0xa2, 0x8e, 0x95, 0x96, 0x4a, 0x1a, 0x56, 0x4e, + 0x94, 0x96, 0x56, 0x92, 0x7e, 0xfb, 0x31, 0xa7, 0xe3, 0xd6, 0x4c, 0x0b, 0xc6, 0x45, 0x2a, 0x33, + 0x74, 0x6e, 0xb4, 0x82, 0xc3, 0x57, 0x9e, 0x0b, 0xcc, 0x16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23, + 0x2e, 0x6a, 0x85, 0xba, 0xc4, 0x2c, 0x47, 0x1d, 0xbf, 0xb3, 0x44, 0xf3, 0x34, 0x76, 0xa9, 0xe2, + 0xe6, 0x11, 0x24, 0xee, 0x49, 0xdc, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x5b, 0x29, 0x34, + 0x30, 0x02, 0x00, 0x00, +} diff --git a/protos/peer/fabric_proposal.proto b/protos/peer/proposal.proto similarity index 54% rename from protos/peer/fabric_proposal.proto rename to protos/peer/proposal.proto index 914bb4c5f21..384030a89e3 100644 --- a/protos/peer/fabric_proposal.proto +++ b/protos/peer/proposal.proto @@ -20,6 +20,8 @@ option go_package = "github.com/hyperledger/fabric/protos/peer"; package protos; +import "peer/chaincode.proto"; + /* The flow to get a generic transaction approved goes as follows: @@ -140,3 +142,119 @@ message Proposal { // ChaincodeAction message. bytes extension = 3; } + +//-------- the Chaincode Proposal ----------- + +/* +The flow to get a CHAINCODE transaction approved goes as follows: + +1. client sends proposal to endorser +==================================== + +The proposal is basically a request to do something on a chaincode, that will +result on some action - some change in the state of a chaincode and/or some +data to be committed to the ledger; a proposal in general contains a header +(with some metadata describing it, such as the type, the identity of the +invoker, the time, the ID of the chain, a cryptographic nonce..) and a payload +(the chaincode ID, invocation arguments..). Optionally, it may contain actions +that the endorser may be asked to endorse, to emulate a submitting peer. A +chaincode proposal contains the following messages: + +SignedProposal +|\_ Signature (signature on the Proposal message by the creator specified in the header) + \_ Proposal + |\_ Header (the header for this proposal) + |\_ ChaincodeProposalPayload (the payload for this proposal) + \_ ChaincodeAction (the actions for this proposal - optional for a proposal) + +2. endorser sends proposal response back to client +================================================== + +The proposal response contains an endorser's response to a client's proposal. A +proposal response contains a success/error code, a response payload and a +signature (also referred to as endorsement) over the response payload. The +response payload contains a hash of the proposal (to securely link this +response to the corresponding proposal), a description of the action resulting +from the proposal and the endorser's signature over its payload. Formally, a +chaincode proposal response contains the following messages: + +ProposalResponse +|\_ Endorsement (the endorser's signature over the whole response payload) + \_ ProposalResponsePayload + \_ ChaincodeAction (the actions for this proposal) + +3. client assembles endorsements into a transaction +=================================================== + +A transaction message assembles one or more proposals and corresponding +responses into a message to be sent to orderers. After ordering, (batches of) +transactions are delivered to committing peers for validation and final +delivery into the ledger. A transaction contains one or more actions. Each of +them contains a header (same as that of the proposal that requested it), a +proposal payload (same as that of the proposal that requested it), a +description of the resulting action and signatures from each of the endorsers +that endorsed the action. + +SignedTransaction +|\_ Signature (signature on the Transaction message by the creator specified in the header) + \_ Transaction + \_ TransactionAction (1...n) + |\_ Header (1) (the header of the proposal that requested this action) + \_ ChaincodeActionPayload (1) + |\_ ChaincodeProposalPayload (1) (payload of the proposal that requested this action) + \_ ChaincodeEndorsedAction (1) + |\_ Endorsement (1...n) (endorsers' signatures over the whole response payload) + \_ ProposalResponsePayload + \_ ChaincodeAction (the actions for this proposal) +*/ + +// ChaincodeHeaderExtension is the Header's extentions message to be used when +// the Header's type is CHAINCODE. This extensions is used to specify which +// chaincode to invoke and what should appear on the ledger. +message ChaincodeHeaderExtension { + + // The PayloadVisibility field controls to what extent the Proposal's payload + // (recall that for the type CHAINCODE, it is ChaincodeProposalPayload + // message) field will be visible in the final transaction and in the ledger. + // Ideally, it would be configurable, supporting at least 3 main “visibility + // modes”: + // 1. all bytes of the payload are visible; + // 2. only a hash of the payload is visible; + // 3. nothing is visible. + // Notice that the visibility function may be potentially part of the ESCC. + // In that case it overrides PayloadVisibility field. Finally notice that + // this field impacts the content of ProposalResponsePayload.proposalHash. + bytes payloadVisibility = 1; + + // The ID of the chaincode to target. + ChaincodeID chaincodeID = 2; +} + +// ChaincodeProposalPayload is the Proposal's payload message to be used when +// the Header's type is CHAINCODE. It contains the arguments for this +// invocation. +message ChaincodeProposalPayload { + + // Input contains the arguments for this invocation. If this invocation + // deploys a new chaincode, ESCC/VSCC are part of this field. + bytes Input = 1; + + // Transient contains data (e.g. cryptographic material) that might be used + // to implement some form of application-level confidentiality. The contents + // of this field are supposed to always be omitted from the transaction and + // excluded from the ledger. + bytes Transient = 2; +} + +// ChaincodeAction contains the actions the events generated by the execution +// of the chaincode. +message ChaincodeAction { + + // This field contains the read set and the write set produced by the + // chaincode executing this invocation. + bytes results = 1; + + // This field contains the events generated by the chaincode executing this + // invocation. + bytes events = 2; +} diff --git a/protos/peer/fabric_proposal_response.pb.go b/protos/peer/proposal_response.pb.go similarity index 73% rename from protos/peer/fabric_proposal_response.pb.go rename to protos/peer/proposal_response.pb.go index 42c20aba81b..8024ef1b3a4 100644 --- a/protos/peer/fabric_proposal_response.pb.go +++ b/protos/peer/proposal_response.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. -// source: peer/fabric_proposal_response.proto +// source: peer/proposal_response.proto // DO NOT EDIT! package peer @@ -7,7 +7,7 @@ package peer import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -27,7 +27,7 @@ type ProposalResponse struct { Version int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` // Timestamp is the time that the message // was created as defined by the sender - Timestamp *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` + Timestamp *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` // A response message indicating whether the // endorsement of the action was successful Response *Response `protobuf:"bytes,4,opt,name=response" json:"response,omitempty"` @@ -41,9 +41,9 @@ type ProposalResponse struct { func (m *ProposalResponse) Reset() { *m = ProposalResponse{} } func (m *ProposalResponse) String() string { return proto.CompactTextString(m) } func (*ProposalResponse) ProtoMessage() {} -func (*ProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } +func (*ProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } -func (m *ProposalResponse) GetTimestamp() *google_protobuf.Timestamp { +func (m *ProposalResponse) GetTimestamp() *google_protobuf1.Timestamp { if m != nil { return m.Timestamp } @@ -78,7 +78,7 @@ type Response struct { func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{1} } +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } // ProposalResponsePayload is the payload of a proposal response. This message // is the "bridge" between the client's request and the endorser's action in @@ -113,7 +113,7 @@ type ProposalResponsePayload struct { func (m *ProposalResponsePayload) Reset() { *m = ProposalResponsePayload{} } func (m *ProposalResponsePayload) String() string { return proto.CompactTextString(m) } func (*ProposalResponsePayload) ProtoMessage() {} -func (*ProposalResponsePayload) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{2} } +func (*ProposalResponsePayload) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{2} } // An endorsement is a signature of an endorser over a proposal response. By // producing an endorsement message, an endorser implicitly "approves" that @@ -135,7 +135,7 @@ type Endorsement struct { func (m *Endorsement) Reset() { *m = Endorsement{} } func (m *Endorsement) String() string { return proto.CompactTextString(m) } func (*Endorsement) ProtoMessage() {} -func (*Endorsement) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{3} } +func (*Endorsement) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{3} } func init() { proto.RegisterType((*ProposalResponse)(nil), "protos.ProposalResponse") @@ -144,30 +144,30 @@ func init() { proto.RegisterType((*Endorsement)(nil), "protos.Endorsement") } -func init() { proto.RegisterFile("peer/fabric_proposal_response.proto", fileDescriptor8) } - -var fileDescriptor8 = []byte{ - // 342 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x5c, 0x52, 0x5f, 0x4b, 0xfb, 0x30, - 0x14, 0x65, 0xfb, 0xfd, 0x36, 0xb7, 0xbb, 0x3d, 0x8c, 0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0xfb, 0xbc, 0xf0, 0x1d, 0x06, 0x6d, 0xbd, 0x13, 0xe8, 0x57, 0x99, 0xcc, 0x86, 0x5c, 0x3b, 0x87, - 0x6a, 0xd3, 0x2a, 0x2d, 0x89, 0x14, 0x6d, 0xb5, 0x21, 0xf7, 0x70, 0x3f, 0xce, 0xbf, 0x83, 0x38, - 0xe1, 0x27, 0x9c, 0xfe, 0x7d, 0xbe, 0x99, 0x4b, 0x1a, 0xc2, 0xd8, 0xff, 0x9e, 0x57, 0x41, 0x6b, - 0x6b, 0x36, 0xe6, 0x07, 0x33, 0x76, 0x06, 0x43, 0xfc, 0x36, 0x58, 0xda, 0xb7, 0xee, 0x5a, 0xc2, - 0x6e, 0x10, 0xbe, 0xc0, 0x68, 0xaf, 0x10, 0x9b, 0xc2, 0xc0, 0x55, 0xd2, 0x4e, 0xac, 0xc5, 0xb5, - 0x10, 0x65, 0x69, 0x59, 0xf5, 0xd0, 0xe8, 0x85, 0xda, 0xc1, 0xd3, 0xcd, 0xc7, 0x75, 0x9a, 0x99, - 0xf5, 0x26, 0x89, 0x16, 0xb2, 0x88, 0xd7, 0x5b, 0x85, 0x3a, 0xc7, 0x65, 0xda, 0xee, 0x51, 0xb3, - 0x1f, 0x14, 0xd7, 0xab, 0x95, 0x34, 0xbb, 0x73, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x43, 0xe1, - 0xd2, 0xab, 0x69, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("peer/proposal_response.proto", fileDescriptor7) } + +var fileDescriptor7 = []byte{ + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x5c, 0x52, 0xdf, 0x4b, 0xeb, 0x30, + 0x14, 0xa6, 0xbb, 0x77, 0xbb, 0xdb, 0xd9, 0x1e, 0x46, 0x2e, 0x68, 0x19, 0x03, 0x47, 0x9f, 0x26, + 0x4a, 0x0b, 0x8a, 0xe0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, 0x6b, 0xe7, 0x50, 0x63, 0x5a, 0x22, + 0x91, 0xc8, 0xd0, 0x56, 0x1b, 0x71, 0x0f, 0x8f, 0xe3, 0xfc, 0x39, 0x89, 0x13, 0xbd, 0xc3, 0xf9, + 0xef, 0xeb, 0x5b, 0xb9, 0xa4, 0x11, 0x4c, 0xfc, 0xf3, 0x3c, 0x0b, 0xda, 0x59, 0xb3, 0x09, 0x3f, + 0x99, 0xb1, 0x39, 0x8c, 0xf0, 0xcb, 0x60, 0x65, 0xef, 0xba, 0x67, 0x09, 0x87, 0x41, 0xf4, 0x04, + 0xe3, 0xa3, 0x42, 0x6c, 0x06, 0x43, 0x57, 0x49, 0x3b, 0xb1, 0x0e, 0x37, 0x42, 0x94, 0x67, 0x95, + 0x30, 0xb5, 0x46, 0x2f, 0xd4, 0x0d, 0x1e, 0xae, 0xde, 0x2e, 0xb3, 0xdc, 0xec, 0xea, 0x34, 0x5e, + 0xcb, 0x32, 0xd9, 0xed, 0x15, 0xea, 0x02, 0x37, 0x19, 0xea, 0x64, 0x2b, 0x52, 0x9d, 0xaf, 0xdb, + 0xfd, 0xa0, 0xa4, 0xd9, 0xa9, 0xb4, 0xdd, 0x9d, 0xdb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x38, + 0x84, 0xd8, 0x0f, 0x62, 0x02, 0x00, 0x00, } diff --git a/protos/peer/fabric_proposal_response.proto b/protos/peer/proposal_response.proto similarity index 100% rename from protos/peer/fabric_proposal_response.proto rename to protos/peer/proposal_response.proto diff --git a/protos/peer/transaction.pb.go b/protos/peer/transaction.pb.go new file mode 100644 index 00000000000..1316a0c2b63 --- /dev/null +++ b/protos/peer/transaction.pb.go @@ -0,0 +1,230 @@ +// Code generated by protoc-gen-go. +// source: peer/transaction.proto +// DO NOT EDIT! + +package peer + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type InvalidTransaction_Cause int32 + +const ( + InvalidTransaction_TxIdAlreadyExists InvalidTransaction_Cause = 0 + InvalidTransaction_RWConflictDuringCommit InvalidTransaction_Cause = 1 +) + +var InvalidTransaction_Cause_name = map[int32]string{ + 0: "TxIdAlreadyExists", + 1: "RWConflictDuringCommit", +} +var InvalidTransaction_Cause_value = map[string]int32{ + "TxIdAlreadyExists": 0, + "RWConflictDuringCommit": 1, +} + +func (x InvalidTransaction_Cause) String() string { + return proto.EnumName(InvalidTransaction_Cause_name, int32(x)) +} +func (InvalidTransaction_Cause) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{1, 0} } + +// This message is necessary to facilitate the verification of the signature +// (in the signature field) over the bytes of the transaction (in the +// transactionBytes field). +type SignedTransaction struct { + // The bytes of the Transaction. NDD + TransactionBytes []byte `protobuf:"bytes,1,opt,name=transactionBytes,proto3" json:"transactionBytes,omitempty"` + // Signature of the transactionBytes The public key of the signature is in + // the header field of TransactionAction There might be multiple + // TransactionAction, so multiple headers, but there should be same + // transactor identity (cert) in all headers + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *SignedTransaction) Reset() { *m = SignedTransaction{} } +func (m *SignedTransaction) String() string { return proto.CompactTextString(m) } +func (*SignedTransaction) ProtoMessage() {} +func (*SignedTransaction) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } + +// This is used to wrap an invalid Transaction with the cause +type InvalidTransaction struct { + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction" json:"transaction,omitempty"` + Cause InvalidTransaction_Cause `protobuf:"varint,2,opt,name=cause,enum=protos.InvalidTransaction_Cause" json:"cause,omitempty"` +} + +func (m *InvalidTransaction) Reset() { *m = InvalidTransaction{} } +func (m *InvalidTransaction) String() string { return proto.CompactTextString(m) } +func (*InvalidTransaction) ProtoMessage() {} +func (*InvalidTransaction) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{1} } + +func (m *InvalidTransaction) GetTransaction() *Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +// The transaction to be sent to the ordering service. A transaction contains +// one or more TransactionAction. Each TransactionAction binds a proposal to +// potentially multiple actions. The transaction is atomic meaning that either +// all actions in the transaction will be committed or none will. Note that +// while a Transaction might include more than one Header, the Header.creator +// field must be the same in each. +// A single client is free to issue a number of independent Proposal, each with +// their header (Header) and request payload (ChaincodeProposalPayload). Each +// proposal is independently endorsed generating an action +// (ProposalResponsePayload) with one signature per Endorser. Any number of +// independent proposals (and their action) might be included in a transaction +// to ensure that they are treated atomically. +type Transaction struct { + // Version indicates message protocol version. + Version int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` + // Timestamp is the local time that the + // message was created by the sender + Timestamp *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` + // The payload is an array of TransactionAction. An array is necessary to + // accommodate multiple actions per transaction + Actions []*TransactionAction `protobuf:"bytes,3,rep,name=actions" json:"actions,omitempty"` +} + +func (m *Transaction) Reset() { *m = Transaction{} } +func (m *Transaction) String() string { return proto.CompactTextString(m) } +func (*Transaction) ProtoMessage() {} +func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{2} } + +func (m *Transaction) GetTimestamp() *google_protobuf1.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *Transaction) GetActions() []*TransactionAction { + if m != nil { + return m.Actions + } + return nil +} + +// TransactionAction binds a proposal to its action. The type field in the +// header dictates the type of action to be applied to the ledger. +type TransactionAction struct { + // The header of the proposal action, which is the proposal header + Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The payload of the action as defined by the type in the header For + // chaincode, it's the bytes of ChaincodeActionPayload + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *TransactionAction) Reset() { *m = TransactionAction{} } +func (m *TransactionAction) String() string { return proto.CompactTextString(m) } +func (*TransactionAction) ProtoMessage() {} +func (*TransactionAction) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{3} } + +// ChaincodeActionPayload is the message to be used for the TransactionAction's +// payload when the Header's type is set to CHAINCODE. It carries the +// chaincodeProposalPayload and an endorsed action to apply to the ledger. +type ChaincodeActionPayload struct { + // This field contains the bytes of the ChaincodeProposalPayload message from + // the original invocation (essentially the arguments) after the application + // of the visibility function. The main visibility modes are "full" (the + // entire ChaincodeProposalPayload message is included here), "hash" (only + // the hash of the ChaincodeProposalPayload message is included) or + // "nothing". This field will be used to check the consistency of + // ProposalResponsePayload.proposalHash. For the CHAINCODE type, + // ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader || + // f(ChaincodeProposalPayload)) where f is the visibility function. + ChaincodeProposalPayload []byte `protobuf:"bytes,1,opt,name=chaincodeProposalPayload,proto3" json:"chaincodeProposalPayload,omitempty"` + // The list of actions to apply to the ledger + Action *ChaincodeEndorsedAction `protobuf:"bytes,2,opt,name=action" json:"action,omitempty"` +} + +func (m *ChaincodeActionPayload) Reset() { *m = ChaincodeActionPayload{} } +func (m *ChaincodeActionPayload) String() string { return proto.CompactTextString(m) } +func (*ChaincodeActionPayload) ProtoMessage() {} +func (*ChaincodeActionPayload) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{4} } + +func (m *ChaincodeActionPayload) GetAction() *ChaincodeEndorsedAction { + if m != nil { + return m.Action + } + return nil +} + +// ChaincodeEndorsedAction carries information about the endorsement of a +// specific proposal +type ChaincodeEndorsedAction struct { + // This is the bytes of the ProposalResponsePayload message signed by the + // endorsers. Recall that for the CHAINCODE type, the + // ProposalResponsePayload's extenstion field carries a ChaincodeAction + ProposalResponsePayload []byte `protobuf:"bytes,1,opt,name=proposalResponsePayload,proto3" json:"proposalResponsePayload,omitempty"` + // The endorsement of the proposal, basically the endorser's signature over + // proposalResponsePayload + Endorsements []*Endorsement `protobuf:"bytes,2,rep,name=endorsements" json:"endorsements,omitempty"` +} + +func (m *ChaincodeEndorsedAction) Reset() { *m = ChaincodeEndorsedAction{} } +func (m *ChaincodeEndorsedAction) String() string { return proto.CompactTextString(m) } +func (*ChaincodeEndorsedAction) ProtoMessage() {} +func (*ChaincodeEndorsedAction) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{5} } + +func (m *ChaincodeEndorsedAction) GetEndorsements() []*Endorsement { + if m != nil { + return m.Endorsements + } + return nil +} + +func init() { + proto.RegisterType((*SignedTransaction)(nil), "protos.SignedTransaction") + proto.RegisterType((*InvalidTransaction)(nil), "protos.InvalidTransaction") + proto.RegisterType((*Transaction)(nil), "protos.Transaction") + proto.RegisterType((*TransactionAction)(nil), "protos.TransactionAction") + proto.RegisterType((*ChaincodeActionPayload)(nil), "protos.ChaincodeActionPayload") + proto.RegisterType((*ChaincodeEndorsedAction)(nil), "protos.ChaincodeEndorsedAction") + proto.RegisterEnum("protos.InvalidTransaction_Cause", InvalidTransaction_Cause_name, InvalidTransaction_Cause_value) +} + +func init() { proto.RegisterFile("peer/transaction.proto", fileDescriptor8) } + +var fileDescriptor8 = []byte{ + // 481 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0x51, 0x6b, 0xdb, 0x30, + 0x10, 0xc7, 0xe7, 0x96, 0xa4, 0xf4, 0x5c, 0x46, 0xa2, 0xb1, 0xd4, 0x0b, 0x85, 0x06, 0x3f, 0x75, + 0x1b, 0xd8, 0x90, 0xb2, 0xb5, 0xf4, 0xad, 0xcd, 0xf2, 0xd0, 0xb7, 0xe2, 0x05, 0x06, 0x83, 0x31, + 0x14, 0xfb, 0xe2, 0x08, 0x6c, 0xc9, 0x48, 0x72, 0x69, 0xbe, 0xc3, 0xf6, 0xba, 0xaf, 0xb3, 0xaf, + 0x36, 0x62, 0x49, 0x89, 0x43, 0x96, 0x27, 0x73, 0xfa, 0xff, 0xfc, 0xbf, 0xd3, 0xdd, 0x09, 0x06, +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8a, 0x32, 0x5e, 0xae, 0x2a, 0x94, + 0x05, 0x66, 0x39, 0xca, 0x78, 0x41, 0xe7, 0x92, 0xa5, 0xe6, 0xdd, 0xa9, 0x78, 0xfd, 0xc8, 0xe6, + 0xe6, 0x4d, 0x5e, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x52, 0xfc, 0xf5, 0x8d, 0xb4, 0x03, 0x00, + 0x00, +} diff --git a/protos/peer/fabric_transaction.proto b/protos/peer/transaction.proto similarity index 65% rename from protos/peer/fabric_transaction.proto rename to protos/peer/transaction.proto index a701d671110..53a5c716306 100644 --- a/protos/peer/fabric_transaction.proto +++ b/protos/peer/transaction.proto @@ -21,6 +21,7 @@ option go_package = "github.com/hyperledger/fabric/protos/peer"; package protos; import "google/protobuf/timestamp.proto"; +import "peer/proposal_response.proto"; // This message is necessary to facilitate the verification of the signature // (in the signature field) over the bytes of the transaction (in the @@ -84,3 +85,39 @@ message TransactionAction { // chaincode, it's the bytes of ChaincodeActionPayload bytes payload = 2; } + +//---------- Chaincode Transaction ------------ + +// ChaincodeActionPayload is the message to be used for the TransactionAction's +// payload when the Header's type is set to CHAINCODE. It carries the +// chaincodeProposalPayload and an endorsed action to apply to the ledger. +message ChaincodeActionPayload { + + // This field contains the bytes of the ChaincodeProposalPayload message from + // the original invocation (essentially the arguments) after the application + // of the visibility function. The main visibility modes are "full" (the + // entire ChaincodeProposalPayload message is included here), "hash" (only + // the hash of the ChaincodeProposalPayload message is included) or + // "nothing". This field will be used to check the consistency of + // ProposalResponsePayload.proposalHash. For the CHAINCODE type, + // ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader || + // f(ChaincodeProposalPayload)) where f is the visibility function. + bytes chaincodeProposalPayload = 1; + + // The list of actions to apply to the ledger + ChaincodeEndorsedAction action = 2; +} + +// ChaincodeEndorsedAction carries information about the endorsement of a +// specific proposal +message ChaincodeEndorsedAction { + + // This is the bytes of the ProposalResponsePayload message signed by the + // endorsers. Recall that for the CHAINCODE type, the + // ProposalResponsePayload's extenstion field carries a ChaincodeAction + bytes proposalResponsePayload = 1; + + // The endorsement of the proposal, basically the endorser's signature over + // proposalResponsePayload + repeated Endorsement endorsements = 2; +}