openzeppelin-upgrades icon indicating copy to clipboard operation
openzeppelin-upgrades copied to clipboard

Use storage layout from solc output for more sophisticated storage checks

Open frangio opened this issue 5 years ago • 1 comments

Solidity 0.5.13 introduced the storageLayout compiler output, which gives accurate information about the size and alignment of items in a storage layout. We should use this information instead of the AST. Given this accurate information, the use of the Levenshtein algorithm may have to change quite a bit.

frangio avatar Jul 06 '20 17:07 frangio

This is currently not a priority as the only thing it will give us is more sophisticated checks, in the sense that we are currently disallowing some things which would actually be ok. This is because our current algorithm does not consider the fact that multiple variables can occupy the same slot depending on their size and alignment.

If you have a requirement for these more sophisticated checks let us know. If someone wants to take on this issue and send a PR, that would also be fine, though let us know so we can discuss the details.

frangio avatar Jan 18 '21 18:01 frangio