Koios and Maestro fail on datums nested past 1,250 levels
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
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- 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