-
ADR-033 introduced an anti-reentry mechanism that should be part of the router system for security reasons. But this could be an issue in the context of the group module in the case of executing proposals that contain message requests from the group module itself. Having a simple exception for the group module doesn't seem like a viable solution. This sort of anti-reentry mechanism is somewhat arbitrary and pretty strict. It would be better if it were designed on clear reasoning of what re-entry is and isn’t acceptable. cc/ @aaronc |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 12 replies
-
Re-entry may be more of an issue for user-defined contracts that we need to think about in the context of CosmWasm. So we should probably remove it from the router. I'd love to hear @ethanfrey's thoughts on this if you have a minute. |
Beta Was this translation helpful? Give feedback.
-
IMHO - message execution should consume gas. This is most likely the best re-entrancy protection we could get. We'd need to define message execution cost - until we define a clear way on how a module defines its gas costs we could use a default value. (not sure what it should be though) |
Beta Was this translation helpful? Give feedback.
-
Based on the discussion, we're removing explicit re-entry from the ADR 033 router. Marking this as closed. |
Beta Was this translation helpful? Give feedback.
-
General protection for re-entrency attack is to store all updates before giving a control to another module. One way to do it will be with the async calls - the call will happen only after current message processing is finished. |
Beta Was this translation helpful? Give feedback.
Re-entry may be more of an issue for user-defined contracts that we need to think about in the context of CosmWasm. So we should probably remove it from the router. I'd love to hear @ethanfrey's thoughts on this if you have a minute.