hyperledger / fabric

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
15.78k stars 8.86k forks source link

When I tried to invoke a chaincode in the hyperledger fabric peer cli, I got Argument list too long error #4952

Closed ManjuVenkatachalam closed 2 months ago

ManjuVenkatachalam commented 3 months ago

Description

I have deployed a go chaincode called CalculateCC which has a calculation function. I used shim package. The calculation function gets the arguments in array of string "[]string". When I try to call the calculation function by passing the args [] string (the total length is 209477, i got the following error, bash: /usr/local/bin/peer: Argument list too long.

Note: I cannot breakdown the argument. Since I am doing all the calculation. so I need all the values.

Steps to reproduce

pass the bigger length of arguments as a input.

bestbeforetoday commented 2 months ago

This seems to be an issue with your bash command-line, not a bug with Fabric itself or any related Fabric components. See if this StackOverflow answer helps:

https://stackoverflow.com/a/78898942/3680198