Transactions with witness data nested past 1,000 levels fail to decode
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 22
- Forks
- 33
- Ø Merge
- 21 Std. 38 Min.
- Gemergte PRs (30 T.)
- 55
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus IntersectMBO/evolution-sdk
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IntersectMBO/evolution-sdk#696 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
IntersectMBO/evolution-sdk#694 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
IntersectMBO/evolution-sdk#559 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
IntersectMBO/evolution-sdk#557 ·
Maintainer antworten meist innerhalb von 1 Tag
-
txBuilder: committee cert redeemers are never resolved to a certificate indexEvtl. vergeben @emmanuel-musau hat das vor 15 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
IntersectMBO/evolution-sdk#518 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in IntersectMBO/evolution-sdk
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
home-assistant/frontend#55841 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
lingdojo/kana-dojo#33905 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug(semester-planning): the edit application dialog cannot save with an empty «Annet fra bedriften»Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
blocklist removal
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
MetaMask/eth-phishing-detect#311215 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Explore filter: multi-select value list with allowNewOptions stops accepting values and drops earlier onesEvtl. vergeben @isaac-jaynes-imperva hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/superset#46146 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen