UPLC-CAPE: ScriptContextBuilder: placeholder values the ledger never produces

Aperta
#273 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Unisay ci sta già lavorando.

Dal 4/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

UPLC-CAPE

Besides the order problems in #271, the test contexts carry values that no ledger-built context has:

  • The baseline sets txInfoFee to 0. Every transaction pays a positive fee; the mainnet minimum is 155,381 lovelace plus 44 per byte.
  • The key hashes in the htlc, linear_vesting and two_party_escrow fixtures and specs have 32 bytes, and the script hash placeholder 111…1 has 58 hex digits, so 29 bytes. Ledger key and script hashes have 28 bytes.
  • add_input_utxo has no address field. An own input gets the script hash placeholder, and every other input gets PubKeyCredential (PubKeyHash ""), a 0-byte hash.
  • buildScriptContext accepts a spending context whose SpendingScript reference is not in txInfoInputs. The two_party_escrow deposit fixtures depend on that (#272).

The fee and the hash lengths do not change the measured numbers. No validator reads the fee, and the cost model sizes a bytestring in 8-byte words, so 28, 29 and 32 bytes all count as 4 words. The two_party_escrow submissions compile the buyer, seller and script hashes in, so correcting the lengths means rebuilding them. A builder-side fix: a positive placeholder fee, 28-byte placeholders, an optional address on add_input_utxo, and a BuildError when the SpendingScript reference is not among the inputs.

Lingua principale
Untyped Plutus Core
Stelle
12
Fork
10
Merge medio
2g 5h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/UPLC-CAPE

Tutte le issue di IntersectMBO/UPLC-CAPE

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.