feat(recoverbull): isolate key-server Tor sessions - #2580
Conversation
|
Claude finished @ethicnology's task in 10m 16s —— View job Code review — feat(recoverbull): isolate key-server Tor sessions
Overall this is a solid refactor: the session-per-operation isolation with Findings1.
Suggest wrapping the close in its own try/catch that only logs. Fix this → 2. Stale-generation arm can leave the connecting screen stuck on "Waiting" with no error and no retry button bullbitcoin-mobile/lib/features/recoverbull/presentation/bloc.dart Lines 155 to 158 in 28bcafe
3. Status screen can now cold-start a full Tor bootstrap and block every service row on it Previously 4. Behavior change to confirm: RecoverBull no longer honors the external Tor proxy setting The repository no longer consults Minor notes
Note: I couldn't post these as inline review comments — |
1ea7444 to
ece5c61
Compare
8d6e80d to
9dfab5e
Compare
1070402 to
5e1b34c
Compare
5e1b34c to
b8b0eed
Compare
Stacked on the
feat/bull-tor-packagePR. Review that one first.RecoverBull now opens its own isolated Tor session through
bull_torinstead of borrowing a shared global proxy, so key-server traffic is not correlatable with the app's other Tor traffic.Startup gains
InitializeRequiredTorUsecasebehind anAppStartupWalletPort, which is what lets the Tor bring-up move out ofWalletBloc. Tor was being started from the wallet layer for a reason unrelated to wallets; it now belongs to app startup, andwallet_blocloses that responsibility entirely.ConnectToKeyServerUsecaseowns the retry budget and backoff for reaching the key server. That logic used to sit in the bloc, which owns presentation only — as a use case it is testable without pumping a bloc, and the attempt number is still published so the screen can name the attempt in flight.Two behaviours in the bloc are worth review attention:
TorConnectingagain while the established SOCKS route stays valid. RecoverBull only needs that route, so a benign refresh no longer undoes readiness. A refresh that carries a diagnostic is not treated as benign and still propagates, so a real loss of connectivity is not masked.Bad state: Cannot add new events after calling closeon device. Guarded.