I am building a network where I need that nodes will join throuhgout the lifetime of the application and as first implementation I want to change the channel configuration in order to change the policies regarding who needs to sign a configuration change. Therefore I have followed correctly the procedure where I fetch the latest configuration block, I am decoding it and I am able to edit it in a JSON format.
{
"channel_group": {
"groups": {
"Application": {
},
"Orderer": {
}
},
"mod_policy": "Admins",
"policies": {
"Admins": {
"mod_policy": "Admins",
"policy": {
"type": 3,
"value": {
"rule": "ANY",
"sub_policy": "Admins"
}
},
"version": "0"
},
"Readers": {
"mod_policy": "Admins",
"policy": {
"type": 3,
"value": {
"rule": "ANY",
"sub_policy": "Readers"
}
},
"version": "0"
},
"Writers": {
"mod_policy": "Admins",
"policy": {
"type": 3,
"value": {
"rule": "ANY",
"sub_policy": "Writers"
}
},
"version": "0"
}
},
"values": {
},
"version": "0"
},
"sequence": "8"
}
So I have the above output and I change the rule of Admins policy to ANY (as it is changed).
And after that I encode it back to envelope and start signing.
I have 4 organizations currently and since the default rule is to sign the Majority of Admins I sign one by one with all organizations.
If I sign with only one or two organization Admins and submit the update I get the following error:
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'channel': error authorizing update: error validating DeltaSet: policy for [Policy] /Channel/Admins not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 2 of the 'Admins' sub-policies to be satisfied
Which is very reasonable.
After 3 signatures out of 4, as Majority rule exists I get the following change in update and submit:
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'channel': error authorizing update: error validating DeltaSet: policy for [Policy] /Channel/Admins not satisfied: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 2 of the 'Admins' sub-policies to be satisfied
So as we can see 1 of the sub-policies were satisfied but at this point it needs 2. And here is the point where I am not understanding. What is the second sub-policy? And since I have signed with all the Admins of each organization, who else needs to sign this configuration channel update?
Thank you