Filecoin系列 - 首个实现版本Go-fileoin

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系列

Guess you like

Origin blog.csdn.net/wcc19840827/article/details/117757466