You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many commands require passing data of arbitrary size as program args:
cast abi-encode
cast access-list
cast call
cast calldata
cast disassemble
cast estimate
cast pretty-calldata
cast publish
cast rpc
cast send
cast wallet sign
forge create
forge script
Usually these are Solidity function arguments, but sometimes these are raw transaction payloads or RPC JSONs. The problem is that Linux (other OS-es probably too) puts a hard limit on the size of the program args, throwing Argument list too long if violated. For regular kernel builds it's just 128KB per arg, which for hex-encoded data halves the limit to just 64KB, it's very easy to hit it and there's no workaround.
There are a few approaches for passing arbitrarily-sized args without limitations:
Stdin. Convenient to use, has no size limitations, but it'd put a hard limit of a single arbitrarily-sized arg per command, e.g. it may be tricky to support the interactive wallet.
Files. Not very convenient to use, has no size limitations, wouldn't collide with any parameters.
Enviroment variables. Rather convenient to use, but does have some OS-dependent limitations, wouldn't collide with any parameters.
Any of these solutions would need to work along the regular passing by args to keep the backward compatibility.
The text was updated successfully, but these errors were encountered:
Component
Forge, Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (50756e5 2023-05-29T00:04:27.574210907Z)
What command(s) is the bug in?
No response
Operating System
Linux
Describe the bug
Many commands require passing data of arbitrary size as program args:
Usually these are Solidity function arguments, but sometimes these are raw transaction payloads or RPC JSONs. The problem is that Linux (other OS-es probably too) puts a hard limit on the size of the program args, throwing
Argument list too long
if violated. For regular kernel builds it's just 128KB per arg, which for hex-encoded data halves the limit to just 64KB, it's very easy to hit it and there's no workaround.There are a few approaches for passing arbitrarily-sized args without limitations:
Any of these solutions would need to work along the regular passing by args to keep the backward compatibility.
The text was updated successfully, but these errors were encountered: