In block 978971
, we proposed a change of technical committee. I could find the block with this request on a subsquid indexer:
{
batch(
limit: 10
includeAllBlocks: false
events: [{ name: "TechnicalCommittee.Proposed" }]
) {
header {
height
}
}
}
which returned:
{
"data": {
"batch": [
{
"header": {
"height": 978700
}
},
{
"header": {
"height": 978951
}
},
{
"header": {
"height": 978971
}
}
]
}
}
It is then easier to look at it in polkadotjs app :
→ https://polkadot.js.org/apps/?rpc=wss://gdev.p2p.legal/ws#/explorer/query/978971
This call resulted in an error (BadOrigin) in block 1093031
(found with filter events: [{ name: "TechnicalCommittee.Closed" }]
).
That is because the extrinsic had the technical committee as origin, and not root. If we want this extrinsic to succeed we have to wrap it in an upgrade origin dispatch as root call (upgradeOrigin.dispatchAsRoot(call)
. But I feel like we should instead list which extrinsics accept technical committee as a valid origin. Then preventing technical committee from dispatching as root would be a good way to set the limits of its scope.
What do you think about it?
[edit] some piece of code from the runtime and what I think it means:
a vote of 2 from total of 3 is the “worst case” (?)
pub const WorstCaseOrigin: pallet_collective::RawOrigin<AccountId, TechnicalCommitteeInstance> =
pallet_collective::RawOrigin::<AccountId, TechnicalCommitteeInstance>::Members(2, 3);
a vote with at least two third of the technical committee can be upgraded to root origin
type UpgradableOrigin = pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCommitteeInstance, 2, 3>;