Transactions with witness data nested past 1,000 levels fail to decode
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Start with Data.ts around Data.FromCDDL (1078), CDDLSchema (1044), and Schema.typeSchema(DataSchema), then inspect TransactionWitnessSet.ts (462-469), Redeemers.ts, Redeemer.ts, and Transaction.ts (268). Trace the schema checks on both sides of the iterative conversion in cborValueToPlutusData; reproduce with the 2,000-level witness datum or redeemer from the issue. Done when the schema forms of Data and transaction decoding handle ledger-accepted nesting without the stack overflow.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Transaction.fromCBORHex of a transaction whose witness set holds "81".repeat(2000) + "00", a list nested 2,000 levels deep, as a datum or as redeemer data throws ParseError with "Maximum call stack size exceeded". Since #677, Data.fromCBORHex reads the same list at 16,384 levels. On a first call in a fresh process, every schema form of Data stops at 991 to 996 levels:
Schema.decodeSync(Data.FromCBORHex()),Schema.decodeSync(Data.FromCDDL)andData.withSchema(...).fromCBORHexRedeemer.fromCBORHex, andTransactionWitnessSet.fromCBORHexwith the list as a datum or in a redeemer mapTransaction.fromCBORHex, with the list as a witness datum or in a redeemer
Once the code is warm, Data.FromCBORHex reads up to 2,023 levels and Transaction.fromCBORHex up to 1,647 levels. A constructor nested in a constructor fails sooner: Transaction.fromCBORHex stops at 836 levels of d87981.
Each form decodes through Data.FromCDDL (Data.ts:1078). Its input side is CDDLSchema, which is the recursive CBORSchema union (Data.ts:1044), and its output side is Schema.typeSchema(DataSchema). Both sides type-check the value with one call frame per level, before and after the conversion that #677 made iterative (cborValueToPlutusData, Data.ts:962). Data.FromCBORBytes composes CBOR.FromBytes with FromCDDL (Data.ts:1095-1123), and Data.withSchema composes FromCBORHex (Data.ts:1206-1220). The witness set decodes its datums with PlutusData.FromCDDL (TransactionWitnessSet.ts:462-469). Redeemers go through Data.CDDLSchema and Data.FromCDDL (Redeemers.ts:319, Redeemers.ts:367, Redeemer.ts:220, Redeemer.ts:258). Transaction.fromCBORHex reaches both through Transaction.FromCDDL (Transaction.ts:268).
Transaction.fromCBORHex and Transaction.addVKeyWitnessesHex are how a wallet or dApp reads and signs a transaction it did not build, and the second throws the same ParseError on the 2,000-level example. Tools that read transactions from the chain decode them the same way. The ledger accepts the data. The Plutus data decoder limits the size of each leaf, not the depth (PlutusCore/Data.hs, decodeData), so a witness datum or a redeemer can nest about 16,000 levels in one transaction. The limit does not reach inline datums in outputs: DatumOption decodes them with Data.fromCBORBytes (DatumOption.ts:107-116), and a transaction with a 15,000-level inline datum decodes.
Transaction.fromCBORHex and the schema forms of Data should decode any datum or redeemer the ledger accepts.
- Lingua principale
- TypeScript
- Stelle
- 22
- Fork
- 33
- Merge medio
- 21h 38m
- PR unite (30g)
- 55
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di IntersectMBO/evolution-sdk
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IntersectMBO/evolution-sdk#696 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
IntersectMBO/evolution-sdk#694 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
IntersectMBO/evolution-sdk#559 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
IntersectMBO/evolution-sdk#557 ·
I maintainer di solito rispondono entro 1 giorno
-
txBuilder: committee cert redeemers are never resolved to a certificate indexForse già presa @emmanuel-musau l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
IntersectMBO/evolution-sdk#518 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di IntersectMBO/evolution-sdk
Issue simili
-
fehler
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Azure/azure-functions-nodejs-extensions#180 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
laaielichter/Threesmith#28 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 2 giorni
-
iso-bmff: add IsoBoxReadView.readUint64 and IsoBoxWriteView.writeUint64 for exact 64-bit fieldsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
streaming-video-technology-alliance/common-media-library#611 ·
I maintainer di solito rispondono entro 1 giorno