UPLC-CAPE: ScriptContextBuilder: build TxInfo in the ledger's order
@Unisay đang làm issue này rồi.
Từ ngày 4/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Cape.ScriptContextBuilder prepends with List.cons in AddInputUTXO, AddOutputUTXO, AddOutputUTXOWithDatum and AddSignature, so inputs, outputs and signatories come out in reverse patch order, and inputs and signatories are neither sorted nor deduplicated. RemoveOutputUTXO indexes into the reversed list. The baseline leaves txInfoRedeemers empty, although the ledger always includes the redeemer of the running script.
The ledger builds a V3 TxInfo in toPlutusTxInfo (cardano-ledger-conway 1.22.1.0, which node 11.0.1 ships together with plutus-ledger-api 1.63). The order for the fields the builder fills today and for the ones #228 adds:
txInfoInputsandtxInfoReferenceInputs: ascending byTxOutRef(transaction id, then index), from aSet TxIn. Since protocol version 11 the two sets must be disjoint.txInfoOutputs: the order of the transaction body, so the list index is the output index.txInfoSignatories: ascending, without duplicates.txInfoMint: ascending by policy, then by token name, with no ada entry.txInfoWdrl: script credentials first, then key hashes, each group ascending by hash. The ledger'sCredentiallistsScriptHashObjfirst, while the PlutusCredentiallistsPubKeyCredentialfirst.txInfoRedeemers: by purpose in the order spending, minting, certifying, rewarding, voting, proposing (ConwayPlutusPurpose), then by index. This also differs from the constructor order of the PlutusScriptPurpose.
Current fixtures depend on the reversed order. Each linear_vesting partial-unlock test adds a continuing output on top of the baseline's 900-token output, and the validator reads the first output at the script address, which is the added one only because cons put it at index 0. In patch order 3 measurements and 6 checks change outcome, so the fixtures have to change together with the builder. In two_party_escrow, deposit_with_incorrect_amount puts the bad script output first today and the valid one first after the change, and the two *_with_multiple_inputs measurements move the own input from index 0 to index 1, which changes the budget of any submission that finds its own input by TxOutRef. The CIP-113 scenario (#228) cannot work without the ledger order: its validators take positions in reference inputs, withdrawals and outputs from redeemer fields (params_idx, wdrl_idx, registry_node_idx and outputs_start_idx in the reference implementation), so a context in any other order describes a transaction that cannot exist on chain.
- Ngôn ngữ chính
- Untyped Plutus Core
- Star
- 12
- Fork
- 10
- Merge trung bình
- 2 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của IntersectMBO/UPLC-CAPE
-
UPLC-CAPE: Network profiles measure and report submissions per networkCó thể đã có người làm @Unisay đã nhận 9 ngày trước. Đang mởUPLC-CAPE
IntersectMBO/UPLC-CAPE#281 · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
IntersectMBO/UPLC-CAPE#279 ·
-
UPLC-CAPE: ScriptContextBuilder: placeholder values the ledger never producesCó thể làm lại được @Unisay đã nhận 30 ngày trước và không có pull request nào đang mở. Đang mởUPLC-CAPE
IntersectMBO/UPLC-CAPE#273 · 1 người được giao ·
-
Add a programmable-tokens (CIP-113) benchmark scenarioCó thể làm lại được @Unisay đã nhận 152 ngày trước và không có pull request nào đang mở. Đang mởUPLC-CAPE
IntersectMBO/UPLC-CAPE#228 · 1 người được giao ·
-
Add synthetic benchmark scenarios for common Value operationsCó thể làm lại được @Unisay đã nhận 152 ngày trước và không có pull request nào đang mở. Đang mởUPLC-CAPE
IntersectMBO/UPLC-CAPE#227 · 1 người được giao ·