Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat(reservations): escrow-backed reservations

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

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
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, databases

Hướng nghiên cứu

Read quantum_backend_v2/reservations/service.py and reservations/models.py to understand the reservation transitions, then inspect the credit ledger work in issue #3 and recovery in runtime/recovery.py. Define and test how each terminal state produces exactly one ledger outcome, how holds appear in the reservation API response, and how restart recovery restores or releases them. The issue calls for state-machine tests across transitions and recovery; on-chain escrow is a separate optional phase.

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

Mô tả

chain-integration enhancement payments tier-2

Summary

Tie the reservation state machine to funds: lock on COMMITTED, release on EXECUTED, refund on EXPIRED or CANCELED.

Motivation

Reservations already model intent to use a node. Backing them with a hold makes no-shows and cancellations costly and protects workers.

Current state in this repo

  • quantum_backend_v2/reservations/service.py and reservations/models.py implement REQUESTED -> PREPARED -> COMMITTED -> EXECUTED/EXPIRED/CANCELED.

Proposal

  • Phase 1: ledger-only holds using the credit ledger (#3).
  • Phase 2 (optional, separate PR): on-chain escrow on a registry EVM chain, reusing the Aave-based escrow pattern from proposals or a minimal escrow contract.
  • Define timeouts so holds cannot be stuck: expiry always results in release or refund.

Acceptance criteria

  • Every terminal reservation state results in exactly one ledger outcome (capture, release or refund).
  • Holds are visible on the reservation API response.
  • Crash recovery (runtime/recovery.py) restores or releases holds.

Out of scope

  • Writing production-audited smart contracts; any contract in Phase 2 stays testnet-only until audited.

Dependencies

  • #3
  • #8

Testing plan

  • State-machine tests covering every transition and restart recovery.

Part of ##1. Ground rules for all issues in this roadmap are listed there (testnet-first, no secrets in the repo, chain logic behind the registry, tests and docs with every PR).

Ngôn ngữ chính
Python
Star
2
Fork
4
Merge trung bình
5 giờ 54 phút
Pull request đã merge (30 ngày)
24

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 QMeshPy/distributed-quantum

Tất cả issue của QMeshPy/distributed-quantum

Issue tương tự

Thêm issue về Python

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.