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-recover
process 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-go
this shouldn’t take long to implement use. -
A deeper look may show that we aren’t using the
defer-panic-recover
paradigm 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.go
line 138 -
rpc/client.go
line 202
defer
is used 118 times in Status-go
Here is the search: