-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: add block number for CTypes #440
Conversation
This reverts commit 8875d86.
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.
Looks good. Just a few points that I would like to get clarified.
runtimes/spiritnet/src/lib.rs
Outdated
@@ -553,6 +553,8 @@ impl delegation::Config for Runtime { | |||
type Deposit = constants::delegation::DelegationDeposit; | |||
} | |||
|
|||
type CTypeBlockNumberSetOrigin = pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCollective, 3, 5>; |
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 would argue that we should do that using a general vote and not the TC.
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.
By general vote you are referring to a referendum or the Council collective? I agree we shouldnt give special power to special entities.
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.
referendum
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 don't see why the general public would be concerned about setting the preimage for a CType hash. Yes, it will probably be a one-off operation, but I don't see why we want to wait 2+ weeks to do something that only has technical motivations?
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.
Since the block number is set automatically, you would only need to trust the blockchain, that the number is correct. So trust the chain == trust that polkadot checks everything and the KILT governance(all token holders) is honest and fair.
If you allow the TC to set the block number you would need to trust them, that they set the correct number. It feels weaker.
Also since this should only be necessary once after the upgrade, i would say it's fine to wait 2 weeks.
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.
Adding to Albi's remarks, I would do some minor changes to the migration.
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.
LGTM
I don't have a strong opinion for governance issue. If you are not convinced by the arguments, I'm also fine with leaving it like it is.
William was suggesting we want to have a migration strategy for CTypes that mirrors what the Ethereum migration does. Do we still want to do that? I think in this case is probably unnecessary, but it is also true that this feature is not super high priority and could wait. |
I think it's not necessary. The current strategy is fine. |
Fixes https://github.com/KILTprotocol/ticket/issues/2327 and fixes https://github.com/KILTprotocol/ticket/issues/2325.
Adds a creation block number to future CTypes, and it introduces a
set_block_number
extrinsic that can be called by sudo on standalone and Peregrine, and by 3/5ths of the technical committee on Spiritnet (this can be changed if we agree to). I personally think that involving (part of) the technical committee is the right compromise between agility of action and decentralization. An alternative, more complex solution would be to implement an RPC function that verifies, given the block number and the ctype hash, whether there was a tx in that block for the given CType. This would be cool, and technically could also be feeless, but I am not sure it's worth the hassle.