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
In the FVMLib, the encodeJumpInstruction concats instructions with pointers to the next instructions. This pointer value is a uint8, which means the pointer could be at most 2^8, 256. So if the sum of the length of the instructions is greater than this value, the pointer will revert from arithmetic overflow.
This is not necessarily a bug. This enforces a limit on the amount of instructions that can be encoded, because the pointer would need to be two bytes to support more instructions. This is makes it important to use calldata compression techniques in the encoding, or make the pointers larger.
Now this is documented, we can discuss what we want to do with this limit!
The text was updated successfully, but these errors were encountered:
Note: the solidity encoding functions for allocate/deallocate/swap do not use compression. If compression is used (via typescript/rust encoder), the instruction lengths would be smaller, allowing us to fit in more instructions. So this is only a solidity encoding limitation, we can make a compression lib though!
Description
In the FVMLib, the
encodeJumpInstruction
concats instructions with pointers to the next instructions. Thispointer
value is auint8
, which means the pointer could be at most 2^8, 256. So if the sum of the length of the instructions is greater than this value, thepointer
will revert from arithmetic overflow.This is not necessarily a bug. This enforces a limit on the amount of instructions that can be encoded, because the pointer would need to be two bytes to support more instructions. This is makes it important to use calldata compression techniques in the encoding, or make the pointers larger.
Now this is documented, we can discuss what we want to do with this limit!
The text was updated successfully, but these errors were encountered: