Open nrryuya opened 5 years ago
For now, the code (merged in #70) can't be deployed due to the excess of the code size: eth.exceptions.OutOfGas: Contract code size exceeds EIP170 limit of 24577. Got code of size: 55782
eth.exceptions.OutOfGas: Contract code size exceeds EIP170 limit of 24577. Got code of size: 55782
The size of the Solidity implementation is 6713 with Remix IDE.
The size of the code of big integer arithmetic is around 30000...
For analysis.
There are a tremendous number of mstore and mload in the LLL.
mstore
mload
def _convertBytesArrayToUInt256List(_inp: bytes[256]) -> uint256[8]:
[mload, 320], [mload, 352], [mload, 384], [mload, 416], [mload, 448], [mload, 480], [mload, 512], [mload, 544], [mload, 576], [mload, 608], [mload, 640], [mload, 672], # Continuing...
The code below in Line 225 is compiled to a complicated LLL
multiplicationResult = _primes[4 * i] * _primes[4 * i + 1] * _primes[4 * i + 2] * _primes[4 * i + 3]
For now, the code (merged in #70) can't be deployed due to the excess of the code size:
eth.exceptions.OutOfGas: Contract code size exceeds EIP170 limit of 24577. Got code of size: 55782
The size of the Solidity implementation is 6713 with Remix IDE.
The size of the code of big integer arithmetic is around 30000...
For analysis.
Suspects
There are a tremendous number of
mstore
andmload
in the LLL.def _convertBytesArrayToUInt256List(_inp: bytes[256]) -> uint256[8]:
has a sequence of 231 ofmload
.The code below in Line 225 is compiled to a complicated LLL
Workarounds