diff --git a/bddtests/chaincode_pb2.py b/bddtests/chaincode_pb2.py index 5253889079b..8c390f8c099 100644 --- a/bddtests/chaincode_pb2.py +++ b/bddtests/chaincode_pb2.py @@ -22,7 +22,7 @@ name='chaincode.proto', package='protos', syntax='proto3', - serialized_pb=_b('\n\x0f\x63haincode.proto\x12\x06protos\x1a\x14\x63haincodeevent.proto\x1a\x1fgoogle/protobuf/timestamp.proto\")\n\x0b\x43haincodeID\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x1e\n\x0e\x43haincodeInput\x12\x0c\n\x04\x61rgs\x18\x01 \x03(\x0c\"\xd6\x02\n\rChaincodeSpec\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.protos.ChaincodeSpec.Type\x12(\n\x0b\x63haincodeID\x18\x02 \x01(\x0b\x32\x13.protos.ChaincodeID\x12\'\n\x07\x63torMsg\x18\x03 \x01(\x0b\x32\x16.protos.ChaincodeInput\x12\x0f\n\x07timeout\x18\x04 \x01(\x05\x12\x15\n\rsecureContext\x18\x05 \x01(\t\x12:\n\x14\x63onfidentialityLevel\x18\x06 \x01(\x0e\x32\x1c.protos.ConfidentialityLevel\x12\x10\n\x08metadata\x18\x07 \x01(\x0c\x12\x12\n\nattributes\x18\x08 \x03(\t\">\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06GOLANG\x10\x01\x12\x08\n\x04NODE\x10\x02\x12\x07\n\x03\x43\x41R\x10\x03\x12\x08\n\x04JAVA\x10\x04\"\x86\x02\n\x17\x43haincodeDeploymentSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x31\n\reffectiveDate\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x63odePackage\x18\x03 \x01(\x0c\x12\x45\n\x07\x65xecEnv\x18\x04 \x01(\x0e\x32\x34.protos.ChaincodeDeploymentSpec.ExecutionEnvironment\".\n\x14\x45xecutionEnvironment\x12\n\n\x06\x44OCKER\x10\x00\x12\n\n\x06SYSTEM\x10\x01\"`\n\x17\x43haincodeInvocationSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x17\n\x0fidGenerationAlg\x18\x02 \x01(\t\"\xbf\x01\n\x18\x43haincodeSecurityContext\x12\x12\n\ncallerCert\x18\x01 \x01(\x0c\x12\x12\n\ncallerSign\x18\x02 \x01(\x0c\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0f\n\x07\x62inding\x18\x04 \x01(\x0c\x12\x10\n\x08metadata\x18\x05 \x01(\x0c\x12\x16\n\x0eparentMetadata\x18\x06 \x01(\x0c\x12/\n\x0btxTimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe1\x04\n\x10\x43haincodeMessage\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.protos.ChaincodeMessage.Type\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0c\n\x04txid\x18\x04 \x01(\t\x12\x39\n\x0fsecurityContext\x18\x05 \x01(\x0b\x32 .protos.ChaincodeSecurityContext\x12.\n\x0e\x63haincodeEvent\x18\x06 \x01(\x0b\x32\x16.protos.ChaincodeEvent\"\xe6\x02\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\x0c\n\x08REGISTER\x10\x01\x12\x0e\n\nREGISTERED\x10\x02\x12\x08\n\x04INIT\x10\x03\x12\t\n\x05READY\x10\x04\x12\x0f\n\x0bTRANSACTION\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\t\n\x05\x45RROR\x10\x07\x12\r\n\tGET_STATE\x10\x08\x12\r\n\tPUT_STATE\x10\t\x12\r\n\tDEL_STATE\x10\n\x12\x14\n\x10INVOKE_CHAINCODE\x10\x0b\x12\x10\n\x0cINVOKE_QUERY\x10\x0c\x12\x0c\n\x08RESPONSE\x10\r\x12\t\n\x05QUERY\x10\x0e\x12\x13\n\x0fQUERY_COMPLETED\x10\x0f\x12\x0f\n\x0bQUERY_ERROR\x10\x10\x12\x15\n\x11RANGE_QUERY_STATE\x10\x11\x12\x1a\n\x16RANGE_QUERY_STATE_NEXT\x10\x12\x12\x1b\n\x17RANGE_QUERY_STATE_CLOSE\x10\x13\x12\r\n\tKEEPALIVE\x10\x14\"*\n\x0cPutStateInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"3\n\x0fRangeQueryState\x12\x10\n\x08startKey\x18\x01 \x01(\t\x12\x0e\n\x06\x65ndKey\x18\x02 \x01(\t\"!\n\x13RangeQueryStateNext\x12\n\n\x02ID\x18\x01 \x01(\t\"\"\n\x14RangeQueryStateClose\x12\n\n\x02ID\x18\x01 \x01(\t\"5\n\x17RangeQueryStateKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"n\n\x17RangeQueryStateResponse\x12\x36\n\rkeysAndValues\x18\x01 \x03(\x0b\x32\x1f.protos.RangeQueryStateKeyValue\x12\x0f\n\x07hasMore\x18\x02 \x01(\x08\x12\n\n\x02ID\x18\x03 \x01(\t*4\n\x14\x43onfidentialityLevel\x12\n\n\x06PUBLIC\x10\x00\x12\x10\n\x0c\x43ONFIDENTIAL\x10\x01\x32X\n\x10\x43haincodeSupport\x12\x44\n\x08Register\x12\x18.protos.ChaincodeMessage\x1a\x18.protos.ChaincodeMessage\"\x00(\x01\x30\x01\x42\x18\n\x16org.hyperledger.protosb\x06proto3') + serialized_pb=_b('\n\x0f\x63haincode.proto\x12\x06protos\x1a\x14\x63haincodeevent.proto\x1a\x1fgoogle/protobuf/timestamp.proto\")\n\x0b\x43haincodeID\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x1e\n\x0e\x43haincodeInput\x12\x0c\n\x04\x61rgs\x18\x01 \x03(\x0c\"\xd6\x02\n\rChaincodeSpec\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.protos.ChaincodeSpec.Type\x12(\n\x0b\x63haincodeID\x18\x02 \x01(\x0b\x32\x13.protos.ChaincodeID\x12\'\n\x07\x63torMsg\x18\x03 \x01(\x0b\x32\x16.protos.ChaincodeInput\x12\x0f\n\x07timeout\x18\x04 \x01(\x05\x12\x15\n\rsecureContext\x18\x05 \x01(\t\x12:\n\x14\x63onfidentialityLevel\x18\x06 \x01(\x0e\x32\x1c.protos.ConfidentialityLevel\x12\x10\n\x08metadata\x18\x07 \x01(\x0c\x12\x12\n\nattributes\x18\x08 \x03(\t\">\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06GOLANG\x10\x01\x12\x08\n\x04NODE\x10\x02\x12\x07\n\x03\x43\x41R\x10\x03\x12\x08\n\x04JAVA\x10\x04\"\x86\x02\n\x17\x43haincodeDeploymentSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x31\n\reffectiveDate\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x63odePackage\x18\x03 \x01(\x0c\x12\x45\n\x07\x65xecEnv\x18\x04 \x01(\x0e\x32\x34.protos.ChaincodeDeploymentSpec.ExecutionEnvironment\".\n\x14\x45xecutionEnvironment\x12\n\n\x06\x44OCKER\x10\x00\x12\n\n\x06SYSTEM\x10\x01\"`\n\x17\x43haincodeInvocationSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x17\n\x0fidGenerationAlg\x18\x02 \x01(\t\"\xbf\x01\n\x18\x43haincodeSecurityContext\x12\x12\n\ncallerCert\x18\x01 \x01(\x0c\x12\x12\n\ncallerSign\x18\x02 \x01(\x0c\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0f\n\x07\x62inding\x18\x04 \x01(\x0c\x12\x10\n\x08metadata\x18\x05 \x01(\x0c\x12\x16\n\x0eparentMetadata\x18\x06 \x01(\x0c\x12/\n\x0btxTimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe1\x04\n\x10\x43haincodeMessage\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.protos.ChaincodeMessage.Type\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0c\n\x04txid\x18\x04 \x01(\t\x12\x39\n\x0fsecurityContext\x18\x05 \x01(\x0b\x32 .protos.ChaincodeSecurityContext\x12.\n\x0e\x63haincodeEvent\x18\x06 \x01(\x0b\x32\x16.protos.ChaincodeEvent\"\xe6\x02\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\x0c\n\x08REGISTER\x10\x01\x12\x0e\n\nREGISTERED\x10\x02\x12\x08\n\x04INIT\x10\x03\x12\t\n\x05READY\x10\x04\x12\x0f\n\x0bTRANSACTION\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\t\n\x05\x45RROR\x10\x07\x12\r\n\tGET_STATE\x10\x08\x12\r\n\tPUT_STATE\x10\t\x12\r\n\tDEL_STATE\x10\n\x12\x14\n\x10INVOKE_CHAINCODE\x10\x0b\x12\x10\n\x0cINVOKE_QUERY\x10\x0c\x12\x0c\n\x08RESPONSE\x10\r\x12\t\n\x05QUERY\x10\x0e\x12\x13\n\x0fQUERY_COMPLETED\x10\x0f\x12\x0f\n\x0bQUERY_ERROR\x10\x10\x12\x15\n\x11GET_STATE_BY_RANGE\x10\x11\x12\x1a\n\x16GET_STATE_BY_RANGE_NEXT\x10\x12\x12\x1b\n\x17GET_STATE_BY_RANGE_CLOSE\x10\x13\x12\r\n\tKEEPALIVE\x10\x14\"*\n\x0cPutStateInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"3\n\x0fGetStateByRange\x12\x10\n\x08startKey\x18\x01 \x01(\t\x12\x0e\n\x06\x65ndKey\x18\x02 \x01(\t\"!\n\x13GetStateByRangeNext\x12\n\n\x02ID\x18\x01 \x01(\t\"\"\n\x14GetStateByRangeClose\x12\n\n\x02ID\x18\x01 \x01(\t\"5\n\x17GetStateByRangeKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"n\n\x17GetStateByRangeResponse\x12\x36\n\rkeysAndValues\x18\x01 \x03(\x0b\x32\x1f.protos.GetStateByRangeKeyValue\x12\x0f\n\x07hasMore\x18\x02 \x01(\x08\x12\n\n\x02ID\x18\x03 \x01(\t*4\n\x14\x43onfidentialityLevel\x12\n\n\x06PUBLIC\x10\x00\x12\x10\n\x0c\x43ONFIDENTIAL\x10\x01\x32X\n\x10\x43haincodeSupport\x12\x44\n\x08Register\x12\x18.protos.ChaincodeMessage\x1a\x18.protos.ChaincodeMessage\"\x00(\x01\x30\x01\x42\x18\n\x16org.hyperledger.protosb\x06proto3') , dependencies=[chaincodeevent__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -185,15 +185,15 @@ options=None, type=None), _descriptor.EnumValueDescriptor( - name='RANGE_QUERY_STATE', index=17, number=17, + name='GET_STATE_BY_RANGE', index=17, number=17, options=None, type=None), _descriptor.EnumValueDescriptor( - name='RANGE_QUERY_STATE_NEXT', index=18, number=18, + name='GET_STATE_BY_RANGE_NEXT', index=18, number=18, options=None, type=None), _descriptor.EnumValueDescriptor( - name='RANGE_QUERY_STATE_CLOSE', index=19, number=19, + name='GET_STATE_BY_RANGE_CLOSE', index=19, number=19, options=None, type=None), _descriptor.EnumValueDescriptor( @@ -628,22 +628,22 @@ ) -_RANGEQUERYSTATE = _descriptor.Descriptor( - name='RangeQueryState', - full_name='protos.RangeQueryState', +_GETSTATEBYRANGE = _descriptor.Descriptor( + name='GetStateByRange', + full_name='protos.GetStateByRange', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='startKey', full_name='protos.RangeQueryState.startKey', index=0, + name='startKey', full_name='protos.GetStateByRange.startKey', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='endKey', full_name='protos.RangeQueryState.endKey', index=1, + name='endKey', full_name='protos.GetStateByRange.endKey', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, @@ -666,15 +666,15 @@ ) -_RANGEQUERYSTATENEXT = _descriptor.Descriptor( - name='RangeQueryStateNext', - full_name='protos.RangeQueryStateNext', +_GETSTATEBYRANGENEXT = _descriptor.Descriptor( + name='GetStateByRangeNext', + full_name='protos.GetStateByRangeNext', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='ID', full_name='protos.RangeQueryStateNext.ID', index=0, + name='ID', full_name='protos.GetStateByRangeNext.ID', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, @@ -697,15 +697,15 @@ ) -_RANGEQUERYSTATECLOSE = _descriptor.Descriptor( - name='RangeQueryStateClose', - full_name='protos.RangeQueryStateClose', +_GETSTATEBYRANGECLOSE = _descriptor.Descriptor( + name='GetStateByRangeClose', + full_name='protos.GetStateByRangeClose', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='ID', full_name='protos.RangeQueryStateClose.ID', index=0, + name='ID', full_name='protos.GetStateByRangeClose.ID', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, @@ -728,22 +728,22 @@ ) -_RANGEQUERYSTATEKEYVALUE = _descriptor.Descriptor( - name='RangeQueryStateKeyValue', - full_name='protos.RangeQueryStateKeyValue', +_GETSTATEBYRANGEKEYVALUE = _descriptor.Descriptor( + name='GetStateByRangeKeyValue', + full_name='protos.GetStateByRangeKeyValue', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='key', full_name='protos.RangeQueryStateKeyValue.key', index=0, + name='key', full_name='protos.GetStateByRangeKeyValue.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='value', full_name='protos.RangeQueryStateKeyValue.value', index=1, + name='value', full_name='protos.GetStateByRangeKeyValue.value', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, @@ -766,29 +766,29 @@ ) -_RANGEQUERYSTATERESPONSE = _descriptor.Descriptor( - name='RangeQueryStateResponse', - full_name='protos.RangeQueryStateResponse', +_GETSTATEBYRANGERESPONSE = _descriptor.Descriptor( + name='GetStateByRangeResponse', + full_name='protos.GetStateByRangeResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='keysAndValues', full_name='protos.RangeQueryStateResponse.keysAndValues', index=0, + name='keysAndValues', full_name='protos.GetStateByRangeResponse.keysAndValues', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='hasMore', full_name='protos.RangeQueryStateResponse.hasMore', index=1, + name='hasMore', full_name='protos.GetStateByRangeResponse.hasMore', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='ID', full_name='protos.RangeQueryStateResponse.ID', index=2, + name='ID', full_name='protos.GetStateByRangeResponse.ID', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, @@ -826,7 +826,7 @@ _CHAINCODEMESSAGE.fields_by_name['securityContext'].message_type = _CHAINCODESECURITYCONTEXT _CHAINCODEMESSAGE.fields_by_name['chaincodeEvent'].message_type = chaincodeevent__pb2._CHAINCODEEVENT _CHAINCODEMESSAGE_TYPE.containing_type = _CHAINCODEMESSAGE -_RANGEQUERYSTATERESPONSE.fields_by_name['keysAndValues'].message_type = _RANGEQUERYSTATEKEYVALUE +_GETSTATEBYRANGERESPONSE.fields_by_name['keysAndValues'].message_type = _GETSTATEBYRANGEKEYVALUE DESCRIPTOR.message_types_by_name['ChaincodeID'] = _CHAINCODEID DESCRIPTOR.message_types_by_name['ChaincodeInput'] = _CHAINCODEINPUT DESCRIPTOR.message_types_by_name['ChaincodeSpec'] = _CHAINCODESPEC @@ -835,11 +835,11 @@ DESCRIPTOR.message_types_by_name['ChaincodeSecurityContext'] = _CHAINCODESECURITYCONTEXT DESCRIPTOR.message_types_by_name['ChaincodeMessage'] = _CHAINCODEMESSAGE DESCRIPTOR.message_types_by_name['PutStateInfo'] = _PUTSTATEINFO -DESCRIPTOR.message_types_by_name['RangeQueryState'] = _RANGEQUERYSTATE -DESCRIPTOR.message_types_by_name['RangeQueryStateNext'] = _RANGEQUERYSTATENEXT -DESCRIPTOR.message_types_by_name['RangeQueryStateClose'] = _RANGEQUERYSTATECLOSE -DESCRIPTOR.message_types_by_name['RangeQueryStateKeyValue'] = _RANGEQUERYSTATEKEYVALUE -DESCRIPTOR.message_types_by_name['RangeQueryStateResponse'] = _RANGEQUERYSTATERESPONSE +DESCRIPTOR.message_types_by_name['GetStateByRange'] = _GETSTATEBYRANGE +DESCRIPTOR.message_types_by_name['GetStateByRangeNext'] = _GETSTATEBYRANGENEXT +DESCRIPTOR.message_types_by_name['GetStateByRangeClose'] = _GETSTATEBYRANGECLOSE +DESCRIPTOR.message_types_by_name['GetStateByRangeKeyValue'] = _GETSTATEBYRANGEKEYVALUE +DESCRIPTOR.message_types_by_name['GetStateByRangeResponse'] = _GETSTATEBYRANGERESPONSE DESCRIPTOR.enum_types_by_name['ConfidentialityLevel'] = _CONFIDENTIALITYLEVEL ChaincodeID = _reflection.GeneratedProtocolMessageType('ChaincodeID', (_message.Message,), dict( @@ -898,40 +898,40 @@ )) _sym_db.RegisterMessage(PutStateInfo) -RangeQueryState = _reflection.GeneratedProtocolMessageType('RangeQueryState', (_message.Message,), dict( - DESCRIPTOR = _RANGEQUERYSTATE, +GetStateByRange = _reflection.GeneratedProtocolMessageType('GetStateByRange', (_message.Message,), dict( + DESCRIPTOR = _GETSTATEBYRANGE, __module__ = 'chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.RangeQueryState) + # @@protoc_insertion_point(class_scope:protos.GetStateByRange) )) -_sym_db.RegisterMessage(RangeQueryState) +_sym_db.RegisterMessage(GetStateByRange) -RangeQueryStateNext = _reflection.GeneratedProtocolMessageType('RangeQueryStateNext', (_message.Message,), dict( - DESCRIPTOR = _RANGEQUERYSTATENEXT, +GetStateByRangeNext = _reflection.GeneratedProtocolMessageType('GetStateByRangeNext', (_message.Message,), dict( + DESCRIPTOR = _GETSTATEBYRANGENEXT, __module__ = 'chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.RangeQueryStateNext) + # @@protoc_insertion_point(class_scope:protos.GetStateByRangeNext) )) -_sym_db.RegisterMessage(RangeQueryStateNext) +_sym_db.RegisterMessage(GetStateByRangeNext) -RangeQueryStateClose = _reflection.GeneratedProtocolMessageType('RangeQueryStateClose', (_message.Message,), dict( - DESCRIPTOR = _RANGEQUERYSTATECLOSE, +GetStateByRangeClose = _reflection.GeneratedProtocolMessageType('GetStateByRangeClose', (_message.Message,), dict( + DESCRIPTOR = _GETSTATEBYRANGECLOSE, __module__ = 'chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.RangeQueryStateClose) + # @@protoc_insertion_point(class_scope:protos.GetStateByRangeClose) )) -_sym_db.RegisterMessage(RangeQueryStateClose) +_sym_db.RegisterMessage(GetStateByRangeClose) -RangeQueryStateKeyValue = _reflection.GeneratedProtocolMessageType('RangeQueryStateKeyValue', (_message.Message,), dict( - DESCRIPTOR = _RANGEQUERYSTATEKEYVALUE, +GetStateByRangeKeyValue = _reflection.GeneratedProtocolMessageType('GetStateByRangeKeyValue', (_message.Message,), dict( + DESCRIPTOR = _GETSTATEBYRANGEKEYVALUE, __module__ = 'chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.RangeQueryStateKeyValue) + # @@protoc_insertion_point(class_scope:protos.GetStateByRangeKeyValue) )) -_sym_db.RegisterMessage(RangeQueryStateKeyValue) +_sym_db.RegisterMessage(GetStateByRangeKeyValue) -RangeQueryStateResponse = _reflection.GeneratedProtocolMessageType('RangeQueryStateResponse', (_message.Message,), dict( - DESCRIPTOR = _RANGEQUERYSTATERESPONSE, +GetStateByRangeResponse = _reflection.GeneratedProtocolMessageType('GetStateByRangeResponse', (_message.Message,), dict( + DESCRIPTOR = _GETSTATEBYRANGERESPONSE, __module__ = 'chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.RangeQueryStateResponse) + # @@protoc_insertion_point(class_scope:protos.GetStateByRangeResponse) )) -_sym_db.RegisterMessage(RangeQueryStateResponse) +_sym_db.RegisterMessage(GetStateByRangeResponse) DESCRIPTOR.has_options = True diff --git a/bddtests/peer/chaincode_pb2.py b/bddtests/peer/chaincode_pb2.py index d066d61b1d0..37b8b5dfdf2 100644 --- a/bddtests/peer/chaincode_pb2.py +++ b/bddtests/peer/chaincode_pb2.py @@ -22,7 +22,7 @@ name='peer/chaincode.proto', package='protos', syntax='proto3', - serialized_pb=_b('\n\x14peer/chaincode.proto\x12\x06protos\x1a\x19peer/chaincodeevent.proto\x1a\x1fgoogle/protobuf/timestamp.proto\")\n\x0b\x43haincodeID\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x1e\n\x0e\x43haincodeInput\x12\x0c\n\x04\x61rgs\x18\x01 \x03(\x0c\"\xdb\x01\n\rChaincodeSpec\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.protos.ChaincodeSpec.Type\x12(\n\x0b\x63haincodeID\x18\x02 \x01(\x0b\x32\x13.protos.ChaincodeID\x12%\n\x05input\x18\x03 \x01(\x0b\x32\x16.protos.ChaincodeInput\x12\x0f\n\x07timeout\x18\x04 \x01(\x05\">\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06GOLANG\x10\x01\x12\x08\n\x04NODE\x10\x02\x12\x07\n\x03\x43\x41R\x10\x03\x12\x08\n\x04JAVA\x10\x04\"\x86\x02\n\x17\x43haincodeDeploymentSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x31\n\reffectiveDate\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x63odePackage\x18\x03 \x01(\x0c\x12\x45\n\x07\x65xecEnv\x18\x04 \x01(\x0e\x32\x34.protos.ChaincodeDeploymentSpec.ExecutionEnvironment\".\n\x14\x45xecutionEnvironment\x12\n\n\x06\x44OCKER\x10\x00\x12\n\n\x06SYSTEM\x10\x01\"`\n\x17\x43haincodeInvocationSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x17\n\x0fidGenerationAlg\x18\x02 \x01(\t\">\n\x18\x43haincodeProposalContext\x12\x0f\n\x07\x63reator\x18\x01 \x01(\x0c\x12\x11\n\ttransient\x18\x02 \x01(\x0c\"\xab\x04\n\x10\x43haincodeMessage\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.protos.ChaincodeMessage.Type\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0c\n\x04txid\x18\x04 \x01(\t\x12\x39\n\x0fproposalContext\x18\x05 \x01(\x0b\x32 .protos.ChaincodeProposalContext\x12.\n\x0e\x63haincodeEvent\x18\x06 \x01(\x0b\x32\x16.protos.ChaincodeEvent\"\xb0\x02\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\x0c\n\x08REGISTER\x10\x01\x12\x0e\n\nREGISTERED\x10\x02\x12\x08\n\x04INIT\x10\x03\x12\t\n\x05READY\x10\x04\x12\x0f\n\x0bTRANSACTION\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\t\n\x05\x45RROR\x10\x07\x12\r\n\tGET_STATE\x10\x08\x12\r\n\tPUT_STATE\x10\t\x12\r\n\tDEL_STATE\x10\n\x12\x14\n\x10INVOKE_CHAINCODE\x10\x0b\x12\x0c\n\x08RESPONSE\x10\r\x12\x15\n\x11RANGE_QUERY_STATE\x10\x0e\x12\x17\n\x13\x45XECUTE_QUERY_STATE\x10\x0f\x12\x14\n\x10QUERY_STATE_NEXT\x10\x10\x12\x15\n\x11QUERY_STATE_CLOSE\x10\x11\x12\r\n\tKEEPALIVE\x10\x12\"*\n\x0cPutStateInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"3\n\x0fRangeQueryState\x12\x10\n\x08startKey\x18\x01 \x01(\t\x12\x0e\n\x06\x65ndKey\x18\x02 \x01(\t\"\"\n\x11\x45xecuteQueryState\x12\r\n\x05query\x18\x01 \x01(\t\"\x1c\n\x0eQueryStateNext\x12\n\n\x02ID\x18\x01 \x01(\t\"\x1d\n\x0fQueryStateClose\x12\n\n\x02ID\x18\x01 \x01(\t\"0\n\x12QueryStateKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"d\n\x12QueryStateResponse\x12\x31\n\rkeysAndValues\x18\x01 \x03(\x0b\x32\x1a.protos.QueryStateKeyValue\x12\x0f\n\x07hasMore\x18\x02 \x01(\x08\x12\n\n\x02ID\x18\x03 \x01(\t*4\n\x14\x43onfidentialityLevel\x12\n\n\x06PUBLIC\x10\x00\x12\x10\n\x0c\x43ONFIDENTIAL\x10\x01\x32X\n\x10\x43haincodeSupport\x12\x44\n\x08Register\x12\x18.protos.ChaincodeMessage\x1a\x18.protos.ChaincodeMessage\"\x00(\x01\x30\x01\x42\x43\n\x16org.hyperledger.protosZ)github.com/hyperledger/fabric/protos/peerb\x06proto3') + serialized_pb=_b('\n\x14peer/chaincode.proto\x12\x06protos\x1a\x19peer/chaincodeevent.proto\x1a\x1fgoogle/protobuf/timestamp.proto\")\n\x0b\x43haincodeID\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x1e\n\x0e\x43haincodeInput\x12\x0c\n\x04\x61rgs\x18\x01 \x03(\x0c\"\xdb\x01\n\rChaincodeSpec\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.protos.ChaincodeSpec.Type\x12(\n\x0b\x63haincodeID\x18\x02 \x01(\x0b\x32\x13.protos.ChaincodeID\x12%\n\x05input\x18\x03 \x01(\x0b\x32\x16.protos.ChaincodeInput\x12\x0f\n\x07timeout\x18\x04 \x01(\x05\">\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\n\n\x06GOLANG\x10\x01\x12\x08\n\x04NODE\x10\x02\x12\x07\n\x03\x43\x41R\x10\x03\x12\x08\n\x04JAVA\x10\x04\"\x86\x02\n\x17\x43haincodeDeploymentSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x31\n\reffectiveDate\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0b\x63odePackage\x18\x03 \x01(\x0c\x12\x45\n\x07\x65xecEnv\x18\x04 \x01(\x0e\x32\x34.protos.ChaincodeDeploymentSpec.ExecutionEnvironment\".\n\x14\x45xecutionEnvironment\x12\n\n\x06\x44OCKER\x10\x00\x12\n\n\x06SYSTEM\x10\x01\"`\n\x17\x43haincodeInvocationSpec\x12,\n\rchaincodeSpec\x18\x01 \x01(\x0b\x32\x15.protos.ChaincodeSpec\x12\x17\n\x0fidGenerationAlg\x18\x02 \x01(\t\">\n\x18\x43haincodeProposalContext\x12\x0f\n\x07\x63reator\x18\x01 \x01(\x0c\x12\x11\n\ttransient\x18\x02 \x01(\x0c\"\xab\x04\n\x10\x43haincodeMessage\x12+\n\x04type\x18\x01 \x01(\x0e\x32\x1d.protos.ChaincodeMessage.Type\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0c\n\x04txid\x18\x04 \x01(\t\x12\x39\n\x0fproposalContext\x18\x05 \x01(\x0b\x32 .protos.ChaincodeProposalContext\x12.\n\x0e\x63haincodeEvent\x18\x06 \x01(\x0b\x32\x16.protos.ChaincodeEvent\"\xb0\x02\n\x04Type\x12\r\n\tUNDEFINED\x10\x00\x12\x0c\n\x08REGISTER\x10\x01\x12\x0e\n\nREGISTERED\x10\x02\x12\x08\n\x04INIT\x10\x03\x12\t\n\x05READY\x10\x04\x12\x0f\n\x0bTRANSACTION\x10\x05\x12\r\n\tCOMPLETED\x10\x06\x12\t\n\x05\x45RROR\x10\x07\x12\r\n\tGET_STATE\x10\x08\x12\r\n\tPUT_STATE\x10\t\x12\r\n\tDEL_STATE\x10\n\x12\x14\n\x10INVOKE_CHAINCODE\x10\x0b\x12\x0c\n\x08RESPONSE\x10\r\x12\x15\n\x11GET_STATE_BY_RANGE\x10\x0e\x12\x17\n\x13\x45XECUTE_QUERY_STATE\x10\x0f\x12\x14\n\x10QUERY_STATE_NEXT\x10\x10\x12\x15\n\x11QUERY_STATE_CLOSE\x10\x11\x12\r\n\tKEEPALIVE\x10\x12\"*\n\x0cPutStateInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"3\n\x0fGetStateByRange\x12\x10\n\x08startKey\x18\x01 \x01(\t\x12\x0e\n\x06\x65ndKey\x18\x02 \x01(\t\"\"\n\x11\x45xecuteQueryState\x12\r\n\x05query\x18\x01 \x01(\t\"\x1c\n\x0eQueryStateNext\x12\n\n\x02ID\x18\x01 \x01(\t\"\x1d\n\x0fQueryStateClose\x12\n\n\x02ID\x18\x01 \x01(\t\"0\n\x12QueryStateKeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"d\n\x12QueryStateResponse\x12\x31\n\rkeysAndValues\x18\x01 \x03(\x0b\x32\x1a.protos.QueryStateKeyValue\x12\x0f\n\x07hasMore\x18\x02 \x01(\x08\x12\n\n\x02ID\x18\x03 \x01(\t*4\n\x14\x43onfidentialityLevel\x12\n\n\x06PUBLIC\x10\x00\x12\x10\n\x0c\x43ONFIDENTIAL\x10\x01\x32X\n\x10\x43haincodeSupport\x12\x44\n\x08Register\x12\x18.protos.ChaincodeMessage\x1a\x18.protos.ChaincodeMessage\"\x00(\x01\x30\x01\x42\x43\n\x16org.hyperledger.protosZ)github.com/hyperledger/fabric/protos/peerb\x06proto3') , dependencies=[peer_dot_chaincodeevent__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -169,11 +169,11 @@ options=None, type=None), _descriptor.EnumValueDescriptor( - name='RANGE_QUERY_STATE', index=13, number=14, + name='GET_STATE_BY_RANGE', index=13, number=14, options=None, type=None), _descriptor.EnumValueDescriptor( - name='EXECUTE_QUERY_STATE', index=14, number=15, + name='GET_QUERY_RESULT', index=14, number=15, options=None, type=None), _descriptor.EnumValueDescriptor( @@ -553,22 +553,22 @@ ) -_RANGEQUERYSTATE = _descriptor.Descriptor( - name='RangeQueryState', - full_name='protos.RangeQueryState', +_GETSTATEBYRANGE = _descriptor.Descriptor( + name='GetStateByRange', + full_name='protos.GetStateByRange', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='startKey', full_name='protos.RangeQueryState.startKey', index=0, + name='startKey', full_name='protos.GetStateByRange.startKey', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( - name='endKey', full_name='protos.RangeQueryState.endKey', index=1, + name='endKey', full_name='protos.GetStateByRange.endKey', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, @@ -591,15 +591,15 @@ ) -_EXECUTEQUERYSTATE = _descriptor.Descriptor( - name='ExecuteQueryState', - full_name='protos.ExecuteQueryState', +_GETQUERYRESULT = _descriptor.Descriptor( + name='GetQueryResult', + full_name='protos.GetQueryResult', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='query', full_name='protos.ExecuteQueryState.query', index=0, + name='query', full_name='protos.GetQueryResult.query', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, @@ -789,8 +789,8 @@ DESCRIPTOR.message_types_by_name['ChaincodeProposalContext'] = _CHAINCODEPROPOSALCONTEXT DESCRIPTOR.message_types_by_name['ChaincodeMessage'] = _CHAINCODEMESSAGE DESCRIPTOR.message_types_by_name['PutStateInfo'] = _PUTSTATEINFO -DESCRIPTOR.message_types_by_name['RangeQueryState'] = _RANGEQUERYSTATE -DESCRIPTOR.message_types_by_name['ExecuteQueryState'] = _EXECUTEQUERYSTATE +DESCRIPTOR.message_types_by_name['GetStateByRange'] = _GETSTATEBYRANGE +DESCRIPTOR.message_types_by_name['GetQueryResult'] = _GETQUERYRESULT DESCRIPTOR.message_types_by_name['QueryStateNext'] = _QUERYSTATENEXT DESCRIPTOR.message_types_by_name['QueryStateClose'] = _QUERYSTATECLOSE DESCRIPTOR.message_types_by_name['QueryStateKeyValue'] = _QUERYSTATEKEYVALUE @@ -853,19 +853,19 @@ )) _sym_db.RegisterMessage(PutStateInfo) -RangeQueryState = _reflection.GeneratedProtocolMessageType('RangeQueryState', (_message.Message,), dict( - DESCRIPTOR = _RANGEQUERYSTATE, +GetStateByRange = _reflection.GeneratedProtocolMessageType('GetStateByRange', (_message.Message,), dict( + DESCRIPTOR = _GETSTATEBYRANGE, __module__ = 'peer.chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.RangeQueryState) + # @@protoc_insertion_point(class_scope:protos.GetStateByRange) )) -_sym_db.RegisterMessage(RangeQueryState) +_sym_db.RegisterMessage(GetStateByRange) -ExecuteQueryState = _reflection.GeneratedProtocolMessageType('ExecuteQueryState', (_message.Message,), dict( - DESCRIPTOR = _EXECUTEQUERYSTATE, +GetQueryResult = _reflection.GeneratedProtocolMessageType('GetQueryResult', (_message.Message,), dict( + DESCRIPTOR = _GETQUERYRESULT, __module__ = 'peer.chaincode_pb2' - # @@protoc_insertion_point(class_scope:protos.ExecuteQueryState) + # @@protoc_insertion_point(class_scope:protos.GetQueryResult) )) -_sym_db.RegisterMessage(ExecuteQueryState) +_sym_db.RegisterMessage(GetQueryResult) QueryStateNext = _reflection.GeneratedProtocolMessageType('QueryStateNext', (_message.Message,), dict( DESCRIPTOR = _QUERYSTATENEXT, diff --git a/core/chaincode/handler.go b/core/chaincode/handler.go index 72b87de3edb..389e138dfb7 100644 --- a/core/chaincode/handler.go +++ b/core/chaincode/handler.go @@ -415,8 +415,8 @@ func newChaincodeSupportHandler(chaincodeSupport *ChaincodeSupport, peerChatStre {Name: pb.ChaincodeMessage_INVOKE_CHAINCODE.String(), Src: []string{readystate}, Dst: readystate}, {Name: pb.ChaincodeMessage_COMPLETED.String(), Src: []string{readystate}, Dst: readystate}, {Name: pb.ChaincodeMessage_GET_STATE.String(), Src: []string{readystate}, Dst: readystate}, - {Name: pb.ChaincodeMessage_RANGE_QUERY_STATE.String(), Src: []string{readystate}, Dst: readystate}, - {Name: pb.ChaincodeMessage_EXECUTE_QUERY_STATE.String(), Src: []string{readystate}, Dst: readystate}, + {Name: pb.ChaincodeMessage_GET_STATE_BY_RANGE.String(), Src: []string{readystate}, Dst: readystate}, + {Name: pb.ChaincodeMessage_GET_QUERY_RESULT.String(), Src: []string{readystate}, Dst: readystate}, {Name: pb.ChaincodeMessage_QUERY_STATE_NEXT.String(), Src: []string{readystate}, Dst: readystate}, {Name: pb.ChaincodeMessage_QUERY_STATE_CLOSE.String(), Src: []string{readystate}, Dst: readystate}, {Name: pb.ChaincodeMessage_ERROR.String(), Src: []string{readystate}, Dst: readystate}, @@ -425,19 +425,19 @@ func newChaincodeSupportHandler(chaincodeSupport *ChaincodeSupport, peerChatStre {Name: pb.ChaincodeMessage_TRANSACTION.String(), Src: []string{readystate}, Dst: readystate}, }, fsm.Callbacks{ - "before_" + pb.ChaincodeMessage_REGISTER.String(): func(e *fsm.Event) { v.beforeRegisterEvent(e, v.FSM.Current()) }, - "before_" + pb.ChaincodeMessage_COMPLETED.String(): func(e *fsm.Event) { v.beforeCompletedEvent(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_GET_STATE.String(): func(e *fsm.Event) { v.afterGetState(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_RANGE_QUERY_STATE.String(): func(e *fsm.Event) { v.afterRangeQueryState(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_EXECUTE_QUERY_STATE.String(): func(e *fsm.Event) { v.afterExecuteQueryState(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_QUERY_STATE_NEXT.String(): func(e *fsm.Event) { v.afterQueryStateNext(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_QUERY_STATE_CLOSE.String(): func(e *fsm.Event) { v.afterQueryStateClose(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_PUT_STATE.String(): func(e *fsm.Event) { v.enterBusyState(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_DEL_STATE.String(): func(e *fsm.Event) { v.enterBusyState(e, v.FSM.Current()) }, - "after_" + pb.ChaincodeMessage_INVOKE_CHAINCODE.String(): func(e *fsm.Event) { v.enterBusyState(e, v.FSM.Current()) }, - "enter_" + establishedstate: func(e *fsm.Event) { v.enterEstablishedState(e, v.FSM.Current()) }, - "enter_" + readystate: func(e *fsm.Event) { v.enterReadyState(e, v.FSM.Current()) }, - "enter_" + endstate: func(e *fsm.Event) { v.enterEndState(e, v.FSM.Current()) }, + "before_" + pb.ChaincodeMessage_REGISTER.String(): func(e *fsm.Event) { v.beforeRegisterEvent(e, v.FSM.Current()) }, + "before_" + pb.ChaincodeMessage_COMPLETED.String(): func(e *fsm.Event) { v.beforeCompletedEvent(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_GET_STATE.String(): func(e *fsm.Event) { v.afterGetState(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_GET_STATE_BY_RANGE.String(): func(e *fsm.Event) { v.afterGetStateByRange(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_GET_QUERY_RESULT.String(): func(e *fsm.Event) { v.afterGetQueryResult(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_QUERY_STATE_NEXT.String(): func(e *fsm.Event) { v.afterQueryStateNext(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_QUERY_STATE_CLOSE.String(): func(e *fsm.Event) { v.afterQueryStateClose(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_PUT_STATE.String(): func(e *fsm.Event) { v.enterBusyState(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_DEL_STATE.String(): func(e *fsm.Event) { v.enterBusyState(e, v.FSM.Current()) }, + "after_" + pb.ChaincodeMessage_INVOKE_CHAINCODE.String(): func(e *fsm.Event) { v.enterBusyState(e, v.FSM.Current()) }, + "enter_" + establishedstate: func(e *fsm.Event) { v.enterEstablishedState(e, v.FSM.Current()) }, + "enter_" + readystate: func(e *fsm.Event) { v.enterReadyState(e, v.FSM.Current()) }, + "enter_" + endstate: func(e *fsm.Event) { v.enterEndState(e, v.FSM.Current()) }, }, ) @@ -632,27 +632,27 @@ func (handler *Handler) handleGetState(msg *pb.ChaincodeMessage) { }() } -const maxRangeQueryStateLimit = 100 +const maxGetStateByRangeLimit = 100 -// afterRangeQueryState handles a RANGE_QUERY_STATE request from the chaincode. -func (handler *Handler) afterRangeQueryState(e *fsm.Event, state string) { +// afterGetStateByRange handles a GET_STATE_BY_RANGE request from the chaincode. +func (handler *Handler) afterGetStateByRange(e *fsm.Event, state string) { msg, ok := e.Args[0].(*pb.ChaincodeMessage) if !ok { e.Cancel(fmt.Errorf("Received unexpected message type")) return } - chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_RANGE_QUERY_STATE) + chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_GET_STATE_BY_RANGE) // Query ledger for state - handler.handleRangeQueryState(msg) + handler.handleGetStateByRange(msg) chaincodeLogger.Debug("Exiting GET_STATE") } // Handles query to ledger to rage query state -func (handler *Handler) handleRangeQueryState(msg *pb.ChaincodeMessage) { +func (handler *Handler) handleGetStateByRange(msg *pb.ChaincodeMessage) { // The defer followed by triggering a go routine dance is needed to ensure that the previous state transition // is completed before the next one is triggered. The previous state transition is deemed complete only when - // the afterRangeQueryState function is exited. Interesting bug fix!! + // the afterGetStateByRange function is exited. Interesting bug fix!! go func() { // Check if this is the unique state request from this chaincode txid uniqueReq := handler.createTXIDEntry(msg.Txid) @@ -666,12 +666,12 @@ func (handler *Handler) handleRangeQueryState(msg *pb.ChaincodeMessage) { defer func() { handler.deleteTXIDEntry(msg.Txid) - chaincodeLogger.Debugf("[%s]handleRangeQueryState serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) + chaincodeLogger.Debugf("[%s]handleGetStateByRange serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) handler.serialSendAsync(serialSendMsg, nil) }() - rangeQueryState := &pb.RangeQueryState{} - unmarshalErr := proto.Unmarshal(msg.Payload, rangeQueryState) + getStateByRange := &pb.GetStateByRange{} + unmarshalErr := proto.Unmarshal(msg.Payload, getStateByRange) if unmarshalErr != nil { payload := []byte(unmarshalErr.Error()) chaincodeLogger.Errorf("Failed to unmarshall range query request. Sending %s", pb.ChaincodeMessage_ERROR) @@ -683,13 +683,13 @@ func (handler *Handler) handleRangeQueryState(msg *pb.ChaincodeMessage) { var txContext *transactionContext - txContext, serialSendMsg = handler.isValidTxSim(msg.Txid, "[%s]No ledger context for RangeQueryState. Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_ERROR) + txContext, serialSendMsg = handler.isValidTxSim(msg.Txid, "[%s]No ledger context for GetStateByRange. Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_ERROR) if txContext == nil { return } chaincodeID := handler.getCCRootName() - rangeIter, err := txContext.txsimulator.GetStateRangeScanIterator(chaincodeID, rangeQueryState.StartKey, rangeQueryState.EndKey) + rangeIter, err := txContext.txsimulator.GetStateRangeScanIterator(chaincodeID, getStateByRange.StartKey, getStateByRange.EndKey) if err != nil { // Send error msg back to chaincode. GetState will not trigger event payload := []byte(err.Error()) @@ -703,7 +703,7 @@ func (handler *Handler) handleRangeQueryState(msg *pb.ChaincodeMessage) { var keysAndValues []*pb.QueryStateKeyValue var i = uint32(0) var qresult commonledger.QueryResult - for ; i < maxRangeQueryStateLimit; i++ { + for ; i < maxGetStateByRangeLimit; i++ { qresult, err = rangeIter.Next() if err != nil { chaincodeLogger.Errorf("Failed to get query result from iterator. Sending %s", pb.ChaincodeMessage_ERROR) @@ -748,7 +748,7 @@ func (handler *Handler) afterQueryStateNext(e *fsm.Event, state string) { e.Cancel(fmt.Errorf("Received unexpected message type")) return } - chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_RANGE_QUERY_STATE) + chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_GET_STATE_BY_RANGE) // Query ledger for state handler.handleQueryStateNext(msg) @@ -759,7 +759,7 @@ func (handler *Handler) afterQueryStateNext(e *fsm.Event, state string) { func (handler *Handler) handleQueryStateNext(msg *pb.ChaincodeMessage) { // The defer followed by triggering a go routine dance is needed to ensure that the previous state transition // is completed before the next one is triggered. The previous state transition is deemed complete only when - // the afterRangeQueryState function is exited. Interesting bug fix!! + // the afterGetStateByRange function is exited. Interesting bug fix!! go func() { // Check if this is the unique state request from this chaincode txid uniqueReq := handler.createTXIDEntry(msg.Txid) @@ -773,7 +773,7 @@ func (handler *Handler) handleQueryStateNext(msg *pb.ChaincodeMessage) { defer func() { handler.deleteTXIDEntry(msg.Txid) - chaincodeLogger.Debugf("[%s]handleRangeQueryState serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) + chaincodeLogger.Debugf("[%s]handleGetStateByRange serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) handler.serialSendAsync(serialSendMsg, nil) }() @@ -801,7 +801,7 @@ func (handler *Handler) handleQueryStateNext(msg *pb.ChaincodeMessage) { var qresult commonledger.QueryResult var err error - for ; i < maxRangeQueryStateLimit; i++ { + for ; i < maxGetStateByRangeLimit; i++ { qresult, err = queryIter.Next() if err != nil { chaincodeLogger.Errorf("Failed to get query result from iterator. Sending %s", pb.ChaincodeMessage_ERROR) @@ -839,14 +839,14 @@ func (handler *Handler) handleQueryStateNext(msg *pb.ChaincodeMessage) { }() } -// afterRangeQueryState handles a QUERY_STATE_CLOSE request from the chaincode. +// afterGetStateByRange handles a QUERY_STATE_CLOSE request from the chaincode. func (handler *Handler) afterQueryStateClose(e *fsm.Event, state string) { msg, ok := e.Args[0].(*pb.ChaincodeMessage) if !ok { e.Cancel(fmt.Errorf("Received unexpected message type")) return } - chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_RANGE_QUERY_STATE) + chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_GET_STATE_BY_RANGE) // Query ledger for state handler.handleQueryStateClose(msg) @@ -857,7 +857,7 @@ func (handler *Handler) afterQueryStateClose(e *fsm.Event, state string) { func (handler *Handler) handleQueryStateClose(msg *pb.ChaincodeMessage) { // The defer followed by triggering a go routine dance is needed to ensure that the previous state transition // is completed before the next one is triggered. The previous state transition is deemed complete only when - // the afterRangeQueryState function is exited. Interesting bug fix!! + // the afterGetStateByRange function is exited. Interesting bug fix!! go func() { // Check if this is the unique state request from this chaincode txid uniqueReq := handler.createTXIDEntry(msg.Txid) @@ -871,7 +871,7 @@ func (handler *Handler) handleQueryStateClose(msg *pb.ChaincodeMessage) { defer func() { handler.deleteTXIDEntry(msg.Txid) - chaincodeLogger.Debugf("[%s]handleRangeQueryState serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) + chaincodeLogger.Debugf("[%s]handleGetStateByRange serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) handler.serialSendAsync(serialSendMsg, nil) }() @@ -908,24 +908,24 @@ func (handler *Handler) handleQueryStateClose(msg *pb.ChaincodeMessage) { }() } -const maxExecuteQueryStateLimit = 100 +const maxGetQueryResultLimit = 100 -// afterExecuteQueryState handles a EXECUTE_QUERY_STATE request from the chaincode. -func (handler *Handler) afterExecuteQueryState(e *fsm.Event, state string) { +// afterGetQueryResult handles a GET_QUERY_RESULT request from the chaincode. +func (handler *Handler) afterGetQueryResult(e *fsm.Event, state string) { msg, ok := e.Args[0].(*pb.ChaincodeMessage) if !ok { e.Cancel(fmt.Errorf("Received unexpected message type")) return } - chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_EXECUTE_QUERY_STATE) + chaincodeLogger.Debugf("Received %s, invoking get state from ledger", pb.ChaincodeMessage_GET_QUERY_RESULT) // Query ledger for state - handler.handleExecuteQueryState(msg) - chaincodeLogger.Debug("Exiting EXECUTE_QUERY_STATE") + handler.handleGetQueryResult(msg) + chaincodeLogger.Debug("Exiting GET_QUERY_RESULT") } // Handles query to ledger to execute query state -func (handler *Handler) handleExecuteQueryState(msg *pb.ChaincodeMessage) { +func (handler *Handler) handleGetQueryResult(msg *pb.ChaincodeMessage) { // The defer followed by triggering a go routine dance is needed to ensure that the previous state transition // is completed before the next one is triggered. The previous state transition is deemed complete only when // the afterQueryState function is exited. Interesting bug fix!! @@ -942,12 +942,12 @@ func (handler *Handler) handleExecuteQueryState(msg *pb.ChaincodeMessage) { defer func() { handler.deleteTXIDEntry(msg.Txid) - chaincodeLogger.Debugf("[%s]handleExecuteQueryState serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) + chaincodeLogger.Debugf("[%s]handleGetQueryResult serial send %s", shorttxid(serialSendMsg.Txid), serialSendMsg.Type) handler.serialSendAsync(serialSendMsg, nil) }() - executeQueryState := &pb.ExecuteQueryState{} - unmarshalErr := proto.Unmarshal(msg.Payload, executeQueryState) + getQueryResult := &pb.GetQueryResult{} + unmarshalErr := proto.Unmarshal(msg.Payload, getQueryResult) if unmarshalErr != nil { payload := []byte(unmarshalErr.Error()) chaincodeLogger.Errorf("Failed to unmarshall query request. Sending %s", pb.ChaincodeMessage_ERROR) @@ -959,12 +959,12 @@ func (handler *Handler) handleExecuteQueryState(msg *pb.ChaincodeMessage) { var txContext *transactionContext - txContext, serialSendMsg = handler.isValidTxSim(msg.Txid, "[%s]No ledger context for ExecuteQueryState. Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_ERROR) + txContext, serialSendMsg = handler.isValidTxSim(msg.Txid, "[%s]No ledger context for GetQueryResult. Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_ERROR) if txContext == nil { return } - executeIter, err := txContext.txsimulator.ExecuteQuery(executeQueryState.Query) + executeIter, err := txContext.txsimulator.ExecuteQuery(getQueryResult.Query) if err != nil { // Send error msg back to chaincode. GetState will not trigger event payload := []byte(err.Error()) @@ -978,7 +978,7 @@ func (handler *Handler) handleExecuteQueryState(msg *pb.ChaincodeMessage) { var keysAndValues []*pb.QueryStateKeyValue var i = uint32(0) var qresult commonledger.QueryResult - for ; i < maxExecuteQueryStateLimit; i++ { + for ; i < maxGetQueryResultLimit; i++ { qresult, err = executeIter.Next() if err != nil { chaincodeLogger.Errorf("Failed to get query result from iterator. Sending %s", pb.ChaincodeMessage_ERROR) diff --git a/core/chaincode/shim/chaincode.go b/core/chaincode/shim/chaincode.go index c82b06f00a4..7634f174815 100644 --- a/core/chaincode/shim/chaincode.go +++ b/core/chaincode/shim/chaincode.go @@ -333,13 +333,13 @@ type StateQueryIterator struct { currentLoc int } -// RangeQueryState function can be invoked by a chaincode to query of a range +// GetStateByRange function can be invoked by a chaincode to query of a range // of keys in the state. Assuming the startKey and endKey are in lexical order, // an iterator will be returned that can be used to iterate over all keys // between the startKey and endKey, inclusive. The order in which keys are // returned by the iterator is random. -func (stub *ChaincodeStub) RangeQueryState(startKey, endKey string) (StateQueryIteratorInterface, error) { - response, err := stub.handler.handleRangeQueryState(startKey, endKey, stub.TxID) +func (stub *ChaincodeStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error) { + response, err := stub.handler.handleGetStateByRange(startKey, endKey, stub.TxID) if err != nil { return nil, err } @@ -352,7 +352,7 @@ func (stub *ChaincodeStub) RangeQueryState(startKey, endKey string) (StateQueryI // state database. An iterator is returned which can be used to iterate (next) over // the query result set func (stub *ChaincodeStub) GetQueryResult(query string) (StateQueryIteratorInterface, error) { - response, err := stub.handler.handleExecuteQueryState(query, stub.TxID) + response, err := stub.handler.handleGetQueryResult(query, stub.TxID) if err != nil { return nil, err } @@ -409,19 +409,19 @@ func validateCompositeKeyAttribute(str string) error { return nil } -//PartialCompositeKeyQuery function can be invoked by a chaincode to query the +//GetStateByPartialCompositeKey function can be invoked by a chaincode to query the //state based on a given partial composite key. This function returns an //iterator which can be used to iterate over all composite keys whose prefix //matches the given partial composite key. This function should be used only for //a partial composite key. For a full composite key, an iter with empty response //would be returned. -func (stub *ChaincodeStub) PartialCompositeKeyQuery(objectType string, attributes []string) (StateQueryIteratorInterface, error) { - return partialCompositeKeyQuery(stub, objectType, attributes) +func (stub *ChaincodeStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error) { + return getStateByPartialCompositeKey(stub, objectType, attributes) } -func partialCompositeKeyQuery(stub ChaincodeStubInterface, objectType string, attributes []string) (StateQueryIteratorInterface, error) { +func getStateByPartialCompositeKey(stub ChaincodeStubInterface, objectType string, attributes []string) (StateQueryIteratorInterface, error) { partialCompositeKey, _ := stub.CreateCompositeKey(objectType, attributes) - keysIter, err := stub.RangeQueryState(partialCompositeKey, partialCompositeKey+string(maxUnicodeRuneValue)) + keysIter, err := stub.GetStateByRange(partialCompositeKey, partialCompositeKey+string(maxUnicodeRuneValue)) if err != nil { return nil, fmt.Errorf("Error fetching rows: %s", err) } diff --git a/core/chaincode/shim/handler.go b/core/chaincode/shim/handler.go index 9fe33c26ed1..d90e99a5917 100644 --- a/core/chaincode/shim/handler.go +++ b/core/chaincode/shim/handler.go @@ -494,7 +494,7 @@ func (handler *Handler) handleDelState(key string, txid string) error { return errors.New("Incorrect chaincode message received") } -func (handler *Handler) handleRangeQueryState(startKey, endKey string, txid string) (*pb.QueryStateResponse, error) { +func (handler *Handler) handleGetStateByRange(startKey, endKey string, txid string) (*pb.QueryStateResponse, error) { // Create the channel on which to communicate the response from validating peer respChan, uniqueReqErr := handler.createChannel(txid) if uniqueReqErr != nil { @@ -504,17 +504,17 @@ func (handler *Handler) handleRangeQueryState(startKey, endKey string, txid stri defer handler.deleteChannel(txid) - // Send RANGE_QUERY_STATE message to validator chaincode support - payload := &pb.RangeQueryState{StartKey: startKey, EndKey: endKey} + // Send GET_STATE_BY_RANGE message to validator chaincode support + payload := &pb.GetStateByRange{StartKey: startKey, EndKey: endKey} payloadBytes, err := proto.Marshal(payload) if err != nil { return nil, errors.New("Failed to process range query state request") } - msg := &pb.ChaincodeMessage{Type: pb.ChaincodeMessage_RANGE_QUERY_STATE, Payload: payloadBytes, Txid: txid} - chaincodeLogger.Debugf("[%s]Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_RANGE_QUERY_STATE) + msg := &pb.ChaincodeMessage{Type: pb.ChaincodeMessage_GET_STATE_BY_RANGE, Payload: payloadBytes, Txid: txid} + chaincodeLogger.Debugf("[%s]Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_GET_STATE_BY_RANGE) responseMsg, err := handler.sendReceive(msg, respChan) if err != nil { - chaincodeLogger.Errorf("[%s]error sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_RANGE_QUERY_STATE) + chaincodeLogger.Errorf("[%s]error sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_GET_STATE_BY_RANGE) return nil, errors.New("could not send msg") } @@ -526,7 +526,7 @@ func (handler *Handler) handleRangeQueryState(startKey, endKey string, txid stri unmarshalErr := proto.Unmarshal(responseMsg.Payload, rangeQueryResponse) if unmarshalErr != nil { chaincodeLogger.Errorf("[%s]unmarshall error", shorttxid(responseMsg.Txid)) - return nil, errors.New("Error unmarshalling RangeQueryStateResponse.") + return nil, errors.New("Error unmarshalling GetStateByRangeResponse.") } return rangeQueryResponse, nil @@ -638,7 +638,7 @@ func (handler *Handler) handleQueryStateClose(id, txid string) (*pb.QueryStateRe return nil, errors.New("Incorrect chaincode message received") } -func (handler *Handler) handleExecuteQueryState(query string, txid string) (*pb.QueryStateResponse, error) { +func (handler *Handler) handleGetQueryResult(query string, txid string) (*pb.QueryStateResponse, error) { // Create the channel on which to communicate the response from validating peer respChan, uniqueReqErr := handler.createChannel(txid) if uniqueReqErr != nil { @@ -648,17 +648,17 @@ func (handler *Handler) handleExecuteQueryState(query string, txid string) (*pb. defer handler.deleteChannel(txid) - // Send EXECUTE_QUERY_STATE message to validator chaincode support - payload := &pb.ExecuteQueryState{Query: query} + // Send GET_QUERY_RESULT message to validator chaincode support + payload := &pb.GetQueryResult{Query: query} payloadBytes, err := proto.Marshal(payload) if err != nil { return nil, errors.New("Failed to process query state request") } - msg := &pb.ChaincodeMessage{Type: pb.ChaincodeMessage_EXECUTE_QUERY_STATE, Payload: payloadBytes, Txid: txid} - chaincodeLogger.Debugf("[%s]Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_EXECUTE_QUERY_STATE) + msg := &pb.ChaincodeMessage{Type: pb.ChaincodeMessage_GET_QUERY_RESULT, Payload: payloadBytes, Txid: txid} + chaincodeLogger.Debugf("[%s]Sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_GET_QUERY_RESULT) responseMsg, err := handler.sendReceive(msg, respChan) if err != nil { - chaincodeLogger.Errorf("[%s]error sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_EXECUTE_QUERY_STATE) + chaincodeLogger.Errorf("[%s]error sending %s", shorttxid(msg.Txid), pb.ChaincodeMessage_GET_QUERY_RESULT) return nil, errors.New("could not send msg") } diff --git a/core/chaincode/shim/interfaces.go b/core/chaincode/shim/interfaces.go index 76764afe763..75eb3eeb3bb 100644 --- a/core/chaincode/shim/interfaces.go +++ b/core/chaincode/shim/interfaces.go @@ -65,21 +65,21 @@ type ChaincodeStubInterface interface { // DelState removes the specified `key` and its value from the ledger. DelState(key string) error - // RangeQueryState function can be invoked by a chaincode to query of a range + // GetStateByRange function can be invoked by a chaincode to query of a range // of keys in the state. Assuming the startKey and endKey are in lexical // an iterator will be returned that can be used to iterate over all keys // between the startKey (inclusive) and endKey (exclusive). The order in which keys are // returned by the iterator is random. - RangeQueryState(startKey, endKey string) (StateQueryIteratorInterface, error) + GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error) - // PartialCompositeKeyQuery function can be invoked by a chaincode to query the + // GetStateByPartialCompositeKey function can be invoked by a chaincode to query the // state based on a given partial composite key. This function returns an // iterator which can be used to iterate over all composite keys whose prefix // matches the given partial composite key. This function should be used only for // a partial composite key. For a full composite key, an iter with empty response // would be returned. The objectType and attributes are expected to have only // valid utf8 strings and should not contain U+0000 (nil byte) and U+10FFFF (biggest and unallocated code point) - PartialCompositeKeyQuery(objectType string, keys []string) (StateQueryIteratorInterface, error) + GetStateByPartialCompositeKey(objectType string, keys []string) (StateQueryIteratorInterface, error) // Given a list of attributes, CreateCompositeKey function combines these attributes // to form a composite key. The objectType and attributes are expected to have only diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java index d842b231967..0389c6886ff 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/ChaincodeStub.java @@ -84,25 +84,25 @@ public void delState(String key) { * @param endKey * @return */ - public Map rangeQueryState(String startKey, String endKey) { + public Map getStateByRange(String startKey, String endKey) { Map retMap = new HashMap<>(); - for (Map.Entry item : rangeQueryRawState(startKey, endKey).entrySet()) { + for (Map.Entry item : getStateByRangeRaw(startKey, endKey).entrySet()) { retMap.put(item.getKey(), item.getValue().toStringUtf8()); } return retMap; } /** - * This method is same as rangeQueryState, except it returns value in ByteString, useful in cases where + * This method is same as getStateByRange, except it returns value in ByteString, useful in cases where * serialized object can be retrieved. * * @param startKey * @param endKey * @return */ - public Map rangeQueryRawState(String startKey, String endKey) { + public Map getStateByRangeRaw(String startKey, String endKey) { Map map = new HashMap<>(); - for (Chaincode.QueryStateKeyValue mapping : handler.handleRangeQueryState( + for (Chaincode.QueryStateKeyValue mapping : handler.handleGetStateByRange( startKey, endKey, uuid).getKeysAndValuesList()) { map.put(mapping.getKey(), mapping.getValue()); } @@ -119,10 +119,10 @@ public Map rangeQueryRawState(String startKey, String endKey * @param endKey * @return */ - public Map partialCompositeKeyQuery(String objectType, String[] attributes) { + public Map getStateByPartialCompositeKey(String objectType, String[] attributes) { String partialCompositeKey = new String(); partialCompositeKey = createCompositeKey(objectType, attributes); - return rangeQueryState(partialCompositeKey+"1", partialCompositeKey+":"); + return getStateByRange(partialCompositeKey+"1", partialCompositeKey+":"); } /** @@ -176,8 +176,8 @@ public void putRawState(String key, ByteString value) { * @param limit * @return */ -// public RangeQueryStateResponse rangeQueryRawState(String startKey, String endKey, int limit) { -// return handler.handleRangeQueryState(startKey, endKey, limit, uuid); +// public GetStateByRangeResponse getStateByRangeRaw(String startKey, String endKey, int limit) { +// return handler.handleGetStateByRange(startKey, endKey, limit, uuid); // } /** diff --git a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java b/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java index b44b8d266dc..800fa60263f 100644 --- a/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java +++ b/core/chaincode/shim/java/src/main/java/org/hyperledger/java/shim/Handler.java @@ -599,7 +599,7 @@ public void handleDeleteState(String key, String uuid) { } } - public QueryStateResponse handleRangeQueryState(String startKey, String endKey, String uuid) { + public QueryStateResponse handleGetStateByRange(String startKey, String endKey, String uuid) { // Create the channel on which to communicate the response from validating peer Channel responseChannel; try { @@ -612,23 +612,23 @@ public QueryStateResponse handleRangeQueryState(String startKey, String endKey, //Defer try { - // Send RANGE_QUERY_STATE message to validator chaincode support - RangeQueryState payload = RangeQueryState.newBuilder() + // Send GET_STATE_BY_RANGE message to validator chaincode support + GetStateByRange payload = GetStateByRange.newBuilder() .setStartKey(startKey) .setEndKey(endKey) .build(); ChaincodeMessage message = ChaincodeMessage.newBuilder() - .setType(RANGE_QUERY_STATE) + .setType(GET_STATE_BY_RANGE) .setPayload(payload.toByteString()) .setTxid(uuid) .build(); - logger.debug(String.format("[%s]Sending %s", shortID(message), RANGE_QUERY_STATE)); + logger.debug(String.format("[%s]Sending %s", shortID(message), GET_STATE_BY_RANGE)); try { serialSend(message); } catch (Exception e){ - logger.error(String.format("[%s]error sending %s", shortID(message), RANGE_QUERY_STATE)); + logger.error(String.format("[%s]error sending %s", shortID(message), GET_STATE_BY_RANGE)); throw new RuntimeException("could not send message"); } @@ -651,7 +651,7 @@ public QueryStateResponse handleRangeQueryState(String startKey, String endKey, rangeQueryResponse = QueryStateResponse.parseFrom(response.getPayload()); } catch (Exception e) { logger.error(String.format("[%s]unmarshall error", shortID(response.getTxid()))); - throw new RuntimeException("Error unmarshalling RangeQueryStateResponse."); + throw new RuntimeException("Error unmarshalling GetStateByRangeResponse."); } return rangeQueryResponse; diff --git a/core/chaincode/shim/mockstub.go b/core/chaincode/shim/mockstub.go index 6f48c4c075e..4225de98503 100644 --- a/core/chaincode/shim/mockstub.go +++ b/core/chaincode/shim/mockstub.go @@ -188,7 +188,7 @@ func (stub *MockStub) DelState(key string) error { return nil } -func (stub *MockStub) RangeQueryState(startKey, endKey string) (StateQueryIteratorInterface, error) { +func (stub *MockStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error) { return NewMockStateRangeQueryIterator(stub, startKey, endKey), nil } @@ -204,14 +204,14 @@ func (stub *MockStub) GetQueryResult(query string) (StateQueryIteratorInterface, return nil, errors.New("Not Implemented") } -//PartialCompositeKeyQuery function can be invoked by a chaincode to query the +//GetStateByPartialCompositeKey function can be invoked by a chaincode to query the //state based on a given partial composite key. This function returns an //iterator which can be used to iterate over all composite keys whose prefix //matches the given partial composite key. This function should be used only for //a partial composite key. For a full composite key, an iter with empty response //would be returned. -func (stub *MockStub) PartialCompositeKeyQuery(objectType string, attributes []string) (StateQueryIteratorInterface, error) { - return partialCompositeKeyQuery(stub, objectType, attributes) +func (stub *MockStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error) { + return getStateByPartialCompositeKey(stub, objectType, attributes) } // CreateCompositeKey combines the list of attributes diff --git a/core/chaincode/shim/mockstub_test.go b/core/chaincode/shim/mockstub_test.go index 5afbd4943e5..d449a90517b 100644 --- a/core/chaincode/shim/mockstub_test.go +++ b/core/chaincode/shim/mockstub_test.go @@ -89,8 +89,8 @@ func jsonBytesEqual(expected []byte, actual []byte) bool { return reflect.DeepEqual(infActual, infExpected) } -func TestPartialCompositeKeyQuery(t *testing.T) { - stub := NewMockStub("PartialCompositeKeyQueryTest", nil) +func TestGetStateByPartialCompositeKey(t *testing.T) { + stub := NewMockStub("GetStateByPartialCompositeKeyTest", nil) stub.MockTransactionStart("init") marble1 := &Marble{"marble", "set-1", "red", 5, "tom"} @@ -116,7 +116,7 @@ func TestPartialCompositeKeyQuery(t *testing.T) { expectKeysAttributes := [][]string{{"set-1", "blue"}, {"set-1", "red"}} expectValues := [][]byte{marbleJSONBytes2, marbleJSONBytes1} - rqi, _ := stub.PartialCompositeKeyQuery("marble", []string{"set-1"}) + rqi, _ := stub.GetStateByPartialCompositeKey("marble", []string{"set-1"}) fmt.Println("Running loop") for i := 0; i < 2; i++ { key, value, err := rqi.Next() diff --git a/docs/protocol-spec.md b/docs/protocol-spec.md index 5591774ad2f..96be4ac14e1 100644 --- a/docs/protocol-spec.md +++ b/docs/protocol-spec.md @@ -684,7 +684,7 @@ message ChaincodeMessage { QUERY = 14; QUERY_COMPLETED = 15; QUERY_ERROR = 16; - RANGE_QUERY_STATE = 17; + GET_STATE_BY_RANGE = 17; } Type type = 1; @@ -745,42 +745,42 @@ Chaincode sends a `GET_STATE` message to retrieve the value whose key is specifi ###### DEL_STATE Chaincode sends a `DEL_STATE` message to delete the value whose key is specified in the `payload`. -###### RANGE_QUERY_STATE -Chaincode sends a `RANGE_QUERY_STATE` message to get a range of values. The message `payload` contains a `RangeQueryStateInfo` object. +###### GET_STATE_BY_RANGE +Chaincode sends a `GET_STATE_BY_RANGE` message to get a range of values. The message `payload` contains a `GetStateByRangeInfo` object. ``` -message RangeQueryState { +message GetStateByRange { string startKey = 1; string endKey = 2; } ``` -The `startKey` and `endKey` are inclusive and assumed to be in lexical order. The validating peer responds with `RESPONSE` message whose `payload` is a `RangeQueryStateResponse` object. +The `startKey` and `endKey` are inclusive and assumed to be in lexical order. The validating peer responds with `RESPONSE` message whose `payload` is a `GetStateByRangeResponse` object. ``` -message RangeQueryStateResponse { - repeated RangeQueryStateKeyValue keysAndValues = 1; +message GetStateByRangeResponse { + repeated GetStateByRangeKeyValue keysAndValues = 1; bool hasMore = 2; string ID = 3; } -message RangeQueryStateKeyValue { +message GetStateByRangeKeyValue { string key = 1; bytes value = 2; } ``` -If `hasMore=true` in the response, this indicates that additional keys are available in the requested range. The chaincode can request the next set of keys and values by sending a `RangeQueryStateNext` message with an ID that matches the ID returned in the response. +If `hasMore=true` in the response, this indicates that additional keys are available in the requested range. The chaincode can request the next set of keys and values by sending a `GetStateByRangeNext` message with an ID that matches the ID returned in the response. ``` -message RangeQueryStateNext { +message GetStateByRangeNext { string ID = 1; } ``` -When the chaincode is finished reading from the range, it should send a `RangeQueryStateClose` message with the ID it wishes to close. +When the chaincode is finished reading from the range, it should send a `GetStateByRangeClose` message with the ID it wishes to close. ``` -message RangeQueryStateClose { +message GetStateByRangeClose { string ID = 1; } ``` diff --git a/docs/protocol-spec_zh.md b/docs/protocol-spec_zh.md index 58b61a76617..a822b18e243 100755 --- a/docs/protocol-spec_zh.md +++ b/docs/protocol-spec_zh.md @@ -701,7 +701,7 @@ message ChaincodeMessage { QUERY = 14; QUERY_COMPLETED = 15; QUERY_ERROR = 16; - RANGE_QUERY_STATE = 17; + GET_STATE_BY_RANGE = 17; } Type type = 1; @@ -762,42 +762,42 @@ message PutStateInfo { #### DEL_STATE 链码发送一个由`payload`指定要删除值的键的`DEL_STATE`消息。 -#### RANGE_QUERY_STATE -链码发送一个`payload`包含`RANGE_QUERY_STATE`对象的`RANGE_QUERY_STATE`来获取一个范围内的值。 +#### GET_STATE_BY_RANGE +链码发送一个`payload`包含`GET_STATE_BY_RANGE`对象的`GET_STATE_BY_RANGE`来获取一个范围内的值。 ``` -message RangeQueryState { +message GetStateByRange { string startKey = 1; string endKey = 2; } ``` -`startKey`和`endKey`假设是通过字典排序的. 验证 peer 响应一个`payload`是`RangeQueryStateResponse`对象的`RESPONSE`消息 +`startKey`和`endKey`假设是通过字典排序的. 验证 peer 响应一个`payload`是`GetStateByRangeResponse`对象的`RESPONSE`消息 ``` -message RangeQueryStateResponse { - repeated RangeQueryStateKeyValue keysAndValues = 1; +message GetStateByRangeResponse { + repeated GetStateByRangeKeyValue keysAndValues = 1; bool hasMore = 2; string ID = 3; } -message RangeQueryStateKeyValue { +message GetStateByRangeKeyValue { string key = 1; bytes value = 2; } ``` -如果相应中`hasMore=true`,这表示有在请求的返回中还有另外的键。链码可以通过发送包含与响应中ID相同的ID的`RangeQueryStateNext`消息来获取下一集合。 +如果相应中`hasMore=true`,这表示有在请求的返回中还有另外的键。链码可以通过发送包含与响应中ID相同的ID的`GetStateByRangeNext`消息来获取下一集合。 ``` -message RangeQueryStateNext { +message GetStateByRangeNext { string ID = 1; } ``` -当链码结束读取范围,它会发送带有ID的`RangeQueryStateClose`消息来期望它关闭。 +当链码结束读取范围,它会发送带有ID的`GetStateByRangeClose`消息来期望它关闭。 ``` -message RangeQueryStateClose { +message GetStateByRangeClose { string ID = 1; } ``` diff --git a/examples/chaincode/go/map/map.go b/examples/chaincode/go/map/map.go index d3aebfbb2de..f77c57e6ddd 100644 --- a/examples/chaincode/go/map/map.go +++ b/examples/chaincode/go/map/map.go @@ -92,7 +92,7 @@ func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { startKey := args[0] endKey := args[1] - keysIter, err := stub.RangeQueryState(startKey, endKey) + keysIter, err := stub.GetStateByRange(startKey, endKey) if err != nil { return shim.Error(fmt.Sprintf("keys operation failed. Error accessing state: %s", err)) } diff --git a/examples/chaincode/go/marbles02/marbles_chaincode.go b/examples/chaincode/go/marbles02/marbles_chaincode.go index 43ed81a5541..ff310515f50 100644 --- a/examples/chaincode/go/marbles02/marbles_chaincode.go +++ b/examples/chaincode/go/marbles02/marbles_chaincode.go @@ -292,9 +292,9 @@ func (t *SimpleChaincode) transferMarble(stub shim.ChaincodeStubInterface, args return shim.Success(nil) } -// ==== Example: PartialCompositeKeyQuery/RangeQuery ========================================= +// ==== Example: GetStateByPartialCompositeKey/RangeQuery ========================================= // transferMarblesBasedOnColor will transfer marbles of a given color to a certain new owner. -// Uses a PartialCompositeKeyQuery (range query) against color~name 'index'. +// Uses a GetStateByPartialCompositeKey (range query) against color~name 'index'. // Committing peers will re-execute range queries to guarantee that result sets are stable // between endorsement time and commit time. The transaction is invalidated by the // committing peers if the result set has changed between endorsement time and commit time. @@ -314,7 +314,7 @@ func (t *SimpleChaincode) transferMarblesBasedOnColor(stub shim.ChaincodeStubInt // Query the color~name index by color // This will execute a key range query on all keys starting with 'color' - coloredMarbleResultsIterator, err := stub.PartialCompositeKeyQuery("color~name", []string{color}) + coloredMarbleResultsIterator, err := stub.GetStateByPartialCompositeKey("color~name", []string{color}) if err != nil { return shim.Error(err.Error()) } diff --git a/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java b/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java index 76ebacbbc7a..5d57e6decef 100644 --- a/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java +++ b/examples/chaincode/java/MapExample/src/main/java/example/MapExample.java @@ -40,7 +40,7 @@ public String run(ChaincodeStub stub, String function, String[] args) { public String query(ChaincodeStub stub, String function, String[] args) { // if ("range".equals(function)) { // String build = ""; -// HashMap range = stub.rangeQueryState(args[0], args[1], 10); +// HashMap range = stub.getStateByRange(args[0], args[1], 10); // for (String s : range.keySet()) { // build += s + ":" + range.get(s) + " "; // } diff --git a/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java b/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java index 4d949db5283..0c1eff2b1e8 100644 --- a/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java +++ b/examples/chaincode/java/RangeExample/src/main/java/example/RangeExample.java @@ -57,9 +57,9 @@ public String query(ChaincodeStub stub, String function, String[] args) { case "keys":{ Map keysIter = null; if (args.length >= 2) { - keysIter = stub.rangeQueryState(args[0], args[1]); + keysIter = stub.getStateByRange(args[0], args[1]); }else{ - keysIter = stub.rangeQueryState("",""); + keysIter = stub.getStateByRange("",""); } return keysIter.keySet().toString(); diff --git a/protos/peer/admin.pb.go b/protos/peer/admin.pb.go index 517c847a893..4731eaa8279 100644 --- a/protos/peer/admin.pb.go +++ b/protos/peer/admin.pb.go @@ -28,8 +28,8 @@ It has these top-level messages: ChaincodeProposalContext ChaincodeMessage PutStateInfo - RangeQueryState - ExecuteQueryState + GetStateByRange + GetQueryResult QueryStateNext QueryStateClose QueryStateKeyValue diff --git a/protos/peer/chaincode.pb.go b/protos/peer/chaincode.pb.go index c006a4b1b6e..caf9f0d933a 100644 --- a/protos/peer/chaincode.pb.go +++ b/protos/peer/chaincode.pb.go @@ -97,24 +97,24 @@ func (ChaincodeDeploymentSpec_ExecutionEnvironment) EnumDescriptor() ([]byte, [] type ChaincodeMessage_Type int32 const ( - ChaincodeMessage_UNDEFINED ChaincodeMessage_Type = 0 - ChaincodeMessage_REGISTER ChaincodeMessage_Type = 1 - ChaincodeMessage_REGISTERED ChaincodeMessage_Type = 2 - ChaincodeMessage_INIT ChaincodeMessage_Type = 3 - ChaincodeMessage_READY ChaincodeMessage_Type = 4 - ChaincodeMessage_TRANSACTION ChaincodeMessage_Type = 5 - ChaincodeMessage_COMPLETED ChaincodeMessage_Type = 6 - ChaincodeMessage_ERROR ChaincodeMessage_Type = 7 - ChaincodeMessage_GET_STATE ChaincodeMessage_Type = 8 - ChaincodeMessage_PUT_STATE ChaincodeMessage_Type = 9 - ChaincodeMessage_DEL_STATE ChaincodeMessage_Type = 10 - ChaincodeMessage_INVOKE_CHAINCODE ChaincodeMessage_Type = 11 - ChaincodeMessage_RESPONSE ChaincodeMessage_Type = 13 - ChaincodeMessage_RANGE_QUERY_STATE ChaincodeMessage_Type = 14 - ChaincodeMessage_EXECUTE_QUERY_STATE ChaincodeMessage_Type = 15 - ChaincodeMessage_QUERY_STATE_NEXT ChaincodeMessage_Type = 16 - ChaincodeMessage_QUERY_STATE_CLOSE ChaincodeMessage_Type = 17 - ChaincodeMessage_KEEPALIVE ChaincodeMessage_Type = 18 + ChaincodeMessage_UNDEFINED ChaincodeMessage_Type = 0 + ChaincodeMessage_REGISTER ChaincodeMessage_Type = 1 + ChaincodeMessage_REGISTERED ChaincodeMessage_Type = 2 + ChaincodeMessage_INIT ChaincodeMessage_Type = 3 + ChaincodeMessage_READY ChaincodeMessage_Type = 4 + ChaincodeMessage_TRANSACTION ChaincodeMessage_Type = 5 + ChaincodeMessage_COMPLETED ChaincodeMessage_Type = 6 + ChaincodeMessage_ERROR ChaincodeMessage_Type = 7 + ChaincodeMessage_GET_STATE ChaincodeMessage_Type = 8 + ChaincodeMessage_PUT_STATE ChaincodeMessage_Type = 9 + ChaincodeMessage_DEL_STATE ChaincodeMessage_Type = 10 + ChaincodeMessage_INVOKE_CHAINCODE ChaincodeMessage_Type = 11 + ChaincodeMessage_RESPONSE ChaincodeMessage_Type = 13 + ChaincodeMessage_GET_STATE_BY_RANGE ChaincodeMessage_Type = 14 + ChaincodeMessage_GET_QUERY_RESULT ChaincodeMessage_Type = 15 + ChaincodeMessage_QUERY_STATE_NEXT ChaincodeMessage_Type = 16 + ChaincodeMessage_QUERY_STATE_CLOSE ChaincodeMessage_Type = 17 + ChaincodeMessage_KEEPALIVE ChaincodeMessage_Type = 18 ) var ChaincodeMessage_Type_name = map[int32]string{ @@ -131,31 +131,31 @@ var ChaincodeMessage_Type_name = map[int32]string{ 10: "DEL_STATE", 11: "INVOKE_CHAINCODE", 13: "RESPONSE", - 14: "RANGE_QUERY_STATE", - 15: "EXECUTE_QUERY_STATE", + 14: "GET_STATE_BY_RANGE", + 15: "GET_QUERY_RESULT", 16: "QUERY_STATE_NEXT", 17: "QUERY_STATE_CLOSE", 18: "KEEPALIVE", } var ChaincodeMessage_Type_value = map[string]int32{ - "UNDEFINED": 0, - "REGISTER": 1, - "REGISTERED": 2, - "INIT": 3, - "READY": 4, - "TRANSACTION": 5, - "COMPLETED": 6, - "ERROR": 7, - "GET_STATE": 8, - "PUT_STATE": 9, - "DEL_STATE": 10, - "INVOKE_CHAINCODE": 11, - "RESPONSE": 13, - "RANGE_QUERY_STATE": 14, - "EXECUTE_QUERY_STATE": 15, - "QUERY_STATE_NEXT": 16, - "QUERY_STATE_CLOSE": 17, - "KEEPALIVE": 18, + "UNDEFINED": 0, + "REGISTER": 1, + "REGISTERED": 2, + "INIT": 3, + "READY": 4, + "TRANSACTION": 5, + "COMPLETED": 6, + "ERROR": 7, + "GET_STATE": 8, + "PUT_STATE": 9, + "DEL_STATE": 10, + "INVOKE_CHAINCODE": 11, + "RESPONSE": 13, + "GET_STATE_BY_RANGE": 14, + "GET_QUERY_RESULT": 15, + "QUERY_STATE_NEXT": 16, + "QUERY_STATE_CLOSE": 17, + "KEEPALIVE": 18, } func (x ChaincodeMessage_Type) String() string { @@ -345,24 +345,24 @@ func (m *PutStateInfo) String() string { return proto.CompactTextStri func (*PutStateInfo) ProtoMessage() {} func (*PutStateInfo) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } -type RangeQueryState struct { - StartKey string `protobuf:"bytes,1,opt,name=start_key,json=startKey" json:"start_key,omitempty"` - EndKey string `protobuf:"bytes,2,opt,name=end_key,json=endKey" json:"end_key,omitempty"` +type GetStateByRange struct { + StartKey string `protobuf:"bytes,1,opt,name=startKey" json:"startKey,omitempty"` + EndKey string `protobuf:"bytes,2,opt,name=endKey" json:"endKey,omitempty"` } -func (m *RangeQueryState) Reset() { *m = RangeQueryState{} } -func (m *RangeQueryState) String() string { return proto.CompactTextString(m) } -func (*RangeQueryState) ProtoMessage() {} -func (*RangeQueryState) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } +func (m *GetStateByRange) Reset() { *m = GetStateByRange{} } +func (m *GetStateByRange) String() string { return proto.CompactTextString(m) } +func (*GetStateByRange) ProtoMessage() {} +func (*GetStateByRange) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } -type ExecuteQueryState struct { +type GetQueryResult struct { Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` } -func (m *ExecuteQueryState) Reset() { *m = ExecuteQueryState{} } -func (m *ExecuteQueryState) String() string { return proto.CompactTextString(m) } -func (*ExecuteQueryState) ProtoMessage() {} -func (*ExecuteQueryState) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } +func (m *GetQueryResult) Reset() { *m = GetQueryResult{} } +func (m *GetQueryResult) String() string { return proto.CompactTextString(m) } +func (*GetQueryResult) ProtoMessage() {} +func (*GetQueryResult) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } type QueryStateNext struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -419,8 +419,8 @@ func init() { proto.RegisterType((*ChaincodeProposalContext)(nil), "protos.ChaincodeProposalContext") proto.RegisterType((*ChaincodeMessage)(nil), "protos.ChaincodeMessage") proto.RegisterType((*PutStateInfo)(nil), "protos.PutStateInfo") - proto.RegisterType((*RangeQueryState)(nil), "protos.RangeQueryState") - proto.RegisterType((*ExecuteQueryState)(nil), "protos.ExecuteQueryState") + proto.RegisterType((*GetStateByRange)(nil), "protos.GetStateByRange") + proto.RegisterType((*GetQueryResult)(nil), "protos.GetQueryResult") proto.RegisterType((*QueryStateNext)(nil), "protos.QueryStateNext") proto.RegisterType((*QueryStateClose)(nil), "protos.QueryStateClose") proto.RegisterType((*QueryStateKeyValue)(nil), "protos.QueryStateKeyValue") @@ -538,77 +538,77 @@ var _ChaincodeSupport_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("peer/chaincode.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x8e, 0xfe, 0x6c, 0x69, 0x24, 0x4b, 0xeb, 0x8d, 0x93, 0x28, 0x6e, 0x8b, 0x3a, 0x44, 0x0f, - 0x4e, 0x50, 0xc8, 0xad, 0x1b, 0x04, 0x3d, 0x04, 0x2d, 0x18, 0x72, 0xa3, 0xb2, 0x92, 0x29, 0x65, - 0x45, 0x1b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, + // 1145 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x56, 0xdb, 0x6e, 0xdb, 0x46, + 0x13, 0x0e, 0x25, 0xd9, 0x96, 0x46, 0xb2, 0xb4, 0xd9, 0xdf, 0xf1, 0xaf, 0x18, 0x2d, 0xea, 0x10, + 0x45, 0xe1, 0x06, 0x85, 0xdc, 0xba, 0x41, 0xd0, 0x8b, 0xa0, 0x05, 0x4d, 0x6e, 0x54, 0xd6, 0x32, + 0xa5, 0xac, 0x68, 0x23, 0xee, 0x0d, 0x41, 0x93, 0x63, 0x99, 0x88, 0x4c, 0xb2, 0xe4, 0x4a, 0xb0, + 0xae, 0xf3, 0x3e, 0x7d, 0x84, 0x3e, 0x51, 0xdf, 0xa1, 0xc5, 0x2e, 0x75, 0x72, 0x94, 0x00, 0xb9, + 0xe8, 0x95, 0xf6, 0x9b, 0xf9, 0xe6, 0xb8, 0x33, 0x2b, 0xc2, 0x5e, 0x8a, 0x98, 0x1d, 0x07, 0xb7, + 0x7e, 0x14, 0x07, 0x49, 0x88, 0x9d, 0x34, 0x4b, 0x44, 0x42, 0xb7, 0xd5, 0x4f, 0x7e, 0xf0, 0xf4, + 0xa1, 0x16, 0xa7, 0x18, 0x8b, 0x82, 0x72, 0xf0, 0xd5, 0x28, 0x49, 0x46, 0x63, 0x3c, 0x56, 0xe8, + 0x7a, 0x72, 0x73, 0x2c, 0xa2, 0x3b, 0xcc, 0x85, 0x7f, 0x97, 0x16, 0x04, 0xbd, 0x0f, 0x75, 0x73, + 0x61, 0x68, 0x5b, 0x94, 0x42, 0x25, 0xf5, 0xc5, 0x6d, 0x5b, 0x3b, 0xd4, 0x8e, 0x6a, 0x5c, 0x9d, + 0xa5, 0x2c, 0xf6, 0xef, 0xb0, 0x5d, 0x2a, 0x64, 0xf2, 0x4c, 0xdb, 0xb0, 0x33, 0xc5, 0x2c, 0x8f, + 0x92, 0x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0xd4, 0xb9, 0x9d, 0xa5, 0x98, 0x8d, 0x31, 0x1c, 0x61, 0x36, 0x37, 0xf8, 0xfd, 0xdb, 0x51, 0x24, + 0x6e, 0x27, 0xd7, 0x9d, 0x20, 0xb9, 0x3b, 0x5e, 0x53, 0x1f, 0xdf, 0xf8, 0xd7, 0x59, 0x14, 0x14, + 0x1f, 0x25, 0xf9, 0xb1, 0xfc, 0x7a, 0xb9, 0x2e, 0xbe, 0x65, 0x7e, 0xfc, 0x37, 0x00, 0x00, 0xff, + 0xff, 0x14, 0x45, 0xe8, 0x6f, 0xea, 0x08, 0x00, 0x00, } diff --git a/protos/peer/chaincode.proto b/protos/peer/chaincode.proto index ef3717c2670..422e7b7db7a 100644 --- a/protos/peer/chaincode.proto +++ b/protos/peer/chaincode.proto @@ -136,8 +136,8 @@ message ChaincodeMessage { DEL_STATE = 10; INVOKE_CHAINCODE = 11; RESPONSE = 13; - RANGE_QUERY_STATE = 14; - EXECUTE_QUERY_STATE = 15; + GET_STATE_BY_RANGE = 14; + GET_QUERY_RESULT = 15; QUERY_STATE_NEXT = 16; QUERY_STATE_CLOSE = 17; KEEPALIVE = 18; @@ -161,12 +161,12 @@ message PutStateInfo { bytes value = 2; } -message RangeQueryState { - string start_key = 1; - string end_key = 2; +message GetStateByRange { + string startKey = 1; + string endKey = 2; } -message ExecuteQueryState { +message GetQueryResult { string query = 1; }