Skip to content

fix(vm): canonicalize ModExp zero modulus output (TIP-871)#6780

Open
yanghang8612 wants to merge 1 commit into
tronprotocol:developfrom
yanghang8612:tvm-osaka-modexp-tip871
Open

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

Conversation

@yanghang8612
Copy link
Copy Markdown
Collaborator

@yanghang8612 yanghang8612 commented May 19, 2026

Summary

  • Implement MODEXP zero-modulus output canonicalization behind ALLOW_TVM_OSAKA
  • Add direct Osaka MODEXP tests and a Solidity 0.8.25 VM-level reproduction

Motivation

Implements 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.

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:44
@yanghang8612 yanghang8612 force-pushed the tvm-osaka-modexp-tip871 branch from e2b0660 to 2f88ae5 Compare May 19, 2026 08:40
@yanghang8612 yanghang8612 force-pushed the tvm-osaka-modexp-tip871 branch from 2f88ae5 to 7d89029 Compare May 19, 2026 08:48
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