Official golang implementation of the CrowdCompute engine
Clone the repository to your desired destination:
$ git clone https://github.com/crowdcompute/crowdengine
Build the gocc binary:
$ cd crowdengine
$ make build
You can now run the gocc binary in build/bin/gocc
Requirements: docker
gocc can be supplied with command-line flags. Here is a list of some important flags:
--datadirData directory to storegoccdata--addrP2P listening interface--portP2P listening port--maxpeersMaximum number of peers to connect--rpcEnable the RPC interface--rpcservicesList of rpc services allowed--rpcwhitelistAllow IP addresses to access the RPC servers--socketEnable IPC-RPC interface--socketpathPath of the socker/pipe file--httpEnable the HTTP-RPC server--httpportHTTP-RPC server listening port--httpaddrHTTP-RPC server listening interface--httporiginHTTP-RPC cross-origin value--wsEnable the WS-RPC server--wsportWS-RPC server listening port--wsaddrWS-RPC server listening interface--wsoriginWS-RPC cross-origin value
You can pass a toml configuration file to the binary instead of specifying each flag with the following command:
$ gocc --config /path/to/your_config.toml
CrowdEngine provides a Plain-text JSON RPC request–response protocol which can be used by decentralized applications(DApps) or clients to interact with a node. Requests and responses are formatted in JSON and transferred over HTTP, Websockets and IPC.
CrowdEngine exposes an HTTP server which accepts JSONRPC requests. The following flags can be used to enable the JSONRPC2.0 HTTP interface:
$ gocc --rpc --http --httpport <portnumber> --httpaddr 0.0.0.0 --httporigin "*"
CrowdEngine exposes a Websocket server which accepts JSONRPC requests. The following flags can be used to enable the JSONRPC2.0 Websocket interface:
$ gocc --rpc --ws --wsport <portnumber> --wsaddr 0.0.0.0 --wsorigin "*"
System programs can interact with gocc by writing/reading to a given socket/pipe file, which is created by default within the data directory. To enable socket/pipe use the following command
$ gocc --rpc --socket --socketpath /where/to/save/gocc.ipc
