[How-to] Convert Block level DB to ROCKS DB

This guide is intended for those who wish to convert from one DB format to another. The benefits are:
– You can use RocksDB as storage engine when you want to back up the database without the node application stopped,
– The Rocksdb engine has more tuning parameters for faster-synchronizing block and takes up less disk space when compared with the Block LevelDB.

Note:
You must only use one db engine (leveldb or rocksdb) throughout the life cycle of node because rocksdb’s data structure is incompatible with the leveldb’s. A convert tool is provided within Java-Tron to convert the leveldb data to rocksdb data and the usage of tool is described below. Please be aware that the conversion take time and the node is not syncing any blocks while this operation is ongoing.

1. First we need to clone the git and build it

git clone https://github.com/tronprotocol/java-tron
cd java-tron/
./gradlew build

Just wait until it’s built and tested. Go grab a cup of tee or a coffee.

2. Then we need to stop the node
3. Now we need to use this Java converter package (DBConvert.jar) to perform the conversion. It is located here: /java-tron/build/libs/

Sample syntax looks like this

java -jar build/libs/DBConvert.jar  your_database_dir/database  output-directory-dst/database

Example syntax looks like this

java -jar /home/userdir/java-tron/build/libs/DBConvert.jar /home/userdir/FullNode/output-directory/database /home/userdir/FullNode/output-directory2/database

According to tron documentation it should take about 10 hours to finish the conversion. Well on my node it took about 67800 seconds. This translates to 18.8 hours. The process is not CPU or Memory bound, both my CPU and Memory usage never exceeded 10% or the allocated resources.

Java-tron node, new Odyssey-3.5 released

Yesterday (28.02.2019) a new release (v. 3.5) became available.
https://github.com/tronprotocol/java-tron/releases/

New features:

  • Multiple signatures support and different permissions support in account
  • The upper limit of energy can be adjusted automatically by the current state of the network
  • Develop a new mechanism to listen event message from a queue

Changes:

  • Solved the Compatibility Problem between Backup and DUP_WITNESS
  • Optimize duplicate check of transaction, Increase processing speed
  • Transfertoken function security improvement
  • ADDRESS and ORIGIN instruction security improvements
  • Improve the partial UNKNOWN execution results of the smart contract to a more detailed error type
  • Log optimization improvements
  • Http interface improvements

 

Important:
You will need to update the config.conf:
https://github.com/tronprotocol/tron-deployment/blob/master/main_net_config.conf

Please complete your upgrade to the new version before next Tuesday (March 05, 2019), otherwise it will affect the synchronization of the node !

Software Update to Odyssey-v3.2.2

We’ve updated yesterday to Odyssey-v3.2.2. This new release brings various Optimization of the Tron node software.

The most important for me are:

  • that it provides the RPC and HTTP interface services of the SolidityNode on the FullNode.
  • Asynchronous writing that significantly improves the performance of the FullNode and SolidityNode sync block.

For our dual nodes this greatly improve processing the block speed. We have also deployed one additional node in the network.