Skip to content

feat(vm): record internal tx for precompile value calls#35

Merged
bladehan1 merged 1 commit into
release_v4.8.2from
feat/precompile-internal-tx-release-v4.8.2
Jun 11, 2026
Merged

feat(vm): record internal tx for precompile value calls#35
bladehan1 merged 1 commit into
release_v4.8.2from
feat/precompile-internal-tx-release-v4.8.2

Conversation

@bladehan1

@bladehan1 bladehan1 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Records an internal transaction when a successful precompiled contract call carries TRX or TRC10 value.

Zero-value precompiled contract calls still do not emit internal transactions. TRX value calls are recorded with the transferred TRX value, and TRC10 value calls are recorded with token information, matching normal contract call internal transaction semantics.

Why are these changes required?

Precompiled contract calls can currently carry value through the CALL/CALLTOKEN path when the precompiled address already has an account. The balance change is committed on successful execution, but no internal transaction is recorded, which makes the transfer difficult to reconcile from transaction results.

This change keeps the existing value-transfer behavior while making successful precompiled value calls observable through internal transactions.

This PR has been tested by:

  • Unit Tests: ./gradlew :framework:test --tests org.tron.common.runtime.vm.OperationsTest
  • Checkstyle: ./gradlew :framework:checkstyleMain :framework:checkstyleTest

Follow up

None.

Extra details

This PR is based on release_v4.8.2 and contains one commit with two changed files.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 19eb0d0f-aaf2-4bad-98af-25c668a303f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/precompile-internal-tx-release-v4.8.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bladehan1 bladehan1 changed the title Record internal tx for precompile value calls feat(vm,trace):record internal tx for precompile value calls Jun 11, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@bladehan1 bladehan1 changed the title feat(vm,trace):record internal tx for precompile value calls feat(actuator): record internal tx for precompile value calls Jun 11, 2026
@bladehan1 bladehan1 changed the title feat(actuator): record internal tx for precompile value calls feat(vm): record internal tx for precompile value calls Jun 11, 2026
@bladehan1
bladehan1 merged commit b617af2 into release_v4.8.2 Jun 11, 2026
26 of 34 checks passed
@bladehan1
bladehan1 deleted the feat/precompile-internal-tx-release-v4.8.2 branch June 11, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant