# HG changeset patch # User neko259 # Date 2014-08-24 07:12:06 # Node ID b2941d7fa4988915de3bac375f569894d89a3af3 # Parent 2b96b9e7240f2de4e5f00aaa5dee693d0945b958 Clarified the sync document diff --git a/docs/sync.markdown b/docs/sync.markdown --- a/docs/sync.markdown +++ b/docs/sync.markdown @@ -17,19 +17,21 @@ Protocol version is the version of the s of data models. If at least one of them is different, the sync cannot be performed. -The node signs the data with its key. The receiving node saves the key at the +The node signs the data with its keys. The receiving node saves the key at the first sync and checks it every time. If the key has changed, the info won't be -saved from the node (or the node id must be changed). +saved from the node (or the node id must be changed). A model can be signed +with several keys but at least one of them must be the same as in the global +ID to verify the sender. Each node can have several keys. Nodes can have shared keys to serve as a pool (several nodes with the same key). -Each post has an ID in the unique format: node-id/post-id +Each post has an ID in the unique format: [key-type][key][local-id] -All requests pass a request type, protocol and model versions and a list of +All requests pass a request type, protocol and model versions, and a list of optional arguments used for filtering. -Each protocol has its own version. Version consists of 2 numbers: first is +Each request has its own version. Version consists of 2 numbers: first is incompatible version (1.3 and 2.0 are not compatible and must not be in sync) and the second one is minor and compatible (for example, new optional field is added which will be igroned by those who don't support it yet).