Just to check I understand your situation.
You're submitting a single transaction, that in effect, does a number of 'putState' calls. When that number gets to the ~140 the end-end time has increased.
When you say the payload is 100k, is that of the original transaction, or the data being stored in the states.
How many orgs?
What's the endorsement policy?
Matthew B White IBM Blockchain Solutions Architect
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN
"The wrong answers are the ones you go looking for when the right answers stare you in the face"
----- Original message -----
From: "Marek Malik" <info@...>
Sent by: fabric@...
Subject: [EXTERNAL] [Hyperledger Fabric] Lag between initialization of call in Gateway and ContractRouter #fabric-chaincode #fabric-sdk-java #hyperledger-fabric
Date: Fri, Jul 10, 2020 11:11 AM
I have a problem with executing my chaincode when sending not that big payload (around 100Kb).
There is a big, incremental time lag when waiting for the proposal response back to the gateway.
The chaincode is very simple, I'm uploading records that are transformed on the chaincode and then stored in CouchDB.
I have played with the number of records that would be stored per request:
- 1 record took 2-3 sec.
- 24 records took 9sec,
- 88 records took 60 sec,
- 146 records took 2.40-3 minutes.
I have set the BatchTimeout and MaxMessageCount to (10s and 500 records) but the times are not getting any better.
One thing that I noticed is when processing around 146 records the entire process in my chain code is finished in around 1.5 seconds (I’m logging the duration of the process on the finish). Also, when investigating log times I noticed that the process on the blockchain actually starts very late (logs from ContractRouter), more than 2 minutes after a proposal has been sent from the gateway.
I'm checking the logs if there are any records that would point that the ordered or peer received the request but I don't see anything before the ContractRouter, but I'm still not that experienced in all the core libs, maybe one would be able to help here?
Does anyone have any ideas why the request would be taking that long?
I'm using java for both the gateway (2.1.4 version) and in the chaincode (2.2.0). I'm running it in a docker-compose network.
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU