Giter Club home page Giter Club logo

opentron's Introduction

OpenTron logo Chat on Telegram

OpenTron is an implementation of the Tron blockchain written in Rust. This project is under active development and is not ready for general use.

Rationale

  1. Decentralised

    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.

  2. High performance

    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.

  3. Modern codebase

    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.

Roadmap

  • 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)

TODOs

  • Full Tron Protocol implementation
    • proto2: refactor the protobuf / gRPC
    • primitives
      • 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
      • sync
      • TODO: minor bug fix, timeout error
    • chain
      • Block / Transaction
    • chainbase
      • memory
      • RocksDB
    • mempool
    • consensus
    • EVM / TVM
    • RPC replacement
      • will not support gRPC
      • might have json-rpc support
    • shielded trc20 transaction
      • ztron

Quickstart

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

License

Licensed under either of

at your option.

Contribution

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.

opentron's People

Contributors

andelf avatar kevholder avatar octalmage avatar

Watchers

 avatar

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.