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
As described in #123 and #57, there is a DoS issue with calling (EXT)CODECOPY multiple times on a large contract (i.e. when the code size is becoming large, potentially larger than the current 24kb limit)
This would be circumvented by using a conversion cache, but unlike the way it's done in #123, we could have a global cache so that the conversion is only done once for multiple calls to EXTCODECOPY and even across many calls to the contract.
The DoS vector isn't actually very big, because when executing EXTCODECOPY, we only touch the chunk range and no chunkification occurs. So the chunking could be done on a background thread as it's only needed when building the witness at the end. Right now, it's taken from the tree, but we might want to save space and not store the chunks in the tree either. In that case, we will need to regenerate the code in the background.
This is therefore not an urgent issue, it's left here to be considered once we decide not to store the chunks in the tree.
The text was updated successfully, but these errors were encountered:
As described in #123 and #57, there is a DoS issue with calling
(EXT)CODECOPY
multiple times on a large contract (i.e. when the code size is becoming large, potentially larger than the current 24kb limit)This would be circumvented by using a conversion cache, but unlike the way it's done in #123, we could have a global cache so that the conversion is only done once for multiple calls to
EXTCODECOPY
and even across many calls to the contract.The DoS vector isn't actually very big, because when executing
EXTCODECOPY
, we only touch the chunk range and no chunkification occurs. So the chunking could be done on a background thread as it's only needed when building the witness at the end. Right now, it's taken from the tree, but we might want to save space and not store the chunks in the tree either. In that case, we will need to regenerate the code in the background.This is therefore not an urgent issue, it's left here to be considered once we decide not to store the chunks in the tree.
The text was updated successfully, but these errors were encountered: