Add --lite build flow and ObsidianDragonLite target naming, hide full-node pages/features in lite mode, enforce pool-only mining in lite, and include chat port feasibility audit documentation.
3.0 KiB
3.0 KiB
Chat Port Feasibility Audit (2026-05-06)
Scope:
- Evaluate whether SilentDragonXLite chat can be ported to the current full-node ImGui wallet.
- If feasible, define a safe path with feature flagging.
Source Audit (SilentDragonXLite)
Primary chat surfaces in the reference codebase:
external/SilentDragonXLite/src/chatmodel.hexternal/SilentDragonXLite/src/chatmodel.cppexternal/SilentDragonXLite/src/Chat/Chat.hexternal/SilentDragonXLite/src/Chat/Chat.cppexternal/SilentDragonXLite/src/controller.cpp(transaction scan + memo decrypt/encrypt)external/SilentDragonXLite/src/Model/ChatItem.*external/SilentDragonXLite/src/Model/ContactRequest*external/SilentDragonXLite/src/DataStore/ChatDataStore.*external/SilentDragonXLite/src/mainwindow.uiand related Qt UI widgets.
Observed characteristics:
- Chat is tightly coupled to Qt widget/UI classes (
QListView,QStandardItemModel,.uiforms). - Message transport relies on memo payload parsing/decryption embedded directly in transaction refresh/controller flow.
- Contact requests, chat IDs, and message rendering are mixed with Qt view models and DataStore semantics.
- Crypto flow depends on shared secret derivation and memo header conventions implemented inline in controller/chat code.
Current Wallet Architecture Gap
Current app (src/) is Dear ImGui + SDL3 with different state/render model:
- No existing chat domain model/service in ImGui code path.
- No Qt runtime/view-model infrastructure to reuse reference chat modules.
- Transaction refresh path is centralized in
NetworkRefreshServiceand app refresh orchestration, not Qt controller callbacks.
Feasibility Decision
Decision: Not safe to directly port in this batch.
Reason:
- A direct transplant would require substantial re-architecture, not incremental copy-over.
- High risk of regressions in transaction refresh correctness, memo handling, and wallet UX stability.
- Crypto/message parsing code requires dedicated security review before enabling in production.
Estimated Effort (for a proper staged port)
- Domain extraction (chat/contact/message models, storage interfaces): 3-5 days
- Service integration with current refresh pipeline (
NetworkRefreshService+ app): 4-7 days - ImGui chat UI (list, composer, contact requests, actions): 4-6 days
- Security hardening + memo/crypto validation tests: 3-5 days
- End-to-end QA/regression/perf pass: 2-4 days
Total estimate: 16-27 engineer-days.
Risk Profile
- Security risk: high (memo crypto path and malformed payload handling).
- Stability risk: high (transaction refresh path is core-wallet critical).
- UX risk: medium (new asynchronous chat states and contact flows).
Recommended Safe Plan
- Add compile/runtime feature flag (
DRAGONX_ENABLE_CHAT) default OFF. - Implement read-only parser + storage first (no send), fully test malformed memos.
- Add send path behind same flag with strict size/format guards.
- Ship disabled by default until security and regression acceptance criteria are met.