github.com/FUSIONFoundation/dcrm-go@v0.4.1-0.20190906104840-3b4071bccdbc/README.md (about)

     1  # DCRM-GO
     2  
     3  Official golang implementation of the FUSION DCRM.
     4  
     5  FUSION is an inclusive public blockchain that provides the infrastructure and architecture for fully fledged financial functions on the blockchain. To learn more about FUSION, please visit official website at <https://www.fusion.org> or read the [White Paper](https://github.com/FUSIONFoundation/Whitepaper/blob/master/FUSION%20Whitepaper%20V.1.1.pdf) and [Yellow Paper](https://github.com/FUSIONFoundation/Whitepaper/blob/master/DCRM%20Yellow%20Paper.pdf).
     6  
     7  *Note: go-dcrm is considered beta software. We make no warranties or guarantees of its security or stability.*
     8  
     9  ## Building
    10  
    11  ### Supported Operating Systems
    12  
    13  FUSION DCRM client currently supports the following 64bits operating systems:  
    14  
    15  1. Ubuntu 16.04 or higher(18.04 recommended)
    16  2. Debian 9
    17  3. Centos 7 and RHEL 7
    18  4. Fedora 25 or higher
    19  5. MacOS Darwin 10.12 or higher
    20  
    21  The following building instructions are based on Ubuntu 18.04(64bits), for more prerequisites and detailed build instructions please read the [Installation Instructions](https://github.com/FUSIONFoundation/dcrm-go/wiki/) on the wiki.
    22  
    23  ### Requirements
    24  
    25  - [Go](https://golang.org/doc/install) version 1.9 or higher
    26  
    27   Ensure Go with the supported version is installed properly:
    28  
    29  ```bash
    30  go version
    31  ```
    32  
    33  ### Environment
    34  
    35  Ensure `$GOPATH` set to your work directory:
    36  
    37  ```bash
    38  go env GOROOT GOPATH
    39  ```
    40  
    41  ### Get the source code
    42  
    43  ``` bash
    44  git clone https://github.com/FUSIONFoundation/dcrm-go.git $GOPATH/src/github.com/dcrm-go
    45  ```
    46  
    47  ### Build
    48  
    49  Once the dependencies are installed, run:
    50  
    51  ``` bash
    52  make gdcrm
    53  ```
    54  
    55  When successfully building the project, the `gdcrm` binary should be present in `build/bin` directory.
    56  
    57  ## Running
    58  
    59  Currently, fusion is still in active development and a ton of work needs to be done, but we also provide the following content for these eager to do something with `gdcrm`. This section won't cover all the commands, for more information, please get more from the help of  command, e.g., `gdcrm help`.
    60  
    61  ```help
    62  USAGE:
    63     gdcrm [options] command [command options] [arguments...]
    64  
    65  COMMANDS:
    66     account           Manage accounts
    67     attach            Start an interactive JavaScript environment (connect to node)
    68     bug               opens a window to report a bug on the fsn repo
    69     console           Start an interactive JavaScript environment
    70     copydb            Create a local chain from a target chaindata folder
    71     dump              Dump a specific block from storage
    72     dumpconfig        Show configuration values
    73     export            Export blockchain into file
    74     export-preimages  Export the preimage database into an RLP stream
    75     import            Import a blockchain file
    76     import-preimages  Import the preimage database from an RLP stream
    77     init              Bootstrap and initialize a new genesis block
    78     js                Execute the specified JavaScript files
    79     license           Display license information
    80     monitor           Monitor and visualize node metrics
    81     removedb          Remove blockchain and state databases
    82     version           Print version numbers
    83     help, h           Shows a list of commands or help for one command
    84  
    85  ```
    86  
    87  This command will start gofsn in fast sync mode, causing it to download block data and connect to the FUSION network:
    88  
    89  ```bash
    90  gdcrm
    91  ```
    92  
    93  *Note: Do not perform cross-chain transfer, swap, deposit, and lock-in operations on the main network to avoid losing your tokens, such as: btc, eth.*
    94  
    95  ### Configuration
    96  
    97  As an alternative to passing the numerous flags to the `gdcrm` binary, you can also pass a configuration file via:
    98  
    99  ```bash
   100  gdcrm --config /path/to/your_config.toml
   101  ```
   102  
   103  ### JSON-RPC  API
   104  
   105  Go-DCRM has built-in support for a JSON-RPC based APIs ([standard APIs](https://github.com/FUSIONFoundation/go-dcrm/wiki/JSON-RPC)). These can be exposed via HTTP, WebSockets and IPC.The IPC interface is enabled by default and exposes all the APIs supported by go-fusion, the gofsn node doesn't start the http and weboscket service and not all functionality is provided over these interfaces due to security reasons. These can be turned on/off and configured with the --rpcapi and --wsapi arguments when the gofsn node is started.
   106  
   107  HTTP based JSON-RPC API options:
   108  
   109    * `--rpc` Enable the HTTP-RPC server
   110    * `--rpcaddr` HTTP-RPC server listening interface
   111    * `--rpcport` HTTP-RPC server listening port
   112    * `--rpcapi` API's offered over the HTTP-RPC interface
   113    * `--ws` Enable the WS-RPC server
   114    * `--wsaddr` WS-RPC server listening interface
   115    * `--wsport` WS-RPC server listening port
   116    * `--wsapi` API's offered over the WS-RPC interface
   117    * `--wsorigins` Origins from which to accept websockets requests
   118    * `--ipcdisable` Disable the IPC-RPC server
   119    * `--ipcapi` API's offered over the IPC-RPC interface
   120    * `--ipcpath` Filename for IPC socket/pipe within the datadir
   121  
   122  Developer need to use your own programming environments' capabilities (libraries, tools, etc) to connect via HTTP, WS or IPC to a go-fusion node configured with the above flags and you'll need to speak [JSON-RPC](http://www.jsonrpc.org/specification) on all transports. You can reuse the same connection for multiple requests!
   123  
   124  ## Testing
   125  
   126  Please read the [User-Test-Guide](https://github.com/FUSIONFoundation/dcrm-go/wiki/User-Test-Guide) on the wiki.
   127  
   128  ## Contribution
   129  
   130  Welcome anyone contribute to FUSION with [issues](https://github.com/FUSIONFoundation/dcrm-go/issues) and [PRs](https://github.com/FUSIONFoundation/dcrm-go/pulls). Filing issues for problems you encounter is a great way to contribute. Contributing bugfix is greatly appreciated.
   131  
   132  We recommend the following workflow:
   133  
   134  1. Create an issue for your work.
   135  2. Create a personal fork of the repository on GitHub.
   136  3. Commit your changes.
   137  4. Create a pull request (PR) against the upstream repository's master branch.
   138  
   139   If you wish to submit more complex changes though, please check up with the core devs first to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.
   140  
   141  ## License
   142  
   143  The dcrm-go project is licensed under the [GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html).