dna

command module
v0.0.0-...-c05ccf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 42 Imported by: 0

README

DNA

Version 2.0

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!

We openly welcome developers to DNA.

Features

  • 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

Contents

Build development environment

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

Run DNA

Testmode

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
    

Some examples

Query transaction status sample

./DNA info status <TxHash>

For Example:

./DNA info status 10dede8b57ce0b272b4d51ab282aaf0988a4005e980d25bd49685005cc76ba7f

Result:

Transaction:transfer success
From:AXkDGfr9thEqWmCKpTtQYaazJRwQzH48eC
To:AYiToLDT2yZuNs3PZieXcdTpyC5VWQmfaN
Amount:10

Contributions

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

License

DNA is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Documentation

Overview

* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library. * * The DNA is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The DNA is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with The DNA. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
cmd
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
abi
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
sigsvr
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
sigsvr/handlers
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
sigsvr/store
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
utils
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
core
store/ledgerstore
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
store/overlaydb
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
http
base/actor
Package actor privides communication with other actor
Package actor privides communication with other actor
base/common
Package common privides functions for http handler call
Package common privides functions for http handler call
base/error
Package error privides error code for http
Package error privides error code for http
base/rest
Package rest privides functions to for restful server call
Package rest privides functions to for restful server call
base/rpc
Package rpc provides functions to for rpc server call
Package rpc provides functions to for rpc server call
jsonrpc
Package jsonrpc privides a function to start json rpc server
Package jsonrpc privides a function to start json rpc server
localrpc
Package localrpc privides a function to start local rpc server
Package localrpc privides a function to start local rpc server
nodeinfo
Package nodeinfo privides functions for nodeinfo server
Package nodeinfo privides functions for nodeinfo server
restful
Package restful privides a function to start restful server
Package restful privides a function to start restful server
restful/restful
Package restful privides restful server router and handler
Package restful privides restful server router and handler
websocket
Package websocket privides a function to start websocket server
Package websocket privides a function to start websocket server
websocket/session
Package session privides websocket server manager sessionlist
Package session privides websocket server manager sessionlist
websocket/websocket
Package websocket privides websocket server handler
Package websocket privides websocket server handler
common
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
net/protocol
Package p2p provides an network interface
Package p2p provides an network interface
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
service/native/governance
Governance contract: Users can apply for a candidate node to join consensus selection, deposit ONT to authorize for candidate nodes, quit selection and unAuthorize for candidate nodes through this contract.
Governance contract: Users can apply for a candidate node to join consensus selection, deposit ONT to authorize for candidate nodes, quit selection and unAuthorize for candidate nodes through this contract.
service/native/ontid
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
service/native/utils
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
service/neovm
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
service/wasmvm
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
Package txnpool provides a function to start micro service txPool for external process
Package txnpool provides a function to start micro service txPool for external process
common
Package common provides constants, common types for other packages
Package common provides constants, common types for other packages
proc
Package proc provides functions for handle messages from consensus/ledger/net/http/validators
Package proc provides functions for handle messages from consensus/ledger/net/http/validators
validator
db
vm
neovm
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
wasmvm/disasm
Package disasm provides functions for disassembling WebAssembly bytecode.
Package disasm provides functions for disassembling WebAssembly bytecode.
wasmvm/exec
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
* Copyright (C) 2018 The DNA Authors * This file is part of The DNA library.
wasmvm/exec/internal/compile
Package compile is used internally by wagon to convert standard structured WebAssembly bytecode into an unstructured form suitable for execution by it's VM.
Package compile is used internally by wagon to convert standard structured WebAssembly bytecode into an unstructured form suitable for execution by it's VM.
wasmvm/internal/stack
Package stack implements a growable uint64 stack
Package stack implements a growable uint64 stack
wasmvm/validate
package validate provides functions for validating WebAssembly modules.
package validate provides functions for validating WebAssembly modules.
wasmvm/wasm
Package wasm provides functions for reading and parsing WebAssembly modules.
Package wasm provides functions for reading and parsing WebAssembly modules.
wasmvm/wasm/leb128
Package leb128 provides functions for reading integer values encoded in the Little Endian Base 128 (LEB128) format: https://en.wikipedia.org/wiki/LEB128
Package leb128 provides functions for reading integer values encoded in the Little Endian Base 128 (LEB128) format: https://en.wikipedia.org/wiki/LEB128
wasmvm/wasm/operators
Package operators provides all operators used by WebAssembly bytecode, together with their parameter and return type(s).
Package operators provides all operators used by WebAssembly bytecode, together with their parameter and return type(s).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL