|
| 1 | +# Voting Config Option |
| 2 | + |
| 3 | +`chaincode_ops` chaincode provides a voting config option. |
| 4 | +This allows OpsSC users to configure the maximum number of malicious organizations (`f`) in the voting process. |
| 5 | +This config option is not yet supported for channel_ops. |
| 6 | +- If the option is set, `2f + 1` is required to judge a proposal gets `Approved`. |
| 7 | +- If the option is not set, a majority of all participating organizations is required to judge a proposal gets `Approved`. |
| 8 | + |
| 9 | +You can use this to call the following CC functions in `chaincode_ops` chaincode. |
| 10 | +- `SetMaxMaliciousOrgsInVotes()`: sets number of max malicious orgs in votes. |
| 11 | +- `UnsetMaxMaliciousOrgsInVotes()`: unsets number of max malicious orgs in votes. |
| 12 | +- `GetVotingConfig()`: returns the voting config. |
| 13 | + |
| 14 | +## Example: Skip the Voting Process |
| 15 | + |
| 16 | +By using this, it is possible to configure to skip the voting process from other organizations for chaincode proposals. |
| 17 | +With this configuration, when a proposal request is sent by one organization via the REST API of the OpsSC API server, |
| 18 | +the deployment of the proposed chaincode is automatically executed immediately. |
| 19 | + |
| 20 | +The following command is an example by invoking the SC function via an OpsSC API server: |
| 21 | + |
| 22 | +```bash |
| 23 | +curl -X POST "http://localhost:3000/api/v1/utils/invokeTransaction" \ |
| 24 | +-H "Expect:" \ |
| 25 | +-H 'Content-Type: application/json; charset=utf-8' \ |
| 26 | +-d @- <<EOF |
| 27 | +{ |
| 28 | + "channelID": "ops-channel", |
| 29 | + "ccName": "chaincode_ops", |
| 30 | + "func": "SetMaxMaliciousOrgsInVotes", |
| 31 | + "args": ["0"] |
| 32 | +} |
| 33 | +EOF |
| 34 | +``` |
| 35 | + |
| 36 | +_NOTE:_ In this configuration, chaincode is deployed by a single organization's decision (it means a centralized manner). |
| 37 | +Note that this means that OpsSC is not used for the decentralized operations that it originally envisioned, which partially undermines the value it provides. |
| 38 | +Of course, it is useful for testing or developing phase, etc. |
0 commit comments