ElementsProject / ElementsProject/rust-elements

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

未關閉
#260 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

該 issue 提到了 rust-elements,但沒有指定檔案或測試。首先定位交易 weight 與序列化的進入點,以及現有的 Simplicity 成本處理;然後確定 padding 的依據和所需的涵蓋範圍。完成的標準是實作一個經過測試的標準化機制,用於將交易 padding 到所需的 weight。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust
領域
blockchain
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。