Transactions with witness data nested past 1,000 levels fail to decode
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 22
- Fork
- 33
- Merge trung bình
- 21 giờ 38 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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/evolution-sdk
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
IntersectMBO/evolution-sdk#696 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
IntersectMBO/evolution-sdk#694 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
IntersectMBO/evolution-sdk#559 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
IntersectMBO/evolution-sdk#557 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
txBuilder: committee cert redeemers are never resolved to a certificate indexCó thể đã có người làm @emmanuel-musau đã nhận 14 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
IntersectMBO/evolution-sdk#518 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của IntersectMBO/evolution-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
WalletConnect/walletconnect-monorepo#7392 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Absenderzeile über dem Anschriftfeld wird bei Angeboten und Rechnungen am Ende abgeschnittenĐang mởfehler
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Azure/azure-functions-nodejs-extensions#180 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
laaielichter/Threesmith#28 ·
Maintainer thường phản hồi trong vòng 1 ngày