Disconnects when the modified bytecode is large
The library relies on websocket to send request to godmode-ganache-cli There are times that this library disconnects from the ganache-cli when trying to send over a bytecode.
From experience, this issue appears when the bytecode is large. (I don't have the exact number) I was always able to fix this by modifying the contract and making the bytecode small.
What needs to be done to resolve this issue:
- Determine the limit of the bytecode
- identify the root cause
- fix if possible
This is low priority, as it doesn't limit the functionality of this library. We can always use a contract that only contains the function that we really need to use to modify the storage.
Yup for context I was able to increase the websocket "frame" size to mitigate this for the protocols we currently support (Compound, Maker, UniswapV2).
It would be ideal if we could use a stream but the websocket used by ganache-core doesn't supporting streaming and that's way more work than I think we want to do here.
So as discussed we will set the frame size to whatever the ethereum contract max size is and hopefully that should fix this. Issue here: https://github.com/xGodMode/godmode-ganache-core/issues/3