Skip to content

feat(vm): add P256VERIFY precompile (TIP-7951)#6720

Open
yanghang8612 wants to merge 2 commits intotronprotocol:developfrom
yanghang8612:feat/tip-7951-p256verify
Open

feat(vm): add P256VERIFY precompile (TIP-7951)#6720
yanghang8612 wants to merge 2 commits intotronprotocol:developfrom
yanghang8612:feat/tip-7951-p256verify

Conversation

@yanghang8612
Copy link
Copy Markdown
Collaborator

Summary

  • Adds the P256VERIFY precompile (TIP-7951 / EIP-7951) at address 0x100, gated by ALLOW_TVM_OSAKA.
  • Pure-Java BouncyCastle port — same path as ECRecover, no native dependency.
  • 81 conformance vectors from go-ethereum's EIP-7951 test suite (P256VerifyTest).
  • Optional manual microbenchmarks (PrecompileBenchmark) compare against ECRecover. TEST 4 (coldNoWarmup) measures cold no-warmup latency to reflect the low-frequency mainnet case where the JVM has not JIT-compiled the precompile path.

Spec

Test

  • ./gradlew :framework:test --tests org.tron.common.runtime.vm.P256VerifyTest
  • ./gradlew :framework:test --tests org.tron.common.runtime.vm.AllowTvmOsakaTest
  • (manual, optional) ./gradlew :framework:test --no-daemon --tests 'org.tron.common.runtime.vm.PrecompileBenchmark.coldNoWarmup' -i

Benchmark

To be appended after a server-side run of PrecompileBenchmark.

Pure-Java BC port of EIP-7951; gated by ALLOW_TVM_OSAKA.
Manual @test, not part of regular suite. Run via --tests filter.
@github-actions github-actions Bot requested a review from CodeNinjaEvan April 28, 2026 11:05
@halibobo1205 halibobo1205 added the topic:vm VM, smart contract label Apr 28, 2026
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.8.2 milestone Apr 28, 2026
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.

2 participants