Add Tron Network Support to Blockbook
The focus of my Bachelor's thesis was to implement a blockchain explorer for Tron. I have used Blockbook for this and would like to contribute my work to this repository.
Summary of changes
- Added Coin configuration for Tron and Tron Nile Testnet
-
TronRPCextends theEthereumRPCdue to the fact that Java-Tron client has JSON-RPC interface compatible with Ethereum - The interface is not fully compatible, which leads to specific implementations and certain limitations described below
- Unit, JSON-RPC, API and FakeBlockchain tests were implemented.
- Extended the ZeroMQ implementation to be modular due to the fact that Java-Tron uses ZeroMQ for notifying of new blocks and transactions.
Merge Checklist
- [x] Coin configuration file added (tron.json)
- [x]
tronpackage implements JSON-RPC, parser, client, and types - [x] Unit and integration tests added and passing
- [x] Documentation updated (docs/ports.md, docs/config.md)
- [ ] Code review by at least one maintainer
Known limitations
- Java-Tron JSON-RPC does not support an equivalent method to
eth_sendRawTransaction. This could be solved by implementing HTTP Client and calling the/wallet/broadcasthexendpoint in HTTP API. - TRC-10 tokens are a specific function of Tron, recognition of such transactions can be done only through the HTTP API. For the same reason, recognition of staking, delegating, voting and other Tron-specific transactions can be done only through the HTTP API
- This solution relies on the current implementation of the
ethpackage, but utilises the current code and minimises duplicates.
The Tron Blockbook is currently running on http://147.229.8.210:51661/.
I will be happy to discuss my implementation and improve my current solution, so it can be integrated into the Blockbook repository.
@martinboehm could you please take a look?
@cranycrane thank you very much for your contribution! We are very busy with other tasks but will review it asap.
@etimofeeva Can you also take a look, please ? 🙏
@cranycrane testing is in process, will start on review shortly, apologies for the delay with this.
Hello @cranycrane, thank you a lot for your contribution! Can you please reach out to me at [email protected], so we can chat about the PR outside of GH?
Thanks a lot! MP
Hi @cranycrane, could you share the hardware requirements for running a mainnet node and a testnet node?
Hello @overcat,
I don't have a minimum hw requirements, but I can give you the specs we run Tron mainnet: 3.1TB - javatron 1.3TB - blockbook 24GB - RAM (up to 124GB - on a shared server) 32 CPU cores at 2-10% utilisation