/epochs/latest/parameters missing `cost_models_raw`

Đang mở
#157 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java, typescript
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
70
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bloxbean/yaci-devkit

Tất cả issue của bloxbean/yaci-devkit

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.