LoginSignup
0
0

More than 5 years have passed since last update.

Elements Alpha-Sidechain構築方法

Last updated at Posted at 2016-03-24

Alpha-sidechainの構築方法です。
起動する部分までの方法を記します。

環境
ubuntu14.04(vagrantでOSX10.11.3上に構築)

コンパイル

1) build-essentialパッケージをインストールします。

sudo apt-get install build-essential

2) ツールをインストールします。

sudo apt-get install libtool autotools-dev autoconf pkg-config

3) 依存関係にあるパッケージをインストールします

sudo apt-get install libssl-dev libboost-all-dev libdb4.8-dev libdb4.8++-dev

注意:libdb5.1ではなくlibdb4.8を使ってください。libdb5.1では動かない可能性があります。

Elements構築

1) gitでコードをインストールします。

git clone https://github.com/ElementsProject/elements && cd elements

2) mainchainブランチにcheckoutします。

git checkout mainchain

3) Bitcoinをコンパイルします

./autogen.sh && ./configure && make

4) 扱いやすくするために、bitcoind, bitcoin-cli, bitcoin-txコマンドを親ディレクトリに移動します。

mv src/bitcoin{d,-cli,-tx} ../

5) ブランチをalphaに変更して 2)~4)と同じ処理を行います。

git checkout alpha
./autogen.sh && ./configure && make
mv src/alpha{d,-cli,-tx} ../

Elements起動

bitcoindを起動します。このあたりはbitcoinと同じです。

./bitcoind -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -txindex -daemon

alphadを起動します。

./alphad -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -rpcconnect=127.0.0.1 -rpcconnect=127.0.0.1 -rpcconnectport=18332 -tracksidechain=all -txindex -blindtrust=true -daemon

API call 使い方

API callの呼び出し方です。apiコマンドについてはこちらを参考にしてください。

bitcoind

./bitcoin-cli -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -txindex <type command here>

alphad

./alpha-cli -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -rpcconnect=127.0.0.1 -rpcconnect=127.0.0.1 -rpcconnectport=18332 -tracksidechain=all -txindex -blindtrust=true <type command here>

以上です。次回はBitcoinとAlpha(Sidechain)間でのmoney(token)の移動について記します。

参考

Getting Started with the Alpha Sidechain

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0