[FR] - Balance existing transaction
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- haskell
- Lĩnh vực
- blockchain, cli
Hướng nghiên cứu
Bắt đầu bằng cách xem xét workflow cardano-cli transaction build hiện có và cách các transaction envelope, redeemer và signing key được xử lý. Công việc được xem là hoàn thành khi một giao dịch được soạn thảo bên ngoài được cân bằng bằng cách tính chi phí script và phí, chọn các input trả phí, thêm tiền thừa, rồi ghi kết quả vào đĩa hoặc stdout bằng dữ liệu node.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Internal (anyone could benefit though)
Area
Transaction building
Describe the feature you'd like
I would like to use the cardano-cli to balance a transaction that was drafted by another application. Assuming we have a transaction already built with body and witnesses (redeemers) by a DApp in a transaction envelope tx.json and some signing key wallet.sk which owns ADA to pay fees:
cardano-cli transaction balance \
--socket-path ... \ #
--testnet-magic 2 \
--unbalanced-tx tx.json \
--cardano-signing-key wallet.sk \
--out-file tx.json
Would connect to the cardano-node as usual to fetch various information (utxo owned by user, protocol parameters, system start and era history) and balance the transaction. That is:
- (Re-)calculate script costs using redeemers from the tx
- Estimate fees
- Find and add input to cover fees
- Add a change output
- Write the balanced transaction to disk (or stdout)
Alternative with slightly smaller scope: Take only an input to use for paying fees and change address, very much like transaction build.
Describe alternatives you've considered
Obvious alternative is to do all this in the DApp itself, but balancing a transaction is a generic process and not application-specific. Also, this would tie the transaction creating code very much to the "source" of where UTxO, protocol parameters etc. are fetched from. Having it in the cardano-cli, a dedicated client to the cardano-node, would keep it separated from e.g. an alternative workflow that uses blockfrost.
Additional context / screenshots
We encountered this while designing a command line tool to create certain smart contract transactions in the Hydra protocol. More details here: https://github.com/cardano-scaling/hydra/issues/1574
- Ngôn ngữ chính
- Haskell
- Star
- 72
- Fork
- 25
- Merge trung bình
- 3 ngày
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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/cardano-cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
IntersectMBO/cardano-cli#1306 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
IntersectMBO/cardano-cli#1472 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Clarify the origin and intended use of Plutus V2/V4 test fixturesCó thể đã có người làm @Jimbo4350 đã nhận 3 ngày trước. Đang mở
IntersectMBO/cardano-cli#1464 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Share body construction and input reading between transaction and sub-transaction buildersCó thể đã có người làm @Jimbo4350 đã nhận 3 ngày trước. Đang mởrefactor
IntersectMBO/cardano-cli#1463 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Share common transaction-body arguments across builder commandsCó thể đã có người làm @Jimbo4350 đã nhận 3 ngày trước. Đang mởrefactor
IntersectMBO/cardano-cli#1462 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của IntersectMBO/cardano-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
ndmitchell/hlint#1710 ·
-
CJK text is italicizedCó thể đã có người làm @daniel-gregg đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
simplex-chat/simplex-chat#7714 · 1 reaction ·
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 72/100
Maintainer thường phản hồi trong vòng 2 ngày