You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: decdn whoami fails outright when the node and client keystores have different passwords #2008
decdn whoami resolves the keystore password once (env var → password file → one TTY prompt) and applies that single password to both <data_dir>/keystore.json (node/operator) and <data_dir>/client/keystore.json (client/buyer). See crates/cli/src/commands/whoami.rs (report, the "password is resolved once … then applied to whichever keystores exist" comment).
When the two keystores were created with different passwords — easy to end up with, since key-gen writes them at different times and prompts separately — the command aborts with:
Error: failed to load keystore at ~/.decdn/keystore.json: failed to decrypt eth keystore at ~/.decdn/keystore.json: Mac Mismatch
and prints nothing for the other keystore, even though its password was correct. Decrypting each file on its own with cast wallet address --keystore <path> succeeds, so the keys are fine; this is purely the single-password assumption.
Expected
A wrong password for one keystore should degrade that one line to a note (like the existing "needs a password" line), not fail the whole command — the doc comment already says the node id / paths should print before and regardless of password resolution.
On a TTY, prompt per keystore (or re-prompt for the second one when the first password fails to decrypt it).
DECDN_KEYSTORE_PASSWORD / --keystore-password-file could stay single-valued as the common case; a per-role source (e.g. --client-keystore-password-file) is optional.
Repro
decdn key-gen with password A (node keystore).
Create the client keystore under <data_dir>/client/ with password B.
decdn whoami → enter either password → Mac Mismatch error, no addresses printed.
Activity
fix(cli): batch of five CLI fixes around the node-vs-client data dir (#…