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
The issue is contracts that use a struct (with a large size array member) in a hashmap see their bytecode size increase dramatically. Using brownie compile -s one can see the bytecode size of compiled contracts.
The text was updated successfully, but these errors were encountered:
The issue is that the two contracts have different semantics. The former contract takes a single argument (an address) generates a return statement which writes the entire struct at the location data[arg0:address] to the returndata. The latter takes two arguments (an address and an index into the array) and returns the item at the location data[arg0:address,arg1:uint256] to the returndata.
I don't think this is a performance bug per se, but rather the bug is that the semantics are inconsistent or at least unclear. So we need to figure out which one we want.
(for reference, I'm pasting the two contracts here:
Version Information
What's your issue about?
The issue is contracts that use a struct (with a large size array member) in a hashmap see their bytecode size increase dramatically. Using
brownie compile -s
one can see the bytecode size of compiled contracts.The text was updated successfully, but these errors were encountered: