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
[22.0] stellar keys generate should no longer fund #1407
Currently, stellar keys generate not only generate keys, but also funds them. This is a bit confusing for the user (e.g. the original error Chad has encountered), and makes thing more complicated because same thing can be done in multiple ways.
The proposal is to remove fund functionality from keys generate, as well as all network related flags (no network connection is needed anymore, we just generating key pair), and --no-fund (this is a default behavior now).
User can still fund keys with stellar keys fund
Because this is a breaking change, we can't make it before 22.0
This is because we flatten in the network and told clap we expected either rpc url and network passphrase or network. One solution is to remove from clap and instead the error will move from parsing to just when a the network needs to be resolved. So it should be an easy fix since we already handle the latter error.
Another option is we remove funding from generating. I find it odd that every time I generate a key, I get an account on testnet, when sometimes I don't want an account created either now or not yet.
If no network provided, should generate keys and quietly skip funding.
A downside of this is that when someone has a network set as an env var, it'd still be picked up there, so I could feel like I'm typing a simple generate command but then get hit with funding because I set the env var for commands that I expected to use the network.
I think the idea was to flip the logic to always not fund as a breaking change in 22.0
User can still provide --fund to fund the new accounts explicitly. WDYT @leighmcculloch ?
Adding a --fund flag isn't too different to folks using the fund command, so if we're removing the default fund behavior, I'd suggest we leave off the --fund flag so there's one way to do the thing rather than two.
But a flipped flag would be fine too, it's just two ways to do the same thing.
Hmm yeah that makes sense, you can just stellar keys generate alice && stellar keys fund alice, which is just a bit more verbose than stellar keys generate alice --fund. IMO it makes sense that generate only generates the key and doesn't fund it :)
Yeah we should strive to make each command do one thing as much as possible. I am still a little annoyed that deploy hash --wasm and does the install as well. Being explicit as much as possible helps people understand the steps.
We can indeed make all network args optional, but then we need to do validation ourselves, which will give a different input compared to clap (don't think it's a major downside, but still)
I'm saying we are already doing the validation. So removing the clap requires should not break anything, though we might need to improve the error message.
This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 30 days unless the stale label is removed, and the assignee is removed or updated.
Activity
willemneal commentedon Jun 26, 2024
This is because we flatten in the network and told clap we expected either rpc url and network passphrase or network. One solution is to remove from clap and instead the error will move from parsing to just when a the network needs to be resolved. So it should be an easy fix since we already handle the latter error.
leighmcculloch commentedon Jul 11, 2024
Another option is we remove funding from generating. I find it odd that every time I generate a key, I get an account on testnet, when sometimes I don't want an account created either now or not yet.
willemneal commentedon Jul 11, 2024
Yeah perhaps we should flip the flag. This way users who want to have it work in one step can still use just one command.
leighmcculloch commentedon Jul 31, 2024
A downside of this is that when someone has a network set as an env var, it'd still be picked up there, so I could feel like I'm typing a simple generate command but then get hit with funding because I set the env var for commands that I expected to use the network.
ifropc commentedon Jul 31, 2024
I think the idea was to flip the logic to always not fund as a breaking change in 22.0
User can still provide
--fundto fund the new accounts explicitly. WDYT @leighmcculloch ?leighmcculloch commentedon Jul 31, 2024
Adding a
--fundflag isn't too different to folks using thefundcommand, so if we're removing the default fund behavior, I'd suggest we leave off the--fundflag so there's one way to do the thing rather than two.But a flipped flag would be fine too, it's just two ways to do the same thing.
ifropc commentedon Jul 31, 2024
Hmm yeah that makes sense, you can just
stellar keys generate alice && stellar keys fund alice, which is just a bit more verbose thanstellar keys generate alice --fund. IMO it makes sense thatgenerateonly generates the key and doesn't fund it :)willemneal commentedon Jul 31, 2024
Yeah we should strive to make each command do one thing as much as possible. I am still a little annoyed that deploy hash --wasm and does the install as well. Being explicit as much as possible helps people understand the steps.
[-]generate keys --no-fund[/-][+][22.0] `stellar keys generate` should no longer fund[/+]fnando commentedon Sep 11, 2024
I feel the case where keys are funded is more common than the other way around. I believe we should fix
--no-fundrather than changing the behavior. 🤔If not, I vote for adding
--fundinstead, because that's better than having to issue two commands.5 remaining items
fnando commentedon Sep 26, 2024
@ifropc maybe this a good reason for #1616. It's easier to make one single argument optional when needed. 🤔
ifropc commentedon Sep 26, 2024
^ One of the reasons I want to see that change actually 😆
willemneal commentedon Sep 27, 2024
I'm saying we are already doing the validation. So removing the clap requires should not break anything, though we might need to improve the error message.
github-actions commentedon Dec 5, 2024
This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 30 days unless the stale label is removed, and the assignee is removed or updated.