0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

気がついたら間違えてBitcoin Coreをダウンロードしていた件について

Last updated at Posted at 2024-01-28

趣旨

Ordiswap APIを利用しようとドキュメントもきちんと読まずに適当に書いてあるコマンド打ってエラーの解決方法探していたら、いつの間にかBitcoin Coreをダウンロードしてブロックチェーンのシンクロが始まっていました(笑)

せっかくなので備忘録としてここに記録しておきます。

ARM系のRaspberry Piを利用しました。

このコマンドでARM系だと判明したので、ファイル名がARM用になっています。

uname -m

実行したコマンド

まずはシステムのアップデートとアップグレードを行います

sudo apt update && sudo apt upgrade

必要なライブラリをインストールします。

sudo apt install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils

現時点(2024年1月)で最新版のBitcoin Coreをダウンロードします。

wget https://bitcoincore.org/bin/bitcoin-core-26.0/bitcoin-26.0-arm-linux-gnueabihf.tar.gz

ダウンロードした圧縮ファイルを解凍します。

tar -xzf bitcoin-26.0-arm-linux-gnueabihf.tar.gz

コンパイルしてインストールします。

cd bitcoin-26.0
cd bin
./bitcoind
make
sudo make install

あとは自動でビットコインのブロックチェーンの同期が始まります。

2024年1月時点でビットコインのブロックチェーンのサイズは618GBなので、SSDなしのラズパイ程度では到底同期すらできません。

私は即中断しました。

他のノードと接続できてるか気になる場合は以下のWebサイトで確認できます。
https://bitnodes.io/

テストネットでもう一度トライ

ディレクトリを削除してもう一度解凍します。

テストネット版でBitcoin Coreを起動します。

cd bitcoin-26.0
cd bin
./bitcoind -testnet

Configファイルを編集します。

cd ~/.bitcoin/
nano bitcoin.conf

中に以下の内容を書き込みます。

testnet=1
rpcuser=****
rpcpassword=****

リスタートします。

cd ..
cd bitcoin-26.0
cd bin
./bitcoind -testnet

動くか確認します。

./bitcoin-cli -testnet -rpcuser=**** -rpcpassword=**** getinfo

テストネットでもブロックチェーンのサイズは30GBほどあって私の低スペックなラズパイと低容量のSDカードでは動かせませんでした。
今度別のデバイスと容量のでかいSDカードで試してみます。

0
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?