hyperledger / fabric-sdk-py

Hyperledger Fabric Python SDK
https://fabric-sdk-py.readthedocs.io/en/latest/
Apache License 2.0
405 stars 200 forks source link

"Missing 'proposalResponses' parameter in transaction request" #162

Open JessKXWL opened 2 years ago

JessKXWL commented 2 years ago

I recently started learning fabric and wrote a small demo, but there were errors when uploading data using postman. When I upload the following data, the code will not make mistakes.But when the data I upload is 15M, an error will be reported,"Missing 'proposalResponses' parameter in transaction request"。here is the data

{
    "identifier": "client0_to_rsu4_epoch1",
    "data": {
        "enc_vectors": {
            "conv1.weight": "conv1.weightxxxxxxxxxxx",
            "conv1.bias": "conv1.biasxxxxx",
            "conv2.weight": "conv2.weightxxx",
            "conv2.bias": "conv2.biasxxxxxx",
            "fc1.weight": "fc1.weightxxxxx",
            "fc1.bias": "fc1.biasxxxx",
            "fc2.weight": "fc2.weightxxxxxxx",
            "fc2.bias": "fc2.biasxxxx"
        },
        "dec_aes_key": "chBXLZA03PXYzs43UArhGfGsSn7TACdldFIqYPTO3/FjS73h50IX4RSoALE13fqkROEray0lsLiShIN/48exerGDEaL0BN6O0gGpq55WwNtRUqrsOvGzwisFLJVGK3d5nCyo+Hw8QwjO4fwfQs2ynpeubP1+Zr/TIx09p4NDUHM=",
        "loss_slice": 0.10846090443590854
    }
}

The following is the data displayed in the docker log

docker logs dev-peer1.org1.example.com-privacy_cc-1.0
invoke is runningadd
进入add函数
反序列化中
根据Id获取值
添加数据
序列化数据
保存数据
发送事件

I wonder if this problem occurs because the uploaded data is too large.

I tried to change PreferredMaxBytes from 512KB to 15MB, but it didn't work.

Is there any way for me to upload such large data?

Creazy-MR commented 2 years ago

@JessKXWL Dear friends, how did you deal this problem later?

JessKXWL commented 2 years ago

@JessKXWL Dear friends, how did you deal this problem later?

I didn't solve this problem, but later I tried to find out the limit. It's OK to upload data below 4M. The maximum data transmitted by the gossip protocol is also 4M, so I think it's related to the gossip protocol. However, there will still be errors when modifying the maximum data transmitted by the gossip protocol. It may be that I changed the wrong place

Creazy-MR commented 2 years ago

@JessKXWL ,thank you very much! i will try to have a look on it , this problem is really Strange

saikumar-neelam commented 2 years ago

@JessKXWL : Check the network.json, verify the peer endpoints configured are correct or not.

NonCover commented 11 months ago

我的问题跟你的问题一样。但我是获取数据时报的这个错误。

JessKXWL commented 11 months ago

时间太久了,我有点不太记得了,我印象中是因为grpc协议传输的数据设置为了4M,而我传输的数据远超过4M,所以出错了。在这个代码里面有地方可以设置GRPC协议传输数据大小,不过我当时设置的时候可能没找对地方,没设置成功。

------------------ 原始邮件 ------------------ 发件人: "hyperledger/fabric-sdk-py" @.>; 发送时间: 2023年11月27日(星期一) 晚上6:51 @.>; @.**@.>; 主题: Re: [hyperledger/fabric-sdk-py] "Missing 'proposalResponses' parameter in transaction request" (Issue #162)

我的问题跟你的问题一样。但我是获取数据时报的这个错误。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Creazy-MR commented 11 months ago

确实是这样,是由于grpc协议数据量的关系,貌似是在一个配置文件里修改,数额修改地大些,也别太大

------------------ 原始邮件 ------------------ 发件人: "hyperledger/fabric-sdk-py" @.>; 发送时间: 2023年11月27日(星期一) 晚上11:04 @.>; @.**@.>; 主题: Re: [hyperledger/fabric-sdk-py] "Missing 'proposalResponses' parameter in transaction request" (Issue #162)

时间太久了,我有点不太记得了,我印象中是因为grpc协议传输的数据设置为了4M,而我传输的数据远超过4M,所以出错了。在这个代码里面有地方可以设置GRPC协议传输数据大小,不过我当时设置的时候可能没找对地方,没设置成功。

------------------ 原始邮件 ------------------ 发件人: "hyperledger/fabric-sdk-py" @.>; 发送时间: 2023年11月27日(星期一) 晚上6:51 @.>; @.**@.>; 主题: Re: [hyperledger/fabric-sdk-py] "Missing 'proposalResponses' parameter in transaction request" (Issue #162)

我的问题跟你的问题一样。但我是获取数据时报的这个错误。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

NonCover commented 11 months ago

请问是在network.json文件里面改吗?

  "orderers": {
    "orderer.example.com": {
      "url": "192.168.227.128:7050",
      "grpcOptions": {
        "grpc.ssl_target_name_override": "orderer.example.com",
        "grpc-max-send-message-length": -1 // 无限制
      },
      "tlsCACerts": {
        "path": "./crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"
      }
    }
  },

但是改了后,重新启动程序还是报这个错误。