Mainnet Periander Plan

TRON Core Devs
TRON
Published in
5 min readMay 29, 2023

GreatVoyage-v4.7.2(Periander) is estimated to be released at the end of June. You are welcome to check new improvements in advance here.

Changes planned to be included in Periander:

1.TIP-541: Support canceling unstaking in Stake 2.0

2.TIP-542: Resource delegating supports customizable lock period

3.TIP-543: Implement EIP-3855 PUSH0 instruction

4.TIP-544: Add data to the http interfaces interacting with smart contract

5.TIP-555: Network upgrade logic optimization

6.Upgrade the P2P network module to Libp2p v1.2.0

  • Connection precheck before P2P communication
  • Node Discovery via DNS
  • P2P support IPv6 protocol
  • P2P message snappy compression

TIP-541: Support canceling unstaking in Stake 2.0

TIP-541 optimizes Stake 2.0. Currently, after users initiate a Stake 2.0 unstaking transaction through the HTTP API, they need to wait 14 days to withdraw the corresponding funds. Periander will introduce a new governance proposal to allow users to cancel the unstaking operation that has already been initiated, further improving the flexibility of Stake 2.0.

It should be noted that the unstaking that has been waiting for more than 14 days cannot be canceled and the funds will be automatically withdrawn to the account. In the future, this function will need to be confirmed through governance voting to determine whether it will take effect.

TIP-542: Resource delegating supports customizable lock period

When delegating resources, the user can choose whether to lock the delegation operation. If choose to lock, the resource delegated to the target address cannot be canceled within 3 days, which is more conducive to users participating in the resource rental market. TIP-542 adds a proposal to optimize delegated resource locking, changing the locking time from the current fixed value of 3 days to a specified number of days. Users can specify the number of days that the delegation will lock according to their needs, which will provide them with more options and improve the flexibility of Stake 2.0 resource delegation.

TIP-543: Implement EIP-3855 PUSH0 instruction

EIP-3855 is included in the Shanghai upgrade of Ethereum, which adds a new instruction called PUSH0 to the Ethereum Virtual Machine (EVM) to reduce the gas cost of smart contract transactions, and Periander also adds a new governance proposal to be compatible with EIP-3855. On one hand, it can ensure the compatibility between TRON and Ethereum at the virtual machine level, and on the other hand, it also reduces the energy cost of using smart contracts on TRON.

TIP-544: Add data to the http interfaces interacting with smart contract

Developers can call the triggerconstantcontract API to estimate the transaction fee for calling a smart contract, but this API cannot estimate the transaction fee for deploying a smart contract. TIP-544 optimizes the HTTP interfaces related to smart contract calls: triggersmartcontract and triggerconstantcontract, adds data parameter, and modifies function_selector and contract_address as optional parameters. That will realize the estimation of the transaction fee for both calling a smart contract and deploying a smart contract. At the same time, it supports directly passing the data field in the smart contract call transaction to data for contract call which will greatly improve the convenience of smart contract development.

TIP-555: Network upgrade logic optimization

The upgrade strategy of the TRON network is: as long as more than a certain proportion of super representative nodes use a certain version, the network will reach a consensus to upgrade to this version. After the network upgrade, there should be no network downgrade caused by the downgrade operation of individual super representatives. Therefore, TIP-555 optimizes the network upgrade logic. First, it ensures the accuracy of the calculation of the SR upgrade ratio. Second, it ensures that the upgrade will take effect immediately after the consensus is reached and cannot be rolled back, so as to improve the stability of the network upgrade.

Upgrade the p2p network module to Libp2p v1.2.0

Libp2p is a Java version open-source P2P protocol framework developed by the Java-tron core developers. Anyone can develop distributed applications based on Libp2p. The underlying P2P network of Java-tron is implemented based on Libp2p. In order to further improve the underlying network performance of Java-tron, Periander will replace the dependent Libp2p v0.1.4 version with the v1.2.0 version.

Libp2p v1.2.0 has the following new features:

Connection precheck before P2P communication

​​​Libp2p v0.1.4 chooses whether to establish a connection and synchronize data with the remote node according to the order of the update time of the remote node. In actual scenarios, the connection may be rejected by the other party for some reason, which will affect data synchronization. To solve this problem, Libp2p v1.2.0 supports the node pre-detection function, which can detect whether the node can be connected in advance, avoid invalid connection requests, and greatly improve the efficiency of connection establishment.

Node Discovery via DNS

DNS is a protocol that can map domain names and IP addresses to each other, so that people can visit the website only by remembering a simple website name, instead of remembering the IPs of many websites. Similarly, distributed applications need to know several active nodes in the network in order to join the network and establish connections with more active nodes. ​​​​Java-tron configures several node information by default in the configuration file. Most Java-tron nodes start up and join the network through these default nodes, which makes these nodes bear greater service pressure. ​​​​A better way is to maintain a large list of active nodes somewhere, publish a domain name to the outside world, and other nodes can obtain nodes in the list through this domain name to join the network. The DNS protocol realizes this function and supports some trusted nodes in the network to become DNS nodes to meet the needs of other nodes in the network to join services. Node discovery based on the DNS protocol will greatly improve the access capability of the TRON network.

P2P support IPv6 protocol

IPV6 protocol is the next-generation Internet IP protocol that replaces IPV4. While solving the problem of IP4 address exhaustion, the network performance has also been improved. Currently, mainstream server operating systems support both IPv4 and IPv6. Therefore, Libp2p v1.2.0 can not only improve the network performance of TRON, but also provide space for the future network architecture expansion of Java-tron.

P2P message snappy compression

Libp2p v1.2.0 supports compressed message transmission, which can greatly reduce Java-tron’s demand for network bandwidth, so it can reduce the operation and maintenance cost of Java-tron nodes.

--

--