Skip to content

Add Resource Unit Price Query APIs for Solidity & PBFT #5437

@lxcmyf

Description

@lxcmyf

Rationale

The SolidityNode and PBFTNode have slightly different uses in java-tron:

  1. Solidity node
  • Used to synchronize irrevocable solidified blocks
  • Provide solidified block query interfaces
  • Reduce the storage pressure of full nodes
  1. PBFT node
  • Form the PBFT consensus network to generate new blocks
  • Perform trusted block confirmation based on PBFT algorithm
  • Ensure consensus efficiency and security

In short:
The SolidityNode focuses on synchronizing and querying solidified blocks. It can reduce the storage pressure on full nodes and avoid repeatedly synchronizing solidified blocks.
The PBFTNode is used to expand the consensus algorithm. The PBFT algorithm can improve consensus efficiency and reliability.
So their focuses are different:
The SolidityNode focuses on solidified block synchronization, and the PBFTNode focuses on consensus efficiency.
In the latest versions, the SolidityNode has been replaced by the full node. But PBFTNode provide an optional consensus mechanism through dynamic switching of consensus algorithms.

In the TRON network, some interfaces are common across various nodes, and they are not only applicable to FullNode, but also to SolidityNode and PBFTNode. For example, GetEnergyPrices and GetBandwidthPrices are interfaces for querying historical unit prices of bandwidth and energy. However, in recent usage, it has been found that GetBandwidthPrices do not have API implementations for solidity and PBFT. However, GetEnergyPrices do exist, and bandwidth and energy are frequently used resources in the tron network. Their behavior as interfaces for querying should be consistent. Therefore, We hope to supplement the solidity and PBFT implementation of GetBandwidthPrices in future version updates.

Implementation

Add the implementation of solidity and PBFT for GetBandwidthPrices.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions