ElementsProject / ElementsProject/rust-elements

Add a way to pad transactions' size if needed by Simplicity cost metric

未关闭
#260 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
57
派生
40
平均合并
11 小时 58 分钟
30 天内合并 PR
1

描述

Simplicity transactions have an additional "cost" associated with the computational resources consumed by verification of the results of executing the contract.

This cost is paid for by ensuring that the transaction has a sufficiently high weight (using conventional weight calculations) to cause the associated fee to be adequate according to the cost formula. Currently, most typical Simplicity programs inherently produce large enough transactions to satisfy this requirement, so there hasn't been a need to artificially increase the size of their transactions in order to get them accepted by Liquid nodes. However, this might not always be the case for more computationally-intensive contracts in the future, e.g. those that use loops or that call expensive jets repeatedly for some reason.

So, we could use a standardized way to pad transactions to make them deliberately larger when this turns out to be required by the cost formula.

@apoelstra suggested that the appropriate place to specify and implement the basis for this is here in `rust-elements`.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。