Koios and Maestro fail on datums nested past 1,250 levels
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
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Read HttpUtils.ts:74-86 and HttpUtils.ts:127 to trace JSON parsing and the numberAsText reviver, then compare the datum response paths in Koios.ts and Maestro.ts. Reproduce the stack overflow with a deeply nested datum and inspect existing provider tests. Done means Koios and Maestro return UTxOs and datums at ledger-supported depths, including the cases described here.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A Koios address_info row whose inline datum is a list nested 1,500 levels deep makes KoiosEffect.getUtxos fail. With fetch stubbed to return that row, the call fails with ProviderError "Koios getUtxos failed", and its cause ends in "Maximum call stack size exceeded". MaestroEffect.getUtxos fails the same way with "Maestro get paginated UTxOs failed". Koios returns the UTxO up to 1,252 levels and Maestro up to 1,253 levels. The same Koios row decodes when it carries a 15,000-level datum in bytes and a shallow JSON form, as #677 now allows.
Both providers parse every response with Schema.parseJson({ reviver: numberAsText }) (HttpUtils.ts:74-86, applied at HttpUtils.ts:127). The reviver keeps each number as the text the server wrote. The runtime calls a reviver by walking the parsed value recursively, so a deep value overflows the stack. Koios sends each datum's JSON form in inline_datum.value (Koios.ts:113, Koios.ts:239) and Maestro in datum.json (Maestro.ts:103). The SDK reads only the CBOR bytes of each datum, but the reviver walks the whole response first. Each datum level is two JSON levels ({"list":[...]}). JSON.parse with a reviver fails from 1,259 datum levels, and JSON.parse without one reads at least 40,000.
Before #662 the CBOR decoder failed at about the same depth and hid this limit. One UTxO with such a datum at an address still makes getUtxos() fail for the whole address on Koios and Maestro. Koios getUtxosByOutRef and getDatum fail the same way at 1,500 levels, since utxo_info and datum_info also carry the JSON form. The ledger accepts such datums. The Plutus data decoder limits the size of each leaf, not the depth (PlutusCore/Data.hs, decodeData), so a datum can nest about 16,000 levels in one transaction.
One possible fix, not decided: when the parse with the reviver overflows, quote each number token in one linear scan of the text and parse again without the reviver.
Koios and Maestro should return UTxOs and datums at any depth the ledger accepts, as Blockfrost and Kupmios do since #677.
- 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