OpenTron is an implementation of the Tron blockchain written in Rust. This project is under active development and is not ready for general use.
The Tron network currently has one and only implementation. This has lead to some criticism of Tron being too centralized. We want to change that by providing an alternative implementation and independent development team.
API calls to java-tron nodes often results in CPU timeouts and other "out of resource" related errors. This is partly due to java-tron being written in Java, a garbage collected language that runs on a virtual machine. OpenTron is written in Rust, a modern compiled language that is increasingly adopted for blockchain and systems development due to its high performance, safety and modern design.
Java-tron was forked a few years ago from a Java Ethereum implementation. It has accumulated a lot of technical debt over the years and has a lot of inconsistent or missing documentation. We believe that a greenfield implementation will enable us to produce a cleaner code base that is easier to understand, improve and extend. In addition, since Rust has first class support for WebAssembly, it will be possible to re-use its code for creating web based clients, wallets, explorers, etc.
- Block data sync, only blocks (raw transactions), without transaction info and any other state data. Handle chain fork and block Merkle tree verification.
- Simple transaction broadcast, without much verification, just broadcast transactions to the network as quickly as possible(an airdrop tool can be made from it)
- Handle transaction verification. all state data will be available. (difficult, EVM engine, resource consumption mode, witness/vote/proposal, chain parameter are all handled at this stage, to make the state data identical as java-tron )
- Build a query API layer upon state data. json-rpc.
- Build a event API layer upon state data.
- block mining logic (difficult, DPoS mining, need resource to become an SR)
- Full Tron Protocol implementation
- proto2: refactor the protobuf /
- use primitive-types
- Address, PublicKey, PrivateKey, Signature
- config file
- genesis block parsing
- toml config file parsing
- reorganize chain parameters
- discover protocol
- channel protocol
- demo works
- TODO: minor bug fix, timeout error
- Block / Transaction
- EVM / TVM
- 3.7 TVM https://github.com/andelf/evm
- 4.0 TVM with zksnark:
- massive tests against resource usage
- RPC replacement
- will not support gRPC
- might have json-rpc support
- shielded trc20 transaction
- proto2: refactor the protobuf /
See INSTALL.md for more detailed information.
> # Install rust-nightly > curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly > rustup component add rustfmt > # Install protoc > brew install protobuf # macOS > sudo pacman -S protobuf # ArchLinux > sudo apt install protobuf-compiler libprotobuf-dev # Ubuntu / Debian > # Install RocksDB > brew install rocksdb # macOS > # Get code > git clone --recurse-submodules https://github.com/oikos-cash/OpenTron.git > # Compile tools > cd ./OpenTron/ > cargo build --all > cargo run -- --config config/conf.nile.toml
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.