Ethereum: Difference between revisions
Created page with "Ethereum is a crypto platform for running smart contracts and exchanging Ether. == Go-Ethereum (geth) == The Ethereum client written in Go. === Setup === On a Fedora 22 mac..." |
|||
| Line 31: | Line 31: | ||
# Install QT5.5 from the official website using their binary blob installer. The official repository does not have QT5 webengine. Neither does the official source. | # Install QT5.5 from the official website using their binary blob installer. The official repository does not have QT5 webengine. Neither does the official source. | ||
# Compile ethereum using the dependencies installed above. | # Compile ethereum using the dependencies installed above. | ||
Some dependencies: | |||
yum -y install libffi-devel cryptopp cryptopp-devel argtable argtable-devel libmicrohttpd libmicrohttpd-devel cmake jsoncpp-devel jsoncpp gmp-devel leveldb-devel leveldb-devel pocl hwloc-libs | |||
==== Build LLVM 3.8 ==== | ==== Build LLVM 3.8 ==== | ||
Revision as of 07:06, 26 August 2015
Ethereum is a crypto platform for running smart contracts and exchanging Ether.
Go-Ethereum (geth)
The Ethereum client written in Go.
Setup
On a Fedora 22 machine, download and install the go client from golang's website. Compile the most recent version of go-ethereum using the official client and then run geth.
The Fedora 22 version of go will not work.
Usage
Get Balance
web3.fromWei(eth.getBalance(eth.coinbase), "ether")
Get my address
eth.coinbase
or
eth.accounts[0]
Start CPU Mining
miner.setEtherbase(eth.accounts[0]) miner.start()
CPP-Ethereum (eth)
The official C++ version of the Ethereum client.
Setup Overview
On a Fedora 22 machine, you will need to:
- Download and compile the most recent version of LLVM. The packaged version of LLVM available from the official repositories is only version 3.7.
- Git clone v0.4.1 branch of the libjson-rpc-cpp code base. Versions higher may not compile. The most recent version fails due to dependency issues. Install to /usr or /opt/
- Install QT5.5 from the official website using their binary blob installer. The official repository does not have QT5 webengine. Neither does the official source.
- Compile ethereum using the dependencies installed above.
Some dependencies:
yum -y install libffi-devel cryptopp cryptopp-devel argtable argtable-devel libmicrohttpd libmicrohttpd-devel cmake jsoncpp-devel jsoncpp gmp-devel leveldb-devel leveldb-devel pocl hwloc-libs
Build LLVM 3.8
git clone http://llvm.org/git/llvm.git cd llvm mkdir build ; cd build ../configure --prefix=/opt/llvm --enable-libffi make -j 8 make install
Build libjson-rpc-cpp
git clone https://github.com/cinemast/libjson-rpc-cpp cd libjson-rpc-cpp git checkout tags/v0.4.1 mkdir -p build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr .. make sudo make install sudo ldconfig
Build Ethereum
You may want to make a symlink for llvm/include/llvm-c and llvm/include/llvm in /usr so that the cmake files can find it. Defining LLVM_DIR is not sufficient.
git clone ethereum-cpp cd ethereum-cpp mkdir build cd build LLVM_DIR=/opt/llvm/include CMAKE_PREFIX_PATH=/opt/llvm/include:/opt/Qt5.5.0/Tools:/opt/Qt5.5.0/5.5/gcc_64/ cmake -DCMAKE_INSTALL_PREFIX=/opt/ethereum ..