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
It was recently suggested that the requireAccess function should explicitly check if the namespace exists using:
ResourceIds.getExists(toNamespaceId))
This would ensure any access control checks on non-existent namespaces revert, which is expected because no one has access to them yet. This prevents any "premature" interactions like sending ETH to an unregistered namespace.
However this is a hot code path so this check would add some gas overhead.
The text was updated successfully, but these errors were encountered:
i'd prefer to keep those checks unbundled so we can more granularly use them (ie only check existence of a namespace once, but then require multiple actors to have access to it)
i'd prefer to keep those checks unbundled so we can more granularly use them (ie only check existence of a namespace once, but then require multiple actors to have access to it)
Do we have places where we do multiple access checks? What's the cost of a "warm" look up of the namespace existing?
Do we have places where we do multiple access checks?
I'm not sure if we do in the current codebase but i can imagine this being used in modules.
One of big themes of the recent audit was bundling too much functionality in one thing rather than having one thing do one thing only, I feel like this goes in a similar direction. I'd rather do those checks explicitly in consuming code to make it clear what's going on than bundling both checks in one checkForExistenceAndAccess function.
It was recently suggested that the
requireAccess
function should explicitly check if the namespace exists using:ResourceIds.getExists(toNamespaceId))
This would ensure any access control checks on non-existent namespaces revert, which is expected because no one has access to them yet. This prevents any "premature" interactions like sending ETH to an unregistered namespace.
However this is a hot code path so this check would add some gas overhead.
The text was updated successfully, but these errors were encountered: