Skip to content

feat(vm): optimize TVM delegate and undelegate execution - #6920

Open
ouy95917 wants to merge 1 commit into
tronprotocol:developfrom
ouy95917:feat/optimize-delegate-undelegate-execution
Open

feat(vm): optimize TVM delegate and undelegate execution#6920
ouy95917 wants to merge 1 commit into
tronprotocol:developfrom
ouy95917:feat/optimize-delegate-undelegate-execution

Conversation

@ouy95917

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR optimizes the execution of SELFDESTRUCT, FreezeBalanceV2, UnfreezeBalanceV2, WithdrawExpireUnfreeze, and CancelAllUnfreezeV2 by exiting early in specific edge cases to improve performance.

Why are these changes required?

To streamline the related execution paths and improve processing efficiency in specific scenarios.

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

The release and activation plans will be evaluated separately.

Extra details

The version identifier used in this PR is provisional and may be adjusted later.

@halibobo1205 halibobo1205 added the topic:vm VM, smart contract label Aug 20, 2026
}

@Test
public void testSuicide2RejectsSelfDestructedBeneficiaryAfterFork()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add a pre-fork case asserting that suicide2() succeeds when VERSION_4_8_2_2 is not activated? Since the beneficiary check is invoked unconditionally and gated inside MUtil, this would explicitly protect backward compatibility before the fork.

}

@Test
public void testSuicide2RejectsSelfDestructedBeneficiaryAfterFork()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add a pre-fork case asserting that suicide2() succeeds when VERSION_4_8_2_2 is not activated? Since the beneficiary check is invoked unconditionally and gated inside MUtil, this would explicitly protect backward compatibility before the fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:vm VM, smart contract

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants