zigbee-alliance/distributed-compliance-ledger

Feature: Reject a proposal

Closed this issue · 3 comments

As a Trustee, I can reject a proposal, so that once more than 1/3 of rejects is received, the proposal goes to rejected state.

Notes:

  • It should not be possible to vote multiple times for the same Trustees, so once approve/reject is sent, no more votes are accepted from that Trustee
  • The rejected proposal should not be removed, but kept in the state for history purposes
  • All votes (rejects and approvals) must be stored and kept for the rejected proposals for the history purposes.

Pre 1.0

@abdulla-ashurov, issue #288 seems to be related to this issue. Consider including it to implementation if applicable.

Plan of attack for section Auth:

Create a message and a new entity:

  • Add a new command reject-add-account and create a new entity RejectedAccount with fields Account

Note: If we have more than 1/3 of rejects is received, the proposal goes to a new entity RejectedAccount.

Plan of attack for section Validator:

Create a message and a new entity:

  • Add a new command reject-disable-node and create a new entity RejectedNode with fields Account

Note: If we have more than 1/3 of rejects is received, the proposal goes to a new entity RejectedDisableNode.

Plan of attack for section PKI:

Create a message and a new entity:

  • Add a new command reject-x509-root-cert and create a new entity RejectedX509RootCert

Note: If we have more than 1/3 of rejects is received, the proposal goes to a new entity RejectedX509RootCert.

Plan of attack for section Upgrade:

Create a message and a new entity:

  • Add a new command reject-upgrade and create a new entity RejectedUpgrade

Note: If we have more than 1/3 of rejects is received, the proposal goes to a new entity RejectedUpgrade.

Check:

  • A Trustee should not vote multiple times for the same account, so once approve/reject is sent, no more votes are accepted from that Trustee
  • The rejected proposal should not be removed, but kept in state for historical purposes.
  • All votes (reject and approvals) must be stored and kept for the rejected proposals for historical purposes.

PR: