You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the bundled CKB node requires a data migration on startup (e.g. after upgrading to a ckb release with a new DB schema), Neuron shows a static migrating... indicator in the top-right sync-status area for the entire duration. The confirmation dialog estimates 20 ~ 60 min, and during that whole window the user gets no feedback at all — no percentage, no current step, no log output. It is impossible to tell whether the migration is progressing or stuck, which is likely to generate "is my wallet broken?" support reports.
Current behavior
migrateCkbData() spawns ckb migrate -C <nodeDataPath> --force with stdio: ['ignore', 'pipe', 'pipe'], but stderr is only written to electron-log and the last chunk is kept as a failure reason. Nothing is forwarded to the renderer:
Migration progress bars are rendered by indicatif to the child process's stderr (nervosnetwork/ckb, db-migration/src/lib.rs, ProgressDrawTarget::stderr()), including processed/total counts
Info-level migration log lines (e.g. start to run migrate in background: ...) go to both the standard streams and the rotating log file under the node data dir (ckb.toml defaults: log_to_file = true, log_to_stdout = true, filter = info)
During a foreground migration no RPC is available, so parsing the child process output is the only viable channel
Proposed solution
Since Neuron already pipes both streams of the ckb migrate child process, the data is already in our hands — it just stops at the main process:
Parse the indicatif progress output (or, as a minimal first step, just the info-level migration log lines) from stderr in migrateCkbData(). Note the progress bars redraw the same line with ANSI control sequences, so the parser needs to strip those before extracting processed/total.
Extend MigrateSubject messages with a progress payload (e.g. { processed, total, percent } and/or the latest log line) and forward it over the existing migrate IPC channel.
In the UI, render the percentage in place of the static migrating... text (e.g. Migrating 42%), optionally with a tooltip / expandable detail view showing the live migration log tail — the same pattern as the existing sync-status tooltip, which already shows cacheTip / bestKnown block numbers and estimated time left (packages/neuron-ui/src/components/SyncStatus/index.tsx, SyncDetail).
Additional context
The current flow was built for the v0.35.1 bundled-node data migration; the dialog copy (messages.rebuild-sync) still says "estimated 20 ~ 60min"
CKB also supports running some migrations in the background (run_in_background); if that path is ever used, node RPC stays up and progress could be surfaced differently — worth keeping the abstraction in mind
Feature Request
Is your feature request related to a problem?
When the bundled CKB node requires a data migration on startup (e.g. after upgrading to a ckb release with a new DB schema), Neuron shows a static
migrating...indicator in the top-right sync-status area for the entire duration. The confirmation dialog estimates 20 ~ 60 min, and during that whole window the user gets no feedback at all — no percentage, no current step, no log output. It is impossible to tell whether the migration is progressing or stuck, which is likely to generate "is my wallet broken?" support reports.Current behavior
migrateCkbData()spawnsckb migrate -C <nodeDataPath> --forcewithstdio: ['ignore', 'pipe', 'pipe'], but stderr is only written to electron-log and the last chunk is kept as a failure reason. Nothing is forwarded to the renderer:packages/neuron-wallet/src/services/ckb-runner.ts(migrateCkbData, ~L195–218)need-migrate | migrating | finish | failed— with no progress payload:packages/neuron-wallet/src/models/subjects/migrate-subject.tsmigratechannel inpackages/neuron-wallet/src/controllers/app/subscribe.tsnetwork-status.migratingtext:packages/neuron-ui/src/components/SyncStatus/index.tsx(~L119)What CKB exposes during migration
indicatifto the child process's stderr (nervosnetwork/ckb,db-migration/src/lib.rs,ProgressDrawTarget::stderr()), including processed/total countsstart to run migrate in background: ...) go to both the standard streams and the rotating log file under the node data dir (ckb.tomldefaults:log_to_file = true,log_to_stdout = true, filter =info)Proposed solution
Since Neuron already pipes both streams of the
ckb migratechild process, the data is already in our hands — it just stops at the main process:indicatifprogress output (or, as a minimal first step, just the info-level migration log lines) from stderr inmigrateCkbData(). Note the progress bars redraw the same line with ANSI control sequences, so the parser needs to strip those before extractingprocessed/total.MigrateSubjectmessages with aprogresspayload (e.g.{ processed, total, percent }and/or the latest log line) and forward it over the existingmigrateIPC channel.migrating...text (e.g.Migrating 42%), optionally with a tooltip / expandable detail view showing the live migration log tail — the same pattern as the existing sync-status tooltip, which already showscacheTip / bestKnownblock numbers and estimated time left (packages/neuron-ui/src/components/SyncStatus/index.tsx,SyncDetail).Additional context
messages.rebuild-sync) still says "estimated 20 ~ 60min"run_in_background); if that path is ever used, node RPC stays up and progress could be surfaced differently — worth keeping the abstraction in mind