Debug mode to turn off hermetization #775
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "hermetization-turnoff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: radrow
Added
debug_mode
option which exposes all functions in all namespaces and main contract to ease the process of unit testing. Meaning of this flag can be later extended to some additional features.fixes #277
Created by: hanssv
Friday evening so not looking at the PR in detail. But this is really dangerous - imagine if you forget to switch off the option and deploy - is there a clever way to make it safer? 🤔
Created by: radrow
I don't think it is a real issue - this flag is supposed to be used only by debuggers and sdks. If someone would be about to deploy a contract in debug mode then their interface should warn them about it
Created by: radrow
We can also add a pragma for network id and require additional flag if someone is going to deploy debug contract to the mainnet. But this would require some assertion of the net id from inside of the bytecode to make it work reasonably...
Created by: hanssv
I'm not sure it is worth it, I'm normally all for giving users/people good tools for shooting themselves in the foot - it's just that crypto people seem to be so talented in screwing up...
I agree that exposing a debug mode gives users a new way to kill their app.
On the other hand I see 2 reasons why this is a good idea:
It's a security/usability trade-off.
Created by: radrow
Anyway, nobody uses the compiler directly. There is always a frontend to it that is responsible for handling flags and configurations. If it is not implemented there, the flag won't be even usable for regular users.
Created by: hanssv
Review: Approved
approved this merge request
Merged by: radrow at 2020-10-12 11:17:41 UTC