ElementsProject / ElementsProject/rust-elements

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

Đang mở
#260 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
57
Fork
40
Merge trung bình
11 giờ 58 phút
Pull request đã merge (30 ngày)
1

Mô tả

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`.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.