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]: Cannot update Validator Description Metadata #23413

Closed
1 task done
corverroos opened this issue Jan 16, 2025 · 0 comments · Fixed by #23461
Closed
1 task done

[Bug]: Cannot update Validator Description Metadata #23413

corverroos opened this issue Jan 16, 2025 · 0 comments · Fixed by #23461
Assignees
Labels

Comments

@corverroos
Copy link

corverroos commented Jan 16, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

While reading through the MsgEditValidator logic, I noticed a bug introduced in PR #21315 in x/staking/types/validator.go#Description.UpdateDescription.

The bug results in Metadata never being updated.

The code in question is:

	if d2.Metadata.ProfilePicUri == DoNotModifyDesc {
		d2.Metadata.ProfilePicUri = d.Metadata.ProfilePicUri
	}

	return NewDescription(
		d2.Moniker,
		d2.Identity,
		d2.Website,
		d2.SecurityContact,
		d2.Details,
		d.Metadata, <- bug is here
	).Validate()

The problem is that d.Metadata is used in NewDescription instead of d2.Metadata.

Cosmos SDK Version

v1.0.0

How to reproduce?

Submit an MsgEditValidator that modifies any of the two Description.Metadata fields, see that they are ignored.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Cosmos-SDK Jan 16, 2025
@corverroos corverroos changed the title [Bug]: [Bug]: Cannot update Validator Description Metadata Jan 16, 2025
@tac0turtle tac0turtle moved this from 📋 Backlog to 🤸‍♂️ In Progress in Cosmos-SDK Jan 16, 2025
@ziscky ziscky moved this from 🤸‍♂️ In Progress to 👀 Waiting / In review in Cosmos-SDK Jan 20, 2025
@github-project-automation github-project-automation bot moved this from 👀 Waiting / In review to 🥳 Done in Cosmos-SDK Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🥳 Done
Development

Successfully merging a pull request may close this issue.

2 participants