While compiling we write the compiler input as json to zksolc’s stdin - this is fine but sometimes zksolc will error and close before we are done writing the input to stdin.
This leads to the “Broken Pipe” error we often see.
A workaround for this would be to not propagate the error that serde throws immediately (with ?) but instead print the command’s stderr (if available) first, then returning the error - this way we can more easily troubleshoot the cause
While compiling we write the compiler input as json to zksolc’s stdin - this is fine but sometimes zksolc will error and close before we are done writing the input to stdin.
This leads to the “Broken Pipe” error we often see.
A workaround for this would be to not propagate the error that serde throws immediately (with
?
) but instead print the command’s stderr (if available) first, then returning the error - this way we can more easily troubleshoot the cause