diff --git a/go.mod b/go.mod index 985fec2b522..b7c14fb7a4c 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/hyperledger/fabric-chaincode-go/v2 v2.0.0 github.com/hyperledger/fabric-config v0.3.0 github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5 - github.com/hyperledger/fabric-protos-go-apiv2 v0.3.3 + github.com/hyperledger/fabric-protos-go-apiv2 v0.3.4 github.com/kr/pretty v0.3.1 github.com/miekg/pkcs11 v1.1.1 github.com/mitchellh/mapstructure v1.5.0 @@ -36,7 +36,7 @@ require ( go.etcd.io/etcd/raft/v3 v3.5.14 go.etcd.io/etcd/server/v3 v3.5.14 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.66.1 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/yaml.v2 v2.4.0 @@ -118,7 +118,7 @@ require ( golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect golang.org/x/tools v0.25.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index ca194229584..2b5b50cae56 100644 --- a/go.sum +++ b/go.sum @@ -904,8 +904,8 @@ github.com/hyperledger/fabric-config v0.3.0 h1:FS5/dc9GAniljP6RYxQRG92AaiBVoN2vT github.com/hyperledger/fabric-config v0.3.0/go.mod h1:kSevTn78K83Suc++JsEo7Nt1tYIPqDajW+ORz3OhWlg= github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5 h1:RPWTL5wxAb+xDOrsCU3QYZP65305F8v3PaOyzdbPVMU= github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5/go.mod h1:SHNCq8AB0VpHAmvJEtdbzabv6NNV1F48JdmDihasBjc= -github.com/hyperledger/fabric-protos-go-apiv2 v0.3.3 h1:Xpd6fzG/KjAOHJsq7EQXY2l+qi/y8muxBaY7R6QWABk= -github.com/hyperledger/fabric-protos-go-apiv2 v0.3.3/go.mod h1:2pq0ui6ZWA0cC8J+eCErgnMDCS1kPOEYVY+06ZAK0qE= +github.com/hyperledger/fabric-protos-go-apiv2 v0.3.4 h1:YJrd+gMaeY0/vsN0aS0QkEKTivGoUnSRIXxGJ7KI+Pc= +github.com/hyperledger/fabric-protos-go-apiv2 v0.3.4/go.mod h1:bau/6AJhvEcu9GKKYHlDXAxXKzYNfhP6xu2GXuxEcFk= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -1784,8 +1784,8 @@ google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1828,8 +1828,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= -google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230512210959-5dcfb37c0b43/go.mod h1:irORyHPQXotoshbRTZVFvPDcfTfFHL23efQeop+H45M= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/collection.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/collection.pb.go index 9fbca16a779..04ad009ad09 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/collection.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/collection.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: common/collection.proto @@ -432,7 +432,7 @@ func file_common_collection_proto_rawDescGZIP() []byte { } var file_common_collection_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_common_collection_proto_goTypes = []interface{}{ +var file_common_collection_proto_goTypes = []any{ (*CollectionConfigPackage)(nil), // 0: common.CollectionConfigPackage (*CollectionConfig)(nil), // 1: common.CollectionConfig (*StaticCollectionConfig)(nil), // 2: common.StaticCollectionConfig @@ -460,7 +460,7 @@ func file_common_collection_proto_init() { } file_common_policies_proto_init() if !protoimpl.UnsafeEnabled { - file_common_collection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_collection_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CollectionConfigPackage); i { case 0: return &v.state @@ -472,7 +472,7 @@ func file_common_collection_proto_init() { return nil } } - file_common_collection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_collection_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CollectionConfig); i { case 0: return &v.state @@ -484,7 +484,7 @@ func file_common_collection_proto_init() { return nil } } - file_common_collection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_common_collection_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*StaticCollectionConfig); i { case 0: return &v.state @@ -496,7 +496,7 @@ func file_common_collection_proto_init() { return nil } } - file_common_collection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_common_collection_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CollectionPolicyConfig); i { case 0: return &v.state @@ -509,10 +509,10 @@ func file_common_collection_proto_init() { } } } - file_common_collection_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_common_collection_proto_msgTypes[1].OneofWrappers = []any{ (*CollectionConfig_StaticCollectionConfig)(nil), } - file_common_collection_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_common_collection_proto_msgTypes[3].OneofWrappers = []any{ (*CollectionPolicyConfig_SignaturePolicy)(nil), } type x struct{} diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/common.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/common.pb.go index 51d7d540d84..4718005d7ed 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/common.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/common.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: common/common.proto @@ -1224,7 +1224,7 @@ func file_common_common_proto_rawDescGZIP() []byte { var file_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_common_common_proto_goTypes = []interface{}{ +var file_common_common_proto_goTypes = []any{ (Status)(0), // 0: common.Status (HeaderType)(0), // 1: common.HeaderType (BlockMetadataIndex)(0), // 2: common.BlockMetadataIndex @@ -1265,7 +1265,7 @@ func file_common_common_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*LastConfig); i { case 0: return &v.state @@ -1277,7 +1277,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Metadata); i { case 0: return &v.state @@ -1289,7 +1289,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*MetadataSignature); i { case 0: return &v.state @@ -1301,7 +1301,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*IdentifierHeader); i { case 0: return &v.state @@ -1313,7 +1313,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Header); i { case 0: return &v.state @@ -1325,7 +1325,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ChannelHeader); i { case 0: return &v.state @@ -1337,7 +1337,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*SignatureHeader); i { case 0: return &v.state @@ -1349,7 +1349,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Payload); i { case 0: return &v.state @@ -1361,7 +1361,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*Envelope); i { case 0: return &v.state @@ -1373,7 +1373,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Block); i { case 0: return &v.state @@ -1385,7 +1385,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*BlockHeader); i { case 0: return &v.state @@ -1397,7 +1397,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*BlockData); i { case 0: return &v.state @@ -1409,7 +1409,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*BlockMetadata); i { case 0: return &v.state @@ -1421,7 +1421,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*OrdererBlockMetadata); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configtx.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configtx.pb.go index b97727243ff..cdbf40d9e54 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configtx.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configtx.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: common/configtx.proto @@ -676,7 +676,7 @@ func file_common_configtx_proto_rawDescGZIP() []byte { } var file_common_configtx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_common_configtx_proto_goTypes = []interface{}{ +var file_common_configtx_proto_goTypes = []any{ (*ConfigEnvelope)(nil), // 0: common.ConfigEnvelope (*Config)(nil), // 1: common.Config (*ConfigUpdateEnvelope)(nil), // 2: common.ConfigUpdateEnvelope @@ -722,7 +722,7 @@ func file_common_configtx_proto_init() { file_common_common_proto_init() file_common_policies_proto_init() if !protoimpl.UnsafeEnabled { - file_common_configtx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ConfigEnvelope); i { case 0: return &v.state @@ -734,7 +734,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -746,7 +746,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ConfigUpdateEnvelope); i { case 0: return &v.state @@ -758,7 +758,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ConfigUpdate); i { case 0: return &v.state @@ -770,7 +770,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ConfigGroup); i { case 0: return &v.state @@ -782,7 +782,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ConfigValue); i { case 0: return &v.state @@ -794,7 +794,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ConfigPolicy); i { case 0: return &v.state @@ -806,7 +806,7 @@ func file_common_configtx_proto_init() { return nil } } - file_common_configtx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_common_configtx_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ConfigSignature); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configuration.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configuration.pb.go index 927ebcf6fed..103779a2c16 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configuration.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/configuration.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: common/configuration.proto @@ -559,7 +559,7 @@ func file_common_configuration_proto_rawDescGZIP() []byte { } var file_common_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_common_configuration_proto_goTypes = []interface{}{ +var file_common_configuration_proto_goTypes = []any{ (*HashingAlgorithm)(nil), // 0: common.HashingAlgorithm (*BlockDataHashingStructure)(nil), // 1: common.BlockDataHashingStructure (*OrdererAddresses)(nil), // 2: common.OrdererAddresses @@ -587,7 +587,7 @@ func file_common_configuration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*HashingAlgorithm); i { case 0: return &v.state @@ -599,7 +599,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BlockDataHashingStructure); i { case 0: return &v.state @@ -611,7 +611,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*OrdererAddresses); i { case 0: return &v.state @@ -623,7 +623,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Consenter); i { case 0: return &v.state @@ -635,7 +635,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Orderers); i { case 0: return &v.state @@ -647,7 +647,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Consortium); i { case 0: return &v.state @@ -659,7 +659,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Capabilities); i { case 0: return &v.state @@ -671,7 +671,7 @@ func file_common_configuration_proto_init() { return nil } } - file_common_configuration_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_common_configuration_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Capability); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/ledger.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/ledger.pb.go index e486f78dfa9..2a243d13468 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/ledger.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/ledger.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: common/ledger.proto @@ -197,7 +197,7 @@ func file_common_ledger_proto_rawDescGZIP() []byte { } var file_common_ledger_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_common_ledger_proto_goTypes = []interface{}{ +var file_common_ledger_proto_goTypes = []any{ (*BlockchainInfo)(nil), // 0: common.BlockchainInfo (*BootstrappingSnapshotInfo)(nil), // 1: common.BootstrappingSnapshotInfo } @@ -216,7 +216,7 @@ func file_common_ledger_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_ledger_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_ledger_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BlockchainInfo); i { case 0: return &v.state @@ -228,7 +228,7 @@ func file_common_ledger_proto_init() { return nil } } - file_common_ledger_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_ledger_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BootstrappingSnapshotInfo); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/policies.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/policies.pb.go index 3f2b35b3c77..4cb39e3d274 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/policies.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/common/policies.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: common/policies.proto @@ -627,7 +627,7 @@ func file_common_policies_proto_rawDescGZIP() []byte { var file_common_policies_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_common_policies_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_common_policies_proto_goTypes = []interface{}{ +var file_common_policies_proto_goTypes = []any{ (Policy_PolicyType)(0), // 0: common.Policy.PolicyType (ImplicitMetaPolicy_Rule)(0), // 1: common.ImplicitMetaPolicy.Rule (*Policy)(nil), // 2: common.Policy @@ -658,7 +658,7 @@ func file_common_policies_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_policies_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_policies_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Policy); i { case 0: return &v.state @@ -670,7 +670,7 @@ func file_common_policies_proto_init() { return nil } } - file_common_policies_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_policies_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SignaturePolicyEnvelope); i { case 0: return &v.state @@ -682,7 +682,7 @@ func file_common_policies_proto_init() { return nil } } - file_common_policies_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_common_policies_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SignaturePolicy); i { case 0: return &v.state @@ -694,7 +694,7 @@ func file_common_policies_proto_init() { return nil } } - file_common_policies_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_common_policies_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ImplicitMetaPolicy); i { case 0: return &v.state @@ -706,7 +706,7 @@ func file_common_policies_proto_init() { return nil } } - file_common_policies_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_common_policies_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ApplicationPolicy); i { case 0: return &v.state @@ -718,7 +718,7 @@ func file_common_policies_proto_init() { return nil } } - file_common_policies_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_common_policies_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SignaturePolicy_NOutOf); i { case 0: return &v.state @@ -731,11 +731,11 @@ func file_common_policies_proto_init() { } } } - file_common_policies_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_common_policies_proto_msgTypes[2].OneofWrappers = []any{ (*SignaturePolicy_SignedBy)(nil), (*SignaturePolicy_NOutOf_)(nil), } - file_common_policies_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_common_policies_proto_msgTypes[4].OneofWrappers = []any{ (*ApplicationPolicy_SignaturePolicy)(nil), (*ApplicationPolicy_ChannelConfigPolicyReference)(nil), } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol.pb.go index 99acaf7e06e..6414746c1b2 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: discovery/protocol.proto @@ -1440,7 +1440,7 @@ func file_discovery_protocol_proto_rawDescGZIP() []byte { } var file_discovery_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 25) -var file_discovery_protocol_proto_goTypes = []interface{}{ +var file_discovery_protocol_proto_goTypes = []any{ (*SignedRequest)(nil), // 0: discovery.SignedRequest (*Request)(nil), // 1: discovery.Request (*Response)(nil), // 2: discovery.Response @@ -1514,7 +1514,7 @@ func file_discovery_protocol_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_discovery_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SignedRequest); i { case 0: return &v.state @@ -1526,7 +1526,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Request); i { case 0: return &v.state @@ -1538,7 +1538,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Response); i { case 0: return &v.state @@ -1550,7 +1550,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*AuthInfo); i { case 0: return &v.state @@ -1562,7 +1562,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Query); i { case 0: return &v.state @@ -1574,7 +1574,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*QueryResult); i { case 0: return &v.state @@ -1586,7 +1586,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ConfigQuery); i { case 0: return &v.state @@ -1598,7 +1598,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ConfigResult); i { case 0: return &v.state @@ -1610,7 +1610,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*PeerMembershipQuery); i { case 0: return &v.state @@ -1622,7 +1622,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*PeerMembershipResult); i { case 0: return &v.state @@ -1634,7 +1634,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeQuery); i { case 0: return &v.state @@ -1646,7 +1646,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeQueryResult); i { case 0: return &v.state @@ -1658,7 +1658,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*LocalPeerQuery); i { case 0: return &v.state @@ -1670,7 +1670,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*EndorsementDescriptor); i { case 0: return &v.state @@ -1682,7 +1682,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*Layout); i { case 0: return &v.state @@ -1694,7 +1694,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*Peers); i { case 0: return &v.state @@ -1706,7 +1706,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*Peer); i { case 0: return &v.state @@ -1718,7 +1718,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*Error); i { case 0: return &v.state @@ -1730,7 +1730,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*Endpoints); i { case 0: return &v.state @@ -1742,7 +1742,7 @@ func file_discovery_protocol_proto_init() { return nil } } - file_discovery_protocol_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_discovery_protocol_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*Endpoint); i { case 0: return &v.state @@ -1755,13 +1755,13 @@ func file_discovery_protocol_proto_init() { } } } - file_discovery_protocol_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_discovery_protocol_proto_msgTypes[4].OneofWrappers = []any{ (*Query_ConfigQuery)(nil), (*Query_PeerQuery)(nil), (*Query_CcQuery)(nil), (*Query_LocalPeers)(nil), } - file_discovery_protocol_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_discovery_protocol_proto_msgTypes[5].OneofWrappers = []any{ (*QueryResult_Error)(nil), (*QueryResult_ConfigResult)(nil), (*QueryResult_CcQueryRes)(nil), diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol_grpc.pb.go index 387942cd82c..68fd879aca0 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/discovery/protocol_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: discovery/protocol.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Discovery_Discover_FullMethodName = "/discovery.Discovery/Discover" @@ -29,6 +29,9 @@ const ( // DiscoveryClient is the client API for Discovery service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Discovery defines a service that serves information about the fabric network +// like which peers, orderers, chaincodes, etc. type DiscoveryClient interface { // Discover receives a signed request, and returns a response. Discover(ctx context.Context, in *SignedRequest, opts ...grpc.CallOption) (*Response, error) @@ -43,8 +46,9 @@ func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient { } func (c *discoveryClient) Discover(ctx context.Context, in *SignedRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Response) - err := c.cc.Invoke(ctx, Discovery_Discover_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Discovery_Discover_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -53,19 +57,26 @@ func (c *discoveryClient) Discover(ctx context.Context, in *SignedRequest, opts // DiscoveryServer is the server API for Discovery service. // All implementations should embed UnimplementedDiscoveryServer -// for forward compatibility +// for forward compatibility. +// +// Discovery defines a service that serves information about the fabric network +// like which peers, orderers, chaincodes, etc. type DiscoveryServer interface { // Discover receives a signed request, and returns a response. Discover(context.Context, *SignedRequest) (*Response, error) } -// UnimplementedDiscoveryServer should be embedded to have forward compatible implementations. -type UnimplementedDiscoveryServer struct { -} +// UnimplementedDiscoveryServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDiscoveryServer struct{} func (UnimplementedDiscoveryServer) Discover(context.Context, *SignedRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Discover not implemented") } +func (UnimplementedDiscoveryServer) testEmbeddedByValue() {} // UnsafeDiscoveryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DiscoveryServer will @@ -75,6 +86,13 @@ type UnsafeDiscoveryServer interface { } func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer) { + // If the following call pancis, it indicates UnimplementedDiscoveryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Discovery_ServiceDesc, srv) } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway.pb.go index 63bf346f2b7..532e7b14418 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: gateway/gateway.proto @@ -1157,7 +1157,7 @@ func file_gateway_gateway_proto_rawDescGZIP() []byte { } var file_gateway_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_gateway_gateway_proto_goTypes = []interface{}{ +var file_gateway_gateway_proto_goTypes = []any{ (*EndorseRequest)(nil), // 0: gateway.EndorseRequest (*EndorseResponse)(nil), // 1: gateway.EndorseResponse (*SubmitRequest)(nil), // 2: gateway.SubmitRequest @@ -1214,7 +1214,7 @@ func file_gateway_gateway_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_gateway_gateway_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*EndorseRequest); i { case 0: return &v.state @@ -1226,7 +1226,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*EndorseResponse); i { case 0: return &v.state @@ -1238,7 +1238,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SubmitRequest); i { case 0: return &v.state @@ -1250,7 +1250,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SubmitResponse); i { case 0: return &v.state @@ -1262,7 +1262,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SignedCommitStatusRequest); i { case 0: return &v.state @@ -1274,7 +1274,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*CommitStatusRequest); i { case 0: return &v.state @@ -1286,7 +1286,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*CommitStatusResponse); i { case 0: return &v.state @@ -1298,7 +1298,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*EvaluateRequest); i { case 0: return &v.state @@ -1310,7 +1310,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*EvaluateResponse); i { case 0: return &v.state @@ -1322,7 +1322,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*SignedChaincodeEventsRequest); i { case 0: return &v.state @@ -1334,7 +1334,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeEventsRequest); i { case 0: return &v.state @@ -1346,7 +1346,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeEventsResponse); i { case 0: return &v.state @@ -1358,7 +1358,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*ErrorDetail); i { case 0: return &v.state @@ -1370,7 +1370,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*ProposedTransaction); i { case 0: return &v.state @@ -1382,7 +1382,7 @@ func file_gateway_gateway_proto_init() { return nil } } - file_gateway_gateway_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_gateway_gateway_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*PreparedTransaction); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway_grpc.pb.go index 102c58ee642..48c62956ecd 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gateway/gateway_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: gateway/gateway.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Gateway_Endorse_FullMethodName = "/gateway.Gateway/Endorse" @@ -33,6 +33,13 @@ const ( // GatewayClient is the client API for Gateway service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// The Gateway API for evaluating and submitting transactions via the gateway. +// Transaction evaluation (query) requires the invocation of the Evaluate service +// Transaction submission (ledger updates) is a two step process invoking Endorse +// followed by Submit. A third step, invoking CommitStatus, is required if the +// clients wish to wait for a Transaction to be committed. +// The proposal and transaction must be signed by the client before each step. type GatewayClient interface { // The Endorse service passes a proposed transaction to the gateway in order to // obtain sufficient endorsement. @@ -59,7 +66,7 @@ type GatewayClient interface { // requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses // are only returned for blocks that contain the requested events, while blocks not containing any of the requested // events are skipped. - ChaincodeEvents(ctx context.Context, in *SignedChaincodeEventsRequest, opts ...grpc.CallOption) (Gateway_ChaincodeEventsClient, error) + ChaincodeEvents(ctx context.Context, in *SignedChaincodeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ChaincodeEventsResponse], error) } type gatewayClient struct { @@ -71,8 +78,9 @@ func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient { } func (c *gatewayClient) Endorse(ctx context.Context, in *EndorseRequest, opts ...grpc.CallOption) (*EndorseResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EndorseResponse) - err := c.cc.Invoke(ctx, Gateway_Endorse_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Gateway_Endorse_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -80,8 +88,9 @@ func (c *gatewayClient) Endorse(ctx context.Context, in *EndorseRequest, opts .. } func (c *gatewayClient) Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*SubmitResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitResponse) - err := c.cc.Invoke(ctx, Gateway_Submit_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Gateway_Submit_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -89,8 +98,9 @@ func (c *gatewayClient) Submit(ctx context.Context, in *SubmitRequest, opts ...g } func (c *gatewayClient) CommitStatus(ctx context.Context, in *SignedCommitStatusRequest, opts ...grpc.CallOption) (*CommitStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CommitStatusResponse) - err := c.cc.Invoke(ctx, Gateway_CommitStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Gateway_CommitStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -98,20 +108,22 @@ func (c *gatewayClient) CommitStatus(ctx context.Context, in *SignedCommitStatus } func (c *gatewayClient) Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EvaluateResponse) - err := c.cc.Invoke(ctx, Gateway_Evaluate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Gateway_Evaluate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *gatewayClient) ChaincodeEvents(ctx context.Context, in *SignedChaincodeEventsRequest, opts ...grpc.CallOption) (Gateway_ChaincodeEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &Gateway_ServiceDesc.Streams[0], Gateway_ChaincodeEvents_FullMethodName, opts...) +func (c *gatewayClient) ChaincodeEvents(ctx context.Context, in *SignedChaincodeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ChaincodeEventsResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Gateway_ServiceDesc.Streams[0], Gateway_ChaincodeEvents_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &gatewayChaincodeEventsClient{stream} + x := &grpc.GenericClientStream[SignedChaincodeEventsRequest, ChaincodeEventsResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -121,26 +133,19 @@ func (c *gatewayClient) ChaincodeEvents(ctx context.Context, in *SignedChaincode return x, nil } -type Gateway_ChaincodeEventsClient interface { - Recv() (*ChaincodeEventsResponse, error) - grpc.ClientStream -} - -type gatewayChaincodeEventsClient struct { - grpc.ClientStream -} - -func (x *gatewayChaincodeEventsClient) Recv() (*ChaincodeEventsResponse, error) { - m := new(ChaincodeEventsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Gateway_ChaincodeEventsClient = grpc.ServerStreamingClient[ChaincodeEventsResponse] // GatewayServer is the server API for Gateway service. // All implementations should embed UnimplementedGatewayServer -// for forward compatibility +// for forward compatibility. +// +// The Gateway API for evaluating and submitting transactions via the gateway. +// Transaction evaluation (query) requires the invocation of the Evaluate service +// Transaction submission (ledger updates) is a two step process invoking Endorse +// followed by Submit. A third step, invoking CommitStatus, is required if the +// clients wish to wait for a Transaction to be committed. +// The proposal and transaction must be signed by the client before each step. type GatewayServer interface { // The Endorse service passes a proposed transaction to the gateway in order to // obtain sufficient endorsement. @@ -167,12 +172,15 @@ type GatewayServer interface { // requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses // are only returned for blocks that contain the requested events, while blocks not containing any of the requested // events are skipped. - ChaincodeEvents(*SignedChaincodeEventsRequest, Gateway_ChaincodeEventsServer) error + ChaincodeEvents(*SignedChaincodeEventsRequest, grpc.ServerStreamingServer[ChaincodeEventsResponse]) error } -// UnimplementedGatewayServer should be embedded to have forward compatible implementations. -type UnimplementedGatewayServer struct { -} +// UnimplementedGatewayServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGatewayServer struct{} func (UnimplementedGatewayServer) Endorse(context.Context, *EndorseRequest) (*EndorseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Endorse not implemented") @@ -186,9 +194,10 @@ func (UnimplementedGatewayServer) CommitStatus(context.Context, *SignedCommitSta func (UnimplementedGatewayServer) Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Evaluate not implemented") } -func (UnimplementedGatewayServer) ChaincodeEvents(*SignedChaincodeEventsRequest, Gateway_ChaincodeEventsServer) error { +func (UnimplementedGatewayServer) ChaincodeEvents(*SignedChaincodeEventsRequest, grpc.ServerStreamingServer[ChaincodeEventsResponse]) error { return status.Errorf(codes.Unimplemented, "method ChaincodeEvents not implemented") } +func (UnimplementedGatewayServer) testEmbeddedByValue() {} // UnsafeGatewayServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GatewayServer will @@ -198,6 +207,13 @@ type UnsafeGatewayServer interface { } func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer) { + // If the following call pancis, it indicates UnimplementedGatewayServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Gateway_ServiceDesc, srv) } @@ -278,21 +294,11 @@ func _Gateway_ChaincodeEvents_Handler(srv interface{}, stream grpc.ServerStream) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(GatewayServer).ChaincodeEvents(m, &gatewayChaincodeEventsServer{stream}) -} - -type Gateway_ChaincodeEventsServer interface { - Send(*ChaincodeEventsResponse) error - grpc.ServerStream -} - -type gatewayChaincodeEventsServer struct { - grpc.ServerStream + return srv.(GatewayServer).ChaincodeEvents(m, &grpc.GenericServerStream[SignedChaincodeEventsRequest, ChaincodeEventsResponse]{ServerStream: stream}) } -func (x *gatewayChaincodeEventsServer) Send(m *ChaincodeEventsResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Gateway_ChaincodeEventsServer = grpc.ServerStreamingServer[ChaincodeEventsResponse] // Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message.pb.go index 2b7fd6d4030..e29bfcc5902 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: gossip/message.proto @@ -2868,7 +2868,7 @@ func file_gossip_message_proto_rawDescGZIP() []byte { var file_gossip_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_gossip_message_proto_msgTypes = make([]protoimpl.MessageInfo, 34) -var file_gossip_message_proto_goTypes = []interface{}{ +var file_gossip_message_proto_goTypes = []any{ (PullMsgType)(0), // 0: gossip.PullMsgType (GossipMessage_Tag)(0), // 1: gossip.GossipMessage.Tag (*Envelope)(nil), // 2: gossip.Envelope @@ -2970,7 +2970,7 @@ func file_gossip_message_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_gossip_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Envelope); i { case 0: return &v.state @@ -2982,7 +2982,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SecretEnvelope); i { case 0: return &v.state @@ -2994,7 +2994,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Secret); i { case 0: return &v.state @@ -3006,7 +3006,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GossipMessage); i { case 0: return &v.state @@ -3018,7 +3018,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*StateInfo); i { case 0: return &v.state @@ -3030,7 +3030,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Properties); i { case 0: return &v.state @@ -3042,7 +3042,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*StateInfoSnapshot); i { case 0: return &v.state @@ -3054,7 +3054,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*StateInfoPullRequest); i { case 0: return &v.state @@ -3066,7 +3066,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ConnEstablish); i { case 0: return &v.state @@ -3078,7 +3078,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*PeerIdentity); i { case 0: return &v.state @@ -3090,7 +3090,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*DataRequest); i { case 0: return &v.state @@ -3102,7 +3102,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*GossipHello); i { case 0: return &v.state @@ -3114,7 +3114,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*DataUpdate); i { case 0: return &v.state @@ -3126,7 +3126,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*DataDigest); i { case 0: return &v.state @@ -3138,7 +3138,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*DataMessage); i { case 0: return &v.state @@ -3150,7 +3150,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*PrivateDataMessage); i { case 0: return &v.state @@ -3162,7 +3162,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*Payload); i { case 0: return &v.state @@ -3174,7 +3174,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*PrivatePayload); i { case 0: return &v.state @@ -3186,7 +3186,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*AliveMessage); i { case 0: return &v.state @@ -3198,7 +3198,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*LeadershipMessage); i { case 0: return &v.state @@ -3210,7 +3210,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*PeerTime); i { case 0: return &v.state @@ -3222,7 +3222,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*MembershipRequest); i { case 0: return &v.state @@ -3234,7 +3234,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*MembershipResponse); i { case 0: return &v.state @@ -3246,7 +3246,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*Member); i { case 0: return &v.state @@ -3258,7 +3258,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*Empty); i { case 0: return &v.state @@ -3270,7 +3270,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*RemoteStateRequest); i { case 0: return &v.state @@ -3282,7 +3282,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*RemoteStateResponse); i { case 0: return &v.state @@ -3294,7 +3294,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*RemotePvtDataRequest); i { case 0: return &v.state @@ -3306,7 +3306,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*PvtDataDigest); i { case 0: return &v.state @@ -3318,7 +3318,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*RemotePvtDataResponse); i { case 0: return &v.state @@ -3330,7 +3330,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*PvtDataElement); i { case 0: return &v.state @@ -3342,7 +3342,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*PvtDataPayload); i { case 0: return &v.state @@ -3354,7 +3354,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*Acknowledgement); i { case 0: return &v.state @@ -3366,7 +3366,7 @@ func file_gossip_message_proto_init() { return nil } } - file_gossip_message_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_gossip_message_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*Chaincode); i { case 0: return &v.state @@ -3379,10 +3379,10 @@ func file_gossip_message_proto_init() { } } } - file_gossip_message_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_gossip_message_proto_msgTypes[2].OneofWrappers = []any{ (*Secret_InternalEndpoint)(nil), } - file_gossip_message_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_gossip_message_proto_msgTypes[3].OneofWrappers = []any{ (*GossipMessage_AliveMsg)(nil), (*GossipMessage_MemReq)(nil), (*GossipMessage_MemRes)(nil), diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message_grpc.pb.go index 9930cbdf5da..84ecf408d81 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/gossip/message_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: gossip/message.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Gossip_GossipStream_FullMethodName = "/gossip.Gossip/GossipStream" @@ -30,9 +30,11 @@ const ( // GossipClient is the client API for Gossip service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Gossip type GossipClient interface { // GossipStream is the gRPC stream used for sending and receiving messages - GossipStream(ctx context.Context, opts ...grpc.CallOption) (Gossip_GossipStreamClient, error) + GossipStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Envelope, Envelope], error) // Ping is used to probe a remote peer's aliveness Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) } @@ -45,40 +47,23 @@ func NewGossipClient(cc grpc.ClientConnInterface) GossipClient { return &gossipClient{cc} } -func (c *gossipClient) GossipStream(ctx context.Context, opts ...grpc.CallOption) (Gossip_GossipStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &Gossip_ServiceDesc.Streams[0], Gossip_GossipStream_FullMethodName, opts...) +func (c *gossipClient) GossipStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Envelope, Envelope], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Gossip_ServiceDesc.Streams[0], Gossip_GossipStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &gossipGossipStreamClient{stream} + x := &grpc.GenericClientStream[Envelope, Envelope]{ClientStream: stream} return x, nil } -type Gossip_GossipStreamClient interface { - Send(*Envelope) error - Recv() (*Envelope, error) - grpc.ClientStream -} - -type gossipGossipStreamClient struct { - grpc.ClientStream -} - -func (x *gossipGossipStreamClient) Send(m *Envelope) error { - return x.ClientStream.SendMsg(m) -} - -func (x *gossipGossipStreamClient) Recv() (*Envelope, error) { - m := new(Envelope) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Gossip_GossipStreamClient = grpc.BidiStreamingClient[Envelope, Envelope] func (c *gossipClient) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, Gossip_Ping_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Gossip_Ping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -87,24 +72,30 @@ func (c *gossipClient) Ping(ctx context.Context, in *Empty, opts ...grpc.CallOpt // GossipServer is the server API for Gossip service. // All implementations should embed UnimplementedGossipServer -// for forward compatibility +// for forward compatibility. +// +// Gossip type GossipServer interface { // GossipStream is the gRPC stream used for sending and receiving messages - GossipStream(Gossip_GossipStreamServer) error + GossipStream(grpc.BidiStreamingServer[Envelope, Envelope]) error // Ping is used to probe a remote peer's aliveness Ping(context.Context, *Empty) (*Empty, error) } -// UnimplementedGossipServer should be embedded to have forward compatible implementations. -type UnimplementedGossipServer struct { -} +// UnimplementedGossipServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedGossipServer struct{} -func (UnimplementedGossipServer) GossipStream(Gossip_GossipStreamServer) error { +func (UnimplementedGossipServer) GossipStream(grpc.BidiStreamingServer[Envelope, Envelope]) error { return status.Errorf(codes.Unimplemented, "method GossipStream not implemented") } func (UnimplementedGossipServer) Ping(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } +func (UnimplementedGossipServer) testEmbeddedByValue() {} // UnsafeGossipServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GossipServer will @@ -114,34 +105,22 @@ type UnsafeGossipServer interface { } func RegisterGossipServer(s grpc.ServiceRegistrar, srv GossipServer) { + // If the following call pancis, it indicates UnimplementedGossipServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Gossip_ServiceDesc, srv) } func _Gossip_GossipStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(GossipServer).GossipStream(&gossipGossipStreamServer{stream}) -} - -type Gossip_GossipStreamServer interface { - Send(*Envelope) error - Recv() (*Envelope, error) - grpc.ServerStream -} - -type gossipGossipStreamServer struct { - grpc.ServerStream + return srv.(GossipServer).GossipStream(&grpc.GenericServerStream[Envelope, Envelope]{ServerStream: stream}) } -func (x *gossipGossipStreamServer) Send(m *Envelope) error { - return x.ServerStream.SendMsg(m) -} - -func (x *gossipGossipStreamServer) Recv() (*Envelope, error) { - m := new(Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Gossip_GossipStreamServer = grpc.BidiStreamingServer[Envelope, Envelope] func _Gossip_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult/kv_query_result.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult/kv_query_result.pb.go index 24bebaa6142..4b2e5485a35 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult/kv_query_result.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult/kv_query_result.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ledger/queryresult/kv_query_result.proto @@ -214,7 +214,7 @@ func file_ledger_queryresult_kv_query_result_proto_rawDescGZIP() []byte { } var file_ledger_queryresult_kv_query_result_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ledger_queryresult_kv_query_result_proto_goTypes = []interface{}{ +var file_ledger_queryresult_kv_query_result_proto_goTypes = []any{ (*KV)(nil), // 0: queryresult.KV (*KeyModification)(nil), // 1: queryresult.KeyModification (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp @@ -234,7 +234,7 @@ func file_ledger_queryresult_kv_query_result_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ledger_queryresult_kv_query_result_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ledger_queryresult_kv_query_result_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*KV); i { case 0: return &v.state @@ -246,7 +246,7 @@ func file_ledger_queryresult_kv_query_result_proto_init() { return nil } } - file_ledger_queryresult_kv_query_result_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ledger_queryresult_kv_query_result_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*KeyModification); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/kvrwset/kv_rwset.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/kvrwset/kv_rwset.pb.go index bee28b46a5e..49e885ce045 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/kvrwset/kv_rwset.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/kvrwset/kv_rwset.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ledger/rwset/kvrwset/kv_rwset.proto @@ -998,7 +998,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_rawDescGZIP() []byte { } var file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_ledger_rwset_kvrwset_kv_rwset_proto_goTypes = []interface{}{ +var file_ledger_rwset_kvrwset_kv_rwset_proto_goTypes = []any{ (*KVRWSet)(nil), // 0: kvrwset.KVRWSet (*HashedRWSet)(nil), // 1: kvrwset.HashedRWSet (*KVRead)(nil), // 2: kvrwset.KVRead @@ -1041,7 +1041,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*KVRWSet); i { case 0: return &v.state @@ -1053,7 +1053,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*HashedRWSet); i { case 0: return &v.state @@ -1065,7 +1065,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*KVRead); i { case 0: return &v.state @@ -1077,7 +1077,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*KVWrite); i { case 0: return &v.state @@ -1089,7 +1089,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*KVMetadataWrite); i { case 0: return &v.state @@ -1101,7 +1101,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*KVReadHash); i { case 0: return &v.state @@ -1113,7 +1113,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*KVWriteHash); i { case 0: return &v.state @@ -1125,7 +1125,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*KVMetadataWriteHash); i { case 0: return &v.state @@ -1137,7 +1137,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*KVMetadataEntry); i { case 0: return &v.state @@ -1149,7 +1149,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Version); i { case 0: return &v.state @@ -1161,7 +1161,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*RangeQueryInfo); i { case 0: return &v.state @@ -1173,7 +1173,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*QueryReads); i { case 0: return &v.state @@ -1185,7 +1185,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { return nil } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*QueryReadsMerkleSummary); i { case 0: return &v.state @@ -1198,7 +1198,7 @@ func file_ledger_rwset_kvrwset_kv_rwset_proto_init() { } } } - file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_ledger_rwset_kvrwset_kv_rwset_proto_msgTypes[10].OneofWrappers = []any{ (*RangeQueryInfo_RawReads)(nil), (*RangeQueryInfo_ReadsMerkleHashes)(nil), } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/rwset.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/rwset.pb.go index 5f13260adf8..e67b19cbc79 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/rwset.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/rwset.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ledger/rwset/rwset.proto @@ -506,7 +506,7 @@ func file_ledger_rwset_rwset_proto_rawDescGZIP() []byte { var file_ledger_rwset_rwset_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_ledger_rwset_rwset_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_ledger_rwset_rwset_proto_goTypes = []interface{}{ +var file_ledger_rwset_rwset_proto_goTypes = []any{ (TxReadWriteSet_DataModel)(0), // 0: rwset.TxReadWriteSet.DataModel (*TxReadWriteSet)(nil), // 1: rwset.TxReadWriteSet (*NsReadWriteSet)(nil), // 2: rwset.NsReadWriteSet @@ -535,7 +535,7 @@ func file_ledger_rwset_rwset_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ledger_rwset_rwset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_rwset_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TxReadWriteSet); i { case 0: return &v.state @@ -547,7 +547,7 @@ func file_ledger_rwset_rwset_proto_init() { return nil } } - file_ledger_rwset_rwset_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_rwset_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*NsReadWriteSet); i { case 0: return &v.state @@ -559,7 +559,7 @@ func file_ledger_rwset_rwset_proto_init() { return nil } } - file_ledger_rwset_rwset_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_rwset_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CollectionHashedReadWriteSet); i { case 0: return &v.state @@ -571,7 +571,7 @@ func file_ledger_rwset_rwset_proto_init() { return nil } } - file_ledger_rwset_rwset_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_rwset_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TxPvtReadWriteSet); i { case 0: return &v.state @@ -583,7 +583,7 @@ func file_ledger_rwset_rwset_proto_init() { return nil } } - file_ledger_rwset_rwset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_rwset_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*NsPvtReadWriteSet); i { case 0: return &v.state @@ -595,7 +595,7 @@ func file_ledger_rwset_rwset_proto_init() { return nil } } - file_ledger_rwset_rwset_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ledger_rwset_rwset_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*CollectionPvtReadWriteSet); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/identities.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/identities.pb.go index 7b906b36637..d06aece04b0 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/identities.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/identities.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: msp/identities.proto @@ -218,7 +218,7 @@ func file_msp_identities_proto_rawDescGZIP() []byte { } var file_msp_identities_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_msp_identities_proto_goTypes = []interface{}{ +var file_msp_identities_proto_goTypes = []any{ (*SerializedIdentity)(nil), // 0: msp.SerializedIdentity (*SerializedIdemixIdentity)(nil), // 1: msp.SerializedIdemixIdentity } @@ -236,7 +236,7 @@ func file_msp_identities_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_msp_identities_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_msp_identities_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SerializedIdentity); i { case 0: return &v.state @@ -248,7 +248,7 @@ func file_msp_identities_proto_init() { return nil } } - file_msp_identities_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_msp_identities_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SerializedIdemixIdentity); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_config.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_config.pb.go index 1001ae9f6e1..f0eb5b7dac2 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_config.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_config.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: msp/msp_config.proto @@ -923,7 +923,7 @@ func file_msp_msp_config_proto_rawDescGZIP() []byte { } var file_msp_msp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_msp_msp_config_proto_goTypes = []interface{}{ +var file_msp_msp_config_proto_goTypes = []any{ (*MSPConfig)(nil), // 0: msp.MSPConfig (*FabricMSPConfig)(nil), // 1: msp.FabricMSPConfig (*FabricCryptoConfig)(nil), // 2: msp.FabricCryptoConfig @@ -958,7 +958,7 @@ func file_msp_msp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_msp_msp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*MSPConfig); i { case 0: return &v.state @@ -970,7 +970,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FabricMSPConfig); i { case 0: return &v.state @@ -982,7 +982,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*FabricCryptoConfig); i { case 0: return &v.state @@ -994,7 +994,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*IdemixMSPConfig); i { case 0: return &v.state @@ -1006,7 +1006,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*IdemixMSPSignerConfig); i { case 0: return &v.state @@ -1018,7 +1018,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SigningIdentityInfo); i { case 0: return &v.state @@ -1030,7 +1030,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*KeyInfo); i { case 0: return &v.state @@ -1042,7 +1042,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*FabricOUIdentifier); i { case 0: return &v.state @@ -1054,7 +1054,7 @@ func file_msp_msp_config_proto_init() { return nil } } - file_msp_msp_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_config_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*FabricNodeOUs); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_principal.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_principal.pb.go index 1dd13289099..d9ca77e3d27 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_principal.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/msp/msp_principal.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: msp/msp_principal.proto @@ -593,7 +593,7 @@ func file_msp_msp_principal_proto_rawDescGZIP() []byte { var file_msp_msp_principal_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_msp_msp_principal_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_msp_msp_principal_proto_goTypes = []interface{}{ +var file_msp_msp_principal_proto_goTypes = []any{ (MSPPrincipal_Classification)(0), // 0: common.MSPPrincipal.Classification (MSPRole_MSPRoleType)(0), // 1: common.MSPRole.MSPRoleType (MSPIdentityAnonymity_MSPIdentityAnonymityType)(0), // 2: common.MSPIdentityAnonymity.MSPIdentityAnonymityType @@ -621,7 +621,7 @@ func file_msp_msp_principal_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_msp_msp_principal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_principal_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*MSPPrincipal); i { case 0: return &v.state @@ -633,7 +633,7 @@ func file_msp_msp_principal_proto_init() { return nil } } - file_msp_msp_principal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_principal_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*OrganizationUnit); i { case 0: return &v.state @@ -645,7 +645,7 @@ func file_msp_msp_principal_proto_init() { return nil } } - file_msp_msp_principal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_principal_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*MSPRole); i { case 0: return &v.state @@ -657,7 +657,7 @@ func file_msp_msp_principal_proto_init() { return nil } } - file_msp_msp_principal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_principal_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*MSPIdentityAnonymity); i { case 0: return &v.state @@ -669,7 +669,7 @@ func file_msp_msp_principal_proto_init() { return nil } } - file_msp_msp_principal_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_msp_msp_principal_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*CombinedPrincipal); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab.pb.go index efbd5a1f7b4..7ce79093367 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/ab.proto @@ -775,7 +775,7 @@ func file_orderer_ab_proto_rawDescGZIP() []byte { var file_orderer_ab_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_orderer_ab_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_orderer_ab_proto_goTypes = []interface{}{ +var file_orderer_ab_proto_goTypes = []any{ (SeekInfo_SeekBehavior)(0), // 0: orderer.SeekInfo.SeekBehavior (SeekInfo_SeekErrorResponse)(0), // 1: orderer.SeekInfo.SeekErrorResponse (SeekInfo_SeekContentType)(0), // 2: orderer.SeekInfo.SeekContentType @@ -821,7 +821,7 @@ func file_orderer_ab_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_ab_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BroadcastResponse); i { case 0: return &v.state @@ -833,7 +833,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SeekNewest); i { case 0: return &v.state @@ -845,7 +845,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SeekOldest); i { case 0: return &v.state @@ -857,7 +857,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SeekSpecified); i { case 0: return &v.state @@ -869,7 +869,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SeekNextCommit); i { case 0: return &v.state @@ -881,7 +881,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SeekPosition); i { case 0: return &v.state @@ -893,7 +893,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*SeekInfo); i { case 0: return &v.state @@ -905,7 +905,7 @@ func file_orderer_ab_proto_init() { return nil } } - file_orderer_ab_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_orderer_ab_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*DeliverResponse); i { case 0: return &v.state @@ -918,13 +918,13 @@ func file_orderer_ab_proto_init() { } } } - file_orderer_ab_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_orderer_ab_proto_msgTypes[5].OneofWrappers = []any{ (*SeekPosition_Newest)(nil), (*SeekPosition_Oldest)(nil), (*SeekPosition_Specified)(nil), (*SeekPosition_NextCommit)(nil), } - file_orderer_ab_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_orderer_ab_proto_msgTypes[7].OneofWrappers = []any{ (*DeliverResponse_Status)(nil), (*DeliverResponse_Block)(nil), } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab_grpc.pb.go index 6ceea60b175..ae4de726c75 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/ab_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: orderer/ab.proto @@ -20,8 +20,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( AtomicBroadcast_Broadcast_FullMethodName = "/orderer.AtomicBroadcast/Broadcast" @@ -33,9 +33,9 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AtomicBroadcastClient interface { // broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure - Broadcast(ctx context.Context, opts ...grpc.CallOption) (AtomicBroadcast_BroadcastClient, error) + Broadcast(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, BroadcastResponse], error) // deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received. - Deliver(ctx context.Context, opts ...grpc.CallOption) (AtomicBroadcast_DeliverClient, error) + Deliver(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) } type atomicBroadcastClient struct { @@ -46,88 +46,56 @@ func NewAtomicBroadcastClient(cc grpc.ClientConnInterface) AtomicBroadcastClient return &atomicBroadcastClient{cc} } -func (c *atomicBroadcastClient) Broadcast(ctx context.Context, opts ...grpc.CallOption) (AtomicBroadcast_BroadcastClient, error) { - stream, err := c.cc.NewStream(ctx, &AtomicBroadcast_ServiceDesc.Streams[0], AtomicBroadcast_Broadcast_FullMethodName, opts...) +func (c *atomicBroadcastClient) Broadcast(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, BroadcastResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &AtomicBroadcast_ServiceDesc.Streams[0], AtomicBroadcast_Broadcast_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &atomicBroadcastBroadcastClient{stream} + x := &grpc.GenericClientStream[common.Envelope, BroadcastResponse]{ClientStream: stream} return x, nil } -type AtomicBroadcast_BroadcastClient interface { - Send(*common.Envelope) error - Recv() (*BroadcastResponse, error) - grpc.ClientStream -} - -type atomicBroadcastBroadcastClient struct { - grpc.ClientStream -} - -func (x *atomicBroadcastBroadcastClient) Send(m *common.Envelope) error { - return x.ClientStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type AtomicBroadcast_BroadcastClient = grpc.BidiStreamingClient[common.Envelope, BroadcastResponse] -func (x *atomicBroadcastBroadcastClient) Recv() (*BroadcastResponse, error) { - m := new(BroadcastResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *atomicBroadcastClient) Deliver(ctx context.Context, opts ...grpc.CallOption) (AtomicBroadcast_DeliverClient, error) { - stream, err := c.cc.NewStream(ctx, &AtomicBroadcast_ServiceDesc.Streams[1], AtomicBroadcast_Deliver_FullMethodName, opts...) +func (c *atomicBroadcastClient) Deliver(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &AtomicBroadcast_ServiceDesc.Streams[1], AtomicBroadcast_Deliver_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &atomicBroadcastDeliverClient{stream} + x := &grpc.GenericClientStream[common.Envelope, DeliverResponse]{ClientStream: stream} return x, nil } -type AtomicBroadcast_DeliverClient interface { - Send(*common.Envelope) error - Recv() (*DeliverResponse, error) - grpc.ClientStream -} - -type atomicBroadcastDeliverClient struct { - grpc.ClientStream -} - -func (x *atomicBroadcastDeliverClient) Send(m *common.Envelope) error { - return x.ClientStream.SendMsg(m) -} - -func (x *atomicBroadcastDeliverClient) Recv() (*DeliverResponse, error) { - m := new(DeliverResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type AtomicBroadcast_DeliverClient = grpc.BidiStreamingClient[common.Envelope, DeliverResponse] // AtomicBroadcastServer is the server API for AtomicBroadcast service. // All implementations should embed UnimplementedAtomicBroadcastServer -// for forward compatibility +// for forward compatibility. type AtomicBroadcastServer interface { // broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure - Broadcast(AtomicBroadcast_BroadcastServer) error + Broadcast(grpc.BidiStreamingServer[common.Envelope, BroadcastResponse]) error // deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received. - Deliver(AtomicBroadcast_DeliverServer) error + Deliver(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error } -// UnimplementedAtomicBroadcastServer should be embedded to have forward compatible implementations. -type UnimplementedAtomicBroadcastServer struct { -} +// UnimplementedAtomicBroadcastServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAtomicBroadcastServer struct{} -func (UnimplementedAtomicBroadcastServer) Broadcast(AtomicBroadcast_BroadcastServer) error { +func (UnimplementedAtomicBroadcastServer) Broadcast(grpc.BidiStreamingServer[common.Envelope, BroadcastResponse]) error { return status.Errorf(codes.Unimplemented, "method Broadcast not implemented") } -func (UnimplementedAtomicBroadcastServer) Deliver(AtomicBroadcast_DeliverServer) error { +func (UnimplementedAtomicBroadcastServer) Deliver(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error { return status.Errorf(codes.Unimplemented, "method Deliver not implemented") } +func (UnimplementedAtomicBroadcastServer) testEmbeddedByValue() {} // UnsafeAtomicBroadcastServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AtomicBroadcastServer will @@ -137,60 +105,29 @@ type UnsafeAtomicBroadcastServer interface { } func RegisterAtomicBroadcastServer(s grpc.ServiceRegistrar, srv AtomicBroadcastServer) { + // If the following call pancis, it indicates UnimplementedAtomicBroadcastServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&AtomicBroadcast_ServiceDesc, srv) } func _AtomicBroadcast_Broadcast_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AtomicBroadcastServer).Broadcast(&atomicBroadcastBroadcastServer{stream}) -} - -type AtomicBroadcast_BroadcastServer interface { - Send(*BroadcastResponse) error - Recv() (*common.Envelope, error) - grpc.ServerStream -} - -type atomicBroadcastBroadcastServer struct { - grpc.ServerStream + return srv.(AtomicBroadcastServer).Broadcast(&grpc.GenericServerStream[common.Envelope, BroadcastResponse]{ServerStream: stream}) } -func (x *atomicBroadcastBroadcastServer) Send(m *BroadcastResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *atomicBroadcastBroadcastServer) Recv() (*common.Envelope, error) { - m := new(common.Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type AtomicBroadcast_BroadcastServer = grpc.BidiStreamingServer[common.Envelope, BroadcastResponse] func _AtomicBroadcast_Deliver_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AtomicBroadcastServer).Deliver(&atomicBroadcastDeliverServer{stream}) + return srv.(AtomicBroadcastServer).Deliver(&grpc.GenericServerStream[common.Envelope, DeliverResponse]{ServerStream: stream}) } -type AtomicBroadcast_DeliverServer interface { - Send(*DeliverResponse) error - Recv() (*common.Envelope, error) - grpc.ServerStream -} - -type atomicBroadcastDeliverServer struct { - grpc.ServerStream -} - -func (x *atomicBroadcastDeliverServer) Send(m *DeliverResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *atomicBroadcastDeliverServer) Recv() (*common.Envelope, error) { - m := new(common.Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type AtomicBroadcast_DeliverServer = grpc.BidiStreamingServer[common.Envelope, DeliverResponse] // AtomicBroadcast_ServiceDesc is the grpc.ServiceDesc for AtomicBroadcast service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation.pb.go index c286ddbd160..bd6c9b62625 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/blockattestation.proto @@ -218,7 +218,7 @@ func file_orderer_blockattestation_proto_rawDescGZIP() []byte { } var file_orderer_blockattestation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_orderer_blockattestation_proto_goTypes = []interface{}{ +var file_orderer_blockattestation_proto_goTypes = []any{ (*BlockAttestation)(nil), // 0: orderer.BlockAttestation (*BlockAttestationResponse)(nil), // 1: orderer.BlockAttestationResponse (*common.BlockHeader)(nil), // 2: common.BlockHeader @@ -246,7 +246,7 @@ func file_orderer_blockattestation_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_blockattestation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_blockattestation_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BlockAttestation); i { case 0: return &v.state @@ -258,7 +258,7 @@ func file_orderer_blockattestation_proto_init() { return nil } } - file_orderer_blockattestation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_blockattestation_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BlockAttestationResponse); i { case 0: return &v.state @@ -271,7 +271,7 @@ func file_orderer_blockattestation_proto_init() { } } } - file_orderer_blockattestation_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_orderer_blockattestation_proto_msgTypes[1].OneofWrappers = []any{ (*BlockAttestationResponse_Status)(nil), (*BlockAttestationResponse_BlockAttestation)(nil), } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation_grpc.pb.go index f79406a70bc..7e245d7f0db 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/blockattestation_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: orderer/blockattestation.proto @@ -20,8 +20,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( BlockAttestations_BlockAttestations_FullMethodName = "/orderer.BlockAttestations/BlockAttestations" @@ -32,7 +32,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BlockAttestationsClient interface { // BlockAttestations receives an Envelope of type DELIVER_SEEK_INFO , then sends back a stream of BlockAttestations. - BlockAttestations(ctx context.Context, in *common.Envelope, opts ...grpc.CallOption) (BlockAttestations_BlockAttestationsClient, error) + BlockAttestations(ctx context.Context, in *common.Envelope, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlockAttestationResponse], error) } type blockAttestationsClient struct { @@ -43,12 +43,13 @@ func NewBlockAttestationsClient(cc grpc.ClientConnInterface) BlockAttestationsCl return &blockAttestationsClient{cc} } -func (c *blockAttestationsClient) BlockAttestations(ctx context.Context, in *common.Envelope, opts ...grpc.CallOption) (BlockAttestations_BlockAttestationsClient, error) { - stream, err := c.cc.NewStream(ctx, &BlockAttestations_ServiceDesc.Streams[0], BlockAttestations_BlockAttestations_FullMethodName, opts...) +func (c *blockAttestationsClient) BlockAttestations(ctx context.Context, in *common.Envelope, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlockAttestationResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &BlockAttestations_ServiceDesc.Streams[0], BlockAttestations_BlockAttestations_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &blockAttestationsBlockAttestationsClient{stream} + x := &grpc.GenericClientStream[common.Envelope, BlockAttestationResponse]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -58,38 +59,28 @@ func (c *blockAttestationsClient) BlockAttestations(ctx context.Context, in *com return x, nil } -type BlockAttestations_BlockAttestationsClient interface { - Recv() (*BlockAttestationResponse, error) - grpc.ClientStream -} - -type blockAttestationsBlockAttestationsClient struct { - grpc.ClientStream -} - -func (x *blockAttestationsBlockAttestationsClient) Recv() (*BlockAttestationResponse, error) { - m := new(BlockAttestationResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BlockAttestations_BlockAttestationsClient = grpc.ServerStreamingClient[BlockAttestationResponse] // BlockAttestationsServer is the server API for BlockAttestations service. // All implementations should embed UnimplementedBlockAttestationsServer -// for forward compatibility +// for forward compatibility. type BlockAttestationsServer interface { // BlockAttestations receives an Envelope of type DELIVER_SEEK_INFO , then sends back a stream of BlockAttestations. - BlockAttestations(*common.Envelope, BlockAttestations_BlockAttestationsServer) error + BlockAttestations(*common.Envelope, grpc.ServerStreamingServer[BlockAttestationResponse]) error } -// UnimplementedBlockAttestationsServer should be embedded to have forward compatible implementations. -type UnimplementedBlockAttestationsServer struct { -} +// UnimplementedBlockAttestationsServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBlockAttestationsServer struct{} -func (UnimplementedBlockAttestationsServer) BlockAttestations(*common.Envelope, BlockAttestations_BlockAttestationsServer) error { +func (UnimplementedBlockAttestationsServer) BlockAttestations(*common.Envelope, grpc.ServerStreamingServer[BlockAttestationResponse]) error { return status.Errorf(codes.Unimplemented, "method BlockAttestations not implemented") } +func (UnimplementedBlockAttestationsServer) testEmbeddedByValue() {} // UnsafeBlockAttestationsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BlockAttestationsServer will @@ -99,6 +90,13 @@ type UnsafeBlockAttestationsServer interface { } func RegisterBlockAttestationsServer(s grpc.ServiceRegistrar, srv BlockAttestationsServer) { + // If the following call pancis, it indicates UnimplementedBlockAttestationsServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&BlockAttestations_ServiceDesc, srv) } @@ -107,21 +105,11 @@ func _BlockAttestations_BlockAttestations_Handler(srv interface{}, stream grpc.S if err := stream.RecvMsg(m); err != nil { return err } - return srv.(BlockAttestationsServer).BlockAttestations(m, &blockAttestationsBlockAttestationsServer{stream}) -} - -type BlockAttestations_BlockAttestationsServer interface { - Send(*BlockAttestationResponse) error - grpc.ServerStream + return srv.(BlockAttestationsServer).BlockAttestations(m, &grpc.GenericServerStream[common.Envelope, BlockAttestationResponse]{ServerStream: stream}) } -type blockAttestationsBlockAttestationsServer struct { - grpc.ServerStream -} - -func (x *blockAttestationsBlockAttestationsServer) Send(m *BlockAttestationResponse) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type BlockAttestations_BlockAttestationsServer = grpc.ServerStreamingServer[BlockAttestationResponse] // BlockAttestations_ServiceDesc is the grpc.ServiceDesc for BlockAttestations service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster.pb.go index 52ce69365a5..01b6ddc8c72 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/cluster.proto @@ -451,7 +451,7 @@ func file_orderer_cluster_proto_rawDescGZIP() []byte { } var file_orderer_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_orderer_cluster_proto_goTypes = []interface{}{ +var file_orderer_cluster_proto_goTypes = []any{ (*StepRequest)(nil), // 0: orderer.StepRequest (*StepResponse)(nil), // 1: orderer.StepResponse (*ConsensusRequest)(nil), // 2: orderer.ConsensusRequest @@ -481,7 +481,7 @@ func file_orderer_cluster_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_cluster_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*StepRequest); i { case 0: return &v.state @@ -493,7 +493,7 @@ func file_orderer_cluster_proto_init() { return nil } } - file_orderer_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_cluster_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*StepResponse); i { case 0: return &v.state @@ -505,7 +505,7 @@ func file_orderer_cluster_proto_init() { return nil } } - file_orderer_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_orderer_cluster_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ConsensusRequest); i { case 0: return &v.state @@ -517,7 +517,7 @@ func file_orderer_cluster_proto_init() { return nil } } - file_orderer_cluster_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_orderer_cluster_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SubmitRequest); i { case 0: return &v.state @@ -529,7 +529,7 @@ func file_orderer_cluster_proto_init() { return nil } } - file_orderer_cluster_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_orderer_cluster_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SubmitResponse); i { case 0: return &v.state @@ -542,11 +542,11 @@ func file_orderer_cluster_proto_init() { } } } - file_orderer_cluster_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_orderer_cluster_proto_msgTypes[0].OneofWrappers = []any{ (*StepRequest_ConsensusRequest)(nil), (*StepRequest_SubmitRequest)(nil), } - file_orderer_cluster_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_orderer_cluster_proto_msgTypes[1].OneofWrappers = []any{ (*StepResponse_SubmitRes)(nil), } type x struct{} diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster_grpc.pb.go index 1b62225dfe6..cef1af28bf5 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/cluster_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: orderer/cluster.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Cluster_Step_FullMethodName = "/orderer.Cluster/Step" @@ -29,9 +29,11 @@ const ( // ClusterClient is the client API for Cluster service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Cluster defines communication between cluster members. type ClusterClient interface { // Step passes an implementation-specific message to another cluster member. - Step(ctx context.Context, opts ...grpc.CallOption) (Cluster_StepClient, error) + Step(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StepRequest, StepResponse], error) } type clusterClient struct { @@ -42,52 +44,40 @@ func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient { return &clusterClient{cc} } -func (c *clusterClient) Step(ctx context.Context, opts ...grpc.CallOption) (Cluster_StepClient, error) { - stream, err := c.cc.NewStream(ctx, &Cluster_ServiceDesc.Streams[0], Cluster_Step_FullMethodName, opts...) +func (c *clusterClient) Step(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StepRequest, StepResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Cluster_ServiceDesc.Streams[0], Cluster_Step_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &clusterStepClient{stream} + x := &grpc.GenericClientStream[StepRequest, StepResponse]{ClientStream: stream} return x, nil } -type Cluster_StepClient interface { - Send(*StepRequest) error - Recv() (*StepResponse, error) - grpc.ClientStream -} - -type clusterStepClient struct { - grpc.ClientStream -} - -func (x *clusterStepClient) Send(m *StepRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *clusterStepClient) Recv() (*StepResponse, error) { - m := new(StepResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Cluster_StepClient = grpc.BidiStreamingClient[StepRequest, StepResponse] // ClusterServer is the server API for Cluster service. // All implementations should embed UnimplementedClusterServer -// for forward compatibility +// for forward compatibility. +// +// Cluster defines communication between cluster members. type ClusterServer interface { // Step passes an implementation-specific message to another cluster member. - Step(Cluster_StepServer) error + Step(grpc.BidiStreamingServer[StepRequest, StepResponse]) error } -// UnimplementedClusterServer should be embedded to have forward compatible implementations. -type UnimplementedClusterServer struct { -} +// UnimplementedClusterServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedClusterServer struct{} -func (UnimplementedClusterServer) Step(Cluster_StepServer) error { +func (UnimplementedClusterServer) Step(grpc.BidiStreamingServer[StepRequest, StepResponse]) error { return status.Errorf(codes.Unimplemented, "method Step not implemented") } +func (UnimplementedClusterServer) testEmbeddedByValue() {} // UnsafeClusterServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ClusterServer will @@ -97,34 +87,22 @@ type UnsafeClusterServer interface { } func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer) { + // If the following call pancis, it indicates UnimplementedClusterServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Cluster_ServiceDesc, srv) } func _Cluster_Step_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ClusterServer).Step(&clusterStepServer{stream}) -} - -type Cluster_StepServer interface { - Send(*StepResponse) error - Recv() (*StepRequest, error) - grpc.ServerStream -} - -type clusterStepServer struct { - grpc.ServerStream + return srv.(ClusterServer).Step(&grpc.GenericServerStream[StepRequest, StepResponse]{ServerStream: stream}) } -func (x *clusterStepServer) Send(m *StepResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *clusterStepServer) Recv() (*StepRequest, error) { - m := new(StepRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Cluster_StepServer = grpc.BidiStreamingServer[StepRequest, StepResponse] // Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver.pb.go index 6012de414e1..eb75a832785 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/clusterserver.proto @@ -592,7 +592,7 @@ func file_orderer_clusterserver_proto_rawDescGZIP() []byte { } var file_orderer_clusterserver_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_orderer_clusterserver_proto_goTypes = []interface{}{ +var file_orderer_clusterserver_proto_goTypes = []any{ (*ClusterNodeServiceStepRequest)(nil), // 0: orderer.ClusterNodeServiceStepRequest (*ClusterNodeServiceStepResponse)(nil), // 1: orderer.ClusterNodeServiceStepResponse (*NodeConsensusRequest)(nil), // 2: orderer.NodeConsensusRequest @@ -626,7 +626,7 @@ func file_orderer_clusterserver_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_clusterserver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_clusterserver_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ClusterNodeServiceStepRequest); i { case 0: return &v.state @@ -638,7 +638,7 @@ func file_orderer_clusterserver_proto_init() { return nil } } - file_orderer_clusterserver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_clusterserver_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ClusterNodeServiceStepResponse); i { case 0: return &v.state @@ -650,7 +650,7 @@ func file_orderer_clusterserver_proto_init() { return nil } } - file_orderer_clusterserver_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_orderer_clusterserver_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*NodeConsensusRequest); i { case 0: return &v.state @@ -662,7 +662,7 @@ func file_orderer_clusterserver_proto_init() { return nil } } - file_orderer_clusterserver_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_orderer_clusterserver_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*NodeTransactionOrderRequest); i { case 0: return &v.state @@ -674,7 +674,7 @@ func file_orderer_clusterserver_proto_init() { return nil } } - file_orderer_clusterserver_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_orderer_clusterserver_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TransactionOrderResponse); i { case 0: return &v.state @@ -686,7 +686,7 @@ func file_orderer_clusterserver_proto_init() { return nil } } - file_orderer_clusterserver_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_orderer_clusterserver_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*NodeAuthRequest); i { case 0: return &v.state @@ -699,12 +699,12 @@ func file_orderer_clusterserver_proto_init() { } } } - file_orderer_clusterserver_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_orderer_clusterserver_proto_msgTypes[0].OneofWrappers = []any{ (*ClusterNodeServiceStepRequest_NodeConrequest)(nil), (*ClusterNodeServiceStepRequest_NodeTranrequest)(nil), (*ClusterNodeServiceStepRequest_NodeAuthrequest)(nil), } - file_orderer_clusterserver_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_orderer_clusterserver_proto_msgTypes[1].OneofWrappers = []any{ (*ClusterNodeServiceStepResponse_TranorderRes)(nil), } type x struct{} diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver_grpc.pb.go index d4c8fa58644..bb2ac2e3010 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/clusterserver_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: orderer/clusterserver.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ClusterNodeService_Step_FullMethodName = "/orderer.ClusterNodeService/Step" @@ -29,9 +29,11 @@ const ( // ClusterNodeServiceClient is the client API for ClusterNodeService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service ClusterNodeService defines communication between cluster members. type ClusterNodeServiceClient interface { // Step passes an implementation-specific message to another cluster member. - Step(ctx context.Context, opts ...grpc.CallOption) (ClusterNodeService_StepClient, error) + Step(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse], error) } type clusterNodeServiceClient struct { @@ -42,52 +44,40 @@ func NewClusterNodeServiceClient(cc grpc.ClientConnInterface) ClusterNodeService return &clusterNodeServiceClient{cc} } -func (c *clusterNodeServiceClient) Step(ctx context.Context, opts ...grpc.CallOption) (ClusterNodeService_StepClient, error) { - stream, err := c.cc.NewStream(ctx, &ClusterNodeService_ServiceDesc.Streams[0], ClusterNodeService_Step_FullMethodName, opts...) +func (c *clusterNodeServiceClient) Step(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ClusterNodeService_ServiceDesc.Streams[0], ClusterNodeService_Step_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &clusterNodeServiceStepClient{stream} + x := &grpc.GenericClientStream[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse]{ClientStream: stream} return x, nil } -type ClusterNodeService_StepClient interface { - Send(*ClusterNodeServiceStepRequest) error - Recv() (*ClusterNodeServiceStepResponse, error) - grpc.ClientStream -} - -type clusterNodeServiceStepClient struct { - grpc.ClientStream -} - -func (x *clusterNodeServiceStepClient) Send(m *ClusterNodeServiceStepRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *clusterNodeServiceStepClient) Recv() (*ClusterNodeServiceStepResponse, error) { - m := new(ClusterNodeServiceStepResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ClusterNodeService_StepClient = grpc.BidiStreamingClient[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse] // ClusterNodeServiceServer is the server API for ClusterNodeService service. // All implementations should embed UnimplementedClusterNodeServiceServer -// for forward compatibility +// for forward compatibility. +// +// Service ClusterNodeService defines communication between cluster members. type ClusterNodeServiceServer interface { // Step passes an implementation-specific message to another cluster member. - Step(ClusterNodeService_StepServer) error + Step(grpc.BidiStreamingServer[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse]) error } -// UnimplementedClusterNodeServiceServer should be embedded to have forward compatible implementations. -type UnimplementedClusterNodeServiceServer struct { -} +// UnimplementedClusterNodeServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedClusterNodeServiceServer struct{} -func (UnimplementedClusterNodeServiceServer) Step(ClusterNodeService_StepServer) error { +func (UnimplementedClusterNodeServiceServer) Step(grpc.BidiStreamingServer[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse]) error { return status.Errorf(codes.Unimplemented, "method Step not implemented") } +func (UnimplementedClusterNodeServiceServer) testEmbeddedByValue() {} // UnsafeClusterNodeServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ClusterNodeServiceServer will @@ -97,34 +87,22 @@ type UnsafeClusterNodeServiceServer interface { } func RegisterClusterNodeServiceServer(s grpc.ServiceRegistrar, srv ClusterNodeServiceServer) { + // If the following call pancis, it indicates UnimplementedClusterNodeServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ClusterNodeService_ServiceDesc, srv) } func _ClusterNodeService_Step_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ClusterNodeServiceServer).Step(&clusterNodeServiceStepServer{stream}) -} - -type ClusterNodeService_StepServer interface { - Send(*ClusterNodeServiceStepResponse) error - Recv() (*ClusterNodeServiceStepRequest, error) - grpc.ServerStream -} - -type clusterNodeServiceStepServer struct { - grpc.ServerStream + return srv.(ClusterNodeServiceServer).Step(&grpc.GenericServerStream[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse]{ServerStream: stream}) } -func (x *clusterNodeServiceStepServer) Send(m *ClusterNodeServiceStepResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *clusterNodeServiceStepServer) Recv() (*ClusterNodeServiceStepRequest, error) { - m := new(ClusterNodeServiceStepRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ClusterNodeService_StepServer = grpc.BidiStreamingServer[ClusterNodeServiceStepRequest, ClusterNodeServiceStepResponse] // ClusterNodeService_ServiceDesc is the grpc.ServiceDesc for ClusterNodeService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/configuration.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/configuration.pb.go index 58f2f6a5e49..f35e688c9ca 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/configuration.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/configuration.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/configuration.proto @@ -420,7 +420,7 @@ func file_orderer_configuration_proto_rawDescGZIP() []byte { var file_orderer_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_orderer_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_orderer_configuration_proto_goTypes = []interface{}{ +var file_orderer_configuration_proto_goTypes = []any{ (ConsensusType_State)(0), // 0: orderer.ConsensusType.State (*ConsensusType)(nil), // 1: orderer.ConsensusType (*BatchSize)(nil), // 2: orderer.BatchSize @@ -443,7 +443,7 @@ func file_orderer_configuration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_configuration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ConsensusType); i { case 0: return &v.state @@ -455,7 +455,7 @@ func file_orderer_configuration_proto_init() { return nil } } - file_orderer_configuration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_configuration_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BatchSize); i { case 0: return &v.state @@ -467,7 +467,7 @@ func file_orderer_configuration_proto_init() { return nil } } - file_orderer_configuration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_orderer_configuration_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*BatchTimeout); i { case 0: return &v.state @@ -479,7 +479,7 @@ func file_orderer_configuration_proto_init() { return nil } } - file_orderer_configuration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_orderer_configuration_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*KafkaBrokers); i { case 0: return &v.state @@ -491,7 +491,7 @@ func file_orderer_configuration_proto_init() { return nil } } - file_orderer_configuration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_orderer_configuration_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ChannelRestrictions); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/configuration.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/configuration.pb.go index e0b0b857e0b..c64f3d4e03f 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/configuration.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/configuration.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/etcdraft/configuration.proto @@ -299,7 +299,7 @@ func file_orderer_etcdraft_configuration_proto_rawDescGZIP() []byte { } var file_orderer_etcdraft_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_orderer_etcdraft_configuration_proto_goTypes = []interface{}{ +var file_orderer_etcdraft_configuration_proto_goTypes = []any{ (*ConfigMetadata)(nil), // 0: etcdraft.ConfigMetadata (*Consenter)(nil), // 1: etcdraft.Consenter (*Options)(nil), // 2: etcdraft.Options @@ -320,7 +320,7 @@ func file_orderer_etcdraft_configuration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_etcdraft_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_etcdraft_configuration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ConfigMetadata); i { case 0: return &v.state @@ -332,7 +332,7 @@ func file_orderer_etcdraft_configuration_proto_init() { return nil } } - file_orderer_etcdraft_configuration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_etcdraft_configuration_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Consenter); i { case 0: return &v.state @@ -344,7 +344,7 @@ func file_orderer_etcdraft_configuration_proto_init() { return nil } } - file_orderer_etcdraft_configuration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_orderer_etcdraft_configuration_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Options); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/metadata.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/metadata.pb.go index 821265cba9c..75dc9ba6986 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/metadata.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft/metadata.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/etcdraft/metadata.proto @@ -189,7 +189,7 @@ func file_orderer_etcdraft_metadata_proto_rawDescGZIP() []byte { } var file_orderer_etcdraft_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_orderer_etcdraft_metadata_proto_goTypes = []interface{}{ +var file_orderer_etcdraft_metadata_proto_goTypes = []any{ (*BlockMetadata)(nil), // 0: etcdraft.BlockMetadata (*ClusterMetadata)(nil), // 1: etcdraft.ClusterMetadata } @@ -207,7 +207,7 @@ func file_orderer_etcdraft_metadata_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_etcdraft_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_etcdraft_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BlockMetadata); i { case 0: return &v.state @@ -219,7 +219,7 @@ func file_orderer_etcdraft_metadata_proto_init() { return nil } } - file_orderer_etcdraft_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_orderer_etcdraft_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ClusterMetadata); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/smartbft/configuration.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/smartbft/configuration.pb.go index 9660b0b1e14..1f6d0b94281 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/smartbft/configuration.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/orderer/smartbft/configuration.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: orderer/smartbft/configuration.proto @@ -362,7 +362,7 @@ func file_orderer_smartbft_configuration_proto_rawDescGZIP() []byte { var file_orderer_smartbft_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_orderer_smartbft_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_orderer_smartbft_configuration_proto_goTypes = []interface{}{ +var file_orderer_smartbft_configuration_proto_goTypes = []any{ (Options_Rotation)(0), // 0: orderer.smartbft.Options.Rotation (*Options)(nil), // 1: orderer.smartbft.Options } @@ -381,7 +381,7 @@ func file_orderer_smartbft_configuration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_orderer_smartbft_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_orderer_smartbft_configuration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Options); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode.pb.go index 6e0c2724594..80ec7aab1c4 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/chaincode.proto @@ -733,7 +733,7 @@ func file_peer_chaincode_proto_rawDescGZIP() []byte { var file_peer_chaincode_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_peer_chaincode_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_peer_chaincode_proto_goTypes = []interface{}{ +var file_peer_chaincode_proto_goTypes = []any{ (ChaincodeSpec_Type)(0), // 0: protos.ChaincodeSpec.Type (*ChaincodeID)(nil), // 1: protos.ChaincodeID (*ChaincodeInput)(nil), // 2: protos.ChaincodeInput @@ -768,7 +768,7 @@ func file_peer_chaincode_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_chaincode_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeID); i { case 0: return &v.state @@ -780,7 +780,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeInput); i { case 0: return &v.state @@ -792,7 +792,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeSpec); i { case 0: return &v.state @@ -804,7 +804,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeDeploymentSpec); i { case 0: return &v.state @@ -816,7 +816,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeInvocationSpec); i { case 0: return &v.state @@ -828,7 +828,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*LifecycleEvent); i { case 0: return &v.state @@ -840,7 +840,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*CDSData); i { case 0: return &v.state @@ -852,7 +852,7 @@ func file_peer_chaincode_proto_init() { return nil } } - file_peer_chaincode_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeData); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_event.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_event.pb.go index ab856c7a3d1..0eb0d03ff78 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_event.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_event.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/chaincode_event.proto @@ -137,7 +137,7 @@ func file_peer_chaincode_event_proto_rawDescGZIP() []byte { } var file_peer_chaincode_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_peer_chaincode_event_proto_goTypes = []interface{}{ +var file_peer_chaincode_event_proto_goTypes = []any{ (*ChaincodeEvent)(nil), // 0: protos.ChaincodeEvent } var file_peer_chaincode_event_proto_depIdxs = []int32{ @@ -154,7 +154,7 @@ func file_peer_chaincode_event_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_chaincode_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_event_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeEvent); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim.pb.go index 695668712d9..17cdac21dfe 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/chaincode_shim.proto @@ -1394,7 +1394,7 @@ func file_peer_chaincode_shim_proto_rawDescGZIP() []byte { var file_peer_chaincode_shim_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_peer_chaincode_shim_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_peer_chaincode_shim_proto_goTypes = []interface{}{ +var file_peer_chaincode_shim_proto_goTypes = []any{ (ChaincodeMessage_Type)(0), // 0: protos.ChaincodeMessage.Type (*ChaincodeMessage)(nil), // 1: protos.ChaincodeMessage (*GetState)(nil), // 2: protos.GetState @@ -1445,7 +1445,7 @@ func file_peer_chaincode_shim_proto_init() { file_peer_chaincode_event_proto_init() file_peer_proposal_proto_init() if !protoimpl.UnsafeEnabled { - file_peer_chaincode_shim_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeMessage); i { case 0: return &v.state @@ -1457,7 +1457,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetState); i { case 0: return &v.state @@ -1469,7 +1469,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GetStateMetadata); i { case 0: return &v.state @@ -1481,7 +1481,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*PutState); i { case 0: return &v.state @@ -1493,7 +1493,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*PutStateMetadata); i { case 0: return &v.state @@ -1505,7 +1505,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DelState); i { case 0: return &v.state @@ -1517,7 +1517,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*PurgePrivateState); i { case 0: return &v.state @@ -1529,7 +1529,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*GetStateByRange); i { case 0: return &v.state @@ -1541,7 +1541,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*GetQueryResult); i { case 0: return &v.state @@ -1553,7 +1553,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*QueryMetadata); i { case 0: return &v.state @@ -1565,7 +1565,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*GetHistoryForKey); i { case 0: return &v.state @@ -1577,7 +1577,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*QueryStateNext); i { case 0: return &v.state @@ -1589,7 +1589,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*QueryStateClose); i { case 0: return &v.state @@ -1601,7 +1601,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*QueryResultBytes); i { case 0: return &v.state @@ -1613,7 +1613,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*QueryResponse); i { case 0: return &v.state @@ -1625,7 +1625,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*QueryResponseMetadata); i { case 0: return &v.state @@ -1637,7 +1637,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*StateMetadata); i { case 0: return &v.state @@ -1649,7 +1649,7 @@ func file_peer_chaincode_shim_proto_init() { return nil } } - file_peer_chaincode_shim_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_peer_chaincode_shim_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*StateMetadataResult); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim_grpc.pb.go index c7baf0503d2..01b080611b7 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/chaincode_shim_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: peer/chaincode_shim.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ChaincodeSupport_Register_FullMethodName = "/protos.ChaincodeSupport/Register" @@ -29,8 +29,11 @@ const ( // ChaincodeSupportClient is the client API for ChaincodeSupport service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Interface that provides support to chaincode execution. ChaincodeContext +// provides the context necessary for the server to respond appropriately. type ChaincodeSupportClient interface { - Register(ctx context.Context, opts ...grpc.CallOption) (ChaincodeSupport_RegisterClient, error) + Register(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ChaincodeMessage, ChaincodeMessage], error) } type chaincodeSupportClient struct { @@ -41,51 +44,40 @@ func NewChaincodeSupportClient(cc grpc.ClientConnInterface) ChaincodeSupportClie return &chaincodeSupportClient{cc} } -func (c *chaincodeSupportClient) Register(ctx context.Context, opts ...grpc.CallOption) (ChaincodeSupport_RegisterClient, error) { - stream, err := c.cc.NewStream(ctx, &ChaincodeSupport_ServiceDesc.Streams[0], ChaincodeSupport_Register_FullMethodName, opts...) +func (c *chaincodeSupportClient) Register(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ChaincodeMessage, ChaincodeMessage], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &ChaincodeSupport_ServiceDesc.Streams[0], ChaincodeSupport_Register_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &chaincodeSupportRegisterClient{stream} + x := &grpc.GenericClientStream[ChaincodeMessage, ChaincodeMessage]{ClientStream: stream} return x, nil } -type ChaincodeSupport_RegisterClient interface { - Send(*ChaincodeMessage) error - Recv() (*ChaincodeMessage, error) - grpc.ClientStream -} - -type chaincodeSupportRegisterClient struct { - grpc.ClientStream -} - -func (x *chaincodeSupportRegisterClient) Send(m *ChaincodeMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *chaincodeSupportRegisterClient) Recv() (*ChaincodeMessage, error) { - m := new(ChaincodeMessage) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ChaincodeSupport_RegisterClient = grpc.BidiStreamingClient[ChaincodeMessage, ChaincodeMessage] // ChaincodeSupportServer is the server API for ChaincodeSupport service. // All implementations should embed UnimplementedChaincodeSupportServer -// for forward compatibility +// for forward compatibility. +// +// Interface that provides support to chaincode execution. ChaincodeContext +// provides the context necessary for the server to respond appropriately. type ChaincodeSupportServer interface { - Register(ChaincodeSupport_RegisterServer) error + Register(grpc.BidiStreamingServer[ChaincodeMessage, ChaincodeMessage]) error } -// UnimplementedChaincodeSupportServer should be embedded to have forward compatible implementations. -type UnimplementedChaincodeSupportServer struct { -} +// UnimplementedChaincodeSupportServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedChaincodeSupportServer struct{} -func (UnimplementedChaincodeSupportServer) Register(ChaincodeSupport_RegisterServer) error { +func (UnimplementedChaincodeSupportServer) Register(grpc.BidiStreamingServer[ChaincodeMessage, ChaincodeMessage]) error { return status.Errorf(codes.Unimplemented, "method Register not implemented") } +func (UnimplementedChaincodeSupportServer) testEmbeddedByValue() {} // UnsafeChaincodeSupportServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChaincodeSupportServer will @@ -95,34 +87,22 @@ type UnsafeChaincodeSupportServer interface { } func RegisterChaincodeSupportServer(s grpc.ServiceRegistrar, srv ChaincodeSupportServer) { + // If the following call pancis, it indicates UnimplementedChaincodeSupportServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ChaincodeSupport_ServiceDesc, srv) } func _ChaincodeSupport_Register_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ChaincodeSupportServer).Register(&chaincodeSupportRegisterServer{stream}) -} - -type ChaincodeSupport_RegisterServer interface { - Send(*ChaincodeMessage) error - Recv() (*ChaincodeMessage, error) - grpc.ServerStream -} - -type chaincodeSupportRegisterServer struct { - grpc.ServerStream + return srv.(ChaincodeSupportServer).Register(&grpc.GenericServerStream[ChaincodeMessage, ChaincodeMessage]{ServerStream: stream}) } -func (x *chaincodeSupportRegisterServer) Send(m *ChaincodeMessage) error { - return x.ServerStream.SendMsg(m) -} - -func (x *chaincodeSupportRegisterServer) Recv() (*ChaincodeMessage, error) { - m := new(ChaincodeMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type ChaincodeSupport_RegisterServer = grpc.BidiStreamingServer[ChaincodeMessage, ChaincodeMessage] // ChaincodeSupport_ServiceDesc is the grpc.ServiceDesc for ChaincodeSupport service. // It's only intended for direct use with grpc.RegisterService, @@ -149,8 +129,11 @@ const ( // ChaincodeClient is the client API for Chaincode service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Chaincode as a server - peer establishes a connection to the chaincode as a client +// Currently only supports a stream connection. type ChaincodeClient interface { - Connect(ctx context.Context, opts ...grpc.CallOption) (Chaincode_ConnectClient, error) + Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ChaincodeMessage, ChaincodeMessage], error) } type chaincodeClient struct { @@ -161,51 +144,40 @@ func NewChaincodeClient(cc grpc.ClientConnInterface) ChaincodeClient { return &chaincodeClient{cc} } -func (c *chaincodeClient) Connect(ctx context.Context, opts ...grpc.CallOption) (Chaincode_ConnectClient, error) { - stream, err := c.cc.NewStream(ctx, &Chaincode_ServiceDesc.Streams[0], Chaincode_Connect_FullMethodName, opts...) +func (c *chaincodeClient) Connect(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ChaincodeMessage, ChaincodeMessage], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Chaincode_ServiceDesc.Streams[0], Chaincode_Connect_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &chaincodeConnectClient{stream} + x := &grpc.GenericClientStream[ChaincodeMessage, ChaincodeMessage]{ClientStream: stream} return x, nil } -type Chaincode_ConnectClient interface { - Send(*ChaincodeMessage) error - Recv() (*ChaincodeMessage, error) - grpc.ClientStream -} - -type chaincodeConnectClient struct { - grpc.ClientStream -} - -func (x *chaincodeConnectClient) Send(m *ChaincodeMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *chaincodeConnectClient) Recv() (*ChaincodeMessage, error) { - m := new(ChaincodeMessage) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Chaincode_ConnectClient = grpc.BidiStreamingClient[ChaincodeMessage, ChaincodeMessage] // ChaincodeServer is the server API for Chaincode service. // All implementations should embed UnimplementedChaincodeServer -// for forward compatibility +// for forward compatibility. +// +// Chaincode as a server - peer establishes a connection to the chaincode as a client +// Currently only supports a stream connection. type ChaincodeServer interface { - Connect(Chaincode_ConnectServer) error + Connect(grpc.BidiStreamingServer[ChaincodeMessage, ChaincodeMessage]) error } -// UnimplementedChaincodeServer should be embedded to have forward compatible implementations. -type UnimplementedChaincodeServer struct { -} +// UnimplementedChaincodeServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedChaincodeServer struct{} -func (UnimplementedChaincodeServer) Connect(Chaincode_ConnectServer) error { +func (UnimplementedChaincodeServer) Connect(grpc.BidiStreamingServer[ChaincodeMessage, ChaincodeMessage]) error { return status.Errorf(codes.Unimplemented, "method Connect not implemented") } +func (UnimplementedChaincodeServer) testEmbeddedByValue() {} // UnsafeChaincodeServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ChaincodeServer will @@ -215,34 +187,22 @@ type UnsafeChaincodeServer interface { } func RegisterChaincodeServer(s grpc.ServiceRegistrar, srv ChaincodeServer) { + // If the following call pancis, it indicates UnimplementedChaincodeServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Chaincode_ServiceDesc, srv) } func _Chaincode_Connect_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ChaincodeServer).Connect(&chaincodeConnectServer{stream}) -} - -type Chaincode_ConnectServer interface { - Send(*ChaincodeMessage) error - Recv() (*ChaincodeMessage, error) - grpc.ServerStream -} - -type chaincodeConnectServer struct { - grpc.ServerStream + return srv.(ChaincodeServer).Connect(&grpc.GenericServerStream[ChaincodeMessage, ChaincodeMessage]{ServerStream: stream}) } -func (x *chaincodeConnectServer) Send(m *ChaincodeMessage) error { - return x.ServerStream.SendMsg(m) -} - -func (x *chaincodeConnectServer) Recv() (*ChaincodeMessage, error) { - m := new(ChaincodeMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Chaincode_ConnectServer = grpc.BidiStreamingServer[ChaincodeMessage, ChaincodeMessage] // Chaincode_ServiceDesc is the grpc.ServiceDesc for Chaincode service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/collection.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/collection.pb.go index c55fa1a2a9e..49d304cff3d 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/collection.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/collection.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/collection.proto @@ -424,7 +424,7 @@ func file_peer_collection_proto_rawDescGZIP() []byte { } var file_peer_collection_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_peer_collection_proto_goTypes = []interface{}{ +var file_peer_collection_proto_goTypes = []any{ (*CollectionConfigPackage)(nil), // 0: protos.CollectionConfigPackage (*CollectionConfig)(nil), // 1: protos.CollectionConfig (*StaticCollectionConfig)(nil), // 2: protos.StaticCollectionConfig @@ -452,7 +452,7 @@ func file_peer_collection_proto_init() { } file_peer_policy_proto_init() if !protoimpl.UnsafeEnabled { - file_peer_collection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_collection_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CollectionConfigPackage); i { case 0: return &v.state @@ -464,7 +464,7 @@ func file_peer_collection_proto_init() { return nil } } - file_peer_collection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_collection_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CollectionConfig); i { case 0: return &v.state @@ -476,7 +476,7 @@ func file_peer_collection_proto_init() { return nil } } - file_peer_collection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_collection_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*StaticCollectionConfig); i { case 0: return &v.state @@ -488,7 +488,7 @@ func file_peer_collection_proto_init() { return nil } } - file_peer_collection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_collection_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CollectionPolicyConfig); i { case 0: return &v.state @@ -501,10 +501,10 @@ func file_peer_collection_proto_init() { } } } - file_peer_collection_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_peer_collection_proto_msgTypes[1].OneofWrappers = []any{ (*CollectionConfig_StaticCollectionConfig)(nil), } - file_peer_collection_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_peer_collection_proto_msgTypes[3].OneofWrappers = []any{ (*CollectionPolicyConfig_SignaturePolicy)(nil), } type x struct{} diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/configuration.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/configuration.pb.go index 238b3e4835e..c052ee6418d 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/configuration.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/configuration.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/configuration.proto @@ -277,7 +277,7 @@ func file_peer_configuration_proto_rawDescGZIP() []byte { } var file_peer_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_peer_configuration_proto_goTypes = []interface{}{ +var file_peer_configuration_proto_goTypes = []any{ (*AnchorPeers)(nil), // 0: protos.AnchorPeers (*AnchorPeer)(nil), // 1: protos.AnchorPeer (*APIResource)(nil), // 2: protos.APIResource @@ -301,7 +301,7 @@ func file_peer_configuration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_configuration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*AnchorPeers); i { case 0: return &v.state @@ -313,7 +313,7 @@ func file_peer_configuration_proto_init() { return nil } } - file_peer_configuration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_configuration_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*AnchorPeer); i { case 0: return &v.state @@ -325,7 +325,7 @@ func file_peer_configuration_proto_init() { return nil } } - file_peer_configuration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_configuration_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*APIResource); i { case 0: return &v.state @@ -337,7 +337,7 @@ func file_peer_configuration_proto_init() { return nil } } - file_peer_configuration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_configuration_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ACLs); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events.pb.go index 27c810d4b75..75f8db6d3b5 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/events.proto @@ -568,7 +568,7 @@ func file_peer_events_proto_rawDescGZIP() []byte { } var file_peer_events_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_peer_events_proto_goTypes = []interface{}{ +var file_peer_events_proto_goTypes = []any{ (*FilteredBlock)(nil), // 0: protos.FilteredBlock (*FilteredTransaction)(nil), // 1: protos.FilteredTransaction (*FilteredTransactionActions)(nil), // 2: protos.FilteredTransactionActions @@ -619,7 +619,7 @@ func file_peer_events_proto_init() { file_peer_chaincode_event_proto_init() file_peer_transaction_proto_init() if !protoimpl.UnsafeEnabled { - file_peer_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_events_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FilteredBlock); i { case 0: return &v.state @@ -631,7 +631,7 @@ func file_peer_events_proto_init() { return nil } } - file_peer_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_events_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FilteredTransaction); i { case 0: return &v.state @@ -643,7 +643,7 @@ func file_peer_events_proto_init() { return nil } } - file_peer_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_events_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*FilteredTransactionActions); i { case 0: return &v.state @@ -655,7 +655,7 @@ func file_peer_events_proto_init() { return nil } } - file_peer_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_events_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*FilteredChaincodeAction); i { case 0: return &v.state @@ -667,7 +667,7 @@ func file_peer_events_proto_init() { return nil } } - file_peer_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_events_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*BlockAndPrivateData); i { case 0: return &v.state @@ -679,7 +679,7 @@ func file_peer_events_proto_init() { return nil } } - file_peer_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_peer_events_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeliverResponse); i { case 0: return &v.state @@ -692,10 +692,10 @@ func file_peer_events_proto_init() { } } } - file_peer_events_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_peer_events_proto_msgTypes[1].OneofWrappers = []any{ (*FilteredTransaction_TransactionActions)(nil), } - file_peer_events_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_peer_events_proto_msgTypes[5].OneofWrappers = []any{ (*DeliverResponse_Status)(nil), (*DeliverResponse_Block)(nil), (*DeliverResponse_FilteredBlock)(nil), diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events_grpc.pb.go index 4b4b09ce9fb..bfbf3f5837e 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/events_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: peer/events.proto @@ -20,8 +20,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Deliver_Deliver_FullMethodName = "/protos.Deliver/Deliver" @@ -36,15 +36,15 @@ type DeliverClient interface { // Deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with // Payload data as a marshaled orderer.SeekInfo message, // then a stream of block replies is received - Deliver(ctx context.Context, opts ...grpc.CallOption) (Deliver_DeliverClient, error) + Deliver(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) // DeliverFiltered first requires an Envelope of type ab.DELIVER_SEEK_INFO with // Payload data as a marshaled orderer.SeekInfo message, // then a stream of **filtered** block replies is received - DeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (Deliver_DeliverFilteredClient, error) + DeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) // DeliverWithPrivateData first requires an Envelope of type ab.DELIVER_SEEK_INFO with // Payload data as a marshaled orderer.SeekInfo message, // then a stream of block and private data replies is received - DeliverWithPrivateData(ctx context.Context, opts ...grpc.CallOption) (Deliver_DeliverWithPrivateDataClient, error) + DeliverWithPrivateData(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) } type deliverClient struct { @@ -55,130 +55,80 @@ func NewDeliverClient(cc grpc.ClientConnInterface) DeliverClient { return &deliverClient{cc} } -func (c *deliverClient) Deliver(ctx context.Context, opts ...grpc.CallOption) (Deliver_DeliverClient, error) { - stream, err := c.cc.NewStream(ctx, &Deliver_ServiceDesc.Streams[0], Deliver_Deliver_FullMethodName, opts...) +func (c *deliverClient) Deliver(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Deliver_ServiceDesc.Streams[0], Deliver_Deliver_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &deliverDeliverClient{stream} + x := &grpc.GenericClientStream[common.Envelope, DeliverResponse]{ClientStream: stream} return x, nil } -type Deliver_DeliverClient interface { - Send(*common.Envelope) error - Recv() (*DeliverResponse, error) - grpc.ClientStream -} - -type deliverDeliverClient struct { - grpc.ClientStream -} - -func (x *deliverDeliverClient) Send(m *common.Envelope) error { - return x.ClientStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Deliver_DeliverClient = grpc.BidiStreamingClient[common.Envelope, DeliverResponse] -func (x *deliverDeliverClient) Recv() (*DeliverResponse, error) { - m := new(DeliverResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *deliverClient) DeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (Deliver_DeliverFilteredClient, error) { - stream, err := c.cc.NewStream(ctx, &Deliver_ServiceDesc.Streams[1], Deliver_DeliverFiltered_FullMethodName, opts...) +func (c *deliverClient) DeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Deliver_ServiceDesc.Streams[1], Deliver_DeliverFiltered_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &deliverDeliverFilteredClient{stream} + x := &grpc.GenericClientStream[common.Envelope, DeliverResponse]{ClientStream: stream} return x, nil } -type Deliver_DeliverFilteredClient interface { - Send(*common.Envelope) error - Recv() (*DeliverResponse, error) - grpc.ClientStream -} - -type deliverDeliverFilteredClient struct { - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Deliver_DeliverFilteredClient = grpc.BidiStreamingClient[common.Envelope, DeliverResponse] -func (x *deliverDeliverFilteredClient) Send(m *common.Envelope) error { - return x.ClientStream.SendMsg(m) -} - -func (x *deliverDeliverFilteredClient) Recv() (*DeliverResponse, error) { - m := new(DeliverResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *deliverClient) DeliverWithPrivateData(ctx context.Context, opts ...grpc.CallOption) (Deliver_DeliverWithPrivateDataClient, error) { - stream, err := c.cc.NewStream(ctx, &Deliver_ServiceDesc.Streams[2], Deliver_DeliverWithPrivateData_FullMethodName, opts...) +func (c *deliverClient) DeliverWithPrivateData(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Envelope, DeliverResponse], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &Deliver_ServiceDesc.Streams[2], Deliver_DeliverWithPrivateData_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &deliverDeliverWithPrivateDataClient{stream} + x := &grpc.GenericClientStream[common.Envelope, DeliverResponse]{ClientStream: stream} return x, nil } -type Deliver_DeliverWithPrivateDataClient interface { - Send(*common.Envelope) error - Recv() (*DeliverResponse, error) - grpc.ClientStream -} - -type deliverDeliverWithPrivateDataClient struct { - grpc.ClientStream -} - -func (x *deliverDeliverWithPrivateDataClient) Send(m *common.Envelope) error { - return x.ClientStream.SendMsg(m) -} - -func (x *deliverDeliverWithPrivateDataClient) Recv() (*DeliverResponse, error) { - m := new(DeliverResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Deliver_DeliverWithPrivateDataClient = grpc.BidiStreamingClient[common.Envelope, DeliverResponse] // DeliverServer is the server API for Deliver service. // All implementations should embed UnimplementedDeliverServer -// for forward compatibility +// for forward compatibility. type DeliverServer interface { // Deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with // Payload data as a marshaled orderer.SeekInfo message, // then a stream of block replies is received - Deliver(Deliver_DeliverServer) error + Deliver(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error // DeliverFiltered first requires an Envelope of type ab.DELIVER_SEEK_INFO with // Payload data as a marshaled orderer.SeekInfo message, // then a stream of **filtered** block replies is received - DeliverFiltered(Deliver_DeliverFilteredServer) error + DeliverFiltered(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error // DeliverWithPrivateData first requires an Envelope of type ab.DELIVER_SEEK_INFO with // Payload data as a marshaled orderer.SeekInfo message, // then a stream of block and private data replies is received - DeliverWithPrivateData(Deliver_DeliverWithPrivateDataServer) error + DeliverWithPrivateData(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error } -// UnimplementedDeliverServer should be embedded to have forward compatible implementations. -type UnimplementedDeliverServer struct { -} +// UnimplementedDeliverServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDeliverServer struct{} -func (UnimplementedDeliverServer) Deliver(Deliver_DeliverServer) error { +func (UnimplementedDeliverServer) Deliver(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error { return status.Errorf(codes.Unimplemented, "method Deliver not implemented") } -func (UnimplementedDeliverServer) DeliverFiltered(Deliver_DeliverFilteredServer) error { +func (UnimplementedDeliverServer) DeliverFiltered(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error { return status.Errorf(codes.Unimplemented, "method DeliverFiltered not implemented") } -func (UnimplementedDeliverServer) DeliverWithPrivateData(Deliver_DeliverWithPrivateDataServer) error { +func (UnimplementedDeliverServer) DeliverWithPrivateData(grpc.BidiStreamingServer[common.Envelope, DeliverResponse]) error { return status.Errorf(codes.Unimplemented, "method DeliverWithPrivateData not implemented") } +func (UnimplementedDeliverServer) testEmbeddedByValue() {} // UnsafeDeliverServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DeliverServer will @@ -188,86 +138,36 @@ type UnsafeDeliverServer interface { } func RegisterDeliverServer(s grpc.ServiceRegistrar, srv DeliverServer) { + // If the following call pancis, it indicates UnimplementedDeliverServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Deliver_ServiceDesc, srv) } func _Deliver_Deliver_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DeliverServer).Deliver(&deliverDeliverServer{stream}) -} - -type Deliver_DeliverServer interface { - Send(*DeliverResponse) error - Recv() (*common.Envelope, error) - grpc.ServerStream -} - -type deliverDeliverServer struct { - grpc.ServerStream -} - -func (x *deliverDeliverServer) Send(m *DeliverResponse) error { - return x.ServerStream.SendMsg(m) + return srv.(DeliverServer).Deliver(&grpc.GenericServerStream[common.Envelope, DeliverResponse]{ServerStream: stream}) } -func (x *deliverDeliverServer) Recv() (*common.Envelope, error) { - m := new(common.Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Deliver_DeliverServer = grpc.BidiStreamingServer[common.Envelope, DeliverResponse] func _Deliver_DeliverFiltered_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DeliverServer).DeliverFiltered(&deliverDeliverFilteredServer{stream}) -} - -type Deliver_DeliverFilteredServer interface { - Send(*DeliverResponse) error - Recv() (*common.Envelope, error) - grpc.ServerStream -} - -type deliverDeliverFilteredServer struct { - grpc.ServerStream + return srv.(DeliverServer).DeliverFiltered(&grpc.GenericServerStream[common.Envelope, DeliverResponse]{ServerStream: stream}) } -func (x *deliverDeliverFilteredServer) Send(m *DeliverResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *deliverDeliverFilteredServer) Recv() (*common.Envelope, error) { - m := new(common.Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Deliver_DeliverFilteredServer = grpc.BidiStreamingServer[common.Envelope, DeliverResponse] func _Deliver_DeliverWithPrivateData_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DeliverServer).DeliverWithPrivateData(&deliverDeliverWithPrivateDataServer{stream}) -} - -type Deliver_DeliverWithPrivateDataServer interface { - Send(*DeliverResponse) error - Recv() (*common.Envelope, error) - grpc.ServerStream + return srv.(DeliverServer).DeliverWithPrivateData(&grpc.GenericServerStream[common.Envelope, DeliverResponse]{ServerStream: stream}) } -type deliverDeliverWithPrivateDataServer struct { - grpc.ServerStream -} - -func (x *deliverDeliverWithPrivateDataServer) Send(m *DeliverResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *deliverDeliverWithPrivateDataServer) Recv() (*common.Envelope, error) { - m := new(common.Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type Deliver_DeliverWithPrivateDataServer = grpc.BidiStreamingServer[common.Envelope, DeliverResponse] // Deliver_ServiceDesc is the grpc.ServiceDesc for Deliver service. // It's only intended for direct use with grpc.RegisterService, diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/chaincode_definition.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/chaincode_definition.pb.go index dc14e8fface..e10fe0d15fe 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/chaincode_definition.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/chaincode_definition.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/lifecycle/chaincode_definition.proto @@ -198,7 +198,7 @@ func file_peer_lifecycle_chaincode_definition_proto_rawDescGZIP() []byte { } var file_peer_lifecycle_chaincode_definition_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_peer_lifecycle_chaincode_definition_proto_goTypes = []interface{}{ +var file_peer_lifecycle_chaincode_definition_proto_goTypes = []any{ (*ChaincodeEndorsementInfo)(nil), // 0: lifecycle.ChaincodeEndorsementInfo (*ChaincodeValidationInfo)(nil), // 1: lifecycle.ChaincodeValidationInfo } @@ -216,7 +216,7 @@ func file_peer_lifecycle_chaincode_definition_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_lifecycle_chaincode_definition_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_chaincode_definition_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeEndorsementInfo); i { case 0: return &v.state @@ -228,7 +228,7 @@ func file_peer_lifecycle_chaincode_definition_proto_init() { return nil } } - file_peer_lifecycle_chaincode_definition_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_chaincode_definition_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeValidationInfo); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/db.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/db.pb.go index bbe1a748449..d02a68bb1ad 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/db.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/db.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/lifecycle/db.proto @@ -221,7 +221,7 @@ func file_peer_lifecycle_db_proto_rawDescGZIP() []byte { } var file_peer_lifecycle_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_peer_lifecycle_db_proto_goTypes = []interface{}{ +var file_peer_lifecycle_db_proto_goTypes = []any{ (*StateMetadata)(nil), // 0: lifecycle.StateMetadata (*StateData)(nil), // 1: lifecycle.StateData } @@ -239,7 +239,7 @@ func file_peer_lifecycle_db_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_lifecycle_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_db_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*StateMetadata); i { case 0: return &v.state @@ -251,7 +251,7 @@ func file_peer_lifecycle_db_proto_init() { return nil } } - file_peer_lifecycle_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_db_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*StateData); i { case 0: return &v.state @@ -264,7 +264,7 @@ func file_peer_lifecycle_db_proto_init() { } } } - file_peer_lifecycle_db_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_peer_lifecycle_db_proto_msgTypes[1].OneofWrappers = []any{ (*StateData_Int64)(nil), (*StateData_Bytes)(nil), (*StateData_String_)(nil), diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/lifecycle.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/lifecycle.pb.go index af83baacd38..5a766009cc0 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/lifecycle.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle/lifecycle.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/lifecycle/lifecycle.proto @@ -2469,7 +2469,7 @@ func file_peer_lifecycle_lifecycle_proto_rawDescGZIP() []byte { } var file_peer_lifecycle_lifecycle_proto_msgTypes = make([]protoimpl.MessageInfo, 38) -var file_peer_lifecycle_lifecycle_proto_goTypes = []interface{}{ +var file_peer_lifecycle_lifecycle_proto_goTypes = []any{ (*InstallChaincodeArgs)(nil), // 0: lifecycle.InstallChaincodeArgs (*InstallChaincodeResult)(nil), // 1: lifecycle.InstallChaincodeResult (*QueryInstalledChaincodeArgs)(nil), // 2: lifecycle.QueryInstalledChaincodeArgs @@ -2549,7 +2549,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_lifecycle_lifecycle_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*InstallChaincodeArgs); i { case 0: return &v.state @@ -2561,7 +2561,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*InstallChaincodeResult); i { case 0: return &v.state @@ -2573,7 +2573,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodeArgs); i { case 0: return &v.state @@ -2585,7 +2585,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodeResult); i { case 0: return &v.state @@ -2597,7 +2597,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*GetInstalledChaincodePackageArgs); i { case 0: return &v.state @@ -2609,7 +2609,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*GetInstalledChaincodePackageResult); i { case 0: return &v.state @@ -2621,7 +2621,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodesArgs); i { case 0: return &v.state @@ -2633,7 +2633,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodesResult); i { case 0: return &v.state @@ -2645,7 +2645,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ApproveChaincodeDefinitionForMyOrgArgs); i { case 0: return &v.state @@ -2657,7 +2657,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeSource); i { case 0: return &v.state @@ -2669,7 +2669,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*ApproveChaincodeDefinitionForMyOrgResult); i { case 0: return &v.state @@ -2681,7 +2681,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*CommitChaincodeDefinitionArgs); i { case 0: return &v.state @@ -2693,7 +2693,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*CommitChaincodeDefinitionResult); i { case 0: return &v.state @@ -2705,7 +2705,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*CheckCommitReadinessArgs); i { case 0: return &v.state @@ -2717,7 +2717,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*CheckCommitReadinessResult); i { case 0: return &v.state @@ -2729,7 +2729,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*QueryApprovedChaincodeDefinitionArgs); i { case 0: return &v.state @@ -2741,7 +2741,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*QueryApprovedChaincodeDefinitionResult); i { case 0: return &v.state @@ -2753,7 +2753,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*QueryApprovedChaincodeDefinitionsArgs); i { case 0: return &v.state @@ -2765,7 +2765,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*QueryApprovedChaincodeDefinitionsResult); i { case 0: return &v.state @@ -2777,7 +2777,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*QueryChaincodeDefinitionArgs); i { case 0: return &v.state @@ -2789,7 +2789,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*QueryChaincodeDefinitionResult); i { case 0: return &v.state @@ -2801,7 +2801,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*QueryChaincodeDefinitionsArgs); i { case 0: return &v.state @@ -2813,7 +2813,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*QueryChaincodeDefinitionsResult); i { case 0: return &v.state @@ -2825,7 +2825,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodeResult_References); i { case 0: return &v.state @@ -2837,7 +2837,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodeResult_Chaincode); i { case 0: return &v.state @@ -2849,7 +2849,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodesResult_InstalledChaincode); i { case 0: return &v.state @@ -2861,7 +2861,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodesResult_References); i { case 0: return &v.state @@ -2873,7 +2873,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*QueryInstalledChaincodesResult_Chaincode); i { case 0: return &v.state @@ -2885,7 +2885,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeSource_Unavailable); i { case 0: return &v.state @@ -2897,7 +2897,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeSource_Local); i { case 0: return &v.state @@ -2909,7 +2909,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*CheckCommitReadinessResult_Mismatches); i { case 0: return &v.state @@ -2921,7 +2921,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*QueryApprovedChaincodeDefinitionsResult_ApprovedChaincodeDefinition); i { case 0: return &v.state @@ -2933,7 +2933,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { return nil } } - file_peer_lifecycle_lifecycle_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_peer_lifecycle_lifecycle_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*QueryChaincodeDefinitionsResult_ChaincodeDefinition); i { case 0: return &v.state @@ -2946,7 +2946,7 @@ func file_peer_lifecycle_lifecycle_proto_init() { } } } - file_peer_lifecycle_lifecycle_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_peer_lifecycle_lifecycle_proto_msgTypes[9].OneofWrappers = []any{ (*ChaincodeSource_Unavailable_)(nil), (*ChaincodeSource_LocalPackage)(nil), } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer.pb.go index b8172e6586f..1577fb03113 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/peer.proto @@ -49,7 +49,7 @@ var file_peer_peer_proto_rawDesc = []byte{ 0x74, 0x6f, 0x33, } -var file_peer_peer_proto_goTypes = []interface{}{ +var file_peer_peer_proto_goTypes = []any{ (*SignedProposal)(nil), // 0: protos.SignedProposal (*ProposalResponse)(nil), // 1: protos.ProposalResponse } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer_grpc.pb.go index f3fd5657084..ac99beb100b 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/peer_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: peer/peer.proto @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Endorser_ProcessProposal_FullMethodName = "/protos.Endorser/ProcessProposal" @@ -42,8 +42,9 @@ func NewEndorserClient(cc grpc.ClientConnInterface) EndorserClient { } func (c *endorserClient) ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ProposalResponse) - err := c.cc.Invoke(ctx, Endorser_ProcessProposal_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Endorser_ProcessProposal_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -52,18 +53,22 @@ func (c *endorserClient) ProcessProposal(ctx context.Context, in *SignedProposal // EndorserServer is the server API for Endorser service. // All implementations should embed UnimplementedEndorserServer -// for forward compatibility +// for forward compatibility. type EndorserServer interface { ProcessProposal(context.Context, *SignedProposal) (*ProposalResponse, error) } -// UnimplementedEndorserServer should be embedded to have forward compatible implementations. -type UnimplementedEndorserServer struct { -} +// UnimplementedEndorserServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedEndorserServer struct{} func (UnimplementedEndorserServer) ProcessProposal(context.Context, *SignedProposal) (*ProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessProposal not implemented") } +func (UnimplementedEndorserServer) testEmbeddedByValue() {} // UnsafeEndorserServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EndorserServer will @@ -73,6 +78,13 @@ type UnsafeEndorserServer interface { } func RegisterEndorserServer(s grpc.ServiceRegistrar, srv EndorserServer) { + // If the following call pancis, it indicates UnimplementedEndorserServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Endorser_ServiceDesc, srv) } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/policy.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/policy.pb.go index 38a220f5550..72a80941b69 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/policy.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/policy.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/policy.proto @@ -157,7 +157,7 @@ func file_peer_policy_proto_rawDescGZIP() []byte { } var file_peer_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_peer_policy_proto_goTypes = []interface{}{ +var file_peer_policy_proto_goTypes = []any{ (*ApplicationPolicy)(nil), // 0: protos.ApplicationPolicy (*common.SignaturePolicyEnvelope)(nil), // 1: common.SignaturePolicyEnvelope } @@ -176,7 +176,7 @@ func file_peer_policy_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ApplicationPolicy); i { case 0: return &v.state @@ -189,7 +189,7 @@ func file_peer_policy_proto_init() { } } } - file_peer_policy_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_peer_policy_proto_msgTypes[0].OneofWrappers = []any{ (*ApplicationPolicy_SignaturePolicy)(nil), (*ApplicationPolicy_ChannelConfigPolicyReference)(nil), } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal.pb.go index c737a9da2e7..4283b522028 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/proposal.proto @@ -470,7 +470,7 @@ func file_peer_proposal_proto_rawDescGZIP() []byte { } var file_peer_proposal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_peer_proposal_proto_goTypes = []interface{}{ +var file_peer_proposal_proto_goTypes = []any{ (*SignedProposal)(nil), // 0: protos.SignedProposal (*Proposal)(nil), // 1: protos.Proposal (*ChaincodeHeaderExtension)(nil), // 2: protos.ChaincodeHeaderExtension @@ -500,7 +500,7 @@ func file_peer_proposal_proto_init() { file_peer_chaincode_proto_init() file_peer_proposal_response_proto_init() if !protoimpl.UnsafeEnabled { - file_peer_proposal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SignedProposal); i { case 0: return &v.state @@ -512,7 +512,7 @@ func file_peer_proposal_proto_init() { return nil } } - file_peer_proposal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Proposal); i { case 0: return &v.state @@ -524,7 +524,7 @@ func file_peer_proposal_proto_init() { return nil } } - file_peer_proposal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeHeaderExtension); i { case 0: return &v.state @@ -536,7 +536,7 @@ func file_peer_proposal_proto_init() { return nil } } - file_peer_proposal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeProposalPayload); i { case 0: return &v.state @@ -548,7 +548,7 @@ func file_peer_proposal_proto_init() { return nil } } - file_peer_proposal_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeAction); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal_response.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal_response.pb.go index 40a48d3ac56..2ce05de86f6 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal_response.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/proposal_response.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/proposal_response.proto @@ -570,7 +570,7 @@ func file_peer_proposal_response_proto_rawDescGZIP() []byte { } var file_peer_proposal_response_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_peer_proposal_response_proto_goTypes = []interface{}{ +var file_peer_proposal_response_proto_goTypes = []any{ (*ProposalResponse)(nil), // 0: protos.ProposalResponse (*Response)(nil), // 1: protos.Response (*ProposalResponsePayload)(nil), // 2: protos.ProposalResponsePayload @@ -600,7 +600,7 @@ func file_peer_proposal_response_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_proposal_response_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_response_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ProposalResponse); i { case 0: return &v.state @@ -612,7 +612,7 @@ func file_peer_proposal_response_proto_init() { return nil } } - file_peer_proposal_response_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_response_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Response); i { case 0: return &v.state @@ -624,7 +624,7 @@ func file_peer_proposal_response_proto_init() { return nil } } - file_peer_proposal_response_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_response_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ProposalResponsePayload); i { case 0: return &v.state @@ -636,7 +636,7 @@ func file_peer_proposal_response_proto_init() { return nil } } - file_peer_proposal_response_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_response_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Endorsement); i { case 0: return &v.state @@ -648,7 +648,7 @@ func file_peer_proposal_response_proto_init() { return nil } } - file_peer_proposal_response_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_response_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeInterest); i { case 0: return &v.state @@ -660,7 +660,7 @@ func file_peer_proposal_response_proto_init() { return nil } } - file_peer_proposal_response_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_peer_proposal_response_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeCall); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/query.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/query.pb.go index fc263cdddcf..b17a5de8f92 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/query.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/query.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/query.proto @@ -401,7 +401,7 @@ func file_peer_query_proto_rawDescGZIP() []byte { } var file_peer_query_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_peer_query_proto_goTypes = []interface{}{ +var file_peer_query_proto_goTypes = []any{ (*ChaincodeQueryResponse)(nil), // 0: protos.ChaincodeQueryResponse (*ChaincodeInfo)(nil), // 1: protos.ChaincodeInfo (*ChannelQueryResponse)(nil), // 2: protos.ChannelQueryResponse @@ -424,7 +424,7 @@ func file_peer_query_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_query_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeQueryResponse); i { case 0: return &v.state @@ -436,7 +436,7 @@ func file_peer_query_proto_init() { return nil } } - file_peer_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_query_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeInfo); i { case 0: return &v.state @@ -448,7 +448,7 @@ func file_peer_query_proto_init() { return nil } } - file_peer_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_query_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ChannelQueryResponse); i { case 0: return &v.state @@ -460,7 +460,7 @@ func file_peer_query_proto_init() { return nil } } - file_peer_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_query_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ChannelInfo); i { case 0: return &v.state @@ -472,7 +472,7 @@ func file_peer_query_proto_init() { return nil } } - file_peer_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_query_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*JoinBySnapshotStatus); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/resources.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/resources.pb.go index a7c2eef34f9..08e484b5225 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/resources.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/resources.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/resources.proto @@ -356,7 +356,7 @@ func file_peer_resources_proto_rawDescGZIP() []byte { } var file_peer_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_peer_resources_proto_goTypes = []interface{}{ +var file_peer_resources_proto_goTypes = []any{ (*ChaincodeIdentifier)(nil), // 0: protos.ChaincodeIdentifier (*ChaincodeValidation)(nil), // 1: protos.ChaincodeValidation (*VSCCArgs)(nil), // 2: protos.VSCCArgs @@ -380,7 +380,7 @@ func file_peer_resources_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_resources_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeIdentifier); i { case 0: return &v.state @@ -392,7 +392,7 @@ func file_peer_resources_proto_init() { return nil } } - file_peer_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_resources_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeValidation); i { case 0: return &v.state @@ -404,7 +404,7 @@ func file_peer_resources_proto_init() { return nil } } - file_peer_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_resources_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*VSCCArgs); i { case 0: return &v.state @@ -416,7 +416,7 @@ func file_peer_resources_proto_init() { return nil } } - file_peer_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_resources_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeEndorsement); i { case 0: return &v.state @@ -428,7 +428,7 @@ func file_peer_resources_proto_init() { return nil } } - file_peer_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_resources_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ConfigTree); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/signed_cc_dep_spec.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/signed_cc_dep_spec.pb.go index 4c31baa7736..e8d66b39fd0 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/signed_cc_dep_spec.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/signed_cc_dep_spec.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/signed_cc_dep_spec.proto @@ -143,7 +143,7 @@ func file_peer_signed_cc_dep_spec_proto_rawDescGZIP() []byte { } var file_peer_signed_cc_dep_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_peer_signed_cc_dep_spec_proto_goTypes = []interface{}{ +var file_peer_signed_cc_dep_spec_proto_goTypes = []any{ (*SignedChaincodeDeploymentSpec)(nil), // 0: protos.SignedChaincodeDeploymentSpec (*Endorsement)(nil), // 1: protos.Endorsement } @@ -163,7 +163,7 @@ func file_peer_signed_cc_dep_spec_proto_init() { } file_peer_proposal_response_proto_init() if !protoimpl.UnsafeEnabled { - file_peer_signed_cc_dep_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_signed_cc_dep_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SignedChaincodeDeploymentSpec); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot.pb.go index 4f9494c9af4..00b52c2b40c 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/snapshot.proto @@ -332,7 +332,7 @@ func file_peer_snapshot_proto_rawDescGZIP() []byte { } var file_peer_snapshot_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_peer_snapshot_proto_goTypes = []interface{}{ +var file_peer_snapshot_proto_goTypes = []any{ (*SnapshotRequest)(nil), // 0: protos.SnapshotRequest (*SnapshotQuery)(nil), // 1: protos.SnapshotQuery (*SignedSnapshotRequest)(nil), // 2: protos.SignedSnapshotRequest @@ -362,7 +362,7 @@ func file_peer_snapshot_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_peer_snapshot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_snapshot_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SnapshotRequest); i { case 0: return &v.state @@ -374,7 +374,7 @@ func file_peer_snapshot_proto_init() { return nil } } - file_peer_snapshot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_snapshot_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SnapshotQuery); i { case 0: return &v.state @@ -386,7 +386,7 @@ func file_peer_snapshot_proto_init() { return nil } } - file_peer_snapshot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_snapshot_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SignedSnapshotRequest); i { case 0: return &v.state @@ -398,7 +398,7 @@ func file_peer_snapshot_proto_init() { return nil } } - file_peer_snapshot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_snapshot_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*QueryPendingSnapshotsResponse); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot_grpc.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot_grpc.pb.go index 466f8eedc93..f991b2f6783 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot_grpc.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/snapshot_grpc.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: peer/snapshot.proto @@ -20,8 +20,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Snapshot_Generate_FullMethodName = "/protos.Snapshot/Generate" @@ -50,8 +50,9 @@ func NewSnapshotClient(cc grpc.ClientConnInterface) SnapshotClient { } func (c *snapshotClient) Generate(ctx context.Context, in *SignedSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Snapshot_Generate_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Snapshot_Generate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -59,8 +60,9 @@ func (c *snapshotClient) Generate(ctx context.Context, in *SignedSnapshotRequest } func (c *snapshotClient) Cancel(ctx context.Context, in *SignedSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Snapshot_Cancel_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Snapshot_Cancel_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -68,8 +70,9 @@ func (c *snapshotClient) Cancel(ctx context.Context, in *SignedSnapshotRequest, } func (c *snapshotClient) QueryPendings(ctx context.Context, in *SignedSnapshotRequest, opts ...grpc.CallOption) (*QueryPendingSnapshotsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryPendingSnapshotsResponse) - err := c.cc.Invoke(ctx, Snapshot_QueryPendings_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Snapshot_QueryPendings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -78,7 +81,7 @@ func (c *snapshotClient) QueryPendings(ctx context.Context, in *SignedSnapshotRe // SnapshotServer is the server API for Snapshot service. // All implementations should embed UnimplementedSnapshotServer -// for forward compatibility +// for forward compatibility. type SnapshotServer interface { // Generate a snapshot reqeust. SignedSnapshotRequest contains marshalled bytes for SnaphostRequest Generate(context.Context, *SignedSnapshotRequest) (*emptypb.Empty, error) @@ -88,9 +91,12 @@ type SnapshotServer interface { QueryPendings(context.Context, *SignedSnapshotRequest) (*QueryPendingSnapshotsResponse, error) } -// UnimplementedSnapshotServer should be embedded to have forward compatible implementations. -type UnimplementedSnapshotServer struct { -} +// UnimplementedSnapshotServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSnapshotServer struct{} func (UnimplementedSnapshotServer) Generate(context.Context, *SignedSnapshotRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Generate not implemented") @@ -101,6 +107,7 @@ func (UnimplementedSnapshotServer) Cancel(context.Context, *SignedSnapshotReques func (UnimplementedSnapshotServer) QueryPendings(context.Context, *SignedSnapshotRequest) (*QueryPendingSnapshotsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPendings not implemented") } +func (UnimplementedSnapshotServer) testEmbeddedByValue() {} // UnsafeSnapshotServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SnapshotServer will @@ -110,6 +117,13 @@ type UnsafeSnapshotServer interface { } func RegisterSnapshotServer(s grpc.ServiceRegistrar, srv SnapshotServer) { + // If the following call pancis, it indicates UnimplementedSnapshotServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Snapshot_ServiceDesc, srv) } diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/transaction.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/transaction.pb.go index dc094f2627f..93992aaab4a 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/transaction.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/peer/transaction.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: peer/transaction.proto @@ -628,7 +628,7 @@ func file_peer_transaction_proto_rawDescGZIP() []byte { var file_peer_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_peer_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_peer_transaction_proto_goTypes = []interface{}{ +var file_peer_transaction_proto_goTypes = []any{ (TxValidationCode)(0), // 0: protos.TxValidationCode (MetaDataKeys)(0), // 1: protos.MetaDataKeys (*ProcessedTransaction)(nil), // 2: protos.ProcessedTransaction @@ -658,7 +658,7 @@ func file_peer_transaction_proto_init() { } file_peer_proposal_response_proto_init() if !protoimpl.UnsafeEnabled { - file_peer_transaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_peer_transaction_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ProcessedTransaction); i { case 0: return &v.state @@ -670,7 +670,7 @@ func file_peer_transaction_proto_init() { return nil } } - file_peer_transaction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_peer_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Transaction); i { case 0: return &v.state @@ -682,7 +682,7 @@ func file_peer_transaction_proto_init() { return nil } } - file_peer_transaction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_peer_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TransactionAction); i { case 0: return &v.state @@ -694,7 +694,7 @@ func file_peer_transaction_proto_init() { return nil } } - file_peer_transaction_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_peer_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeActionPayload); i { case 0: return &v.state @@ -706,7 +706,7 @@ func file_peer_transaction_proto_init() { return nil } } - file_peer_transaction_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_peer_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ChaincodeEndorsedAction); i { case 0: return &v.state diff --git a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/transientstore/transientstore.pb.go b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/transientstore/transientstore.pb.go index b4ee02279a3..5a3a3100933 100644 --- a/vendor/github.com/hyperledger/fabric-protos-go-apiv2/transientstore/transientstore.pb.go +++ b/vendor/github.com/hyperledger/fabric-protos-go-apiv2/transientstore/transientstore.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: transientstore/transientstore.proto @@ -153,7 +153,7 @@ func file_transientstore_transientstore_proto_rawDescGZIP() []byte { } var file_transientstore_transientstore_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_transientstore_transientstore_proto_goTypes = []interface{}{ +var file_transientstore_transientstore_proto_goTypes = []any{ (*TxPvtReadWriteSetWithConfigInfo)(nil), // 0: transientstore.TxPvtReadWriteSetWithConfigInfo nil, // 1: transientstore.TxPvtReadWriteSetWithConfigInfo.CollectionConfigsEntry (*rwset.TxPvtReadWriteSet)(nil), // 2: rwset.TxPvtReadWriteSet @@ -176,7 +176,7 @@ func file_transientstore_transientstore_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transientstore_transientstore_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transientstore_transientstore_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TxPvtReadWriteSetWithConfigInfo); i { case 0: return &v.state diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index a7f1eeec8e6..2b87bd79c75 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -36,7 +36,7 @@ type baseBuilder struct { config Config } -func (bb *baseBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { +func (bb *baseBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer { bal := &baseBalancer{ cc: cc, pickerBuilder: bb.pickerBuilder, @@ -259,6 +259,6 @@ type errPicker struct { err error // Pick() always returns this err. } -func (p *errPicker) Pick(info balancer.PickInfo) (balancer.PickResult, error) { +func (p *errPicker) Pick(balancer.PickInfo) (balancer.PickResult, error) { return balancer.PickResult{}, p.err } diff --git a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go index 5b592f48ad9..4d69b4052f8 100644 --- a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go +++ b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go @@ -50,7 +50,7 @@ const ( type pickfirstBuilder struct{} -func (pickfirstBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { +func (pickfirstBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer { b := &pickfirstBalancer{cc: cc} b.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(logPrefix, b)) return b diff --git a/vendor/google.golang.org/grpc/balancer_wrapper.go b/vendor/google.golang.org/grpc/balancer_wrapper.go index 6561b769ebf..8ad6ce2f095 100644 --- a/vendor/google.golang.org/grpc/balancer_wrapper.go +++ b/vendor/google.golang.org/grpc/balancer_wrapper.go @@ -192,7 +192,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer return acbw, nil } -func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) { +func (ccb *ccBalancerWrapper) RemoveSubConn(balancer.SubConn) { // The graceful switch balancer will never call this. logger.Errorf("ccb RemoveSubConn(%v) called unexpectedly, sc") } @@ -342,8 +342,8 @@ func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) ( pData := acbw.producers[pb] if pData == nil { // Not found; create a new one and add it to the producers map. - p, close := pb.Build(acbw) - pData = &refCountedProducer{producer: p, close: close} + p, closeFn := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: closeFn} acbw.producers[pb] = pData } // Account for this new reference. diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index fcd1cfe8024..55bffaa77ef 100644 --- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: grpc/binlog/v1/binarylog.proto @@ -1015,7 +1015,7 @@ func file_grpc_binlog_v1_binarylog_proto_rawDescGZIP() []byte { var file_grpc_binlog_v1_binarylog_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_grpc_binlog_v1_binarylog_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_grpc_binlog_v1_binarylog_proto_goTypes = []interface{}{ +var file_grpc_binlog_v1_binarylog_proto_goTypes = []any{ (GrpcLogEntry_EventType)(0), // 0: grpc.binarylog.v1.GrpcLogEntry.EventType (GrpcLogEntry_Logger)(0), // 1: grpc.binarylog.v1.GrpcLogEntry.Logger (Address_Type)(0), // 2: grpc.binarylog.v1.Address.Type @@ -1058,7 +1058,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_grpc_binlog_v1_binarylog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GrpcLogEntry); i { case 0: return &v.state @@ -1070,7 +1070,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ClientHeader); i { case 0: return &v.state @@ -1082,7 +1082,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ServerHeader); i { case 0: return &v.state @@ -1094,7 +1094,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Trailer); i { case 0: return &v.state @@ -1106,7 +1106,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -1118,7 +1118,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Metadata); i { case 0: return &v.state @@ -1130,7 +1130,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*MetadataEntry); i { case 0: return &v.state @@ -1142,7 +1142,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_grpc_binlog_v1_binarylog_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Address); i { case 0: return &v.state @@ -1155,7 +1155,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { } } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []any{ (*GrpcLogEntry_ClientHeader)(nil), (*GrpcLogEntry_ServerHeader)(nil), (*GrpcLogEntry_Message)(nil), diff --git a/vendor/google.golang.org/grpc/credentials/insecure/insecure.go b/vendor/google.golang.org/grpc/credentials/insecure/insecure.go index 82bee1443bf..4c805c64462 100644 --- a/vendor/google.golang.org/grpc/credentials/insecure/insecure.go +++ b/vendor/google.golang.org/grpc/credentials/insecure/insecure.go @@ -40,7 +40,7 @@ func NewCredentials() credentials.TransportCredentials { // NoSecurity. type insecureTC struct{} -func (insecureTC) ClientHandshake(ctx context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error) { +func (insecureTC) ClientHandshake(_ context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error) { return conn, info{credentials.CommonAuthInfo{SecurityLevel: credentials.NoSecurity}}, nil } diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index 27c1b9bb63f..2b285beee37 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -518,6 +518,8 @@ func WithUserAgent(s string) DialOption { // WithKeepaliveParams returns a DialOption that specifies keepalive parameters // for the client transport. +// +// Keepalive is disabled by default. func WithKeepaliveParams(kp keepalive.ClientParameters) DialOption { if kp.Time < internal.KeepaliveMinPingTime { logger.Warningf("Adjusting keepalive ping interval to minimum period of %v", internal.KeepaliveMinPingTime) diff --git a/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go b/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go index 930140f57ed..1d827dd5d9d 100644 --- a/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go +++ b/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go @@ -20,7 +20,6 @@ package stats import ( "maps" - "testing" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" @@ -250,9 +249,9 @@ func RegisterInt64Gauge(descriptor MetricDescriptor) *Int64GaugeHandle { } // snapshotMetricsRegistryForTesting snapshots the global data of the metrics -// registry. Registers a cleanup function on the provided testing.T that sets -// the metrics registry to its original state. Only called in testing functions. -func snapshotMetricsRegistryForTesting(t *testing.T) { +// registry. Returns a cleanup function that sets the metrics registry to its +// original state. +func snapshotMetricsRegistryForTesting() func() { oldDefaultMetrics := DefaultMetrics oldRegisteredMetrics := registeredMetrics oldMetricsRegistry := metricsRegistry @@ -262,9 +261,9 @@ func snapshotMetricsRegistryForTesting(t *testing.T) { maps.Copy(registeredMetrics, registeredMetrics) maps.Copy(metricsRegistry, metricsRegistry) - t.Cleanup(func() { + return func() { DefaultMetrics = oldDefaultMetrics registeredMetrics = oldRegisteredMetrics metricsRegistry = oldMetricsRegistry - }) + } } diff --git a/vendor/google.golang.org/grpc/grpclog/internal/logger.go b/vendor/google.golang.org/grpc/grpclog/internal/logger.go index 0d9a824ce1b..e524fdd40b2 100644 --- a/vendor/google.golang.org/grpc/grpclog/internal/logger.go +++ b/vendor/google.golang.org/grpc/grpclog/internal/logger.go @@ -81,7 +81,7 @@ func (l *LoggerWrapper) Errorf(format string, args ...any) { } // V reports whether verbosity level l is at least the requested verbose level. -func (*LoggerWrapper) V(l int) bool { +func (*LoggerWrapper) V(int) bool { // Returns true for all verbose level. return true } diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go index e65cf0ea15e..d92335445f6 100644 --- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go +++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 +// protoc-gen-go v1.34.2 // protoc v5.27.1 // source: grpc/health/v1/health.proto @@ -237,7 +237,7 @@ func file_grpc_health_v1_health_proto_rawDescGZIP() []byte { var file_grpc_health_v1_health_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_grpc_health_v1_health_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_grpc_health_v1_health_proto_goTypes = []interface{}{ +var file_grpc_health_v1_health_proto_goTypes = []any{ (HealthCheckResponse_ServingStatus)(0), // 0: grpc.health.v1.HealthCheckResponse.ServingStatus (*HealthCheckRequest)(nil), // 1: grpc.health.v1.HealthCheckRequest (*HealthCheckResponse)(nil), // 2: grpc.health.v1.HealthCheckResponse @@ -261,7 +261,7 @@ func file_grpc_health_v1_health_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_grpc_health_v1_health_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_grpc_health_v1_health_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*HealthCheckRequest); i { case 0: return &v.state @@ -273,7 +273,7 @@ func file_grpc_health_v1_health_proto_init() { return nil } } - file_grpc_health_v1_health_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_grpc_health_v1_health_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*HealthCheckResponse); i { case 0: return &v.state diff --git a/vendor/google.golang.org/grpc/health/server.go b/vendor/google.golang.org/grpc/health/server.go index cce6312d77f..d4b4b708159 100644 --- a/vendor/google.golang.org/grpc/health/server.go +++ b/vendor/google.golang.org/grpc/health/server.go @@ -51,7 +51,7 @@ func NewServer() *Server { } // Check implements `service Health`. -func (s *Server) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) { +func (s *Server) Check(_ context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) { s.mu.RLock() defer s.mu.RUnlock() if servingStatus, ok := s.statusMap[in.Service]; ok { diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index aa4505a871d..9669328914a 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -106,7 +106,7 @@ func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry } // Log creates a proto binary log entry, and logs it to the sink. -func (ml *TruncatingMethodLogger) Log(ctx context.Context, c LogEntryConfig) { +func (ml *TruncatingMethodLogger) Log(_ context.Context, c LogEntryConfig) { ml.sink.Write(ml.Build(c)) } diff --git a/vendor/google.golang.org/grpc/internal/channelz/channelmap.go b/vendor/google.golang.org/grpc/internal/channelz/channelmap.go index bb531225d5f..64c791953d0 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/channelmap.go +++ b/vendor/google.golang.org/grpc/internal/channelz/channelmap.go @@ -234,13 +234,6 @@ func copyMap(m map[int64]string) map[int64]string { return n } -func min(a, b int) int { - if a < b { - return a - } - return b -} - func (c *channelMap) getTopChannels(id int64, maxResults int) ([]*Channel, bool) { if maxResults <= 0 { maxResults = EntriesPerPage diff --git a/vendor/google.golang.org/grpc/internal/channelz/funcs.go b/vendor/google.golang.org/grpc/internal/channelz/funcs.go index 03e24e1507a..078bb81238b 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/funcs.go +++ b/vendor/google.golang.org/grpc/internal/channelz/funcs.go @@ -33,7 +33,7 @@ var ( // outside this package except by tests. IDGen IDGenerator - db *channelMap = newChannelMap() + db = newChannelMap() // EntriesPerPage defines the number of channelz entries to be shown on a web page. EntriesPerPage = 50 curState int32 diff --git a/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go b/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go index d1ed8df6a51..0e6e18e185c 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go +++ b/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go @@ -35,13 +35,13 @@ type SocketOptionData struct { // Getsockopt defines the function to get socket options requested by channelz. // It is to be passed to syscall.RawConn.Control(). // Windows OS doesn't support Socket Option -func (s *SocketOptionData) Getsockopt(fd uintptr) { +func (s *SocketOptionData) Getsockopt(uintptr) { once.Do(func() { logger.Warning("Channelz: socket options are not supported on non-linux environments") }) } // GetSocketOption gets the socket option info of the conn. -func GetSocketOption(c any) *SocketOptionData { +func GetSocketOption(any) *SocketOptionData { return nil } diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 00abc7c2beb..452985f8d8f 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -45,7 +45,7 @@ var ( // option is present for backward compatibility. This option may be overridden // by setting the environment variable "GRPC_ENFORCE_ALPN_ENABLED" to "true" // or "false". - EnforceALPNEnabled = boolFromEnv("GRPC_ENFORCE_ALPN_ENABLED", false) + EnforceALPNEnabled = boolFromEnv("GRPC_ENFORCE_ALPN_ENABLED", true) // XDSFallbackSupport is the env variable that controls whether support for // xDS fallback is turned on. If this is unset or is false, only the first // xDS server in the list of server configs will be used. diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index 65f936a623a..7aae9240ffc 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -183,7 +183,7 @@ var ( // GRPCResolverSchemeExtraMetadata determines when gRPC will add extra // metadata to RPCs. - GRPCResolverSchemeExtraMetadata string = "xds" + GRPCResolverSchemeExtraMetadata = "xds" // EnterIdleModeForTesting gets the ClientConn to enter IDLE mode. EnterIdleModeForTesting any // func(*grpc.ClientConn) @@ -203,7 +203,7 @@ var ( // UserSetDefaultScheme is set to true if the user has overridden the // default resolver scheme. - UserSetDefaultScheme bool = false + UserSetDefaultScheme = false // ShuffleAddressListForTesting pseudo-randomizes the order of addresses. n // is the number of elements. swap swaps the elements with indexes i and j. @@ -217,10 +217,9 @@ var ( SetConnectedAddress any // func(scs *SubConnState, addr resolver.Address) // SnapshotMetricRegistryForTesting snapshots the global data of the metric - // registry. Registers a cleanup function on the provided testing.T that - // sets the metric registry to its original state. Only called in testing - // functions. - SnapshotMetricRegistryForTesting any // func(t *testing.T) + // registry. Returns a cleanup function that sets the metric registry to its + // original state. Only called in testing functions. + SnapshotMetricRegistryForTesting func() func() // SetDefaultBufferPoolForTesting updates the default buffer pool, for // testing purposes. diff --git a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index afac56572ad..b901c7bace5 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go +++ b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -55,7 +55,7 @@ func (r *passthroughResolver) start() { r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint()}}}) } -func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOptions) {} +func (*passthroughResolver) ResolveNow(resolver.ResolveNowOptions) {} func (*passthroughResolver) Close() {} diff --git a/vendor/google.golang.org/grpc/internal/status/status.go b/vendor/google.golang.org/grpc/internal/status/status.go index c7dbc820595..757925381fe 100644 --- a/vendor/google.golang.org/grpc/internal/status/status.go +++ b/vendor/google.golang.org/grpc/internal/status/status.go @@ -138,11 +138,11 @@ func (s *Status) WithDetails(details ...protoadapt.MessageV1) (*Status, error) { // s.Code() != OK implies that s.Proto() != nil. p := s.Proto() for _, detail := range details { - any, err := anypb.New(protoadapt.MessageV2Of(detail)) + m, err := anypb.New(protoadapt.MessageV2Of(detail)) if err != nil { return nil, err } - p.Details = append(p.Details, any) + p.Details = append(p.Details, m) } return &Status{s: p}, nil } diff --git a/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go b/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go index 999f52cd75b..54c24c2ff38 100644 --- a/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go +++ b/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go @@ -58,20 +58,20 @@ func GetRusage() *Rusage { // CPUTimeDiff returns the differences of user CPU time and system CPU time used // between two Rusage structs. It a no-op function for non-linux environments. -func CPUTimeDiff(first *Rusage, latest *Rusage) (float64, float64) { +func CPUTimeDiff(*Rusage, *Rusage) (float64, float64) { log() return 0, 0 } // SetTCPUserTimeout is a no-op function under non-linux environments. -func SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error { +func SetTCPUserTimeout(net.Conn, time.Duration) error { log() return nil } // GetTCPUserTimeout is a no-op function under non-linux environments. // A negative return value indicates the operation is not supported -func GetTCPUserTimeout(conn net.Conn) (int, error) { +func GetTCPUserTimeout(net.Conn) (int, error) { log() return -1, nil } diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index ea0633bbdab..ef72fbb3a01 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -1033,10 +1033,3 @@ func (l *loopyWriter) processData() (bool, error) { } return false, nil } - -func min(a, b int) int { - if a < b { - return a - } - return b -} diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index e1cd86b2fce..ce878693bd7 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -333,7 +333,7 @@ func (ht *serverHandlerTransport) writeCustomHeaders(s *Stream) { s.hdrMu.Unlock() } -func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error { +func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Options) error { // Always take a reference because otherwise there is no guarantee the data will // be available after this function returns. This is what callers to Write // expect. @@ -475,7 +475,7 @@ func (ht *serverHandlerTransport) IncrMsgSent() {} func (ht *serverHandlerTransport) IncrMsgRecv() {} -func (ht *serverHandlerTransport) Drain(debugData string) { +func (ht *serverHandlerTransport) Drain(string) { panic("Drain() is not implemented") } diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index f46194fdc62..c769deab53c 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -772,7 +772,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, hdr := &headerFrame{ hf: headerFields, endStream: false, - initStream: func(id uint32) error { + initStream: func(uint32) error { t.mu.Lock() // TODO: handle transport closure in loopy instead and remove this // initStream is never called when transport is draining. @@ -1667,11 +1667,10 @@ func (t *http2Client) reader(errCh chan<- error) { t.closeStream(s, status.Error(code, msg), true, http2.ErrCodeProtocol, status.New(code, msg), nil, false) } continue - } else { - // Transport error. - t.Close(connectionErrorf(true, err, "error reading from server: %v", err)) - return } + // Transport error. + t.Close(connectionErrorf(true, err, "error reading from server: %v", err)) + return } switch frame := frame.(type) { case *http2.MetaHeadersFrame: @@ -1696,13 +1695,6 @@ func (t *http2Client) reader(errCh chan<- error) { } } -func minTime(a, b time.Duration) time.Duration { - if a < b { - return a - } - return b -} - // keepalive running in a separate goroutine makes sure the connection is alive by sending pings. func (t *http2Client) keepalive() { p := &ping{data: [8]byte{}} @@ -1770,7 +1762,7 @@ func (t *http2Client) keepalive() { // timeoutLeft. This will ensure that we wait only for kp.Time // before sending out the next ping (for cases where the ping is // acked). - sleepDuration := minTime(t.kp.Time, timeoutLeft) + sleepDuration := min(t.kp.Time, timeoutLeft) timeoutLeft -= sleepDuration timer.Reset(sleepDuration) case <-t.ctx.Done(): diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index f5163f770c8..584b50fe553 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -1117,7 +1117,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { // Write converts the data into HTTP2 data frame and sends it out. Non-nil error // is returns if it fails (e.g., framing error, transport error). -func (t *http2Server) Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error { +func (t *http2Server) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Options) error { reader := data.Reader() if !s.isHeaderSent() { // Headers haven't been written yet. @@ -1238,7 +1238,7 @@ func (t *http2Server) keepalive() { // timeoutLeft. This will ensure that we wait only for kp.Time // before sending out the next ping (for cases where the ping is // acked). - sleepDuration := minTime(t.kp.Time, kpTimeoutLeft) + sleepDuration := min(t.kp.Time, kpTimeoutLeft) kpTimeoutLeft -= sleepDuration kpTimer.Reset(sleepDuration) case <-t.done: diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go index f609c6c6659..3613d7b6481 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http_util.go +++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go @@ -393,7 +393,7 @@ type framer struct { fr *http2.Framer } -var writeBufferPoolMap map[int]*sync.Pool = make(map[int]*sync.Pool) +var writeBufferPoolMap = make(map[int]*sync.Pool) var writeBufferMutex sync.Mutex func newFramer(conn net.Conn, writeBufferSize, readBufferSize int, sharedWriteBuffer bool, maxHeaderListSize uint32) *framer { diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index fdd6fa86cc1..924ba4f3653 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -616,7 +616,7 @@ func (t *transportReader) ReadHeader(header []byte) (int, error) { t.er = err return 0, err } - t.windowHandler(len(header)) + t.windowHandler(n) return n, nil } diff --git a/vendor/google.golang.org/grpc/keepalive/keepalive.go b/vendor/google.golang.org/grpc/keepalive/keepalive.go index 34d31b5e7d3..eb42b19fb99 100644 --- a/vendor/google.golang.org/grpc/keepalive/keepalive.go +++ b/vendor/google.golang.org/grpc/keepalive/keepalive.go @@ -34,15 +34,29 @@ type ClientParameters struct { // After a duration of this time if the client doesn't see any activity it // pings the server to see if the transport is still alive. // If set below 10s, a minimum value of 10s will be used instead. - Time time.Duration // The current default value is infinity. + // + // Note that gRPC servers have a default EnforcementPolicy.MinTime of 5 + // minutes (which means the client shouldn't ping more frequently than every + // 5 minutes). + // + // Though not ideal, it's not a strong requirement for Time to be less than + // EnforcementPolicy.MinTime. Time will automatically double if the server + // disconnects due to its enforcement policy. + // + // For more details, see + // https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md + Time time.Duration // After having pinged for keepalive check, the client waits for a duration // of Timeout and if no activity is seen even after that the connection is // closed. - Timeout time.Duration // The current default value is 20 seconds. + // + // If keepalive is enabled, and this value is not explicitly set, the default + // is 20 seconds. + Timeout time.Duration // If true, client sends keepalive pings even with no active RPCs. If false, // when there are no active RPCs, Time and Timeout will be ignored and no // keepalive pings will be sent. - PermitWithoutStream bool // false by default. + PermitWithoutStream bool } // ServerParameters is used to set keepalive and max-age parameters on the diff --git a/vendor/google.golang.org/grpc/mem/buffer_slice.go b/vendor/google.golang.org/grpc/mem/buffer_slice.go index d7775cea623..228e9c2f20f 100644 --- a/vendor/google.golang.org/grpc/mem/buffer_slice.go +++ b/vendor/google.golang.org/grpc/mem/buffer_slice.go @@ -19,7 +19,6 @@ package mem import ( - "compress/flate" "io" ) @@ -92,9 +91,11 @@ func (s BufferSlice) Materialize() []byte { } // MaterializeToBuffer functions like Materialize except that it writes the data -// to a single Buffer pulled from the given BufferPool. As a special case, if the -// input BufferSlice only actually has one Buffer, this function has nothing to -// do and simply returns said Buffer. +// to a single Buffer pulled from the given BufferPool. +// +// As a special case, if the input BufferSlice only actually has one Buffer, this +// function simply increases the refcount before returning said Buffer. Freeing this +// buffer won't release it until the BufferSlice is itself released. func (s BufferSlice) MaterializeToBuffer(pool BufferPool) Buffer { if len(s) == 1 { s[0].Ref() @@ -124,7 +125,8 @@ func (s BufferSlice) Reader() Reader { // Remaining(), which returns the number of unread bytes remaining in the slice. // Buffers will be freed as they are read. type Reader interface { - flate.Reader + io.Reader + io.ByteReader // Close frees the underlying BufferSlice and never returns an error. Subsequent // calls to Read will return (0, io.EOF). Close() error diff --git a/vendor/google.golang.org/grpc/mem/buffers.go b/vendor/google.golang.org/grpc/mem/buffers.go index 975ceb71853..4d66b2ccc2b 100644 --- a/vendor/google.golang.org/grpc/mem/buffers.go +++ b/vendor/google.golang.org/grpc/mem/buffers.go @@ -224,11 +224,11 @@ func (e emptyBuffer) Len() int { return 0 } -func (e emptyBuffer) split(n int) (left, right Buffer) { +func (e emptyBuffer) split(int) (left, right Buffer) { return e, e } -func (e emptyBuffer) read(buf []byte) (int, Buffer) { +func (e emptyBuffer) read([]byte) (int, Buffer) { return 0, e } diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index db8865ec3fd..2d96f1405e8 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -220,8 +220,8 @@ type HeaderCallOption struct { HeaderAddr *metadata.MD } -func (o HeaderCallOption) before(c *callInfo) error { return nil } -func (o HeaderCallOption) after(c *callInfo, attempt *csAttempt) { +func (o HeaderCallOption) before(*callInfo) error { return nil } +func (o HeaderCallOption) after(_ *callInfo, attempt *csAttempt) { *o.HeaderAddr, _ = attempt.s.Header() } @@ -242,8 +242,8 @@ type TrailerCallOption struct { TrailerAddr *metadata.MD } -func (o TrailerCallOption) before(c *callInfo) error { return nil } -func (o TrailerCallOption) after(c *callInfo, attempt *csAttempt) { +func (o TrailerCallOption) before(*callInfo) error { return nil } +func (o TrailerCallOption) after(_ *callInfo, attempt *csAttempt) { *o.TrailerAddr = attempt.s.Trailer() } @@ -264,8 +264,8 @@ type PeerCallOption struct { PeerAddr *peer.Peer } -func (o PeerCallOption) before(c *callInfo) error { return nil } -func (o PeerCallOption) after(c *callInfo, attempt *csAttempt) { +func (o PeerCallOption) before(*callInfo) error { return nil } +func (o PeerCallOption) after(_ *callInfo, attempt *csAttempt) { if x, ok := peer.FromContext(attempt.s.Context()); ok { *o.PeerAddr = *x } @@ -304,7 +304,7 @@ func (o FailFastCallOption) before(c *callInfo) error { c.failFast = o.FailFast return nil } -func (o FailFastCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o FailFastCallOption) after(*callInfo, *csAttempt) {} // OnFinish returns a CallOption that configures a callback to be called when // the call completes. The error passed to the callback is the status of the @@ -339,7 +339,7 @@ func (o OnFinishCallOption) before(c *callInfo) error { return nil } -func (o OnFinishCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o OnFinishCallOption) after(*callInfo, *csAttempt) {} // MaxCallRecvMsgSize returns a CallOption which sets the maximum message size // in bytes the client can receive. If this is not set, gRPC uses the default @@ -363,7 +363,7 @@ func (o MaxRecvMsgSizeCallOption) before(c *callInfo) error { c.maxReceiveMessageSize = &o.MaxRecvMsgSize return nil } -func (o MaxRecvMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o MaxRecvMsgSizeCallOption) after(*callInfo, *csAttempt) {} // MaxCallSendMsgSize returns a CallOption which sets the maximum message size // in bytes the client can send. If this is not set, gRPC uses the default @@ -387,7 +387,7 @@ func (o MaxSendMsgSizeCallOption) before(c *callInfo) error { c.maxSendMessageSize = &o.MaxSendMsgSize return nil } -func (o MaxSendMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o MaxSendMsgSizeCallOption) after(*callInfo, *csAttempt) {} // PerRPCCredentials returns a CallOption that sets credentials.PerRPCCredentials // for a call. @@ -410,7 +410,7 @@ func (o PerRPCCredsCallOption) before(c *callInfo) error { c.creds = o.Creds return nil } -func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o PerRPCCredsCallOption) after(*callInfo, *csAttempt) {} // UseCompressor returns a CallOption which sets the compressor used when // sending the request. If WithCompressor is also set, UseCompressor has @@ -438,7 +438,7 @@ func (o CompressorCallOption) before(c *callInfo) error { c.compressorType = o.CompressorType return nil } -func (o CompressorCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o CompressorCallOption) after(*callInfo, *csAttempt) {} // CallContentSubtype returns a CallOption that will set the content-subtype // for a call. For example, if content-subtype is "json", the Content-Type over @@ -475,7 +475,7 @@ func (o ContentSubtypeCallOption) before(c *callInfo) error { c.contentSubtype = o.ContentSubtype return nil } -func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o ContentSubtypeCallOption) after(*callInfo, *csAttempt) {} // ForceCodec returns a CallOption that will set codec to be used for all // request and response messages for a call. The result of calling Name() will @@ -514,7 +514,7 @@ func (o ForceCodecCallOption) before(c *callInfo) error { c.codec = newCodecV1Bridge(o.Codec) return nil } -func (o ForceCodecCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o ForceCodecCallOption) after(*callInfo, *csAttempt) {} // ForceCodecV2 returns a CallOption that will set codec to be used for all // request and response messages for a call. The result of calling Name() will @@ -554,7 +554,7 @@ func (o ForceCodecV2CallOption) before(c *callInfo) error { return nil } -func (o ForceCodecV2CallOption) after(c *callInfo, attempt *csAttempt) {} +func (o ForceCodecV2CallOption) after(*callInfo, *csAttempt) {} // CallCustomCodec behaves like ForceCodec, but accepts a grpc.Codec instead of // an encoding.Codec. @@ -579,7 +579,7 @@ func (o CustomCodecCallOption) before(c *callInfo) error { c.codec = newCodecV0Bridge(o.Codec) return nil } -func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o CustomCodecCallOption) after(*callInfo, *csAttempt) {} // MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory // used for buffering this RPC's requests for retry purposes. @@ -607,7 +607,7 @@ func (o MaxRetryRPCBufferSizeCallOption) before(c *callInfo) error { c.maxRetryRPCBufferSize = o.MaxRetryRPCBufferSize return nil } -func (o MaxRetryRPCBufferSizeCallOption) after(c *callInfo, attempt *csAttempt) {} +func (o MaxRetryRPCBufferSizeCallOption) after(*callInfo, *csAttempt) {} // The format of the payload: compressed or not? type payloadFormat uint8 diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 457d27338f7..d1e1415a40f 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -1359,6 +1359,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor } return err } + defer d.Free() if channelz.IsOn() { t.IncrMsgRecv() } diff --git a/vendor/google.golang.org/grpc/stream_interfaces.go b/vendor/google.golang.org/grpc/stream_interfaces.go index 8b813529c0c..0037fee0bd7 100644 --- a/vendor/google.golang.org/grpc/stream_interfaces.go +++ b/vendor/google.golang.org/grpc/stream_interfaces.go @@ -22,15 +22,35 @@ package grpc // request, many responses) RPC. It is generic over the type of the response // message. It is used in generated code. type ServerStreamingClient[Res any] interface { + // Recv receives the next response message from the server. The client may + // repeatedly call Recv to read messages from the response stream. If + // io.EOF is returned, the stream has terminated with an OK status. Any + // other error is compatible with the status package and indicates the + // RPC's status code and message. Recv() (*Res, error) + + // ClientStream is embedded to provide Context, Header, and Trailer + // functionality. No other methods in the ClientStream should be called + // directly. ClientStream } // ServerStreamingServer represents the server side of a server-streaming (one // request, many responses) RPC. It is generic over the type of the response // message. It is used in generated code. +// +// To terminate the response stream, return from the handler method and return +// an error from the status package, or use nil to indicate an OK status code. type ServerStreamingServer[Res any] interface { + // Send sends a response message to the client. The server handler may + // call Send multiple times to send multiple messages to the client. An + // error is returned if the stream was terminated unexpectedly, and the + // handler method should return, as the stream is no longer usable. Send(*Res) error + + // ServerStream is embedded to provide Context, SetHeader, SendHeader, and + // SetTrailer functionality. No other methods in the ServerStream should + // be called directly. ServerStream } @@ -39,8 +59,22 @@ type ServerStreamingServer[Res any] interface { // message stream and the type of the unary response message. It is used in // generated code. type ClientStreamingClient[Req any, Res any] interface { + // Send sends a request message to the server. The client may call Send + // multiple times to send multiple messages to the server. On error, Send + // aborts the stream. If the error was generated by the client, the status + // is returned directly. Otherwise, io.EOF is returned, and the status of + // the stream may be discovered using CloseAndRecv(). Send(*Req) error + + // CloseAndRecv closes the request stream and waits for the server's + // response. This method must be called once and only once after sending + // all request messages. Any error returned is implemented by the status + // package. CloseAndRecv() (*Res, error) + + // ClientStream is embedded to provide Context, Header, and Trailer + // functionality. No other methods in the ClientStream should be called + // directly. ClientStream } @@ -48,9 +82,28 @@ type ClientStreamingClient[Req any, Res any] interface { // requests, one response) RPC. It is generic over both the type of the request // message stream and the type of the unary response message. It is used in // generated code. +// +// To terminate the RPC, call SendAndClose and return nil from the method +// handler or do not call SendAndClose and return an error from the status +// package. type ClientStreamingServer[Req any, Res any] interface { + // Recv receives the next request message from the client. The server may + // repeatedly call Recv to read messages from the request stream. If + // io.EOF is returned, it indicates the client called CloseAndRecv on its + // ClientStreamingClient. Any other error indicates the stream was + // terminated unexpectedly, and the handler method should return, as the + // stream is no longer usable. Recv() (*Req, error) + + // SendAndClose sends a single response message to the client and closes + // the stream. This method must be called once and only once after all + // request messages have been processed. Recv should not be called after + // calling SendAndClose. SendAndClose(*Res) error + + // ServerStream is embedded to provide Context, SetHeader, SendHeader, and + // SetTrailer functionality. No other methods in the ServerStream should + // be called directly. ServerStream } @@ -59,8 +112,23 @@ type ClientStreamingServer[Req any, Res any] interface { // request message stream and the type of the response message stream. It is // used in generated code. type BidiStreamingClient[Req any, Res any] interface { + // Send sends a request message to the server. The client may call Send + // multiple times to send multiple messages to the server. On error, Send + // aborts the stream. If the error was generated by the client, the status + // is returned directly. Otherwise, io.EOF is returned, and the status of + // the stream may be discovered using Recv(). Send(*Req) error + + // Recv receives the next response message from the server. The client may + // repeatedly call Recv to read messages from the response stream. If + // io.EOF is returned, the stream has terminated with an OK status. Any + // other error is compatible with the status package and indicates the + // RPC's status code and message. Recv() (*Res, error) + + // ClientStream is embedded to provide Context, Header, Trailer, and + // CloseSend functionality. No other methods in the ClientStream should be + // called directly. ClientStream } @@ -68,9 +136,27 @@ type BidiStreamingClient[Req any, Res any] interface { // (many requests, many responses) RPC. It is generic over both the type of the // request message stream and the type of the response message stream. It is // used in generated code. +// +// To terminate the stream, return from the handler method and return +// an error from the status package, or use nil to indicate an OK status code. type BidiStreamingServer[Req any, Res any] interface { + // Recv receives the next request message from the client. The server may + // repeatedly call Recv to read messages from the request stream. If + // io.EOF is returned, it indicates the client called CloseSend on its + // BidiStreamingClient. Any other error indicates the stream was + // terminated unexpectedly, and the handler method should return, as the + // stream is no longer usable. Recv() (*Req, error) + + // Send sends a response message to the client. The server handler may + // call Send multiple times to send multiple messages to the client. An + // error is returned if the stream was terminated unexpectedly, and the + // handler method should return, as the stream is no longer usable. Send(*Res) error + + // ServerStream is embedded to provide Context, SetHeader, SendHeader, and + // SetTrailer functionality. No other methods in the ServerStream should + // be called directly. ServerStream } diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 03f9318347a..a96b6a6bff8 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.66.1" +const Version = "1.67.1" diff --git a/vendor/modules.txt b/vendor/modules.txt index d26a75e6c4f..6dfa5f99037 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -260,8 +260,8 @@ github.com/hyperledger/fabric-lib-go/common/metrics/prometheus github.com/hyperledger/fabric-lib-go/common/metrics/statsd github.com/hyperledger/fabric-lib-go/common/metrics/statsd/goruntime github.com/hyperledger/fabric-lib-go/healthz -# github.com/hyperledger/fabric-protos-go-apiv2 v0.3.3 -## explicit; go 1.17 +# github.com/hyperledger/fabric-protos-go-apiv2 v0.3.4 +## explicit; go 1.21.0 github.com/hyperledger/fabric-protos-go-apiv2/common github.com/hyperledger/fabric-protos-go-apiv2/discovery github.com/hyperledger/fabric-protos-go-apiv2/gateway @@ -598,10 +598,10 @@ golang.org/x/text/unicode/norm ## explicit; go 1.22.0 golang.org/x/tools/cover golang.org/x/tools/go/ast/inspector -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 -## explicit; go 1.20 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 +## explicit; go 1.21 google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.66.1 +# google.golang.org/grpc v1.67.1 ## explicit; go 1.21 google.golang.org/grpc google.golang.org/grpc/attributes