[DIS] Mobile-Ready CKB Light Client (Pocket Node) for Android

Hi, @knmo Nice to hear from you again; I had a busy week, so I will be looking into this again. I will get back to you soon.

hey @knmo what version of the app are you?

1.7.4

1 Like

Thank you for this @knmo , genuinely. The transaction hashes and the full account of how you created the wallet made the diagnosis fast and certain.

I traced all of it. Here is what is going on and what is fixed.

The endless “Catching up from…” loop on every restart This is fixed. Your wallet’s primary address has transaction history but no spendable cells of its own (more on why below), and the app was re-running a recovery rescan on every launch, rewinding the sync and never settling. It now runs that recovery at most once and remembers it, so it will not loop on each restart. An explicit resync re-arms it if you ever want to force another look.

“Sync hasn’t progressed in 5 min” while the number was clearly going up Also fixed. That warning was misfiring whenever the recovery rescan rewound the sync position. It now only appears when the block height is genuinely frozen.

Both of those are in this PR: fix(sync): stop per-launch rescan loop + false stall banner on rewind (knmo) by RaheemJnr ¡ Pull Request #360 ¡ RaheemJnr/pocket-node ¡ GitHub

Why only one DAO deposit shows (the important one) This is the root of it. I looked your four deposits up on-chain. Each deposit, and each change output between them, went to a different address:

  • deposit 1 lock args 0xba2dbf18…, 2 0x2a8c9287…, 3 0xda593b03…, 4 0xfb24949b…

That is standard HD-wallet behavior. The Bitcoin Light wallet you made the deposits in rotates to a fresh address for every output, the way Bitcoin wallets do. Pocket Node today watches a single address per wallet, so on restore it only sees the deposit whose chain happened to touch that one address, and the DAO page is empty because those DAO cells live on addresses it never scans. Your own hypothesis was exactly right.

So this is not a sync-window problem and the deep-rescan will not surface them. The real fix is multi-address (HD account) discovery on import, which is tracked here: Enhancement: Auto-discover sub-accounts on mnemonic import ¡ Issue #82 ¡ RaheemJnr/pocket-node ¡ GitHub It is a larger piece of work and I am scoping it as its own effort. Until i fix and merge it, a wallet whose funds are spread across many derived addresses by another app will not display all of them in Pocket Node.

The custom restore point needing a restart, and starting higher than the value you set Both confirmed as real and being fixed next. The restore point should apply immediately, and it should honor the exact height you enter instead of falling back to the recent-blocks default.

Thank you again for the care you put into these reports, and for the kind words about the project. They are exactly what is shaping it.

5 Likes

Title: Pocket Node v1.7.5: send reliability fix


New release of Pocket Node, the on-device CKB light-client wallet for Android.

Fixed: a send that could keep failing with “Could not broadcast transaction” after you closed and reopened the app. A leftover in-progress send was blocking new ones. It now clears itself, and no data wipe is needed.

Also in this release:

  • Send errors now show the real reason instead of always blaming the network
  • Pending sends display the correct amount right away
  • Steadier sync (custom heights, zero-coin wallets, chain rewinds) ( @knmo )
  • Nervos DAO: no more stale “Confirming” card after a withdraw

Existing users get it automatically through the in-app updater. Fresh installs: pocket-node.com

Release notes and APK: Release Pocket Node v1.7.5 ¡ RaheemJnr/pocket-node ¡ GitHub

6 Likes

I understand why not all DAO deposits are displayed, and I’m already looking forward to the HD wallet implementation.

I believe that, especially since this seems to be the standard behavior of wallets, a handling is important, and it is not unlikely that users will import wallets containing such DAO transactions.

I am unable to interact with this DAO deposit. As I mentioned, this single DAO transaction appears in the Activity window (Transactions), but not in the DAO window.

Shouldn’t at least this one deposit be recognized, for which a transaction is displayed? Or, to put it another way, why is the “Deposit” transaction recognized but no DAO is displayed? It seems weird.

1 Like

Good question, and you have actually put your finger on exactly what is happening. Both behaviors come from the same root cause, and it was just written up in detail by another user: Funds become invisible (balance 0 + large negative outflow) when mnemonic was previously used by a standard BIP44 wallet. ¡ Issue #382 ¡ RaheemJnr/pocket-node ¡ GitHub

Why the transaction shows in Activity but the DAO tab is empty: the deposit transaction spent coins from an address Pocket Node knows about, so Activity correctly shows it as “Sent - DAO Deposit”. But the deposit cell itself, the thing the DAO tab looks for, was locked by the originating wallet to one of its internal change addresses. Standard wallets like Neuron spread funds across many derived addresses (receiving and change chains), while Pocket Node currently derives one address per account. Your deposit cell lives at an address Pocket Node does not derive yet, so the DAO tab, which lists deposit cells owned by your known addresses, finds nothing. Activity sees the spend; the DAO tab cannot see the destination. That is why it looks half recognized.

To be clear: Nothing is lost. It is a visibility gap.

What is coming, in order:

  1. A clear in-app notice when we detect this pattern, so it stops looking like something went wrong.
  2. A deeper scan on import that walks the standard BIP44 receiving and change chains and picks up funds and DAO deposits made by other wallets. The sub-account discovery machinery that just shipped was built so we can extend it to exactly this.
  3. Interaction with what is found, including DAO cells like yours.

Until then the reliable way to interact with that deposit is through the wallet that created it (Neuron). Thanks for the persistent, detailed reports, they have helped shaped Pocket Node.

3 Likes

Here, the whole process goes in reverse. For future reference.

0x4837a90b65d603b8d0daf4cb81acea3e9aa93b9ea4ea6640441eec43269540e9

After the first withdrawal transaction, the amount of 9,456—which was normally in the wallet—was no longer visible in PocketNode.

I also quickly restored from the seed several times to bypass “pending operation” spinning wheel in the Bitcoinlight wallet. And in the end, I sent everything back to the main address.

Edit:Some withdrawal transactions took higher fees, but that was obviously my mistake when I processed them in BitcoinLight Wallet.