There are 03 main phases in the process of updating the channel configuration:
- (1) Get the latest configuration from the Orderer.
- (2) Modify the configuration.
- (3) Sign and send a transaction to the Orderer to update channel configuration.
I got an error at step (3) while trying to call updateChannel()
function which is:
{ status: 'BAD_REQUEST',
info: 'error authorizing update: error validating DeltaSet: policy for [Value] /Channel/Orderer/BatchSize not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining' }
I followed the code from hyperledger-sdk-node repo about Channel update here
The policy of the Orderer of the network looks like this (I'm not sure about the problem I've got here)
# Policies defines the set of policies at this level of the config tree
# For Orderer policies, their canonical path is
# /Channel/Orderer/<PolicyName>
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
# BlockValidation specifies what signatures must be included in the block
# from the orderer for the peer to validate it.
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
More about the relevant code:
let signatures = [];
signatures.push(client.signChannelConfig(config_proto));
let request = {
name: channelName,
// orderer: channel.getOrderer("orderer.example.com"), // Do I really need this?
config: config_proto, // response from requesting configtxlator/compute
txId: client.newTransactionID(),
signatures: signatures
};
try {
let result = await client.updateChannel(request); // ERROR HERE
console.log("result", result);
} catch (error) {
console.log(error);
}
If you need more information, just tell me! Any ideas should be helpful