godmode icon indicating copy to clipboard operation
godmode copied to clipboard

Disconnects when the modified bytecode is large

Open martinetlee opened this issue 5 years ago • 1 comments

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.

martinetlee avatar Jul 18 '20 12:07 martinetlee

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

v-stickykeys avatar Feb 20 '21 20:02 v-stickykeys