Skip to content

Proposal: Enable the Prague and Osaka Upgrades to Enhance Compatibility with Ethereum #916

Description

@yanghang8612

Simple Summary

This proposal aims to activate network parameters #95 and #96 on the TRON mainnet, enabling the Prague and Osaka upgrade features included in GreatVoyage-v4.8.2 (Pyrrho) to enhance TRON's compatibility with Ethereum.

Motivation

GreatVoyage-v4.8.2 introduces support for Ethereum Prague/Pectra and Osaka-related protocol features. These changes improve TVM compatibility, security, execution consistency, and support for newer Ethereum opcodes and precompiled contracts.

Specifically, these upgrades will significantly reduce the on-chain cost of complex cryptographic operations and enable native verification of secp256r1 signatures used by passkeys and hardware-backed key stores, including Apple Secure Enclave and Android Keystore.

The corresponding features have already been implemented but remain gated by on-chain governance parameters. This proposal completes the governance process required to formally activate them on the TRON mainnet.

How to Initialize the Voting Request

This is the command for initiating the voting request:

  • createProposal 95 1 96 1

The network parameters refer to:

  • Parameter 95: Enable ALLOW_TVM_PRAGUE
  • Parameter 96: Enable ALLOW_TVM_OSAKA

Technical Specifications

Parameter 95: ALLOW_TVM_PRAGUE

Activating parameter 95 enables the Prague-related functionality introduced by TIP-2935, which serves historical block hashes from state and provides improved compatibility for applications that require access to a longer block-hash history.

TIP-2935 Activation and Bootstrap Behavior

Let A be the maintenance block in which proposal processing enables parameter 95. Because proposal processing occurs after the transaction loop of block A, transactions in block A do not observe the new functionality. The history contract is deployed during maintenance processing, and the first history write occurs at the start of block A + 1, storing the hash of block A.

Historical hashes from before activation are not backfilled. The 8191-slot ring buffer becomes fully populated at block A + 8191, approximately 6.8 hours after activation at TRON's three-second block interval.

During this bootstrap period, for current block N:

  • Queries where K >= N or K < N - 8191 revert.
  • Queries for already-written post-activation blocks (A <= K <= N - 1) return the stored block hash.
  • Queries for unwritten pre-activation slots still within the valid range (N - 8191 <= K < A) return bytes32(0) rather than reverting.

Applications must treat bytes32(0) as "unavailable", continue using the BLOCKHASH opcode for the most recent 256 blocks, and either wait until N >= A + 8191 or use an off-chain fallback when complete historical coverage is required.

The actual activation block A will be added to the timeline once the proposal takes effect.

Parameter 96: ALLOW_TVM_OSAKA

Activating parameter 96 enables the Osaka-related TVM features, including:

  • TIP-7939: Add the Count Leading Zeros (CLZ) opcode.
  • TIP-7823: Set upper bounds on MODEXP inputs.
  • TIP-7883: Adjust the energy cost of the MODEXP precompile.
  • TIP-7951: Add precompile support for the secp256r1/P-256 curve.
  • TIP-854: Standardize calldata encoding for signature-verification precompiles.
  • TIP-871: Standardize the MODEXP output length when the modulus is zero.

These changes align TVM behavior more closely with the corresponding Ethereum upgrades and reduce compatibility differences for smart contracts, development tools, and cross-chain applications.

Backwards Compatibility

The corresponding protocol changes will only be activated after this proposal is approved and takes effect. Before activation, existing network behavior remains unchanged.

Nodes participating in the TRON network, especially block-producing Super Representatives, must upgrade to GreatVoyage-v4.8.2 before the proposal takes effect. Failure to do so will result in the inability to sync blocks or produce new blocks once the TVM semantics switch.

The TIP-2935 bootstrap period does not change the existing BLOCKHASH opcode semantics, but applications querying the history contract must handle unwritten slots as described above.

Timeline

The estimated timeline:

  • Creation time of the voting request: TBD
  • Effective time of the voting request: TBD
  • Activation block A: TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions