Official golang implementation of the EtherArk protocol.
Building geth requires both a Go (version 1.9 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run
make
By far the most common scenario is people wanting to simply interact with the etherark network: create accounts; transfer funds; deploy and interact with contracts. For this particular use-case the user doesn't care about years-old historical data, so we can fast-sync quickly to the current state of the network. To do so:
$ ./build/bin/geth console
This command will:
- Start geth in fast sync mode (default, can be changed with the
--syncmode
flag), causing it to download more data in exchange for avoiding processing the entire history of the etherark network, which is very CPU intensive. - Start up Geth's built-in interactive [JavaScript console]
This tool is optional and if you leave it out you can always attach to an already running Geth instance
with
geth attach
.
As an alternative to passing the numerous flags to the geth
binary, you can also pass a configuration file via:
$ geth --config /path/to/your_config.toml
To get an idea how the file should look like you can use the dumpconfig
subcommand to export your existing configuration:
$ geth --your-favourite-flags dumpconfig
HTTP based JSON-RPC API options:
--rpc
Enable the HTTP-RPC server--rpcaddr
HTTP-RPC server listening interface (default: "localhost")--rpcport
HTTP-RPC server listening port (default: 8545)--rpcapi
API's offered over the HTTP-RPC interface (default: "eth,net,web3")--rpccorsdomain
Comma separated list of domains from which to accept cross origin requests (browser enforced)--ws
Enable the WS-RPC server--wsaddr
WS-RPC server listening interface (default: "localhost")--wsport
WS-RPC server listening port (default: 8546)--wsapi
API's offered over the WS-RPC interface (default: "eth,net,web3")--wsorigins
Origins from which to accept websockets requests--ipcdisable
Disable the IPC-RPC server--ipcapi
API's offered over the IPC-RPC interface (default: "admin,debug,eth,miner,net,personal,shh,txpool,web3")--ipcpath
Filename for IPC socket/pipe within the datadir (explicit paths escape it)
You'll need to use your own programming environments' capabilities (libraries, tools, etc) to connect via HTTP, WS or IPC to a Geth 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!
With the bootnode operational and externally reachable (you can try telnet <ip> <port>
to ensure
it's indeed reachable), start every subsequent Geth node pointed to the bootnode for peer discovery
via the --bootnodes
flag. It will probably also be desirable to keep the data directory of your
private network separated, so do also specify a custom --datadir
flag.
$ geth --datadir=path/to/custom/data/folder --bootnodes=<bootnode-enode-url-from-above>