Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the maximum Transaction size in hyperledger-fabric?

I tried to upload an Image into the ledger (converted image to base64 string and passed it as an arg in the transaction ).

When i send an image of size 30 kb it worked fine , But with an 100kb image my transaction failed , stating that the max size is 102400 .

My question is what is the maximum size of the transaction and the maximum size of the Block ?

like image 260
jaswanth Avatar asked Nov 07 '22 07:11

jaswanth


1 Answers

You can configure max size in your peer configuration under block size. But you may need to configure the grpc Frame size to a bigger value so that peer should accept a message from client. By default grpc frame size is "4194304".

Here is the way we can set frame size using fabric-sdk-java

Properties peerProperties = conf.getPeerProperties(peerName);
peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9999999);
like image 157
Jeetendra J Avatar answered Nov 27 '22 11:11

Jeetendra J