English | 中文
Welcome to the official source code repository for DNA!
DNA is dedicated to developing a high-performance blockchain infrastructure, which is customizable to different business requirements.
Prerequisites for getting started with development on the DNA networks are:
- Mainstream coding and development experience
- Understanding of your business scenario/requirements
- No need for previous blockchain engineering experience
The DNA core tech team, the community, and the ecosystem can all support you in development. MainNet, TestNet, Docker image for DNA, SmartX, and DNA Explorer combined make it easy to start.
DNA makes getting started easier!
And new features are still rapidly under development. The master branch may be unstable, but stable versions can be found under the release page.
We openly welcome developers to DNA.
- Scalable lightweight universal smart contract
- Scalable WASM contract support
- Crosschain interactive protocol (processing)
- Multiple encryption algorithm support
- Highly optimized transaction processing speed
- P2P link layer encryption (optional module)
- Multiple consensus algorithm support (VBFT/DBFT/RBFT/SBFT/PoW)
- Quick block generation time
The requirements to build DNA are:
- Golang version 1.9 or later
- Glide (a third party package management tool)
- Properly configured Go language environment
- Golang supported operating system
- You can download other versions at release page.
Clone the DNA repository into the appropriate $GOPATH/src/github.com/dnaproject2 directory.
$ git clone https://github.com/dnaproject2/DNA.git
or
$ go get github.com/dnaproject2/DNA
Fetch the dependent third party packages with glide.
$ cd $GOPATH/src/github.com/dnaproject2/DNA
$ glide install
If necessary, update dependent third party packages with glide.
$ cd $GOPATH/src/github.com/dnaproject2/DNA
$ glide update
Build the source code with make.
$ make all
After building the source code sucessfully, you should see two executable programs:
DNA
: the node program/command line program for node control.tools/sigsvr
: (optional) DNA Signature Server - sigsvr is a RPC server for signing transactions for some special requirements. Detailed docs can be found here.
Create a directory on the host and store the following files in the directory:
- Node program
DNA
- Executor file
executor.dat
(executor.dat
can be generated by./DNA account add -d
)
Run command $ ./DNA --testmode
can start single-host testnet.
Here's a example of a single-host configuration:
-
Directory structure
$ tree └── DNA ├── DNA └── executor.dat
./DNA info status <TxHash>
For Example:
./DNA info status 10dede8b57ce0b272b4d51ab282aaf0988a4005e980d25bd49685005cc76ba7f
Result:
Transaction:transfer success
From:AXkDGfr9thEqWmCKpTtQYaazJRwQzH48eC
To:AYiToLDT2yZuNs3PZieXcdTpyC5VWQmfaN
Amount:10
Please open a pull request with a signed commit. We appreciate your help! You can also send your code as email to the developer mailing list. You're welcome to join the DNA mailing list or developer forum.
Please provide a detailed submission information when you want to contribute code for this project. The format is as follows:
Header line: Explain the commit in one line (use the imperative).
Body of commit message is a few lines of text, explaining things in more detail, possibly giving some background about the issue being fixed, etc.
The body of the commit message can be several paragraphs. Please do proper word-wrap and keep columns shorter than 74 characters or so. That way "git log" will show things nicely even when it is indented.
Make sure you explain your solution and why you are doing what you are doing, as opposed to describing what you are doing. Reviewers and your future self can read the patch, but might not understand why a particular solution was implemented.
Reported-by: whoever-reported-it + Signed-off-by: Your Name youremail@yourhost.com
DNA is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.