lotus環境搭建(一)


一.根據官方文檔,參與測試網需要的配置要求為

1.8核16線程的cpu

2.16G內存,512G SSD

3.2T機械硬盤

4.GPU顯卡N卡1060,6G

二.安裝ubuntu操作系統(目前暫不支持windows)

可以到ubuntu官方去下載安裝,下載鏈接:https://ubuntu.com/download/desktopUbuntu

三.安裝好系統后配置環境(本教程以ubuntu系統為例)

1安裝以下相關組件

2右鍵打開一個終端命令行,依次輸入以下命令


sudo add-apt-repository ppa:longsleep/golang-backports

sudo apt update

sudo apt install golang-go gcc git bzr jq pkg-configmesa-opencl-icd ocl-icd-opencl-dev

sudo apt installllvm

sudo apt installclang

curlhttps://sh.rustup.rs-sSf | sh

四.安裝Fliecoin-Lotus

1.下載源碼

git clone https://github.com/filecoin-project/lotus.git

2.進入lotus目錄下


cd lotus

3.編譯源碼

make clean && make all
sudo make install

注意: 這塊編譯可能會出錯,cargo -v 查看是否安裝cargo和rustc,如果安裝,則配置環境變量,並使其生效。

source ~/.profile  
source /etc/profile

另外需要開啟gomod,否則會下載go依賴失敗:

export GO111MODULE=on
export GOPROXY=https://goproxy.cn

五.開始運行Filecoin測試網節點

1.啟動運行同步區塊命令

  lotus daemon

2.剛運行的終端不要關閉,接下來,打開一個新的終端界面,用來查看節點狀態

lotus net peers | wc -l (檢查區塊鏈節點連接數量)

lotus sync wait (檢查區塊鏈同步高度)

lotus wallet new bls  (創建錢包地址)

lotus wallet balance [optionaladdress]  (查看錢包余額)

六.初始化礦工

1.打開官方指定地址https://faucet.testnet.filecoin.io/,領取測試FIL代幣,並且創建一個礦工

2.點擊Create Miner

3.輸入完成后,再點擊點擊 Create Miner。不要關閉此窗口

4.進入到終端命令行,初始化礦工

lotus-storage-miner init --actor=t0xx

--owner=t3wxxxxxxxxk6phtoc(輸入你剛生成的挖礦信息)

七.開始挖礦

1. lotus-storage-miner run   (開始挖礦)

2. lotus-storage-miner pledge-sector (密封隨機數提交時空證明)

八.檢查挖礦狀態

根據礦工ID 查詢礦工功率和扇區使用情況:

1.查看全網有效存儲

lotus-storage-miner state power

2.查看當前礦工有效存儲

lotus-storage-miner state power ‘minerid’

3.查看當前礦工密封扇區

lotus-storage-miner state sectors ‘minerid’

Filecoin官方瀏覽器上查看當前礦工狀態,鏈接 https://stats.testnet.filecoin.io

相關鏈接

Filecoin-Lotus測試網教程
Lotus 低配置運行

----------------------------------【喜歡打賞】-------------------------------------------

小主,辛苦啦!文章棒棒噠,賞杯咖啡吧...
打賞

----------------------------------【喜歡打賞】-------------------------------------------


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM