[Enhancement] Support an absolute persistent data directory
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
- 38/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ệ
- typescript
- Lĩnh vực
- backend, infrastructure
Hướng nghiên cứu
Bắt đầu với việc phân giải đường dẫn hiện tại trong src/store.ts, sau đó lần theo các tích hợp đường dẫn lưu trữ được nêu trong #22 và trạng thái checkpoint từ #23. Xác minh cách hoạt động hiện tại của việc xác thực khi khởi động, persistence, migration và rollback; công việc được xem là hoàn tất khi thư mục hiệu dụng được sử dụng nhất quán, hành vi legacy vẫn được giữ nguyên, các đường dẫn không an toàn thất bại một cách an toàn và các kiểm tra khởi động lại तथा migration được liệt kê đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Allow operators to configure an explicit absolute directory for all persistent IPFS node data.
Details
The current storeFolder setting is always joined to the operating-system home directory in src/store.ts. It selects a folder below the user's home but does not provide a clear, validated way to use a dedicated path such as /srv/adamant-ipfs or /mnt/ipfs-data.
Add an optional absolute dataDir setting. When it is absent, preserve the existing ~/<storeFolder> behavior exactly so current installations continue to use the same blockstore, datastore, peer identity, pins, and lifecycle registry.
Changing the resolved data directory to an empty location creates a new peer identity and makes existing content appear missing. The implementation and migration documentation must therefore fail safely and make the selected path explicit.
Checklist
- Add an optional absolute
dataDirconfiguration value - Preserve
storeFolderas the backward-compatible fallback whendataDiris absent - Reject empty, relative, root, malformed, or non-directory values during startup validation
- Resolve the effective data directory in one reusable helper
- Place
blockstoreanddatastorebelow the resolved directory - Log the resolved data directory at startup without exposing sensitive data
- Verify that the directory can be created, opened, and written before starting Helia
- Detect and clearly report a likely accidental switch from a populated legacy directory to an empty data directory
- Document a stop, copy, permissions, verification, and rollback procedure for moving an existing node
- Add tests for the legacy default, an explicit absolute path, invalid paths, and restart persistence
Notes
The broad checklist in #16 marked data-directory configuration as complete, but the current implementation still resolves storeFolder from the user's home directory. This focused issue defines the remaining operational requirement.
The datastore contains the libp2p private key under /pkcs8/self. A correct migration must preserve it together with the blockstore and lifecycle registry, or the process starts as a different peer.
Coordinate the change with the storage paths used by disk-reserve checks, storage metrics, upload admission, replication intake, and garbage collection from #22.
Verification
- Start with no
dataDirand confirm that an existing~/<storeFolder>retains the same Peer ID, pins, registry records, and readable CIDs - Start with an explicit temporary absolute directory and confirm that blockstore and datastore data survive a restart
- Move a populated test store with the documented procedure and confirm byte-identical retrieval of legacy CIDs
- Confirm disk usage, free-space reserve, upload admission, replication, and garbage collection all inspect the configured filesystem
- Confirm invalid or unsafe paths abort startup with a controlled configuration error
- Exercise the rollback procedure and confirm that the original store remains usable
Coordination with persistent health state
The persistent data directory must also contain the checkpoint and repair-cycle state introduced by #23. Moving only the blockstore and datastore while leaving that operational state behind could reset the freshness watermark, lose the recorded membership or placement version, or make height move backwards after restart.
When dataDir is absent, preserve the existing location of all legacy data and introduce any new checkpoint state without moving current stores. The migration and rollback procedure must treat peer identity, pins, lifecycle registry, repair cursor/cycle evidence, and checkpoint state as one consistency unit.
Additional checklist
- Store checkpoint, repair-cycle, and related operational state below the effective persistent data directory
- Preserve or safely invalidate that state during data-directory migration without allowing a false ready checkpoint
Additional verification
- Move a populated test data directory and confirm peer identity, content, lifecycle records, repair-cycle evidence, and checkpoint monotonicity survive together
- Start with missing or mismatched checkpoint state and confirm the node falls back to starting or stale rather than reporting ready
- Ngôn ngữ chính
- TypeScript
- Star
- 309
- Fork
- 5
- 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
- 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
- Đọ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 Adamant-im/ipfs-node
-
APIs bug NodeJS
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Adamant-im/ipfs-node#49 · 1 bình luận ·
-
Decentralization IPFS Privacy Research Security
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Adamant-im/ipfs-node#31 ·
-
enhancement Infrastructure IPFS
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Adamant-im/ipfs-node#29 ·
-
Composite task Decentralization Infrastructure IPFS
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Adamant-im/ipfs-node#28 ·
-
Composite task Decentralization Encryption Governance IPFS
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Adamant-im/ipfs-node#27 · 1 bình luận ·
Tất cả issue của Adamant-im/ipfs-node
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
code-yeongyu/senpi#7139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
lingdojo/kana-dojo#34395 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mastra-ai/mastra#31093 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:web p2 product:business triage:active type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 89/100
cuadrao-ai/argus#2328 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
nikhilb2/simple_invoicing#907 ·