This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow council to slash treasury tip #7753
Allow council to slash treasury tip #7753
Changes from 1 commit
5efbfee
b9a938c
170f288
5a62c97
b157188
26478ea
04f41a6
d03d70b
b18bdcd
e34b421
7088c3d
d22e8b6
3b8bb56
875257f
ddd1ead
f7261dc
0aa051a
287269b
f9c865c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to keep this at the bottom of the list.
You have to think about how these structures and enums are encoded. At some point, there will be an event emitted with index 5 for example. If you place a new item at 4, then all other items shift forward by 1, and now 5 means something different. This isn't always important, and if you are using metadata correctly it shouldnt matter, but here, i dont see an advantage to introduce a breaking encoding change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to make me aware about encoding logic behind this enums, moved the new one to end of the list. Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to write a new benchmark for this, and use the
T::WeightInfo
trait like all the other functions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This on the other hand is VERY important to put at the bottom.
This would be a breaking change for the transaction ordering which would actually be a breaking change for most chains.
Specifically, things like Hardware wallets (ledgers etc) depend on the order of the extrinsics in order to correctly encode and sign transactions.
When you submit a transaction to a chain, you are sending only 2 numbers to identify the extrinsic: the module, and the extrinsic number.
If you add a new dispatchable function in the middle of the other dispatchable function, then the order and number of the extrinsics will change, and this is not good.
Instead, if you place new things at the bottom of the list, then the ordering will always be backwards compatible...
So please place this at the bottom of the extrinsics list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it Shawn, moved to the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very much agreeing. An additional note for when you have to break the transaction version is to check if the next polkadot release is already breaking it or not. It would be sensible to postpone non-urgent transaction-breaking PRs to a release for which hardware developers have been notified of the change and whatnot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to see balance changes here. So show that a reserve balance is taken for creating a tip, and that it is completely removed from the user after the slash event.
etc..