Skip to content

fix(tvm): canonicalize ModExp zero modulus output (TIP-871)#6779

Closed
yanghang8612 wants to merge 1 commit into
developfrom
codex/tvm-osaka-modexp-tip871
Closed

fix(tvm): canonicalize ModExp zero modulus output (TIP-871)#6779
yanghang8612 wants to merge 1 commit into
developfrom
codex/tvm-osaka-modexp-tip871

Conversation

@yanghang8612
Copy link
Copy Markdown
Collaborator

Summary

  • gate MODEXP zero-modulus output canonicalization behind ALLOW_TVM_OSAKA
  • reset CREATE2 call return-data state behind the same Osaka gate
  • add direct Osaka MODEXP tests plus a Solidity 0.8.25 VM-level reproduction for MODEXP and CREATE2 observable behavior

Motivation

Related to tronprotocol/tips#871. MODEXP currently returns empty output for an all-zero modulus even when modLen > 0; after Osaka it should return modLen zero bytes. CREATE2 also needs to match CREATE by clearing stale return-data state before execution once the Osaka behavior is active.

Testing

./gradlew :framework:test --tests org.tron.common.runtime.vm.AllowTvmOsakaTest --tests org.tron.common.runtime.vm.TvmIssueVerifierTest

@github-actions github-actions Bot requested a review from CodeNinjaEvan May 19, 2026 06:36
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