Official golang implementation of the FUSION DCRM.
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 and Yellow Paper.
Note: go-dcrm is considered beta software. We make no warranties or guarantees of its security or stability.
FUSION DCRM client currently supports the following 64bits operating systems:
- Ubuntu 16.04 or higher(18.04 recommended)
- Debian 9
- Centos 7 and RHEL 7
- Fedora 25 or higher
- MacOS Darwin 10.12 or higher
The following building instructions are based on Ubuntu 18.04(64bits), for more prerequisites and detailed build instructions please read the Installation Instructions on the wiki.
- Go version 1.9 or higher
Ensure Go with the supported version is installed properly:
go version
Ensure $GOPATH
set to your work directory:
go env GOROOT GOPATH
git clone https://github.com/FUSIONFoundation/dcrm-go.git $GOPATH/src/github.com/dcrm-go
Once the dependencies are installed, run:
make gdcrm
When successfully building the project, the gdcrm
binary should be present in build/bin
directory.
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
.
USAGE:
gdcrm [options] command [command options] [arguments...]
COMMANDS:
account Manage accounts
attach Start an interactive JavaScript environment (connect to node)
bug opens a window to report a bug on the fsn repo
console Start an interactive JavaScript environment
copydb Create a local chain from a target chaindata folder
dump Dump a specific block from storage
dumpconfig Show configuration values
export Export blockchain into file
export-preimages Export the preimage database into an RLP stream
import Import a blockchain file
import-preimages Import the preimage database from an RLP stream
init Bootstrap and initialize a new genesis block
js Execute the specified JavaScript files
license Display license information
monitor Monitor and visualize node metrics
removedb Remove blockchain and state databases
version Print version numbers
help, h Shows a list of commands or help for one command
This command will start gofsn in fast sync mode, causing it to download block data and connect to the FUSION network:
gdcrm
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.
As an alternative to passing the numerous flags to the gdcrm
binary, you can also pass a configuration file via:
gdcrm --config /path/to/your_config.toml
Go-DCRM has built-in support for a JSON-RPC based APIs (standard APIs). 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.
HTTP based JSON-RPC API options:
--rpc
Enable the HTTP-RPC server--rpcaddr
HTTP-RPC server listening interface--rpcport
HTTP-RPC server listening port--rpcapi
API's offered over the HTTP-RPC interface--ws
Enable the WS-RPC server--wsaddr
WS-RPC server listening interface--wsport
WS-RPC server listening port--wsapi
API's offered over the WS-RPC interface--wsorigins
Origins from which to accept websockets requests--ipcdisable
Disable the IPC-RPC server--ipcapi
API's offered over the IPC-RPC interface--ipcpath
Filename for IPC socket/pipe within the datadir
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 on all transports. You can reuse the same connection for multiple requests!
Please read the User-Test-Guide on the wiki.
Welcome anyone contribute to FUSION with issues and PRs. Filing issues for problems you encounter is a great way to contribute. Contributing bugfix is greatly appreciated.
We recommend the following workflow:
- Create an issue for your work.
- Create a personal fork of the repository on GitHub.
- Commit your changes.
- Create a pull request (PR) against the upstream repository's master branch.
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.
The dcrm-go project is licensed under the GNU Lesser General Public License v3.0.