/epochs/latest/parameters missing `cost_models_raw`

Aperta
#157 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java, typescript
Ambito
api

Direzione di ricerca

The payload names the /epochs/latest/parameters endpoint and its cost_models field, but no source file. Find where yaci-store builds the epoch parameters response and where cost_models is populated, then check the reporter's workaround for the expected ordering. Done means the response also includes cost_models_raw as flat integer arrays per Plutus version, matching Blockfrost, with a test covering it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Real Blockfrost returns both cost_models (named-key dict) and cost_models_raw (flat int array). yaci-store 0.10.6 only returns cost_models. Breaks Blaze's getParameters(), which does Object.entries(response.cost_models_raw) directly - surfaces as TypeError: Cannot convert undefined or null to object at tx-build time.

Client-side workaround (Yaci already emits op names in canonical ledger order, so Object.values() reproduces the expected array):

const cost_models_raw: Record<string, number[]> = {};
for (const [v, ops] of Object.entries(response.cost_models)) {
  cost_models_raw[v] = Object.values(ops as Record<string, number>);
}

Happy to open a PR emitting cost_models_raw alongside cost_models.

Lingua principale
Java
Stelle
70
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bloxbean/yaci-devkit

Tutte le issue di bloxbean/yaci-devkit

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.