{"action":"created","comment":{"url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/comments/183583781","pull_request_review_id":114576291,"id":183583781,"diff_hunk":"@@ -48,6 +49,104 @@ namespace teststrat2\n }\n ```\n \n+## Multi-threaded generation and input validation\n+\n+So you want to use all the CPU available on your computer to generate a fancy vanity address? \n+Here is how you can do that multi-threaded, and there is additional input validation since O \n+and I are not allows in address due to ambiguity. \n+\n+Additionally this example does generation based upon input variables, so it's more easy to use \n+without recompiling and you can even share it with your friends. Start first with two characters, and you \n+will quickly learn that it is much harder to generate 3 characters, and even harder with more.\n+\n+Sometimes the threads find a match almost at the same time, so multiple private key and addresses might \n+appear in the console output.\n+\n+Example on performance with threads: Generating address with prefix \"SASA\" with a single thread took\n+22 seconds on high-end CPU. With 8 threads, it took 1-2 seconds. Results may vary on different computers,\n+and there is an element of (random) luck involved.\n+\n+\n+```cs\n+using System;\n+using NBitcoin;\n+\n+namespace teststrat2\n+{\n+    class Program\n+    {\n+        static void Main(string[] args)\n+        {\n+            if (args.Length == 0)\n+            {\n+                Console.WriteLine(\"You must supply the address prefix. You can also specify number of threads, as the second parameter. E.g. \\\"dotnet teststart2.dll \\\"HI\\\" 10\\\".\");\n+                return;\n+            }\n+\n+            var prefix = args[0];\n+\n+            var prefixUpper = prefix.ToUpper();\n+\n+            if (prefixUpper.Contains(\"O\") || prefixUpper.Contains(\"I\") || prefixUpper.Contains(\"0\"))\n+            {\n+                Console.WriteLine(\"The characters O, I and 0 (zero) is not allowed in addresses.\");","path":"_posts/2018-03-09-code_sample_vanity.md","position":57,"original_position":57,"commit_id":"4b0846e31c479b9c1230a71b673bd71683309635","original_commit_id":"4b0846e31c479b9c1230a71b673bd71683309635","user":{"login":"StratisDeveloper","id":37058627,"avatar_url":"https://avatars0.githubusercontent.com/u/37058627?v=4","gravatar_id":"","url":"https://api.github.com/users/StratisDeveloper","html_url":"https://github.com/StratisDeveloper","followers_url":"https://api.github.com/users/StratisDeveloper/followers","following_url":"https://api.github.com/users/StratisDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/StratisDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/StratisDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StratisDeveloper/subscriptions","organizations_url":"https://api.github.com/users/StratisDeveloper/orgs","repos_url":"https://api.github.com/users/StratisDeveloper/repos","events_url":"https://api.github.com/users/StratisDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/StratisDeveloper/received_events","type":"User","site_admin":false},"body":"Only 0 is not allowed. Additionally, A-M and l-z are not allowed in the second character position (after \"S\"). Consider a comment to this effect.  ","created_at":"2018-04-24T01:39:04Z","updated_at":"2018-04-24T01:39:23Z","html_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pull/7#discussion_r183583781","pull_request_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/comments/183583781"},"html":{"href":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pull/7#discussion_r183583781"},"pull_request":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7","id":183567830,"html_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pull/7","diff_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pull/7.diff","patch_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pull/7.patch","issue_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues/7","number":7,"state":"open","locked":false,"title":"Add multi-thread example to vanity address","user":{"login":"sondreb","id":309938,"avatar_url":"https://avatars3.githubusercontent.com/u/309938?v=4","gravatar_id":"","url":"https://api.github.com/users/sondreb","html_url":"https://github.com/sondreb","followers_url":"https://api.github.com/users/sondreb/followers","following_url":"https://api.github.com/users/sondreb/following{/other_user}","gists_url":"https://api.github.com/users/sondreb/gists{/gist_id}","starred_url":"https://api.github.com/users/sondreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sondreb/subscriptions","organizations_url":"https://api.github.com/users/sondreb/orgs","repos_url":"https://api.github.com/users/sondreb/repos","events_url":"https://api.github.com/users/sondreb/events{/privacy}","received_events_url":"https://api.github.com/users/sondreb/received_events","type":"User","site_admin":false},"body":"- Add a simple timer and output information.\r\n- Add input for prefix and thread count.\r\n- Add input validation.\r\n- Add multi-threaded support.\r\n- Move the GetWif call inside the address check.","created_at":"2018-04-23T21:52:21Z","updated_at":"2018-04-24T01:39:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adb966cef088885df6b2a39678fb9b14c46bc8fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7/commits","review_comments_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7/comments","review_comment_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues/7/comments","statuses_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/statuses/4b0846e31c479b9c1230a71b673bd71683309635","head":{"label":"sondreb:master","ref":"master","sha":"4b0846e31c479b9c1230a71b673bd71683309635","user":{"login":"sondreb","id":309938,"avatar_url":"https://avatars3.githubusercontent.com/u/309938?v=4","gravatar_id":"","url":"https://api.github.com/users/sondreb","html_url":"https://github.com/sondreb","followers_url":"https://api.github.com/users/sondreb/followers","following_url":"https://api.github.com/users/sondreb/following{/other_user}","gists_url":"https://api.github.com/users/sondreb/gists{/gist_id}","starred_url":"https://api.github.com/users/sondreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sondreb/subscriptions","organizations_url":"https://api.github.com/users/sondreb/orgs","repos_url":"https://api.github.com/users/sondreb/repos","events_url":"https://api.github.com/users/sondreb/events{/privacy}","received_events_url":"https://api.github.com/users/sondreb/received_events","type":"User","site_admin":false},"repo":{"id":130760219,"name":"StratisDevelopmentFoundation.github.io","full_name":"sondreb/StratisDevelopmentFoundation.github.io","owner":{"login":"sondreb","id":309938,"avatar_url":"https://avatars3.githubusercontent.com/u/309938?v=4","gravatar_id":"","url":"https://api.github.com/users/sondreb","html_url":"https://github.com/sondreb","followers_url":"https://api.github.com/users/sondreb/followers","following_url":"https://api.github.com/users/sondreb/following{/other_user}","gists_url":"https://api.github.com/users/sondreb/gists{/gist_id}","starred_url":"https://api.github.com/users/sondreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sondreb/subscriptions","organizations_url":"https://api.github.com/users/sondreb/orgs","repos_url":"https://api.github.com/users/sondreb/repos","events_url":"https://api.github.com/users/sondreb/events{/privacy}","received_events_url":"https://api.github.com/users/sondreb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sondreb/StratisDevelopmentFoundation.github.io","description":null,"fork":true,"url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io","forks_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/forks","keys_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/teams","hooks_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/hooks","issue_events_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/events","assignees_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/tags","blobs_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/languages","stargazers_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/stargazers","contributors_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/contributors","subscribers_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/subscribers","subscription_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/subscription","commits_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/merges","archive_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/downloads","issues_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/labels{/name}","releases_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/sondreb/StratisDevelopmentFoundation.github.io/deployments","created_at":"2018-04-23T21:42:26Z","updated_at":"2018-04-23T21:50:17Z","pushed_at":"2018-04-23T21:50:16Z","git_url":"git://github.com/sondreb/StratisDevelopmentFoundation.github.io.git","ssh_url":"git@github.com:sondreb/StratisDevelopmentFoundation.github.io.git","clone_url":"https://github.com/sondreb/StratisDevelopmentFoundation.github.io.git","svn_url":"https://github.com/sondreb/StratisDevelopmentFoundation.github.io","homepage":null,"size":4748,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"StratisDevelopmentFoundation:master","ref":"master","sha":"dcdc147dbb1c82a203ad99f12e9f43a3178d165e","user":{"login":"StratisDevelopmentFoundation","id":37058650,"avatar_url":"https://avatars0.githubusercontent.com/u/37058650?v=4","gravatar_id":"","url":"https://api.github.com/users/StratisDevelopmentFoundation","html_url":"https://github.com/StratisDevelopmentFoundation","followers_url":"https://api.github.com/users/StratisDevelopmentFoundation/followers","following_url":"https://api.github.com/users/StratisDevelopmentFoundation/following{/other_user}","gists_url":"https://api.github.com/users/StratisDevelopmentFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/StratisDevelopmentFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StratisDevelopmentFoundation/subscriptions","organizations_url":"https://api.github.com/users/StratisDevelopmentFoundation/orgs","repos_url":"https://api.github.com/users/StratisDevelopmentFoundation/repos","events_url":"https://api.github.com/users/StratisDevelopmentFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/StratisDevelopmentFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":124580186,"name":"StratisDevelopmentFoundation.github.io","full_name":"StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io","owner":{"login":"StratisDevelopmentFoundation","id":37058650,"avatar_url":"https://avatars0.githubusercontent.com/u/37058650?v=4","gravatar_id":"","url":"https://api.github.com/users/StratisDevelopmentFoundation","html_url":"https://github.com/StratisDevelopmentFoundation","followers_url":"https://api.github.com/users/StratisDevelopmentFoundation/followers","following_url":"https://api.github.com/users/StratisDevelopmentFoundation/following{/other_user}","gists_url":"https://api.github.com/users/StratisDevelopmentFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/StratisDevelopmentFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StratisDevelopmentFoundation/subscriptions","organizations_url":"https://api.github.com/users/StratisDevelopmentFoundation/orgs","repos_url":"https://api.github.com/users/StratisDevelopmentFoundation/repos","events_url":"https://api.github.com/users/StratisDevelopmentFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/StratisDevelopmentFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io","description":null,"fork":false,"url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io","forks_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/forks","keys_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/teams","hooks_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/hooks","issue_events_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/events","assignees_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/tags","blobs_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/languages","stargazers_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/stargazers","contributors_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/contributors","subscribers_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/subscribers","subscription_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/subscription","commits_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/merges","archive_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/downloads","issues_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/labels{/name}","releases_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/deployments","created_at":"2018-03-09T18:46:55Z","updated_at":"2018-04-12T06:07:36Z","pushed_at":"2018-04-23T21:52:22Z","git_url":"git://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io.git","ssh_url":"git@github.com:StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io.git","clone_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io.git","svn_url":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io","homepage":null,"size":4746,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":10,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7"},"html":{"href":"https://github.com/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pull/7"},"issue":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues/7"},"comments":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/StratisDevelopmentFoundation/StratisDevelopmentFoundation.github.io/statuses/4b0846e31c479b9c1230a71b673bd71683309635"}},"author_association":"NONE"}}
{"actor":{"display_login":"StratisDeveloper"}}