soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

soroban-cli: default identity is confusing to use

Open leighmcculloch opened this issue 2 years ago • 5 comments

What version are you using?

v20.0.0-rc.2.1

What did you do?

Use the default identity.

soroban config identity ls

What did you expect to see?

It to show up in all the places.

What did you see instead?

It's invisible.

leighmcculloch avatar Oct 13 '23 23:10 leighmcculloch

I agree it's a little confusing, but the core idea is that you can use just --hd-path 1 with no source account and it will use the test seed to generate it. So there isn't really just one test account; so which one would you list?

How do you suggest improving the default identity? I added it for use in tests, but perhaps removing it and requiring a source account would remove this issue. You can generated it with config identity generate --default-seed default.

willemneal avatar Oct 15 '23 19:10 willemneal

I agree it's a little confusing, but the core idea is that you can use just --hd-path 1 with no source account and it will use the test seed to generate it. So there isn't really just one test account; so which one would you list?

This problem is no different for non-default accounts.

For example, I can do this:

❯ soroban config identity generate me
❯ soroban config identity ls
me
❯ soroban config identity address me
GAMKLGZKEUY6S2DZC632SKDAYGB4QRM2GH56KHK626SYSGPG7RCNC7IS
❯ soroban config identity address me --hd-path 1
GABHSDEPRRGFWNO7ZQR5AVUWBDITRCN3IDVXOXPP3HTKHS7N5OTXCUTF

My generated me account has an infinite number of addresses, and the UI seems to provide a pretty good interface into that.

So I think it would look like this:

❯ soroban config identity ls
default
❯ soroban config identity address
GAMKLGZKEUY6S2DZC632SKDAYGB4QRM2GH56KHK626SYSGPG7RCNC7IS
❯ soroban config identity address --hd-path 1
GABHSDEPRRGFWNO7ZQR5AVUWBDITRCN3IDVXOXPP3HTKHS7N5OTXCUTF

leighmcculloch avatar Oct 16 '23 22:10 leighmcculloch

How do you suggest improving the default identity?

I think if the ls command listed default for the default identity, and then allowed that term to be used to select it (and continued to allow the omission of the name as meaning "default"), that would be sufficient.

The same problem exists with the networks with the default networks not being displayed.

leighmcculloch avatar Oct 16 '23 22:10 leighmcculloch

I think the scope of this should be showing default for soroban config identity ls, and allow the string default to be used when referencing the default identity in other commands.

For me, on the latest changes in main, soroban config network ls shows futurenet by default. Is this not sufficient?

stellarsaur avatar Nov 22 '23 20:11 stellarsaur

Note that as part of the following issue the default identity will be removed:

  • https://github.com/stellar/soroban-tools/issues/1079

leighmcculloch avatar Nov 22 '23 20:11 leighmcculloch

Replaced with stellar keys (more intuitive naming) and specifically for this command stellar keys ls

janewang avatar Jul 02 '24 21:07 janewang