Compiling and Running java-tron on Windows via WSL

in #witness-category5 years ago (edited)

The Tron Blockchain Core: https://github.com/tronprotocol/java-tron can actually be compiled under Windows with the help of WSL (Windows SubSystem for Linux)

Install WSL

image.png

You can follow the steps here to install WSL

Install Oracle-JDK-8

  1. apt update
  2. apt upgrade
  3. Add the following line to /etc/apt/sources.list:

deb https://debian.opennms.org/ stable main

  1. Install GPG key of the repository:

wget -O - http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -

  1. Update the package index:

sudo apt-get update

  1. Install oracle-java8-installer deb package:

sudo apt-get install oracle-java8-installer

Build it using gradlew

$ ./gradlw --warning-mode all clean build

image.png

Using VSCode

We can use VSCode + Remote - WSL Extension (so that you can develop on Windows). You may try using IntelliJ but some dependency may not resolve.

image.png

Start the Full Node. The -c specifies the config file and -d specifies the database i.e. output directory.

nohup java -Xmx24g -XX:+UseConcMarkSweepGC -jar FullNode.jar -c config.conf -d database-path

Check the logs tail -f logs/tron.log and check for the blocks tail -f logs/tron.log | grep -i pushblock

image.png

Tests

However, at the time of writing, one test is failing:

image.png

image.png

Apart from this, all good.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you for reading ^^^^^^^^^^^^^^^

NEW! Following my Trail (Upvote or/and Downvote)

Follow me for topics of Algorithms, Blockchain and Cloud.
I am @justyy - a Steem Witness
https://steemyy.com

My contributions

Delegation Service

  1. Voting Algorithm Updated to Favor those High Delegations!
  • Delegate 1000 to justyy: Link
  • Delegate 5000 to justyy: Link
  • Delegate 10000 to justyy: Link

Support me

If you like my work, please:

  1. Delegate SP: https://steemyy.com/sp-delegate-form/?delegatee=justyy
  2. Vote @justyy as Witness: https://steemyy.com/witness-voting/?witness=justyy&action=approve
  3. Set @justyy as Proxy: https://steemyy.com/witness-voting/?witness=justyy&action=proxy
    Alternatively, you can vote witness or set proxy here: https://steemit.com/~witnesses

Sort:  

Good morning @justyy.
Sorry my friends, I want to ask, why did I receive about 1.93% of the votes from you because I was a delegation of 950 SP, before I got 10.16%. Did I do something wrong to you. Thanks you for your kindness during this time helping me.

Good evening my Friend @justyy . Recently I added my delegation from 950,484 SP to 1000,488 SP. I hope you can help me to get better Vote from you. Because right now I'm promoting Steemit to my friends in Indonesia. Thanks you for your attention and help me during this time. Always success for you my Friend.

I already done set voting proxy for you my Friend. Please check. Thanks.

Screenshot_2021-05-25-20-22-04-99-01.jpeg

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.083
BTC 60221.23
ETH 1581.59
USDT 1.00
SBD 0.42