-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[Bug] debug::print fails module verification #3590
Comments
I have looked into it and the first thing to note (I also mentioned this on Discord) is that this is NOT a Move prover problem but rather an issue related to module verification (and, apparently, not even that as described below). The real issue here is that it's not the verifier that fails but rather the linker as we do not include the debug module in the set of Move stdlib modules we utilize in Sui (at least outside of test mode): sui/crates/sui-framework-build/src/lib.rs Line 20 in ec42308
If I understand it correctly, the debug module is simply not included in the devnet's genesis image. Of course one of the problems here is that the error message that is passed to the user is quite opaque. Furthermore, running the verifier will (at this point) not help here as this is the linker problem. It's unfortunately not easy to pass the detailed error message to the user as the same messages are store on-chain and have to be succinct, generic, and stable in the face of future changes (@tnowacki should be able to provide more context here if need be). Still, there are some solutions that can help mitigate this problem, in particular (as discussed with @tnowacki):
It would be great to get some feedback on this (@sblackshear, @lxfind, @oxade? - please add others to the discussion if need be). |
+1 for making the module The native function has this check of |
Resolved in #4356 |
Steps to Reproduce Issue
When using debug::print in a module, it will fail move prove checks.
Please see very simple example repo: https://github.com/jamescarter-le/sui_bytecode_fail
Expected Result
debug::print should not fail move prove checks, or the compiler should raise this as an error.
Actual Result
sui client publish
returns:Move Bytecode Verification Error. Please run the Bytecode Verifier for more information.
fromsui start
RPC call failed: ErrorObject { code: ServerError(-32000), message: "Move Bytecode Verification Error. Please run the Bytecode Verifier for more information.", data: None }
from the current devnet.System Information
The text was updated successfully, but these errors were encountered: