Skip to content

fix(offline): a wallet created in this session builds its Bluetooth transfer stack - #1044

Merged
cryptskii merged 1 commit into
mainfrom
fix/offline-transport-after-wallet-creation
Sep 27, 2026
Merged

cryptskii merged 1 commit into
mainfrom
fix/offline-transport-after-wallet-creation

Conversation

@cryptskii

@cryptskii cryptskii commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

What

Startup init builds the BluetoothManager and injects the frame coordinator and transport adapter into the bilateral handler only when an identity already exists. Wallet creation installed the full router but not that stack, so a phone that created its wallet in this app session paired over Bluetooth (a different path) yet answered every offline send with the BLE stack is not live yet: Ble transport adapter not injected yet until the app restarted. Seen on the rig on 2026-09-27, where a restart was the only way through to the first offline send proven on real Android devices.

The Android block moves out of init into build_ble_stack_for_identity(), which init still calls at the same point, and system.createGenesisV2 calls it once the new identity's router is up. A failure there rolls the genesis back, like the router install before it.

Verification

  • cargo ndk -t arm64-v8a check -p dsm_sdk --features jni,bluetooth: clean (the code is Android-only; host builds do not compile it). Android clippy reports no finding in either changed file. cargo check -p dsm_sdk --tests, make lint: pass.
  • Proven on real Android devices, 2026-09-27, one app session on the A16 (pid 1022, never restarted), APK built from this branch with the anchor library: startup with no identity logged identity not ready … no BLE stack yet; wallet creation at 15:42:35 logged the BLE stack is live and BLE coordinator and transport adapter injected into bilateral handler; contacts exchanged with the A54, faucet claimed, appliance connected, 20 ERA loaded offline, then 5 ERA sent offline to the A54: TRANSFER SEALED, sender offline 20→15. The A54 logged fused anchor PINNED for 56JEAKND… and offline-bearer release accepted (v2 predicate: σ^DSM+σ^chip+σ^host), balance 105→110. The A16's chip counter stepped 1→2.
  • Before this change, the same flow on the A16 answered the BLE stack is not live yet: Ble transport adapter not injected yet until the app was restarted.

…ransfer stack

Startup init builds the BluetoothManager and injects the frame coordinator and
transport adapter into the bilateral handler only when an identity already
exists. Wallet creation installed the full router but not that stack, so a
phone that created its wallet in this app session paired over Bluetooth (a
different path) yet answered every offline send with "the BLE stack is not
live yet: Ble transport adapter not injected yet" until the app restarted.
Seen on the rig on 2026-09-27; a restart was the only way through.

The Android block moves out of init into build_ble_stack_for_identity(),
which init still calls at the same point, and system.createGenesisV2 calls it
once the new identity's router is up. A failure there rolls the genesis back
like the router install before it does.

cargo ndk -t arm64-v8a check -p dsm_sdk --features jni,bluetooth: clean
(the code is Android-only). Android clippy reports no finding in either file.
make lint: passed.
@cryptskii
cryptskii merged commit ad12302 into main Sep 27, 2026
20 checks passed
@cryptskii
cryptskii deleted the fix/offline-transport-after-wallet-creation branch September 27, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant