[FR] - Change representation of cost models in the code to JSON string

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

Maintainer thường phản hồi trong vòng 2 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
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
haskell
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu trong internal/Cardano/Api/Genesis.hs tại phần biểu diễn cost model, sau đó so sánh với plutus-core/cost-model/data/builtinCostModel.json. Xem cardano-testnet/src/Testnet/Defaults.hs để biết phương pháp validation được đề cập. Hoàn thành khi các cost model được biểu diễn dưới dạng chuỗi JSON dễ đọc trong Haskell, vị trí Plutus ban đầu được ghi lại và validation được xử lý nếu có.

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

Mô tả

Internal/External
Internal

Area
Other Any other topic (Delegation, Ranking, ...).

Describe the feature you'd like
Currently cost models are represented as an array with hard to understand values. To make maintenance easier, they should be stored as JSON string in haskell (quasiquoted preferably). The cost model should be also linked to the original location in plutus repository in the code comment: https://github.com/IntersectMBO/plutus/blob/master/plutus-core/cost-model/data/builtinCostModel.json

A validation logic implemented in cardano-testnet would be nice to have: https://github.com/IntersectMBO/cardano-node/blob/cd3c037fa6d2f836794012f806cd32edfcf31763/cardano-testnet/src/Testnet/Defaults.hs#L88

Describe alternatives you've considered
n/a

Additional context / screenshots
n/a

Ngôn ngữ chính
Haskell
Star
41
Fork
33
Merge trung bình
3 ngày 3 giờ
Pull request đã merge (30 ngày)
15

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

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 IntersectMBO/cardano-api

Tất cả issue của IntersectMBO/cardano-api

Issue tương tự

Thêm issue về Haskell

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.