Run onEdge tooling on our codebase
Relevant People: @adam, @jakubgs, @pedro, @roman, @gravityblast, @dmitrys
Status: incomplete
-
OnEdge is a Go-tool to check for incorrect treatment of the
defer-panic-recoverprocess in Go when dealing with errors. -
They found that you can cause serious issues (e.g. blockchain fork) if this is not done right (e.g. making global state changes in the middle of the pattern)
-
Based on how much
recover()is used instatus-gothis shouldn’t take long to implement use. -
A deeper look may show that we aren’t using the
defer-panic-recoverparadigm well.
Useful Links
Introducing the Go Race Detector - The Go Blog
defer, panic, and recover - The Go Blog
Places recover() is used in Status-go
-
api/backend.goline 138 -
rpc/client.goline 202
defer is used 118 times in Status-go
Here is the search: