Skip to content

fix: look up real user_id instead of hardcoding anonymous for --node-id path#2097

Open
amathxbt wants to merge 1 commit into
nexus-xyz:mainfrom
amathxbt:fix/config-anonymous-user-id
Open

fix: look up real user_id instead of hardcoding anonymous for --node-id path#2097
amathxbt wants to merge 1 commit into
nexus-xyz:mainfrom
amathxbt:fix/config-anonymous-user-id

Conversation

@amathxbt
Copy link
Copy Markdown

@amathxbt amathxbt commented May 7, 2026

Problem

When a user starts the node with --node-id <id>, Config::resolve creates a config with:

user_id: "anonymous".to_string(), // Use anonymous for --node-id shortcut

Every analytics event, reward report (via set_wallet_address_for_reportingreport_proving_if_needed), and orchestrator call for the entire session then identifies the user as "anonymous". This:

  1. Corrupts per-user telemetry — all events from --node-id nodes are bucketed under a single fake identity.
  2. May break reward tracking — if the orchestrator or cloud function validates user_id against registered accounts, an "anonymous" value could cause silent rejections.

Any user who runs nexus-cli start --node-id <id> (rather than the full register + start flow) is affected.

Fix

After resolving wallet_address via orchestrator.get_node(), make a second call to orchestrator.get_user(&wallet_address) to obtain the real user_id. A lookup failure is treated as non-fatal (falls back to an empty string) so node startup is never blocked.

…e-id path

When --node-id is supplied, Config::resolve creates a Config struct with
user_id hardcoded to "anonymous". Every analytics event, cloud-function
reward report, and orchestrator call for this session then identifies the
node as "anonymous", corrupting per-user telemetry and potentially causing
reward attribution to fail for nodes that use the --node-id shortcut.

Fetch the real user_id via orchestrator.get_user(&wallet_address). The
lookup is non-fatal: a failure falls back to an empty string rather than
blocking node startup.
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