feat: flag to disallow asset management changes#875
feat: flag to disallow asset management changes#875rflechtner merged 9 commits intobonded-coins-audit-fixesfrom
Conversation
|
I think it makes sense, but there start to be too many |
I was thinking the same thing. The delegation pallet uses bitflags, which has terrible client-side handling, but a regular struct containing booleans should work just as well? If you think this should be 'extensible' in the sense that we reserve additional bits for future use without migrations, we could probably add dummy fields to it. Alternatively we could use bitflags on the storage level but structs in extrinsics and runtime calls. |
|
Yes either use bitflags in storage and provide a |
|
can't say much about the implementation details, but I think the idea is good, having the option to disable the manager from having complete control over the tokens in all accounts can help. |
I experimented with nesting all immutable settings relating to bonded currencies in a struct, what do you think about that? 7c3c127 |
|
Yes this looks already better, and harder to misuse because of the named properties. |
| /// The current storage version. | ||
| const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); |
There was a problem hiding this comment.
@ntn-x2 I wasn't sure about this one, but we need to bump the storage version if we change the pool struct right?
|
@ntn-x2 I fixed tests and formatting, so if you agree that we can implement migrations for peregrine separately this is ready to be reviewed. My idea is that I'd implement migrations with the help of Adel once he's back next week, as we'd need this merged by Wednesday before the audit deadline runs out. |
|
Perhaps you can remove the storage version here, and introduce it in the PR that also adds the migration. |
I kinda like that the failing test reminds us of the migration we still need to do though, and it doesn't seem to mess with anything else |
re/ KILTProtocol/ticket#3800
Addresses potential centralisation concerns around manager permissions. Having this additional flag could make the extent of centralisation of powers in a pool more transparent. If it is set to
falsethe reset_team() transaction cannot be used on this pool, in which case the manager has much more limited privileges (locking/unlocking and initiating refunding). This flag can only be set on pool creation and not changed.Checklist:
array[3]useget(3), ...)