Conversation
1 task
glevco
commented
Oct 15, 2025
jansegre
previously approved these changes
Oct 15, 2025
msbrogli
previously approved these changes
Oct 15, 2025
98bceb1 to
0f0c9ae
Compare
msbrogli
previously approved these changes
Oct 15, 2025
jansegre
previously approved these changes
Oct 15, 2025
678bcca to
8b9bc87
Compare
8b9bc87 to
d6a1e22
Compare
jansegre
approved these changes
Oct 15, 2025
msbrogli
approved these changes
Oct 15, 2025
# Conflicts: # tests/nanocontracts/test_fallback_method.py
d6a1e22 to
d124790
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Nano error handling relies on catching
NCFailafter nano execution and making the transaction fail. Any other exceptions bubble up and will crash the full node. Also, any exception that inherits fromExceptionand is thrown by user code, is converted toNCFail.The old PR #1321 tried to address error handling but it was unnecessarily complex. This PR replaces #1321 by extracting only the necessary changes from it, most notably, it ensures all nano-related exceptions do inherit from
NCFail. This is necessary because any exception that is thrown by the runner before user code is called, must inherit fromNCFailto fail the transaction instead of crashing the full node, because such exception will not be converted.Acceptance Criteria
NCErrorand making ALL exceptions inherit fromNCFail.try-exceptblock closer to the actual call to user code, that is, from therunnerto themetered_exec.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged