作为矿工(miner) 在挖矿获取 FIL 的 过程中,除了计算服务器、存储系统、网络、机房、人力等成本外,FIL 本身也是一种成本。
那么单纯在挖矿活动中 FIL 的支出有哪些呢?
1. Sector 开销
质押
PreCommitSector
ProveCommitSector
WindowedPoSt:每次 WindowedPoSt 也需要费用
2. 罚金
PreCommit Expiry Penalty: Occurs if a Miner fails to ProveCommit a PreCommitted Sector in time. This happens the first time that a miner declares that it proves a sector and falls into the PoRep consensus.
当 Miner 未及时 ProveCommit 一个已经 PreCommitted Sector。这种情况往往发生在
Undeclared Fault Penalty: Occurs if a Miner fails to submit a PoSt for a Sector on time. Depending on whether the “Skipped Fault” option is implemented, this penalty applies to either a sector or a whole partition.
Declared Fault Penalty: Occurs if a Miner fails to submit a PoSt for a Sector on time, but they declare the Sector faulty before the system finds out (in which case the fault falls in the “Undeclared Fault Penalty” above). This penalty fee should be lower than the undeclared fault penalty, in order to incentivize Miners to declare faults early.
从代码和日志看并未实施,唯一做这块的逻辑在wdpost_run.go中runPost()函数,下面的注释大概解释了为什么没有实施
// check faults / recoveries for the *next* deadline. It's already too
// late to declare them for this deadline
Ongoing Fault Penalty: Occurs every Proving Period a Miner fails to submit a PoSt for a Sector.
证明周期中 Miner 提交 Sector 的时空证明(PoSt)失败,例如 WindowedPoSt。
Termination Penalty: 在 Sector 租期结束之前销毁 Sector。
Consensus Fault Penalty: Occurs if a Miner commits a consensus fault and is reported.
注意最后一种是共识错误,这种情况会先在本地进行检查,如果发现就不会广播到主链上,就不会造成惩罚,但是本次出块无效了。
3. 研发
由于 Filecoin 的测试网络并不完善,程序也在不断改进中,所以当官方更新代码,或者我们调优的过程中需要做 很测试,例如:
调度优化
WindowedPoSt 效率,修正尝试
WinningPoSt 出块研究
4. 更新与切换
如果官方做了一些无法向后兼容的更新,或者其他原因导致需要重启 Miner,需要停止当前的封存任务。则会导致当前的调度必须要暂停,暂停生产本身就是一种浪费,还需要考虑那些已经做了抵押,但是无法继续封存的 Sector 费用。
5. 手续费
Filecoin 网络上的每个活动都是一种业务,每个业务,例如质押、转账等等,都需要手续费,单笔看似少,但量大了,也是一笔不小的开销。
6. 环境变化
不可抗力
lotus 程序有很多复杂的依赖条件:高性能的服务器、网络。稳定的区块链网络、相对平缓的 gas 费用等。环境的变化会导致 FIL 消耗风险。例如:
服务器不稳定或故障,更换 miner 导致的sectors 损失;
base Fee 提高
那么单纯在挖矿活动中 FIL 的支出有哪些呢?
1. Sector 开销
质押
PreCommitSector
ProveCommitSector
WindowedPoSt:每次 WindowedPoSt 也需要费用
2. 罚金
PreCommit Expiry Penalty: Occurs if a Miner fails to ProveCommit a PreCommitted Sector in time. This happens the first time that a miner declares that it proves a sector and falls into the PoRep consensus.
当 Miner 未及时 ProveCommit 一个已经 PreCommitted Sector。这种情况往往发生在
Undeclared Fault Penalty: Occurs if a Miner fails to submit a PoSt for a Sector on time. Depending on whether the “Skipped Fault” option is implemented, this penalty applies to either a sector or a whole partition.
Declared Fault Penalty: Occurs if a Miner fails to submit a PoSt for a Sector on time, but they declare the Sector faulty before the system finds out (in which case the fault falls in the “Undeclared Fault Penalty” above). This penalty fee should be lower than the undeclared fault penalty, in order to incentivize Miners to declare faults early.
从代码和日志看并未实施,唯一做这块的逻辑在wdpost_run.go中runPost()函数,下面的注释大概解释了为什么没有实施
// check faults / recoveries for the *next* deadline. It's already too
// late to declare them for this deadline
Ongoing Fault Penalty: Occurs every Proving Period a Miner fails to submit a PoSt for a Sector.
证明周期中 Miner 提交 Sector 的时空证明(PoSt)失败,例如 WindowedPoSt。
Termination Penalty: 在 Sector 租期结束之前销毁 Sector。
Consensus Fault Penalty: Occurs if a Miner commits a consensus fault and is reported.
注意最后一种是共识错误,这种情况会先在本地进行检查,如果发现就不会广播到主链上,就不会造成惩罚,但是本次出块无效了。
3. 研发
由于 Filecoin 的测试网络并不完善,程序也在不断改进中,所以当官方更新代码,或者我们调优的过程中需要做 很测试,例如:
调度优化
WindowedPoSt 效率,修正尝试
WinningPoSt 出块研究
4. 更新与切换
如果官方做了一些无法向后兼容的更新,或者其他原因导致需要重启 Miner,需要停止当前的封存任务。则会导致当前的调度必须要暂停,暂停生产本身就是一种浪费,还需要考虑那些已经做了抵押,但是无法继续封存的 Sector 费用。
5. 手续费
Filecoin 网络上的每个活动都是一种业务,每个业务,例如质押、转账等等,都需要手续费,单笔看似少,但量大了,也是一笔不小的开销。
6. 环境变化
不可抗力
lotus 程序有很多复杂的依赖条件:高性能的服务器、网络。稳定的区块链网络、相对平缓的 gas 费用等。环境的变化会导致 FIL 消耗风险。例如:
服务器不稳定或故障,更换 miner 导致的sectors 损失;
base Fee 提高