{"action":"created","issue":{"url":"https://api.github.com/repos/dashpay/dash/issues/2288","repository_url":"https://api.github.com/repos/dashpay/dash","labels_url":"https://api.github.com/repos/dashpay/dash/issues/2288/labels{/name}","comments_url":"https://api.github.com/repos/dashpay/dash/issues/2288/comments","events_url":"https://api.github.com/repos/dashpay/dash/issues/2288/events","html_url":"https://github.com/dashpay/dash/pull/2288","id":359508980,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0OTgzNTg1","number":2288,"title":"M-of-N-like sporks","user":{"login":"gladcow","id":28437763,"node_id":"MDQ6VXNlcjI4NDM3NzYz","avatar_url":"https://avatars3.githubusercontent.com/u/28437763?v=4","gravatar_id":"","url":"https://api.github.com/users/gladcow","html_url":"https://github.com/gladcow","followers_url":"https://api.github.com/users/gladcow/followers","following_url":"https://api.github.com/users/gladcow/following{/other_user}","gists_url":"https://api.github.com/users/gladcow/gists{/gist_id}","starred_url":"https://api.github.com/users/gladcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gladcow/subscriptions","organizations_url":"https://api.github.com/users/gladcow/orgs","repos_url":"https://api.github.com/users/gladcow/repos","events_url":"https://api.github.com/users/gladcow/events{/privacy}","received_events_url":"https://api.github.com/users/gladcow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-09-12T14:31:34Z","updated_at":"2018-09-14T15:10:56Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/dashpay/dash/pulls/2288","html_url":"https://github.com/dashpay/dash/pull/2288","diff_url":"https://github.com/dashpay/dash/pull/2288.diff","patch_url":"https://github.com/dashpay/dash/pull/2288.patch"},"body":"See issue https://github.com/dashpay/dash/issues/2221\r\n\r\n- allow multiple hardcoded spork addresses (N) to be specified in chainparams/cmd-line/config (same signers for all sporks);\r\n- allow multiple messages with the same id/value signed by different spork addresses;\r\n- (de)activate any spork only when at least M similar message with the same id/value signed by different signers were received (the same M for all sporks);\r\n\r\n    \"M-of-N\" spork implementation requires spork signers consensus achieved with some external communication and doesn't offer any facilities for such consensus achievement. If this consensus is not achived, the spork is treated as it has default value. For example, if sporks are configured as \"at least 2 signers of 5 possible\" and some spork has default value `0`, and 2 signers broadcast this spork value `1`, while 2 other signers broadcast value `2` (and `nTimeSigned` field has the same value, see details later), this spork is treated as it has value `0`.\r\n\r\n    Also, several possible signers require new logic for `nTimeSigned` field processing. In old implementation this field is used to separate old non-actual spork messages from the new spork messages (spork message with bigger `nTimeSigned` overwrites message with smaller one). We need similar logic in new implementation. For example, we have the same configuration like in previous example, 2-of-5-signers. At moment `t1` signers 1, 2, 3 broadcast spork with value `1` and spork switches to this value. After that at moment `t2` signers 4 and 5 tries to switch this spork to value `2`, and fail to do this, because votes of first 3 signers don't allow any node to calculate current spork value, and spork goes to default value. We can't also simply overwrite all \"old\" spork messages of other signers because of the fact that in this case just one signer can \"rallback\" several other signer's messages.\r\n\r\n    To resolve this issue we can require all signers to use the same value of the `nTimeSigned` field to treat their messages as a part of the same \"spork broadcast\" and allow such signer's groups to overwrite messages of other signer's groups with less `nTimeSigned` field value if this group size is bigger or equal to the minimum configured value (M in M-of-N). It is difficult to use current time for this goal as it was before, because signer's clocks are not synchronized and signers can broadcast their messages at slightly different moments of time. I think it is better to use increasing counter instead and allow signers to set its value directly. Also it is better to allow spork signers to use some default way to calculate this counter value for their convenience and I have added such calculation, but this calculation is not a facility for achieving of signers consensus, so it doesn't resolve all possible situations and sometimes signers should set counter value explicitly. Also,  I've renamed `nTimeSigned` field to `nBroadcastID` to reflect its new meaning.\r\n"},"comment":{"url":"https://api.github.com/repos/dashpay/dash/issues/comments/421389839","html_url":"https://github.com/dashpay/dash/pull/2288#issuecomment-421389839","issue_url":"https://api.github.com/repos/dashpay/dash/issues/2288","id":421389839,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTM4OTgzOQ==","user":{"login":"UdjinM6","id":1935069,"node_id":"MDQ6VXNlcjE5MzUwNjk=","avatar_url":"https://avatars0.githubusercontent.com/u/1935069?v=4","gravatar_id":"","url":"https://api.github.com/users/UdjinM6","html_url":"https://github.com/UdjinM6","followers_url":"https://api.github.com/users/UdjinM6/followers","following_url":"https://api.github.com/users/UdjinM6/following{/other_user}","gists_url":"https://api.github.com/users/UdjinM6/gists{/gist_id}","starred_url":"https://api.github.com/users/UdjinM6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UdjinM6/subscriptions","organizations_url":"https://api.github.com/users/UdjinM6/orgs","repos_url":"https://api.github.com/users/UdjinM6/repos","events_url":"https://api.github.com/users/UdjinM6/events{/privacy}","received_events_url":"https://api.github.com/users/UdjinM6/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T15:10:56Z","updated_at":"2018-09-14T15:10:56Z","author_association":"NONE","body":"@gladcow sounds good (assuming (4) means \", support providing multiple `-sporkaddr`s instead\")"}}
{"actor":{"display_login":"UdjinM6"}}