News for hackers. Stuff that matters.
Re:OptiFi Program Incident Report by nishs on Thursday September 01, 2022 @04:04AM (#32673417)
I think there are some lessons that can learned from this. For example, the command line:

  solana program close 
didn't seem to sufficiently represent the destructive nature of the action.

The program's designers should likely have chosen the verb "shutdown", instead of "close".

Re:OptiFi Program Incident Report by bdcravens on Thursday September 01, 2022 @04:13AM (#32673472)
While it may not accurately represent what it does, "destroy" may be a better fit.
Re:OptiFi Program Incident Report by hbbio on Thursday September 01, 2022 @04:37AM (#32673668)
Even "irreversible_destroy"
Re:OptiFi Program Incident Report by returnInfinity on Thursday September 01, 2022 @04:16AM (#32673497)
this is better

solana program lose-all-money

Re:OptiFi Program Incident Report by vicnicius on Thursday September 01, 2022 @04:23AM (#32673552)
A simple confirmation step with a relevant warning could possibly make developers think twice before proceeding.
Re:OptiFi Program Incident Report by ReptileMan on Thursday September 01, 2022 @04:30AM (#32673610)
From personal experience - no it won't. I have made mistakes with overriding warnings - when under pressure, hyper focused and already in the mental mode of - of course I am sure I want to do it - your slow brain is just shut down so you are moving a bit like on muscle memory.
Re:OptiFi Program Incident Report by hypertele-Xii on Thursday September 01, 2022 @04:50AM (#32673751)
Simply add a 1 hour unskippable countdown timer to the warning. Now you have to think about it.
Re:OptiFi Program Incident Report by ReptileMan on Thursday September 01, 2022 @07:13AM (#32674769)
If you have one hour you shouldn't be editing live anyway.
Re:OptiFi Program Incident Report by krageon on Thursday September 01, 2022 @05:54AM (#32674209)
From the many depressing years I've done UX work I can promise you no amount of changes they make will protect users from their own mistakes. It is far better for your own sanity to accept people make mistakes. This is what development and staging environments are for.
Re:OptiFi Program Incident Report by wzwy on Thursday September 01, 2022 @08:06AM (#32675208)
Accepting that people make mistakes is one thing, but reducing those mistakes is another.

If it’s a simple change, why not do it? Though, I can see your point if the change is monumental but barely reduces rate of mistakes.