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
We might be able to write a test that fails if we accidentally went back down the linked library route. For example, we could parse the transaction output of one of our tests and assert that there are no DELEGATECALL opcodes.
...or we could ensure that our test suite records the gas consumed down enough execution pathways to detect the increased gas usage of DELEGATECALL. I think that is not currently the case because we only use the types, not the functions, exposed by the library.
The reason why we didn't catch this before (see #55), is that the linking or embedding decision is made by solidity not just by inspecting the library, but by inspecting which bits of the library are referenced in the consumer. So we ended up with an embedded library in this repo, since the consumer doesn't reference all of the functions in the library (some of which could be non-internal). But in other consumers (i.e. nitro-protocol) we did reference those functions and ended up with an embedded library.
We might be able to write a test that fails if we accidentally went back down the linked library route. For example, we could parse the transaction output of one of our tests and assert that there are no DELEGATECALL opcodes.
...or we could ensure that our test suite records the gas consumed down enough execution pathways to detect the increased gas usage of
DELEGATECALL
. I think that is not currently the case because we only use the types, not the functions, exposed by the library.Either strategy requires greater test coverage.
Originally posted by @geoknee in #55 (comment)
The text was updated successfully, but these errors were encountered: