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 suggested by @PetarMax, the next step for CSE requires ensuring that code and storage are in place for addresses/accounts corresponding to contract fields.
It is to do with calls to addresses that don’t exist in the accounts. If we know that a storage slot of contract X we’re analysing holds an address of another account addrY coming from another contract Y, then we also know that account with address addrY should be in the storage of X and we also know the structure of the storage of Y.
For me, this should amount to:
creating a fresh symbolic address addrY and putting it into the appropriate storage slot of X;
calling the function that understands storage layout recursively on contract Y and putting whatever it returns in the account with address addrY.
It would be better to test this feature with non-test functions. There are some examples already in the codebase, specifically in this file.
An additional challenge comes from the fact that a field can be an interface but not a contract, in which case we can't run CSE since the we don't know what the addres we're calling has been instantiated with, so perhaps we can just leave it as a known limitation.
The text was updated successfully, but these errors were encountered:
palinatolmach
changed the title
CSE: generate code & storage for contract field
CSE: generate code & storage for addresses in contract field
Jun 3, 2024
As suggested by @PetarMax, the next step for CSE requires ensuring that code and storage are in place for addresses/accounts corresponding to
contract
fields.It is to do with calls to addresses that don’t exist in the accounts. If we know that a storage slot of contract X we’re analysing holds an address of another account
addrY
coming from another contractY
, then we also know that account with addressaddrY
should be in the storage ofX
and we also know the structure of the storage ofY
.For me, this should amount to:
addrY
and putting it into the appropriate storage slot ofX
;Y
and putting whatever it returns in the account with addressaddrY
.It would be better to test this feature with non-test functions. There are some examples already in the codebase, specifically in this file.
An additional challenge comes from the fact that a field can be an
interface
but not acontract
, in which case we can't run CSE since the we don't know what the addres we're calling has been instantiated with, so perhaps we can just leave it as a known limitation.The text was updated successfully, but these errors were encountered: