Skip to content

[Node/Sync] Unify sync-core identity on Starfish user_id#3494

Draft
Herklos wants to merge 1 commit into
devfrom
feature/migrate-from-wallet-to-userId
Draft

[Node/Sync] Unify sync-core identity on Starfish user_id#3494
Herklos wants to merge 1 commit into
devfrom
feature/migrate-from-wallet-to-userId

Conversation

@Herklos

@Herklos Herklos commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Herklos Herklos self-assigned this Jun 12, 2026
@Herklos Herklos force-pushed the feature/migrate-from-wallet-to-userId branch 2 times, most recently from f414026 to dc1f01b Compare June 12, 2026 19:22
…s-storage-key

Root cause: the node wrote sync data under the EVM address (write path) but read it
back under the Starfish user_id (read path), so every pull from mobile returned empty.

Changes:
- server.py: stop re-deriving EVM address in _user_actions_after_write; pass the
  Starfish identity (user_id) directly to execute_user_action.
- abstract_local_collection_provider.py: _get_wallet_private_key now looks up by
  user_id via get_wallet_by_user_id instead of the EVM address.
- Rename wallet_address → user_id throughout the execution chain: workflow params
  (UserActionWorkflowInputs/Output), executor base + all subclasses, models.py,
  octobot_flow_client.py, protocol layer, scheduler.py, workflows_util.py.
- _sanitize_address → _sanitize_storage_key (cosmetic, matches new identity).
- automation_workflow.py: add _user_id_to_evm() to translate user_id back to EVM
  address at the OctoBotActionsJob boundary (CommunityRepository still needs EVM).
- Tests: update all mocks and assertions to use get_wallet_by_user_id / user_id;
  add wallet import + CommunityAuthentication mock to DCA functional tests so
  _user_id_to_evm() resolves correctly; fix pre-existing failures unrelated to this
  change (encryption setup, duplicate import_wallet, retry cap).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Herklos Herklos force-pushed the feature/migrate-from-wallet-to-userId branch from dc1f01b to b1cbd08 Compare June 12, 2026 19:43
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