decentralized-identity / sidetree

Sidetree Specification and Reference Implementation
https://identity.foundation/sidetree/spec
Apache License 2.0
437 stars 112 forks source link

Common protocol parameter format #886

Open troyronda opened 4 years ago

troyronda commented 4 years ago

Are there any generic Sidetree protocol parameters that should have a common format?

Here are our current trustbloc parameters:

{
  "genesisTime": 0,
  "multihashAlgorithm": 18,
  "maxOperationCount": 10,
  "maxOperationSize": 200000,
  "compressionAlgorithm": "GZIP",
  "maxAnchorFileSize": 1000000,
  "maxMapFileSize": 1000000,
  "maxChunkFileSize": 1000000,
  "patches": [
    "replace",
    "add-public-keys",
    "remove-public-keys",
    "add-services",
    "remove-services",
    "ietf-json-patch"
  ],
  "signatureAlgorithms": [
    "EdDSA",
    "ES256",
    "ES256K"
  ],
  "keyAlgorithms": [
    "Ed25519",
    "P-256",
    "secp256k1"
  ]
}
csuwildcat commented 4 years ago

Hmm, there are some params like this called out in the spec, so I think this comes down to style guide choices if we want to codify some of them with a JSON-based example. The current style guide I believe we chose indicates we would want to use uppercased and underscored names for const/config params: https://google.github.io/styleguide/jsguide.html#naming-constant-names

OR13 commented 3 years ago

IMO these belong in the "sidetree version" response, exposed via the REST API....

sandrask commented 3 years ago

@thehenrytsai I may have misunderstood your comment here: https://github.com/decentralized-identity/sidetree/blob/e64bcd3b7389350a9a8d50d8c8e6146a38ffd7d0/lib/core/versions/latest/OperationProcessor.ts#L91

I will remove hashAlgorithm parameter since it looks like it was never meant to be different hash for commitment double hashing