paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

[pallet_collective] set_members Extrinsic Allows Arbitrary 'prime' Argument #14353

Closed ToufeeqP closed 1 year ago

ToufeeqP commented 1 year ago

Is there an existing issue?

Experiencing problems? Have you tried our Stack Exchange first?

Motivation

The motivation behind filing this issue is to address problematic behaviour in the pallet_collective module of the FRAME pallets. The current implementation of the set_members extrinsic allows for an arbitrary value to be passed as the prime argument, despite its intended purpose of representing one of the members in the new_members argument. This behaviour deviates from the expected functionality.

Request

The request is to modify the set_members extrinsic in the pallet_collective module of the FRAME pallets to enforce the intended usage of the prime argument.

Solution

To address this issue, I propose that the prime argument should be restricted to accepting only one of the accounts listed in the new_members argument. This modification will ensure that the set_members extrinsic functions as intended, allowing for correct and secure updates to the collective membership. I would be happy to raise a PR to fix this issue.

Are you willing to help with this request?

Yes!

ggwpez commented 1 year ago

Yea sounds reasonable. Please go ahead if you like 😄