-
Notifications
You must be signed in to change notification settings - Fork 16
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
send dialog and plumbing does not handle over-long memos #323
Comments
after some investigation, 'unreachable' is fully accurate: the wasm call throws a RuntimeError.unreachable. so as far as the extension and webapp can handle, propagation is correct. we can wrap every impl's wasm calls in try/catch to add more detail, but it might be more correct to throw meaningful errors from wasm, either in wasm-ts, wasm-bundler, or from wasm itself |
it's worth considering that errors may contain potentially sensitive information connectrpc has chosen deliberately to obfuscate errors in implementations as generic "internal" errors, unless they are thrown specifically as a ConnectError: connectrpc/connect-es#341 in the course of #295 we took the opposite attitude, but in routing-refactor #282 this behavior of obfuscating internal errors resumes, as we're now 'properly' using connectrpc server tooling i'm going to add catch/rethrows around every wasm call in routing-refactor, and convert existing throws to ConnectError throws, as those are clearly intended to be explicitly returned we should identify errors that might leak information |
Huh, that's very surprising. It seems like a very strange policy to me, since if a server is leaking sensitive info in its error messages that's a problem with the server, and censoring errors from one particular client doesn't really fix that. |
Hmm, maybe we should wait to figure out if there's another solution before we go and add boilerplate code to all of our handlers. My instinct is that I don't think we should be doing any connect-specific error handling. We need to ensure that the extension's view server is just like any other, and that it would be possible (in principle) to swap it out for a network call to If this problem is caused by an upstream tooling choice, we should pause and wait to think through a solution before solving it, rather than adding wrappers around all of our code. |
the choice is made to assist in correct implementation. you can still choose to throw from the service if you'd like, but the default is to obfuscate, and i think that's a good default. upstream tooling is not causing a specific problem, the wasm implementation we currently have is failing to throw anything meaningful my last comment was anticipating some issues in my refactor that i just noticed, and perhaps was better placed in the thread for that pr |
Sadly, this likely means that the Rust code panicked. A part of addressing this task should mean finding the part of the Penumbra repo codebase that isn't using the
When I ran into this before, I had a hard time wrapping this in a try/catch on the javascript side. It's more like the whole process aborts.
Obfuscating errors feels like a very painful road to continue on. This makes debugging user errors essentially impossible and turns troubleshooting into 🤷♂️ . I don't see why we wouldn't be more expressive in error messages and choose to intentionally throw |
ae2b745 reverted. current state is:
|
length used in #329 was incorrect. wasm uses an 80-byte address in the memo, not a BECH32 address, so the boundary is 432/433 |
#356 correct memo length in form validation |
view service validation merged penumbra-zone/penumbra#3585 |
two problems here:
The text was updated successfully, but these errors were encountered: