Weight是区块计费的新指标
Weight的出现来源于隔离见证,以前区块链的计费源于Size,即区块大小。
公式
对于非隔离见证交易区块有1M的约束,则:
也符合上述不等式。
例子
https://btc.com/000000000000000000109439938c398e8f858c1287c60a872ea05a2ebd002ebd
已知:
Size 324,406 Bytes
Stripped Size 324,370 Bytes
Weight 1,297,516
为什么这样设计Weight
Rationale of using a single composite constraint,instead of two separate limits such as 1MB base data and 3MB witness data:
Using two separate limits would make mining and fee estimation nearly impossible. miners would need to solve a complex non-linear optimization problem to find the set of transactions that maximize fees given both constraints,and wallets would not be able to kNow what to pay as it depends on which of the two conditions is most constrained by the time miners try to produce blocks with their transactions in. Another problem with such an approach is freeloading. Once a set of transactions hit the base data 1MB constraint,up to 3MB extra data Could be added to the witness by just minimally increasing the fee. The marginal cost for extra witness space effectively becomes zero in that case.
更多
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。