-
Notifications
You must be signed in to change notification settings - Fork 4
Using Ethereum CLI Client
Ethereum (++) is the C++ proof-of-concept Ethereum command-line client. There is also a proof-of-concept Ethereum Qt-based client; you might want to see Using-AlethZero.
Ethereum (++) can be executed by typing eth
. It has several command-line switches to customise its behaviour, but in general it will attempt to connect to another peer or seed-node (they're the same thing, really), then become a functioning node in the network, collect transactions, blocks and peers and mining new blocks.
eth [OPTIONS] <remote-host>
Options:
-a,--address <addr> Set the coinbase (mining payout) address to addr (default: auto).
-c,--client-name <name> Add a name to your client's version string (default: blank).
-d,--db-path <path> Load database from path (default: ~/.ethereum
<APPDATA>/Etherum or Library/Application Support/Ethereum).
-h,--help Show this help message and exit.
-i,--interactive Enter interactive mode (default: non-interactive).
-l,--listen <port> Listen on the given port for incoming connected (default: 30303).
-m,--mining <on/off/number> Enable mining, optionally for a specified number of blocks (Default: off)
-n,--upnp <on/off> Use upnp for NAT (default: on).
-o,--mode <full/peer> Start a full node or a peer node (Default: full).
-p,--port <port> Connect to remote port (default: 30303).
-r,--remote <host> Connect to remote host (default: none).
-s,--secret <secretkeyhex> Set the secret key for use with send command (default: auto).
-u,--public-ip <ip> Force public ip to given (default; auto).
-v,--verbosity <0 - 9> Set the log verbosity from 0 to 9 (Default: 8).
-x,--peers <number> Attempt to connect to given number of peers (Default: 5).
-V,--version Show the version and exit.
Note that
/path/to/eth -m off -o peer -u 65.78.90.42 -x 256
This starts the node as a peer-server with internet-visible IP 65.78.90.42, able to accept up to 256 peers and share connection information between them. As more than 256 peers get connected, the older peers (that have had a chance to gather peer information of their own) will get disconnected to make way for the newer crowd.
/path/to/eth -u 192.168.0.5 -p 30301 192.168.0.10
This starts a full node on the local client (whose IP is 192.168.0.5) and attempts to connect the LAN peer 192.168.0.10 on port 30301.
cd /tmp
mkdir client1
/path/to/eth -d client1 -u 127.0.0.1 -l 30303 &
mkdir client2
/path/to/eth -d client2 -u 127.0.0.1 -l 30300 -p 30303 127.0.0.1
This creates two full clients on the same host, possible because the databases are stored in different paths, and connects them together. One listens on the local host on port 30303, and the other on 30300.
- Building on Linux
- Building on MacOS
- Building on Windows
- Compatibility Info and Build Tips
- Serpent LLL Only Build
- LLL PoC 6
- [LLL Examples for PoC 6](LLL Examples for PoC 5)
- PoC 6 JS API
- Client Development with PoC 6
- MetaCoin API
- Exchange API
- Name Registration API
- Coins API