sidetree icon indicating copy to clipboard operation
sidetree copied to clipboard

Common protocol parameter format

Open troyronda opened this issue 3 years ago • 3 comments

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"
  ]
}

troyronda avatar Oct 13 '20 19:10 troyronda

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

csuwildcat avatar Nov 03 '20 20:11 csuwildcat

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

OR13 avatar Nov 10 '20 21:11 OR13

@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

sandrask avatar Nov 10 '20 22:11 sandrask