Repository navigation
feat(tvm): optimize execution failure handling - #7105
Merged
yanghang8612 merged 2 commits intoNov 12, 2026
Merged
yanghang8612 merged 2 commits into
yanghang8612 merged 2 commits into
Conversation
Prioritize recognized exception result codes over REVERT when TVM resource optimization is enabled, so post-REVERT CPU timeouts can trigger retry and receipt validation. Preserve historical REVERT priority before activation. Cover exception mappings and post-REVERT timeouts for contract calls and creation.
aiden3885
approved these changes
Nov 12, 2026
Preserve constructor REVERT data beginning with 0xEF when TVM resource optimization is active. Retain London code rejection for normal returns and historical behavior before activation. Cover CREATE and CREATE2 activation combinations, remaining Energy, caller-visible returndata, child rollback, exception precedence, deadline handling and the existing Osaka return-buffer boundary.
CodeNinjaEvan
approved these changes
Nov 12, 2026
yanghang8612
merged commit Nov 12, 2026
6f74c05
into
tronprotocol:release_v4.8.3
12 of 13 checks passed
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.
What does this PR do?
Optimize TVM execution failure handling under
allowTvmResourceOptimization:0xEFand refund unused child Energy. London continues to reject normally returned deployment code beginning with0xEF.Both changes preserve historical behavior before activation.
Why are these changes required?
An end-of-transaction CPU timeout can coexist with the REVERT flag. Reporting
OUT_OF_TIMElets retry and receipt validation distinguish this outcome from a normal REVERT.Constructor revert data is not deployment code. Treating an
0xEFrevert payload as invalid code discards the payload and consumes the child's remaining Energy, affecting subsequent caller execution.This PR has been tested by:
Local validation on macOS ARM64 / JDK 17:
./gradlew clean build -x test— passed.ProgramCreateRevertTest— 64 cases passed, including the real-bytecode activation matrix, precise Energy and returndata, caller storage writes, existing exceptions, child rollback and nonce handling, post-child timeouts, and the existing CREATE2/Osaka buffer boundary.ProgramChildDeadlineTest— 28 cases passed; the 10 RuntimeImpl regression cases and 2 London cases also passed../gradlew test --continue— 5,724 passed, 16 skipped, 2 P2P DNS failures described below; no framework or actuator failures../gradlew :framework:checkstyleMain :framework:checkstyleTest :plugins:checkstyleMain— passed.bash .github/scripts/check_math_usage.sh— passed.Follow up
Extra details
The two local full-suite failures were
LookUpTxtTest.testLookUpIp_nonexistentDomain_returnsNullandStartAppArgsTest.trustIpsSkipsWhatItCannotResolve. The local DNS resolver returned198.18.x.xaddresses for.invalidnames, contrary to these tests' unresolved-host expectations.