Repository navigation
fix(vm): gate JUMPDEST bitmap behind proposal 104 - #7135
Merged
CodeNinjaEvan merged 1 commit intoDec 1, 2026
Merged
CodeNinjaEvan merged 1 commit into
CodeNinjaEvan merged 1 commit into
Conversation
Gate the JUMPDEST bitmap optimization from tronprotocol#7067 behind Proposal 104 (ALLOW_TVM_RESOURCE_OPTIMIZATION / VMConfig.allowTvmResourceOptimization()) so pre-proposal execution preserves the 4.8.2.4 HashSet behavior during mixed-version rollout.
CodeNinjaEvan
approved these changes
Dec 1, 2026
CodeNinjaEvan
approved these changes
Dec 1, 2026
aiden3885
approved these changes
Dec 1, 2026
CodeNinjaEvan
merged commit Dec 1, 2026
1fba3fa
into
tronprotocol:release_v4.8.3
16 of 17 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?
Gate the JUMPDEST bitmap analysis from #7067 behind Proposal 104 (
ALLOW_TVM_RESOURCE_OPTIMIZATION/VMConfig.allowTvmResourceOptimization()).ProgramPrecompile.compilepreserves the legacyHashSet<Integer>implementation.ProgramPrecompile.compileuses the bitmap representation.ProgramPrecompile.hasJumpDestdispatches on each instance's stored representation so cached entries inProgram.programPrecompileLRUMapstay self-consistent across activation, rollback, and hash collisions.JumpDestBitmapTestandProgramPrecompileCacheTestare updated to cover both pre-activation (HashSet) and post-activation (bitmap) paths.Why are these changes required?
The bitmap implementation significantly improves JUMPDEST analysis speed and reduces allocation/GC pressure compared to the legacy
HashSet<Integer>implementation in 4.8.2.4. Without a proposal gate, during the mixed-version 4.8.2.4 / 4.8.3 upgrade window, a transaction that completes withinmaxCpuTimeOfOneTxon a 4.8.3 SR can exceed a 4.8.2.4 verifier'smaxTimeRatiobudget and fail receipt verification (ReceiptCheckErrException). Gating the switch behind Proposal 104 keeps execution behavior aligned during rollout until the network activates it atomically.This PR has been tested by:
./gradlew :actuator:test,Tip945Test,RuntimeImplRevertTimeoutTest)check_math_usage.sh,./gradlew build -x test)Follow up
None.
Extra details
Follow-up to #7067.
ProgramPrecompile#usesBitmap()is package-private and annotated with@VisibleForTestingfor unit test assertions.