Giter VIP home page Giter VIP logo

java-tron's Introduction



java-tron

Java implementation of the Tron Protocol

Table of Contents

What's TRON?

TRON is a project dedicated to building the infrastructure for a truly decentralized Internet.

  • Tron Protocol, one of the largest blockchain-based operating systems in the world, offers scalable, high-availability and high-throughput support that underlies all the decentralized applications in the TRON ecosystem.

  • Tron Virtual Machine (TVM) allows anyone to develop decentralized applications (DAPPs) for themselves or their communities with smart contracts thereby making decentralized crowdfunding and token issuance easier than ever.

TRON enables large-scale development and engagement. With over 2000 transactions per second (TPS), high concurrency, low latency, and massive data transmission. It is ideal for building decentralized entertainment applications. Free features and incentive systems allow developers to create premium app experiences for users.

Building the source

Building java-tron requires git package and 64-bit version of Oracle JDK 1.8 to be installed, other JDK versions are not supported yet. Make sure you operate on Linux and MacOS operating systems.

Clone the repo and switch to the master branch

$ git clone https://github.com/tronprotocol/java-tron.git
$ cd java-tron
$ git checkout -t origin/master

then run the following command to build java-tron, the FullNode.jar file can be found in java-tron/build/libs/ after build successfully.

$ ./gradlew clean build -x test

Running java-tron

Running java-tron requires 64-bit version of Oracle JDK 1.8 to be installed, other JDK versions are not supported yet. Make sure you operate on Linux and MacOS operating systems.

Get the mainnet configuration file: main_net_config.conf, other network configuration files can be found here.

Hardware Requirements

Minimum:

  • CPU with 8 cores
  • 16GB RAM
  • 2TB free storage space to sync the Mainnet

Recommended:

  • CPU with 16+ cores(32+ cores for a super representative)
  • 32GB+ RAM(64GB+ for a super representative)
  • High Performance SSD with at least 2.5TB free space
  • 100+ MB/s download Internet service

Running a full node for mainnet

Full node has full historical data, it is the entry point into the TRON network , it can be used by other processes as a gateway into the TRON network via HTTP and GRPC endpoints. You can interact with the TRON network through full node:transfer assets, deploy contracts, interact with contracts and so on. -c parameter specifies a configuration file to run a full node:

$ nohup java -Xms9G -Xmx9G -XX:ReservedCodeCacheSize=256m \
             -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
             -XX:MaxDirectMemorySize=1G -XX:+PrintGCDetails \
             -XX:+PrintGCDateStamps  -Xloggc:gc.log \
             -XX:+UseConcMarkSweepGC -XX:NewRatio=2 \
             -XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled \
             -XX:+HeapDumpOnOutOfMemoryError \
             -XX:+UseCMSInitiatingOccupancyOnly  -XX:CMSInitiatingOccupancyFraction=70 \
             -jar FullNode.jar -c main_net_config.conf >> start.log 2>&1 &

Running a super representative node for mainnet

Adding the --witness parameter to the startup command, full node will run as a super representative node. The super representative node supports all the functions of the full node and also supports block production. Before running, make sure you have a super representative account and get votes from others. Once the number of obtained votes ranks in the top 27, your super representative node will participate in block production.

Fill in the private key of a super representative address into the localwitness list in the main_net_config.conf. Here is an example:

 localwitness = [
    <your_private_key>
 ]

then run the following command to start the node:

$ nohup java -Xms9G -Xmx9G -XX:ReservedCodeCacheSize=256m \
             -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \
             -XX:MaxDirectMemorySize=1G -XX:+PrintGCDetails \
             -XX:+PrintGCDateStamps  -Xloggc:gc.log \
             -XX:+UseConcMarkSweepGC -XX:NewRatio=2 \
             -XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled \
             -XX:+HeapDumpOnOutOfMemoryError \
             -XX:+UseCMSInitiatingOccupancyOnly  -XX:CMSInitiatingOccupancyFraction=70 \
             -jar FullNode.jar --witness -c main_net_config.conf >> start.log 2>&1 &

Quick Start Tool

An easier way to build and run java-tron is to use start.sh. start.sh is a quick start script written in the Shell language. You can use it to build and run java-tron quickly and easily.

Here are some common use cases of the scripting tool

  • Use start.sh to start a full node with the downloaded FullNode.jar
  • Use start.sh to download the latest FullNode.jar and start a full node.
  • Use start.sh to download the latest source code and compile a FullNode.jar and then start a full node.

For more details, please refer to the tool guide.

Run inside Docker container

One of the quickest ways to get java-tron up and running on your machine is by using Docker:

$ docker run -d --name="java-tron" \
             -v /your_path/output-directory:/java-tron/output-directory \
             -v /your_path/logs:/java-tron/logs \
             -p 8090:8090 -p 18888:18888 -p 50051:50051 \
             tronprotocol/java-tron \
             -c /java-tron/config/main_net_config.conf

This will mount the output-directory and logs directories on the host, the docker.sh tool can also be used to simplify the use of docker, see more here.

Community

Tron Developers & SRs is Tron's official Discord channel. Feel free to join this channel if you have any questions.

Core Devs Community is the Telegram channel for java-tron community developers. If you want to contribute to java-tron, please join this channel.

tronprotocol/allcoredev is the official Gitter channel for developers.

Contribution

Thank you for considering to help out with the source code! If you'd like to contribute to java-tron, please see the Contribution Guide for more details.

Resources

  • Medium java-tron's official technical articles are published there.
  • Documentation java-tron's official technical documentation website.
  • Test network A stable test network of TRON contributed by TRON community.
  • Tronscan TRON network blockchain browser.
  • Wallet-cli TRON network wallet using command line.
  • TIP TRON Improvement Proposal (TIP) describes standards for the TRON network.
  • TP TRON Protocol (TP) describes standards already implemented in TRON network but not published as a TIP.

Integrity Check

  • After January 3, 2023, the release files will be signed using a GPG key pair, and the correctness of the signature will be verified using the following public key:
    pub: 1254 F859 D2B1 BD9F 66E7 107D F859 BCB4 4A28 290B
    uid: [email protected]
    

License

java-tron is released under the LGPLv3 license.

java-tron's People

Contributors

317787106 avatar codeninjaevan avatar dorianrust avatar forfreeday avatar halibobo1205 avatar houlei1017 avatar huangzhengsi avatar huzhenyuan avatar ithinker1991 avatar jiangyy0824 avatar jwrct avatar lvs007 avatar miraculouswang avatar nanfengpo avatar olenheim avatar pangpangfeng avatar renchenchang avatar sasaxie avatar sean-liu55 avatar sh11thead avatar ss334452 avatar taihaofu avatar tjchern avatar wangzichichi avatar xiechang33 avatar yanghang8612 avatar yrp avatar zergweak avatar zhangwenhua-tron avatar zhaohong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java-tron's Issues

The usage method used across classes should be replaced by toString method

This is a suggestion to remove boilerplate code.

Usage method is used to print message.
public abstract void usage();
is used across the projects and This should be removed.

Should override toString() method instead.
So to print the message, System.out.println(Obj) is enough.

Also, consider using String.join. Java 8 added a new static method to java.lang.String which offers a slightly better alternative:

For example

String s = String.join(
System.getProperty("line.separator"),
"First line.",
"Second line.",
"The rest.",
"And the last!"
);

When running the tests, is there a way to run two instances of Tron on the same machine

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    Start two instances of Tron from IDEA (i.e. run it twice) on the same machine. The idea is to test sending from one account to another.

  2. What did you expect to see?
    Two tron instances running successfully enabling testing of certain functions between the two instances.

  3. What did you see instead?
    Exception in thread "main" java.lang.RuntimeException: Can't initialize database
    at org.tron.datasource.leveldb.LevelDbDataSource.init(LevelDbDataSource.java:96)
    at org.tron.core.Blockchain.(Blockchain.java:97)
    at org.tron.peer.Peer.initBlockchian(Peer.java:110)
    at org.tron.peer.Peer.init(Peer.java:96)
    at org.tron.peer.Peer.(Peer.java:45)
    at org.tron.peer.Peer.getInstance(Peer.java:74)
    at org.tron.example.Tron.run(Tron.java:39)
    at org.tron.example.Tron.main(Tron.java:35)
    Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: C:\Users\IdeaProjects\java-tron\database-test\block_data\MANIFEST-000019: The handle is invalid.

    at org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200)
    at org.fusesource.leveldbjni.internal.NativeDB.open(NativeDB.java:218)
    at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:168)
    at org.tron.datasource.leveldb.LevelDbDataSource.init(LevelDbDataSource.java:85)
    ... 7 more

Add Multi-Factor Authentication for User Login in TRON website

  1. What did you do?
    After I registered at https://tron.network/enindex.html, I logged in.

  2. What did you expect to see?
    I expected to see good security controls (for example: multi-factor authentication) in place for login, and TRX wallet deposits and withdrawals.

  3. What did you see instead?
    The login experience was way too simple with not enough security in place. In today's times, this will be a major issue for on-boarding and retaining users. For TRX wallet deposits and withdrawals, we absolutely need to do much better with security to minimize hacking, etc. Better security will lead to better adoption globally.

Consider using the SEI CERT Oracle Coding Standard for Java

Hello.

What are your thoughts on adopting say the SEI CERT Oracle Coding Standard for Java for use in the Tron project to improve security, robustness and overall quality and consistency of the project?

You could hook up a static analyzer like SonarQube's SonarJava or Coverity Scan that supports the SEI CERT standard, and integrate with TravisCI and the gradle build script. These tools generate reports of all of the violations of the standard and potential bugs and problems that need to be remedied to come into compliance. This combined with good unit testing is pretty much the next best thing you can do short of using formal verification and automatic proof checkers.

See the following link for more information:

https://wiki.sei.cmu.edu/confluence/display/java/SEI+CERT+Oracle+Coding+Standard+for+Java

Any Chance for Tron on Node.js?

Hello, I am content creator. WebGL.

Tron looks fantastic for Node.

Lots of mini visual apps going out to the web.

What is required for Tron to run on Node.js?

Thx.

LGPL violation/Missing references to ethereumj project

It's very obvious that java-tron is based on the ethereumj project.
E.g. compare these two files (Just a random example out of many):
https://github.com/tronprotocol/java-tron/blob/develop/src/main/java/org/tron/datasource/leveldb/LevelDbDataSource.java
https://github.com/ethereum/ethereumj/blob/develop/ethereumj-core/src/main/java/org/ethereum/datasource/leveldb/LevelDbDataSource.java

AFAIK this is violation of the LGPL (ethereumj) license because you didn't mention that java-tron has been derived from the ethereumj project.

You might want to get your licensing right. Copying someones work without giving them proper credits is at leased considered very bad practice in the open source community (ignoring any legal aspects of this because I'm not a lawyer).

package org.tron.protos.core does not exist

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.


Error:(12, 28) java: package org.tron.protos.core does not exist

  1. What did you expect to see?


gradlew get dependency ready.

  1. What did you see instead?


Error:(12, 28) java: package org.tron.protos.core does not exist

TRON wallet integration with Trezor, Nano Ledger, etc.

I highly recommend that the TRON team pursue direct integration with hardware wallets (TREZOR, etc). This is not an issue; rather, a suggestion. Given the upcoming main chain release in March 2017 and other long-term goals, hardware wallet integration will lead to better trust and security globally.

Once TRX is no longer an ERC20 token on the Ethereum blockchain, I'm assuming this is possible.

Cant acces my tron wallet. The browser keeps refreshing on its log in page.

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    I tried to click on the wallet button and it leads to the usual log in page.

  2. What did you expect to see?
    I expect to key in my usename and password.

  3. What did you see instead?
    All it does is keep refreshing by itself on my browser and I cant even key in my username and password.

capture

Suggestion: Use of Github Projects/Milestones/Labels

Perhaps Tron coders developers have this internally but it would be beneficial for the community interacting through Github only to have visibility into sprints/milestones. Not saying there is no progress but lack of visibility is frustrating.

Can we please enable visibility on milestones with agreed duration (2 weeks?). For example this milestone we work on getting FullNode to interact with outside world. Next milestone we work on wallet to interact with the node.

This way we will be able to prioritise tasks and separate them from progress work on the actual project. Start using labelling and milestones for every issue.

What do you mean by kafka based network

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    Question:
    What do you mean by kafka based network? In actual deployment, would there be a centralized kafka for all nodes or would the kafka instances run silently on each and every node?

  2. What did you expect to see?
    Question

  3. What did you see instead?
    Question

No Error Handling

  1. What did you do?
    Encounter any error

  2. What did you expect to see?
    Printing to the stacktrace

  3. What did you see instead?
    Logging error that gets picked up by other daemon and have error exported out, or first class monitor hooks

remove documentation from readme.md

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    as a developer i want to have a solid documentation

  2. What did you expect to see?
    i expect to see complete documentation at http://wiki.tron.network

  3. What did you see instead?
    need to just leave header and 1st paragraph, remove everything below and point people to site above instead

Withdrawing issue tron.network wallet

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    When trying to withdraw my trx from the wallet it will send but gets resposited back in after 12 hours and i believe this time it has not come back as of yet. Has happened 3 times in the past three days. I checked etherscan and there is no transaction data at all of the sent coins. I know this is not an issue of wallet addresses. And this is a issue from the tron lab wallet.

  2. What did you expect to see?

Deposited from binance, tried to withdraw back to binance. Was exspecting no issues and not redirection of my trx

I cannot get a hold of anyone for help and only have seen one person with this issue.

I would really like to have the situation resolved

Thank you in advance for your help

Anthony

Attempting to Transfer TRX from Tron Website to Binance

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    Attempting to send TRX from Tron Network site to Binance. However, the “confirm” button will not responsd to my click.

  2. What did you expect to see?
    Expected to see the transfer process begin after clicking “confirm.”

  3. What did you see instead?
    Nothing results when I click “confirm.” Triednysing four separate browsers.

Tron consensus second phase plan

The second phase consensus of tron is based on the Raft consensus algorithm, referring to the Copycat consensus mechanism and completing Tron's own PoS consensus algorithm.

Failing unit tests in a clean clone of the repository

  1. What did you do?
  • Took a clean clone of java-tron master on macOS High Sierra
  • ran 'gradle test'
  1. What did you expect to see?
    All unit tests passing

  2. What did you see instead?
    2 failing tests and 3 skipped (but build reported as successful in spite of the failing tests)

Failed tests:

org.tron.core.BlockchainTest > testAddBlockToChain FAILED
java.lang.RuntimeException at BlockchainTest.java:142
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException at BlockchainTest.java:142

org.tron.core.BlockchainTest > testFindTransaction FAILED
java.lang.RuntimeException at BlockchainTest.java:87
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException at BlockchainTest.java:87

Skipped tests:

org.tron.datasource.leveldb.LevelDbDataSourceTest > testGet SKIPPED

org.tron.datasource.leveldb.LevelDbDataSourceTest > testPut SKIPPED

org.tron.datasource.leveldb.LevelDbDataSourceTest > testRest SKIPPED

No asserts in unit tests

  1. What did you do?
    Run unit tests

  2. What did you expect to see?
    Asserts or validations.

  3. What did you see instead?
    Only logging

NullPointerException in BlockchainTest.testFindTransaction

  1. What did you do?
  • Clone java-tron repository
  • Import java-tron into IntelliJ
  • Open BlockchainTest.java
  • Run test testFindTransaction
  1. What did you expect to see?
  • Test pass
  1. What did you see instead?
  • Test fails with a NullPointerException

java.lang.NullPointerException
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:209)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:214)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
at org.tron.protos.core.TronBlock$Block.parseFrom(TronBlock.java:313)
at org.tron.core.BlockchainIterator.next(BlockchainIterator.java:46)
at org.tron.core.Blockchain.findTransaction(Blockchain.java:116)
at org.tron.core.BlockchainTest.testFindTransaction(BlockchainTest.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Exception thrown is from the following code in BlockchainIterator. The following returns null:

byte[] value = blockchain.getBlockDB().get(index);

And the exception is thrown when the following line executes with null as the value:

block = TronBlock.Block.parseFrom(value);

Suggestion : Server.java

Below is the snippet of Server.java, starting from line 39.

@Override
 public void start() {
   InetAddress localhost = null;
   try {
     localhost = InetAddress.getLocalHost();
     System.out.println("Server localhost: " + localhost.getHostAddress());
     Address address = new Address(localhost.getHostAddress(), 5000);

It should be replaced with

@Override
 public void start() {
   try {
     String hostAddressStr = InetAddress.getLocalHost().getHostAddress();
     System.out.println("Server localhost: " + hostAddressStr);
     Address address = new Address(hostAddressStr, 5000);
  1. localhost variable is not used outside the try-catch
  2. localhost is not reused, localhost.getHostAddress is called twice, that is why we should declare a variable for InetAddress.getLocalHost().getHostAddress(); but not InetAddress.getLocalHost().

The Exception handled is for UnknownHostException. I think it should be replaced by Exception. It is possible to have NullPointerException as well.

Two instances of tron: balance not getting reduced

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    I ran two instances of tron on the same machine (started one as --type server and other as --type normal). Sent 10 from one account to another.Then checked balances on both.

  2. What did you expect to see?
    Balance reducing by 10 on account from which it was sent. Balance increasing by 10 on the other account.

  3. What did you see instead?
    Balance remaining same on account from which it was sent. Balance increasing by 10 on the other account.

on printblockchain, the timestamp of first block shows 1969. Is this related in some way to the genesis block?

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

printblockchain

  1. What did you expect to see?
    current times in blockchain

  2. What did you see instead?

Block {
timestamp=1969/12/31 18:00:00,
parentHash=,
hash=92cc7b05be081109f2245a3cca1a214222751a598abae447df636932b2a0b855,
nonce=,
difficulty=2001,
number=0
}
is this in some way related to the genesis block? Is that the standard for the very first block?

Suggestion : Client.java

Syntax (line 127, trunk)

if (!(pretime == null)){{

should be replaced by

if (pretime != null){

Also, the code of client.java needs to be improved.

Question: More interest from overseas technical communities

Hey guys,

I watched the live-stream while simultaneously staring at the code gently, and actually tweeted Justin with some thoughts, but I thought it might be better to raise it here since it's more technically focused.

I read the wiki, I see the general direction Lucien wants to move in, I think that there can be a groundswell of interest from the open-source community if there was better communication of the technical roadmap phases. I understand the white paper went over a general schedule, but I'm talking about the very very technical roadmap. I think a lot of people want to contribute but there is a little bit of a communication barrier, especially when it comes to next-steps and what problems you guys are running into.

Architecturally, the design is very clever, and I'm excited to see how the implementation is executed. Lucien designed a distributed system with scale in mind, using some industry leading/bleeding edge yet stable technologies: kafka, protobufs, containers, consensus with gossip protocol on-top of p2p network overlay.

Some general thoughts:
1.) It's cool the senior member you guys brought on is a kernel hacker, I don't think the general public understands what that means in terms of technical value, maybe expand on that more, maybe in a more technical setting/presentation?

2.) What layer(s) will the kafka system be operating on/how will it be used? It was not clear how it would be used, if it's a core part of the technology stack, I think people are a little confused because traditionally it's used as an asbtraction for a source of truth, in which case things will be centralized instead of decentralized, unless, for example it's running on a middleware layer that lives everywhere and facilitates the output of another module ...ex. consensus system.

3.) What is the infrastructure going to look like? Right now, if everything else goes according to plan, I think there will be operational issues at scale and I see two very smart senior developers (from what I can tell) but no senior-level operations engineers as of yet, ex.: how are you going to handle orchestration in the container tier?

4.) I think people will complain that the first open source repo/PoC-implementation is Java, which is a very very very mature language, but a lot of people have a prejudice against java (I'm not a huge fan of the boilerplate), at first glance, people are going to complain it's not Golang etc., Then I thought, well, that's actually clever if you leverage other JVM-based languages. It might spark up positive interest if eventually you guys did a PoC implementation showing an abstraction of whatever core java lib for tron, and the interoperability a more modern jvm-esque lang, like Scala or Clojure.

Overall, I think the project and architectural vision is very cool. But, I think there could be better technical communication, especially for technical folks abroad(in non-native chinese speaking countries) that have some spare cycles on the weekend and want to contribute.

Low hanging fruit - maybe start posting some github milestones for problems addressed/resolved so we can keep up with what problems exist/what's being done. And then people can help out easier. Just my two satoshi.

Lucien, Justin, et al, please keep up the good work, but also keep in mind, we can always do better, this is just one engineer's humble opinion and scattered thoughts.

Suggestion: Documentation and comment review

We understand that English is not your native language and we appreciate you trying your best to communicate with us in English.

But may I suggest that you tag us native English speaking contributors into the PR so we can review and make grammatically/syntactical/etc... recommendations? That way it improves the documentation without it needing additional amending PRs.

Thanks!

debug.tronlab.com Issue

HI @sasaxie ,

Since thread was in wrong place I reopen in correct place.

I created account and deposited to debug.tronlab.com
Send went thru to debug account.
Debug account does not register that it received deposit.
Outcome: Cannot withdrawal out of debug wallet.

I understand you guys are working to fix issue - however, I will leave this open for communication for questions etc.. until issue is resolved.

Thank you Tron team for being awesome.
-C

Compile error on the latest code in develop branch

  1. What did you do?
    I just synced and tried to build the project.

  2. What did you expect to see?
    'BUILD SUCCESSFUL'

  3. What did you see instead?
    Bulild failed, here is the 1st compile error
    xxxxx/java-tron/src/main/java/org/tron/core/db/BlockStore.java:26: error: cannot find symbol
    public class BlockStore extends Database {

Commit 'Merge pull request #88 from ruchern/develop' is the latest good build

Please help to fix the compile error. Thanks!

API

Does the JAVA-tron provide any REST / RPC / WebSocket / TCP API or anything like that? If yes, then where can I find the docs? If not, then do I have to use builtin console?

Consider passing Databases on the constructor for the classes which need them

UTXOStore and UTXOSet classes both initialize and set a lock on the TransactionDB.

Blockchain and BlockStores classes both initialize and set a lock on the BlockDB.

In all cases these initialization on the DB are done in the constructor of the class.

It seems like these DBs could be initialized outside of the class, perhaps in the Peer class and then the database dependency injected into Blockchain, BlockStores, UTXOStore and UTXOSet in the constructor.

This way, we can ensure the DB connections are created and locked only once during the runtime lifecycle and avoid the NativeDB$DBException.

This would also allow using a mock for TransactionDB and BlockDB, which would allow for easier state management of the data in the unit tests and so better test coverage.

A wrapper class could be created around the initialization of the database so that the type system can make sure the correct DB is injected into correct class. For example, the Blockchain constructor could look like:

public Blockchain(BlockDB blockDb)

Any thoughts on this approach?

More Licence violations

https://github.com/tronprotocol/java-tron/blob/develop/src/main/java/org/tron/crypto/cryptohash/Digest.java
https://github.com/ethereum/ethereumj/blob/165fe6060ca40325debcc3356b02c634f1f945ee/ethereumj-core/src/main/java/org/ethereum/crypto/cryptohash/Digest.java

Is missing this notice

  • ==========================(LICENSE BEGIN)============================
  • Copyright (c) 2007-2010 Projet RNRT SAPHIR
  • Permission is hereby granted, free of charge, to any person obtaining
  • a copy of this software and associated documentation files (the
  • "Software"), to deal in the Software without restriction, including
  • without limitation the rights to use, copy, modify, merge, publish,
  • distribute, sublicense, and/or sell copies of the Software, and to
  • permit persons to whom the Software is furnished to do so, subject to
  • the following conditions:
  • The above copyright notice and this permission notice shall be
  • included in all copies or substantial portions of the Software.
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  • EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  • MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  • IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  • CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  • TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  • SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • ===========================(LICENSE END)=============================

Many problems with login after my first registraion on Tron site

On January 15th I correctly registered my user account on Tron site and I was able to login only for a few times in that same day. Then, unitl now, I wasn't able anymore to login (the system said me multiple times that the e-mail address or the password were uncorrect). Now I had to register me again with the same identical credentials of the first registration to have a correct access. It would therefore seem that my first registration was canceled. How is that possible?

cannot connect membership

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    login on https://tron.network/ennewlogin.html
    not working ! does not send the reset password email too !

  2. What did you expect to see?
    connect to website

  3. What did you see instead?

error message

TRX deposits are completed on Etherscan but not in exchange account

Hello, I am hoping you can help because the problem below is happening to hundreds of people and there is a growing panic. Over the last month, some deposits into HitBTC are not going through. The transactions look successful on Etherscan but are not being deposited into our accounts. HitBTC support is completely non-responsive to anyone. Can you please shed some light on what is causing this? Here is my last and non-received transaction:

0x1c68d4a21daadf9faa4d0c4a2462e0a96312becd1c127c5b5975e1e996627fee

For comparison, here is the previous transaction which was successfully received:

0x3e8a79f5cc48f55dd844714c19bc53f52ae4211e5287d3eeae41636ea48de549

Please let me know what is the cause and I will pass the message on to the rest of the affected community. Is there anything we can do to fix this?

Thank you

Fork scala-tron to tronprotocol organisation

The scala-tron project has been started a few weeks ago with the goal to provide a working tronprotocol in the Scala language. This week we nearly implemented most of the features that exist in the java-tron project.

The scala-tron project plans on being fully compatible with the java-tron project by adding support for Apache Gossip, Kafka, CopyCat and sharing the same protobuf models.

Would the tron team consider forking the scala-tron project to the tronprotocol organisation so it can receive more exposure and attract developers who prefer Scala over Java?

If scala-tron is being forked to the tronprotocol organisation then development can resume in the forked repository. I can be added as collaborator to the repository so i can further manage the project.

I would also like to volunteer as collaborator to the java-tron project to triage issues and answer technical questions. For example there are quite a few issues which should have been closed already or require more feedback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.