Devnet: Validate account name in CLI
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in devnet/src/account.rs at the account-creation path around line 153, then trace where the CLI account name is parsed. Reproduce the failure with the command in the issue, add account-name validation and a user-facing error for dots, and verify the command reports that error instead of panicking.
Written by the indexing model from the issue text.
Description
Account creation fails when the account name contains dots (periods), but the system doesn't provide clear feedback about this restriction to users.
For example the command below will fail with a obscure panic on an unwrap here due to the dots. https://github.com/Near-One/mpc/blob/708f3dd179a62c167aa8e694f506a992abec0e12/devnet/src/account.rs#L153
target/debug/devnet mpc bookrock-2.0.1 new \
--num-participants 5 \
--num-responding-access-keys 8 \
--near-per-responding-account 1
....
thread 'main' panicked at src/account.rs:153:22:
called `Result::unwrap()` on an `Err` value: handler error: [Access key for public key ed25519:4WeHrvJRcgqEF7SUi2GmHtibpr69fkgG9hvZKQcGz1MN has never been observed on the node]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Add some validation in the CLI to validate the account name, and give a user error.
- Dominant language
- Rust
- Stars
- 44
- Forks
- 42
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 111
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from near/mpc
-
issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100