zigbee-alliance / distributed-compliance-ledger

DCL is a public permissioned ledger framework for certification of device models. The ledger is based on Cosmos SDK and CometBFT (Tendermint).
Apache License 2.0
89 stars 44 forks source link

Broken design pattern in the certificate.proto #611

Closed robszewczyk closed 3 days ago

robszewczyk commented 1 month ago

Problem

Version 1.4 of the DCL introduced extensions to certificate.proto :

  bool isNoc = 15;
  uint32 schemaVersion = 16;

The design pattern is short-sighted and error prone:

Proposed solution

    CertificateType certificateType = 15;

This remains wire compatible with the previous isNoc because both bool and enums are encoded as varints.

hawk248 commented 3 weeks ago

DCL TT : change isNoc to enum as specified here.