Go-fileoin
Filecoin的首個實作版本go-fileoin于2019年2月15號上線,
現在改名為 venus , 由 Filecoin 社區維護
2019年12月15日,Fileoin的第二個實作版本lotus測驗網上線.
- Go-filecoin使用的扇區存盤模塊存盤有關扇區的元資料,并在鍵值資料存盤區中進行交易,與扇區本身分開
- 測驗網中的經濟模型引數是臨時的
- 不支持要求把已經存盤的資料洗掉, 除非到達資料過期時間
- 當某個扇區中的所有交易都已到期并且已達到其宣告的生命周期的終點時,該扇區可能會終止,并且存盤區將用于密封新扇區,
- 密封(挖礦)程序目前不支持ASIC, Mainnet之后,PoRep和共識演算法可能會發生變化和發展. 可用GPU加速
- 當網路上沒有存盤需求時,礦工可以選擇證明“承諾容量扇區,這些扇區隨后可以升級為具有實際交易的扇區以賺取交易付款(無鎖定), 對于沒有存盤需求的礦工來說,密封承諾的扇區比自行交易更合理
- 當前的構造在某些階段確實涉及SHA哈希,因此具有SHA擴展的CPU將在這些階段中受益,
- 在 AMD 處理器上看到此優勢的主要原因是由于它們執行 SHA 硬體指令
編譯環境
- requires Go >= v1.13
- requires Rust >= v1.31
- OpenCL
Deps OpenCL
sudo apt install clinfo
sudo apt install ocl-icd-libopencl1
sudo apt install opencl-headers
sudo apt install ocl-icd-opencl-dev
sudo apt install lsb-core
編譯專案
mkdir -p /path/to/filecoin-project
git clone https://github.com/filecoin-project/go-filecoin.git /path/to/filecoin-project/go-filecoin
git submodule update --init --recursive
# Initialize build dependencies.
make deps
#or 國內下載慢可以使用這面的
FILECOIN_USE_PRECOMPILED_RUST_PROOFS=true go run ./build/*.go deps
Build and run tests
# First, build the binary
make
# Then, run the unit tests.
go run ./build test
開始運行 go-fileoin 的服務連接測驗網
# Remove any existing symlink to a repo directory
rm ~/.filecoin
# Initialize a new repository, downloading a genesis file and setting network parameters (in this case, for the Testnet network)
./go-filecoin init --genesisfile=https://ipfs.io/ipfs/QmXZQeezX1x8uRQX9EUaYxnyivUpTfJqQTvszk3c8SnFPN/testnet.car --network=testnet
# Start the daemon. It will block until it connects to at least one bootstrap peer.
./go-filecoin daemon
# Print the node's connection information
./go-filecoin id
# Show chain sync status
./go-filecoin chain status
向測驗網獲得測驗token - FIL
檢索您的錢包??地址:
./go-filecoin address ls
水龍頭將提供訊息CID,如果thr鏈已經與網路同步,則此訊息應在大約30秒內處理,可以運行以下命令以等待確認:
./go-filecoin message wait ${MESSAGE_CID}
通過檢查錢包余額來驗證FIL是否已進入錢包:
./go-filecoin wallet balance ${WALLET_ADDR}
本地網
localnet readme
-
往期精彩回顧:
- 區塊鏈知識系列
- 密碼學系列
- 零知識證明系列
- 共識系列
- 公鏈調研系列
- 位元幣系列
- 以太坊系列
- EOS系列
- 聯盟鏈系列
- Fabric系列
- 智能合約系列
- Token系列
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/286825.html
標籤:區塊鏈
