background preloader

Getting started with Ethereum C++

Facebook Twitter

Ethereum C++ [W] Building Ethereum C++ on Ubuntu [W] Below are the build instructions for the latest versions of Ubuntu.

Building Ethereum C++ on Ubuntu [W]

The best supported platform as of December 2014 is Ubuntu 14.04, 64 bit, with at least 2 GB RAM. All our tests are done with this version. Community contributions for other versions are welcome! Building for Ubuntu 14.04, 64 bit Install dependencies Before you can build the source, you need several tools and dependencies for the application to get started. First, update your repositories. Sudo apt-get -y update sudo apt-get -y install language-pack-en-base sudo dpkg-reconfigure locales sudo apt-get -y install software-properties-common wget -O - | sudo apt-key add - sudo add-apt-repository "deb llvm-toolchain-trusty-3.5-binaries main" sudo add-apt-repository -y ppa:ethereum/ethereum-qt sudo add-apt-repository -y ppa:ethereum/ethereum sudo add-apt-repository -y ppa:ethereum/ethereum-dev sudo apt-get -y update sudo apt-get -y upgrade Choose your source First grab/unpack the sources. Build mkdir build cd build cmake .. Using the Ethereum C++ command line interface [W]

Ethereum (++) is the C++ proof-of-concept Ethereum command-line client.

Using the Ethereum C++ command line interface [W]

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.

Usage eth [OPTIONS] <remote-host> Options: -a,--address <addr> Set the coinbase (mining payout) address to addr (default: auto). Note that Starting a Peer Server /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. Server configuration [W] Local test net [W] Setting up a local test network in Ethereum is easy.

Local test net [W]

For this you'll need at least two computers on the same network, both the Ethereum software built. You'll need to know their IP addresses. You can find these by running ifconfig in a terminal and checking the output. Firstly we'll set up a command-line client; in a terminal on one machine. We'll assume for the present that this machine has the IP address 192.168.0.10: cd /path/to/cpp-ethereum-build/eth . This will create an Ethereum node with the database in the /tmp path and listening for connections on port 30300. Now we want to connect to that with the second machine (let's suppose it's at address 192.168.0.11).

Using the AlethZero Ethereum C++ graphical client [W] AlethZero is the C++/Qt proof-of-concept Ethereum graphical client.

Using the AlethZero Ethereum C++ graphical client [W]

It can be used to connect the global Ethereum test network (by simply running it and clicking 'Connect', followed by 'OK'), but can also be used to connect to a local test network. AlethZero has seven panes; Transact (Top left): For making transactionsOwned Accounts (Middle left): List of your Ethereum addressesLog (Bottom): Displays details about the activity of your clientBlocks & Transactions (Middle): List of all blocks on the network. If they contain transactions, these will be listed below the block#All Accounts (Top right): List of all known accounts that contain 'ether' on the networkNetwork (Middle right): Shows a list of all the nodes you are connected toPending (Bottom right): All the transactions on the network that have not been included in a block The statusbar at the bottom of AlethZero shows your total account balance, number of peers and some information about the block chain size and difficulty.

Mining.