HelloZeroNet / Documentation

ZeroNet Documentation
https://zeronet.readthedocs.org/
GNU General Public License v2.0
74 stars 107 forks source link

Fixes for content.json #100

Closed anoadragon453 closed 5 years ago

anoadragon453 commented 5 years ago

Fixes to the Structure of content.json page. Some questions I still have though:

For signers_sign, we currently have the following example:

signs_required: 1:1PcxwuHYxuJEmM4ydtB1vbiAY6WkNgsz9G,1CK6KHY6MHgYvmRQ4PAafKYDrg1ejbH1cE
signed message: MEUCIQDuz+CzOVvFkv1P2ra9i5E1p1G0/1cOGecm7GpLpMLhuwIgBIbCL0YHXD1S2+x48QS5VO/rISrkdLiUR+o+x1X0y1A=

Should the "signed message" field in the example instead be "signers_signed"? Also is signs_required really an optional field? Does it default to 1?

Also, for includes, we have the example:

"includes": {
  "data/users/content.json": {
    "signers": [  # Possible signers address for the file
      "1LSxsKfC9S9TVXGGNSM3vPHjyW82jgCX5f"
    ],
    "signers_required": 1 # The *number* of Valid signs required to accept the file (Multisig possibility),
    "files_allowed": "data.json", # Preg pattern for the allowed files in the include file
    "includes_allowed": false, # Whether nested includes are allowed
    "max_size": 10000, # Max total filesize allowed in the include (in bytes)
  }
}

Is max_size the size of the content.json file itself in bytes, or the files it's signing?

HelloZeroNet commented 5 years ago

Should the "signed message" field in the example instead be "signers_signed"? Also is signs_required really an optional field? Does it default to 1?

Actually multisig is not implemented yet, so right now it's always 1

Is max_size the size of the content.json file itself in bytes, or the files it's signing?

Total size of content.json + other files submitted by the user.

anoadragon453 commented 5 years ago

Thanks for the answers. Fixes made.

anoadragon453 commented 5 years ago

This looks good to me now.

anoadragon453 commented 5 years ago

Ah wait, hold up Krixano, those files I just pushed weren't meant for this PR.

anoadragon453 commented 5 years ago

Fixed now. Will take your statements into account on the other files in a new PR @krixano, thanks!