Skip to content

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

Open
yanghang8612 wants to merge 3 commits into
tronprotocol:release_v4.8.2from
yanghang8612:tvm-osaka-modexp-tip871
Open

fix(vm): canonicalize ModExp zero modulus output (TIP-871)#6780
yanghang8612 wants to merge 3 commits into
tronprotocol:release_v4.8.2from
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
@yanghang8612 yanghang8612 changed the base branch from develop to release_v4.8.2 May 20, 2026 07:47
@halibobo1205 halibobo1205 added the topic:vm VM, smart contract label May 21, 2026
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.8.2 milestone May 21, 2026
@yanghang8612 yanghang8612 force-pushed the tvm-osaka-modexp-tip871 branch from 7d89029 to fe04153 Compare May 22, 2026 09:57
@yanghang8612 yanghang8612 force-pushed the tvm-osaka-modexp-tip871 branch from 3166050 to c80969c Compare May 22, 2026 11:19
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