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

Refactor conviction voting to have field names in events #5280

Closed

Conversation

davidk-pt
Copy link
Contributor

@davidk-pt davidk-pt commented Aug 8, 2024

Change to use Rust named event fields paritytech/substrate#9903

@paritytech/frame-coders @seadanda

@davidk-pt davidk-pt requested a review from a team as a code owner August 8, 2024 08:59
@davidk-pt davidk-pt added I4-refactor Code needs refactoring. T2-pallets This PR/Issue is related to a particular pallet. and removed I4-refactor Code needs refactoring. labels Aug 8, 2024
davidk-pt pushed a commit that referenced this pull request Aug 8, 2024
@davidk-pt davidk-pt force-pushed the davidk/refactor-conviction-voting-event-fields branch from 78c2e2f to dd74d26 Compare August 8, 2024 11:41
@seadanda seadanda requested review from seadanda and muharem August 8, 2024 14:01
/// An account has delegated their vote to another account.
Delegated { who: T::AccountId, target: T::AccountId },
/// An account has cancelled a previous delegation operation.
Undelegated { who: T::AccountId },
Copy link
Contributor

@muharem muharem Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change might break things for the clients. It's used in the governance. Not sure what we gain here.
I've seen the issue this PR trying to address. This is my personal opinion. I would not change it for existing events, specifically for the functionality that widely adopted. But for new events I would definitely use named fields.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josepot @Tbaut @ERussel what do you think about such change? do clients handle this with metadata?

Copy link

@Tbaut Tbaut Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the ping. The benefit it brings is negligible compared to the amount of UIs this is potentially going to break, it's indeed not worth it IMHO.

@davidk-pt
Copy link
Contributor Author

Closing not to break existing clients

@davidk-pt davidk-pt closed this Aug 12, 2024
@davidk-pt davidk-pt deleted the davidk/refactor-conviction-voting-event-fields branch August 12, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants