Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: multisign outputs key not provided #19191

Closed
1 task done
JulianToledano opened this issue Jan 23, 2024 · 4 comments · Fixed by #19239
Closed
1 task done

[Bug]: multisign outputs key not provided #19191

JulianToledano opened this issue Jan 23, 2024 · 4 comments · Fixed by #19239
Assignees
Labels

Comments

@JulianToledano
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

The multisign command now outputs the following message: 'No key name or address provided; using the default key: alice.'

This could potentially break scripts that use the redirect operator, although not a significant issue as those can always be updated to use --output-document. Main issue is it provides misleading information, as multisig key name is a required argument for the command.

Cosmos SDK Version

main

How to reproduce?

tx multi-sign... (without using --from flag)

@julienrbrt
Copy link
Member

That's actually a feature more than a bug. Whenever flag --from is required, but no key is provided, we fallback to the default from client.toml. if the default in client.toml is empty, it will fail like before.
We happen to have a default in simapp for showing the capability and facilitate testing but other chains won't.
The user would have to purposely enter a default key.

@julienrbrt
Copy link
Member

For reference: #18101

@JulianToledano
Copy link
Contributor Author

Whenever flag --from is required, but no key is provided, we fallback to the default from client.toml.

I see although as shown by the command help:
simd tx multi-sign [file] [name] [[signature]...] [flags]

The name of the key is a required argument but not the --from flag. Maybe we could change that just leave the file as argument and check --from has been set?

@julienrbrt
Copy link
Member

I see, then it's a bug indeed. I don't think we should change the command UX.
We could set the from like we did in bank before autocli: https://github.com/cosmos/cosmos-sdk/blob/release/v0.50.x/x/bank/client/cli/tx.go#L50

@JulianToledano JulianToledano self-assigned this Jan 25, 2024
@JulianToledano JulianToledano linked a pull request Jan 25, 2024 that will close this issue
12 tasks
@github-project-automation github-project-automation bot moved this from 👀 To Do to 🥳 Done in Cosmos-SDK Jan 26, 2024
@tac0turtle tac0turtle removed this from Cosmos-SDK Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants