-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cosmos): prevent Golang error wrapping stack frame divergence #7930
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no alternative but eternal vigilance for keeping the errors stack-free.
I also see %w
in x/swingset/abci.go
. It's in a panic()
, but there's no local way to tell if the panic is caught. Please fix that one too.
There's also %w
in daemon/cmd/genaccounts.go
. This is probably purely client-side - however, there's a benefit for having the whole codebase %w
-free. Consider changing those too.
Eternal vigilance... hey, I can automate that (or at least some of it)!
Will do! |
2879ec3
to
eaffc1b
Compare
fix(cosmos): prevent Golang error wrapping stack frame divergence
fix(cosmos): prevent Golang error wrapping stack frame divergence
fix(cosmos): prevent Golang error wrapping stack frame divergence
fix(cosmos): prevent Golang error wrapping stack frame divergence
fixes: #7929
Description
The
%w
format specifier for wrapping a Golangerror
object propagates some stack frame information, and thereby affects consensus if sent into SwingSet (since XS heap snapshots and vat transcripts will contain these strings). Use the%s
format specifier to stringify Golangerror
objects so SwingSet is not sensitive to them.Security Considerations
Improves the ability to release soft-patches that change Golang stack information without affecting consensus data.
Scaling Considerations
n/a
Documentation Considerations
n/a
Testing Considerations
Some simple unit tests were written, but more comprehensive audit or testing would be useful.