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 ?
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With