{"action":"closed","number":1120,"pull_request":{"url":"https://api.github.com/repos/dashpay/dash/pulls/1120","id":91715332,"html_url":"https://github.com/dashpay/dash/pull/1120","diff_url":"https://github.com/dashpay/dash/pull/1120.diff","patch_url":"https://github.com/dashpay/dash/pull/1120.patch","issue_url":"https://api.github.com/repos/dashpay/dash/issues/1120","number":1120,"state":"closed","locked":false,"title":"Yet another PrivateSend refactoring/optimization/bug fix","user":{"login":"UdjinM6","id":1935069,"avatar_url":"https://avatars.githubusercontent.com/u/1935069?v=3","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},"body":"This started as \"_Ok, I have 3 wallets open locally in mixing mode and they only need to go through ~20 mns so they should have started to see almost the same info about mns available for mixing already. Why do they mix so rarely then?_\" and escalated quickly 😇 \r\n\r\nSummarized list of changes:\r\n- refactor `IsDenomCompatibleWithSession` - `CreateNewSession`, `AddUserToExistingSession` and `IsAcceptableDenomAndCollateral`\r\n- refactor `UpdatePoolStateOnClient`: states should be switching via local logic (except when entries were rejected), this function should only do very limited pre-defined work\r\n- refactor `Charge*Fees`: reduce steps, no need for wallet usage here\r\n- refactor `CheckPool`, add `CreateFinalTransaction`/rename `CommitFinalTransaction`\r\n- refactor `CheckTimeout`: should not rely on `CDarkSendEntry`'s `nTimeAdded`\r\n- refactor SetState: local only now\r\n- dsq fixes: make sure dsq is not too much in the future, store own dsq to avoid processing it when it's relayed back by other nodes, do not process seen dsq, do not alter nTime for dsq localy, use memory only `fTried` instead, remove `GetAddress` and `GetProtocolVersion` for dsq\r\n- fix dsq rate limit bug: should not use `vecMasternodesUsed` when connecting from queue, should check `nLastDsq` only\r\n- do not read dsvin data when there is not enough session users\r\n- remove excessive bool arg in dscomplete\r\n- check for session readiness early\r\n- fail to process message on the wrong side (client/mn)\r\n- fail and reset pool if can't sign anything in final tx\r\n- fail in `PrepareDenominate` if local pool already has entries, no matter which state we are in now\r\n- remove `POOL_STATE_TRANSMISSION`, `POOL_STATE_FINALIZE_TRANSACTION`, `STATUS_SET_STATE`, `nAmount`, `nTimeAdded`, `fSessionFoundMasternode`, `nSessionUsers`, `IsExpired`\r\n- replace `nSessionUsers` with `vecSessionCollaterals.size()`\r\n- move `mnodeman.Find` out of `CheckSignature` for PS classes\r\n- cleanup, more log verbosity for debug mode\r\n- bump min ps peer proto\r\n\r\nAs a result:\r\n- mixing wallets should rely on local logic and expected set of state switches rather then updates from masternodes\r\n- there should be much less update messages floating around to every node on the network during mixing\r\n- protocol should be a bit more compact and much more straightforward, code should be easier to read and understand\r\n\r\nRequires `PROTOCOL_VERSION` bump to 70203.\r\n\r\nSlightly tested with one mn and 3 wallets, works for me (remember to bump local wallet proto version if you want to test this).","created_at":"2016-11-01T00:26:04Z","updated_at":"2016-11-01T07:05:44Z","closed_at":"2016-11-01T07:05:44Z","merged_at":null,"merge_commit_sha":"6b80f8e1658ae337e6c5740cd4845e0f8c940cb4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dashpay/dash/pulls/1120/commits","review_comments_url":"https://api.github.com/repos/dashpay/dash/pulls/1120/comments","review_comment_url":"https://api.github.com/repos/dashpay/dash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dashpay/dash/issues/1120/comments","statuses_url":"https://api.github.com/repos/dashpay/dash/statuses/7bc1916da4bf1e3d3cf37f7a1389977611b81f8b","head":{"label":"UdjinM6:PSFixes","ref":"PSFixes","sha":"7bc1916da4bf1e3d3cf37f7a1389977611b81f8b","user":{"login":"UdjinM6","id":1935069,"avatar_url":"https://avatars.githubusercontent.com/u/1935069?v=3","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},"repo":{"id":26767942,"name":"dash","full_name":"UdjinM6/dash","owner":{"login":"UdjinM6","id":1935069,"avatar_url":"https://avatars.githubusercontent.com/u/1935069?v=3","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},"private":false,"html_url":"https://github.com/UdjinM6/dash","description":"Dash - Reinventing Cryptocurrency","fork":true,"url":"https://api.github.com/repos/UdjinM6/dash","forks_url":"https://api.github.com/repos/UdjinM6/dash/forks","keys_url":"https://api.github.com/repos/UdjinM6/dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UdjinM6/dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UdjinM6/dash/teams","hooks_url":"https://api.github.com/repos/UdjinM6/dash/hooks","issue_events_url":"https://api.github.com/repos/UdjinM6/dash/issues/events{/number}","events_url":"https://api.github.com/repos/UdjinM6/dash/events","assignees_url":"https://api.github.com/repos/UdjinM6/dash/assignees{/user}","branches_url":"https://api.github.com/repos/UdjinM6/dash/branches{/branch}","tags_url":"https://api.github.com/repos/UdjinM6/dash/tags","blobs_url":"https://api.github.com/repos/UdjinM6/dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UdjinM6/dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UdjinM6/dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/UdjinM6/dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UdjinM6/dash/statuses/{sha}","languages_url":"https://api.github.com/repos/UdjinM6/dash/languages","stargazers_url":"https://api.github.com/repos/UdjinM6/dash/stargazers","contributors_url":"https://api.github.com/repos/UdjinM6/dash/contributors","subscribers_url":"https://api.github.com/repos/UdjinM6/dash/subscribers","subscription_url":"https://api.github.com/repos/UdjinM6/dash/subscription","commits_url":"https://api.github.com/repos/UdjinM6/dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/UdjinM6/dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/UdjinM6/dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/UdjinM6/dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/UdjinM6/dash/contents/{+path}","compare_url":"https://api.github.com/repos/UdjinM6/dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UdjinM6/dash/merges","archive_url":"https://api.github.com/repos/UdjinM6/dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UdjinM6/dash/downloads","issues_url":"https://api.github.com/repos/UdjinM6/dash/issues{/number}","pulls_url":"https://api.github.com/repos/UdjinM6/dash/pulls{/number}","milestones_url":"https://api.github.com/repos/UdjinM6/dash/milestones{/number}","notifications_url":"https://api.github.com/repos/UdjinM6/dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UdjinM6/dash/labels{/name}","releases_url":"https://api.github.com/repos/UdjinM6/dash/releases{/id}","deployments_url":"https://api.github.com/repos/UdjinM6/dash/deployments","created_at":"2014-11-17T17:21:16Z","updated_at":"2016-06-02T12:33:04Z","pushed_at":"2016-10-31T23:35:26Z","git_url":"git://github.com/UdjinM6/dash.git","ssh_url":"git@github.com:UdjinM6/dash.git","clone_url":"https://github.com/UdjinM6/dash.git","svn_url":"https://github.com/UdjinM6/dash","homepage":"https://www.dash.org","size":142081,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"dashpay:v0.12.1.x","ref":"v0.12.1.x","sha":"4894345a58d988c5dec0a0b104487b4fa2644e04","user":{"login":"dashpay","id":11511719,"avatar_url":"https://avatars.githubusercontent.com/u/11511719?v=3","gravatar_id":"","url":"https://api.github.com/users/dashpay","html_url":"https://github.com/dashpay","followers_url":"https://api.github.com/users/dashpay/followers","following_url":"https://api.github.com/users/dashpay/following{/other_user}","gists_url":"https://api.github.com/users/dashpay/gists{/gist_id}","starred_url":"https://api.github.com/users/dashpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dashpay/subscriptions","organizations_url":"https://api.github.com/users/dashpay/orgs","repos_url":"https://api.github.com/users/dashpay/repos","events_url":"https://api.github.com/users/dashpay/events{/privacy}","received_events_url":"https://api.github.com/users/dashpay/received_events","type":"Organization","site_admin":false},"repo":{"id":19352450,"name":"dash","full_name":"dashpay/dash","owner":{"login":"dashpay","id":11511719,"avatar_url":"https://avatars.githubusercontent.com/u/11511719?v=3","gravatar_id":"","url":"https://api.github.com/users/dashpay","html_url":"https://github.com/dashpay","followers_url":"https://api.github.com/users/dashpay/followers","following_url":"https://api.github.com/users/dashpay/following{/other_user}","gists_url":"https://api.github.com/users/dashpay/gists{/gist_id}","starred_url":"https://api.github.com/users/dashpay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dashpay/subscriptions","organizations_url":"https://api.github.com/users/dashpay/orgs","repos_url":"https://api.github.com/users/dashpay/repos","events_url":"https://api.github.com/users/dashpay/events{/privacy}","received_events_url":"https://api.github.com/users/dashpay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dashpay/dash","description":"Dash - Reinventing Cryptocurrency","fork":true,"url":"https://api.github.com/repos/dashpay/dash","forks_url":"https://api.github.com/repos/dashpay/dash/forks","keys_url":"https://api.github.com/repos/dashpay/dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dashpay/dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dashpay/dash/teams","hooks_url":"https://api.github.com/repos/dashpay/dash/hooks","issue_events_url":"https://api.github.com/repos/dashpay/dash/issues/events{/number}","events_url":"https://api.github.com/repos/dashpay/dash/events","assignees_url":"https://api.github.com/repos/dashpay/dash/assignees{/user}","branches_url":"https://api.github.com/repos/dashpay/dash/branches{/branch}","tags_url":"https://api.github.com/repos/dashpay/dash/tags","blobs_url":"https://api.github.com/repos/dashpay/dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dashpay/dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dashpay/dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/dashpay/dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dashpay/dash/statuses/{sha}","languages_url":"https://api.github.com/repos/dashpay/dash/languages","stargazers_url":"https://api.github.com/repos/dashpay/dash/stargazers","contributors_url":"https://api.github.com/repos/dashpay/dash/contributors","subscribers_url":"https://api.github.com/repos/dashpay/dash/subscribers","subscription_url":"https://api.github.com/repos/dashpay/dash/subscription","commits_url":"https://api.github.com/repos/dashpay/dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/dashpay/dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/dashpay/dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/dashpay/dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/dashpay/dash/contents/{+path}","compare_url":"https://api.github.com/repos/dashpay/dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dashpay/dash/merges","archive_url":"https://api.github.com/repos/dashpay/dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dashpay/dash/downloads","issues_url":"https://api.github.com/repos/dashpay/dash/issues{/number}","pulls_url":"https://api.github.com/repos/dashpay/dash/pulls{/number}","milestones_url":"https://api.github.com/repos/dashpay/dash/milestones{/number}","notifications_url":"https://api.github.com/repos/dashpay/dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dashpay/dash/labels{/name}","releases_url":"https://api.github.com/repos/dashpay/dash/releases{/id}","deployments_url":"https://api.github.com/repos/dashpay/dash/deployments","created_at":"2014-05-01T17:45:34Z","updated_at":"2016-10-29T12:41:04Z","pushed_at":"2016-11-01T00:26:05Z","git_url":"git://github.com/dashpay/dash.git","ssh_url":"git@github.com:dashpay/dash.git","clone_url":"https://github.com/dashpay/dash.git","svn_url":"https://github.com/dashpay/dash","homepage":"https://www.dash.org","size":119397,"stargazers_count":329,"watchers_count":329,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":41,"forks":183,"open_issues":41,"watchers":329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dashpay/dash/pulls/1120"},"html":{"href":"https://github.com/dashpay/dash/pull/1120"},"issue":{"href":"https://api.github.com/repos/dashpay/dash/issues/1120"},"comments":{"href":"https://api.github.com/repos/dashpay/dash/issues/1120/comments"},"review_comments":{"href":"https://api.github.com/repos/dashpay/dash/pulls/1120/comments"},"review_comment":{"href":"https://api.github.com/repos/dashpay/dash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dashpay/dash/pulls/1120/commits"},"statuses":{"href":"https://api.github.com/repos/dashpay/dash/statuses/7bc1916da4bf1e3d3cf37f7a1389977611b81f8b"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":27,"additions":383,"deletions":456,"changed_files":3}}
{"actor":{"display_login":"UdjinM6"}}