{"action":"created","comment":{"url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/comments/24304402","id":24304402,"diff_hunk":"@@ -71,23 +92,31 @@ func CreateGenesisState(genesisTime Timestamp) (s *State) {\n \t// Fill out the consensus informaiton for the genesis block.\n \ts.currentBlockID = genesisBlock.ID()\n \ts.currentPath[BlockHeight(0)] = genesisBlock.ID()\n-\ts.unspentOutputs[genesisBlock.MinerPayoutID(0)] = SiacoinOutput{\n-\t\tValue:     CalculateCoinbase(0),\n-\t\tSpendHash: ZeroAddress,\n+\ts.siacoinOutputs[genesisBlock.MinerPayoutID(0)] = SiacoinOutput{\n+\t\tValue:      CalculateCoinbase(0),\n+\t\tUnlockHash: ZeroAddress, // TODO: change to Nebulous Genesis Siacoin SpendHash Address\n \t}\n-\ts.unspentSiafundOutputs[OutputID{0}] = SiafundOutput{\n-\t\tValue:            NewCurrency64(SiafundCount),\n-\t\tSpendHash:        ZeroAddress, // TODO: change to Nebulous Genesis Address\n-\t\tClaimDestination: ZeroAddress, // TODO: change to Nebulous Genesis Address\n+\ts.siafundOutputs[SiafundOutputID{0}] = SiafundOutput{\n+\t\tValue:           NewCurrency64(SiafundCount),\n+\t\tUnlockHash:      ZeroAddress, // TODO: change to Nebulous Genesis Siafund SpendHash Address\n+\t\tClaimUnlockHash: ZeroAddress, // TODO: change to Nebulous Genesis ClaimDestination Address\n \t}\n \n \treturn\n }\n \n+// RLock will readlock the state.\n+//\n+// TODO: Add a safety timer which will auto-unlock if the readlock is held for\n+// more than a second. (panic in debug mode)","path":"consensus/state.go","position":null,"original_position":134,"commit_id":"0da5a8c840d904da3376254977b8f908cbc05a4e","original_commit_id":"d50f6c577db7aeee27554d19a846a84bc8e54e5f","user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"body":"1. function calls RLock, and RLock writes to a semaphore or something that tracks all of the locks in place\r\n2. 1 second passes, RUnlock is automatically called and the semaphore is updated to show that the lock is gone.\r\n3. function calls RUnlock, which checks the semaphore and realizes that someone screwed up. It doesn't call unlock and avoids the panic","created_at":"2015-02-09T00:05:04Z","updated_at":"2015-02-09T00:05:04Z","html_url":"https://github.com/NebulousLabs/Sia/pull/318#discussion_r24304402","pull_request_url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/NebulousLabs/Sia/pulls/comments/24304402"},"html":{"href":"https://github.com/NebulousLabs/Sia/pull/318#discussion_r24304402"},"pull_request":{"href":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318","id":28787677,"html_url":"https://github.com/NebulousLabs/Sia/pull/318","diff_url":"https://github.com/NebulousLabs/Sia/pull/318.diff","patch_url":"https://github.com/NebulousLabs/Sia/pull/318.patch","issue_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/318","number":318,"state":"open","locked":false,"title":"Siafunds + delays for output types","user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"body":"I'm going to go ahead and make this PR, but the build fails in a pretty bad way. The testing needs to be re-written unfortunately. Hopefully the new testing convention means that the tests will break less often.\r\n\r\nI added siafunds, and everything now should be implemented. All that's left (heh) is testing and adding a way to nullify contracts. But I pretty much want to add contract nullifcation as a softfork just to see how it would work, and if it would work well.\r\n\r\nI've also been increasing the amount of documentation. I feel like we're approaching a solid production codebase. Still a ways to go but it's feeling like the strongest of every project I've ever done, even of the smaller ones.","created_at":"2015-02-06T06:21:39Z","updated_at":"2015-02-09T00:05:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4feadec134bf98994c3c05b73fdff14c22081e75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318/commits","review_comments_url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318/comments","review_comment_url":"https://api.github.com/repos/NebulousLabs/Sia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/318/comments","statuses_url":"https://api.github.com/repos/NebulousLabs/Sia/statuses/0da5a8c840d904da3376254977b8f908cbc05a4e","head":{"label":"NebulousLabs:siafunds","ref":"siafunds","sha":"0da5a8c840d904da3376254977b8f908cbc05a4e","user":{"login":"NebulousLabs","id":7471422,"avatar_url":"https://avatars.githubusercontent.com/u/7471422?v=3","gravatar_id":"","url":"https://api.github.com/users/NebulousLabs","html_url":"https://github.com/NebulousLabs","followers_url":"https://api.github.com/users/NebulousLabs/followers","following_url":"https://api.github.com/users/NebulousLabs/following{/other_user}","gists_url":"https://api.github.com/users/NebulousLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/NebulousLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NebulousLabs/subscriptions","organizations_url":"https://api.github.com/users/NebulousLabs/orgs","repos_url":"https://api.github.com/users/NebulousLabs/repos","events_url":"https://api.github.com/users/NebulousLabs/events{/privacy}","received_events_url":"https://api.github.com/users/NebulousLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":25370072,"name":"Sia","full_name":"NebulousLabs/Sia","owner":{"login":"NebulousLabs","id":7471422,"avatar_url":"https://avatars.githubusercontent.com/u/7471422?v=3","gravatar_id":"","url":"https://api.github.com/users/NebulousLabs","html_url":"https://github.com/NebulousLabs","followers_url":"https://api.github.com/users/NebulousLabs/followers","following_url":"https://api.github.com/users/NebulousLabs/following{/other_user}","gists_url":"https://api.github.com/users/NebulousLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/NebulousLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NebulousLabs/subscriptions","organizations_url":"https://api.github.com/users/NebulousLabs/orgs","repos_url":"https://api.github.com/users/NebulousLabs/repos","events_url":"https://api.github.com/users/NebulousLabs/events{/privacy}","received_events_url":"https://api.github.com/users/NebulousLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NebulousLabs/Sia","description":"Blockchain-based marketplace for file storage","fork":false,"url":"https://api.github.com/repos/NebulousLabs/Sia","forks_url":"https://api.github.com/repos/NebulousLabs/Sia/forks","keys_url":"https://api.github.com/repos/NebulousLabs/Sia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NebulousLabs/Sia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NebulousLabs/Sia/teams","hooks_url":"https://api.github.com/repos/NebulousLabs/Sia/hooks","issue_events_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/events{/number}","events_url":"https://api.github.com/repos/NebulousLabs/Sia/events","assignees_url":"https://api.github.com/repos/NebulousLabs/Sia/assignees{/user}","branches_url":"https://api.github.com/repos/NebulousLabs/Sia/branches{/branch}","tags_url":"https://api.github.com/repos/NebulousLabs/Sia/tags","blobs_url":"https://api.github.com/repos/NebulousLabs/Sia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NebulousLabs/Sia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NebulousLabs/Sia/git/refs{/sha}","trees_url":"https://api.github.com/repos/NebulousLabs/Sia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NebulousLabs/Sia/statuses/{sha}","languages_url":"https://api.github.com/repos/NebulousLabs/Sia/languages","stargazers_url":"https://api.github.com/repos/NebulousLabs/Sia/stargazers","contributors_url":"https://api.github.com/repos/NebulousLabs/Sia/contributors","subscribers_url":"https://api.github.com/repos/NebulousLabs/Sia/subscribers","subscription_url":"https://api.github.com/repos/NebulousLabs/Sia/subscription","commits_url":"https://api.github.com/repos/NebulousLabs/Sia/commits{/sha}","git_commits_url":"https://api.github.com/repos/NebulousLabs/Sia/git/commits{/sha}","comments_url":"https://api.github.com/repos/NebulousLabs/Sia/comments{/number}","issue_comment_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/comments/{number}","contents_url":"https://api.github.com/repos/NebulousLabs/Sia/contents/{+path}","compare_url":"https://api.github.com/repos/NebulousLabs/Sia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NebulousLabs/Sia/merges","archive_url":"https://api.github.com/repos/NebulousLabs/Sia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NebulousLabs/Sia/downloads","issues_url":"https://api.github.com/repos/NebulousLabs/Sia/issues{/number}","pulls_url":"https://api.github.com/repos/NebulousLabs/Sia/pulls{/number}","milestones_url":"https://api.github.com/repos/NebulousLabs/Sia/milestones{/number}","notifications_url":"https://api.github.com/repos/NebulousLabs/Sia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NebulousLabs/Sia/labels{/name}","releases_url":"https://api.github.com/repos/NebulousLabs/Sia/releases{/id}","created_at":"2014-10-17T17:50:25Z","updated_at":"2015-02-06T04:18:42Z","pushed_at":"2015-02-08T23:49:11Z","git_url":"git://github.com/NebulousLabs/Sia.git","ssh_url":"git@github.com:NebulousLabs/Sia.git","clone_url":"https://github.com/NebulousLabs/Sia.git","svn_url":"https://github.com/NebulousLabs/Sia","homepage":"http://siacoin.com","size":6914,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":45,"forks":1,"open_issues":45,"watchers":5,"default_branch":"master"}},"base":{"label":"NebulousLabs:master","ref":"master","sha":"51b0192c345ec5282aae04d0d24d78552fba6a9a","user":{"login":"NebulousLabs","id":7471422,"avatar_url":"https://avatars.githubusercontent.com/u/7471422?v=3","gravatar_id":"","url":"https://api.github.com/users/NebulousLabs","html_url":"https://github.com/NebulousLabs","followers_url":"https://api.github.com/users/NebulousLabs/followers","following_url":"https://api.github.com/users/NebulousLabs/following{/other_user}","gists_url":"https://api.github.com/users/NebulousLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/NebulousLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NebulousLabs/subscriptions","organizations_url":"https://api.github.com/users/NebulousLabs/orgs","repos_url":"https://api.github.com/users/NebulousLabs/repos","events_url":"https://api.github.com/users/NebulousLabs/events{/privacy}","received_events_url":"https://api.github.com/users/NebulousLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":25370072,"name":"Sia","full_name":"NebulousLabs/Sia","owner":{"login":"NebulousLabs","id":7471422,"avatar_url":"https://avatars.githubusercontent.com/u/7471422?v=3","gravatar_id":"","url":"https://api.github.com/users/NebulousLabs","html_url":"https://github.com/NebulousLabs","followers_url":"https://api.github.com/users/NebulousLabs/followers","following_url":"https://api.github.com/users/NebulousLabs/following{/other_user}","gists_url":"https://api.github.com/users/NebulousLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/NebulousLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NebulousLabs/subscriptions","organizations_url":"https://api.github.com/users/NebulousLabs/orgs","repos_url":"https://api.github.com/users/NebulousLabs/repos","events_url":"https://api.github.com/users/NebulousLabs/events{/privacy}","received_events_url":"https://api.github.com/users/NebulousLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NebulousLabs/Sia","description":"Blockchain-based marketplace for file storage","fork":false,"url":"https://api.github.com/repos/NebulousLabs/Sia","forks_url":"https://api.github.com/repos/NebulousLabs/Sia/forks","keys_url":"https://api.github.com/repos/NebulousLabs/Sia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NebulousLabs/Sia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NebulousLabs/Sia/teams","hooks_url":"https://api.github.com/repos/NebulousLabs/Sia/hooks","issue_events_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/events{/number}","events_url":"https://api.github.com/repos/NebulousLabs/Sia/events","assignees_url":"https://api.github.com/repos/NebulousLabs/Sia/assignees{/user}","branches_url":"https://api.github.com/repos/NebulousLabs/Sia/branches{/branch}","tags_url":"https://api.github.com/repos/NebulousLabs/Sia/tags","blobs_url":"https://api.github.com/repos/NebulousLabs/Sia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NebulousLabs/Sia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NebulousLabs/Sia/git/refs{/sha}","trees_url":"https://api.github.com/repos/NebulousLabs/Sia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NebulousLabs/Sia/statuses/{sha}","languages_url":"https://api.github.com/repos/NebulousLabs/Sia/languages","stargazers_url":"https://api.github.com/repos/NebulousLabs/Sia/stargazers","contributors_url":"https://api.github.com/repos/NebulousLabs/Sia/contributors","subscribers_url":"https://api.github.com/repos/NebulousLabs/Sia/subscribers","subscription_url":"https://api.github.com/repos/NebulousLabs/Sia/subscription","commits_url":"https://api.github.com/repos/NebulousLabs/Sia/commits{/sha}","git_commits_url":"https://api.github.com/repos/NebulousLabs/Sia/git/commits{/sha}","comments_url":"https://api.github.com/repos/NebulousLabs/Sia/comments{/number}","issue_comment_url":"https://api.github.com/repos/NebulousLabs/Sia/issues/comments/{number}","contents_url":"https://api.github.com/repos/NebulousLabs/Sia/contents/{+path}","compare_url":"https://api.github.com/repos/NebulousLabs/Sia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NebulousLabs/Sia/merges","archive_url":"https://api.github.com/repos/NebulousLabs/Sia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NebulousLabs/Sia/downloads","issues_url":"https://api.github.com/repos/NebulousLabs/Sia/issues{/number}","pulls_url":"https://api.github.com/repos/NebulousLabs/Sia/pulls{/number}","milestones_url":"https://api.github.com/repos/NebulousLabs/Sia/milestones{/number}","notifications_url":"https://api.github.com/repos/NebulousLabs/Sia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NebulousLabs/Sia/labels{/name}","releases_url":"https://api.github.com/repos/NebulousLabs/Sia/releases{/id}","created_at":"2014-10-17T17:50:25Z","updated_at":"2015-02-06T04:18:42Z","pushed_at":"2015-02-08T23:49:11Z","git_url":"git://github.com/NebulousLabs/Sia.git","ssh_url":"git@github.com:NebulousLabs/Sia.git","clone_url":"https://github.com/NebulousLabs/Sia.git","svn_url":"https://github.com/NebulousLabs/Sia","homepage":"http://siacoin.com","size":6914,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":45,"forks":1,"open_issues":45,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318"},"html":{"href":"https://github.com/NebulousLabs/Sia/pull/318"},"issue":{"href":"https://api.github.com/repos/NebulousLabs/Sia/issues/318"},"comments":{"href":"https://api.github.com/repos/NebulousLabs/Sia/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/NebulousLabs/Sia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/NebulousLabs/Sia/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/NebulousLabs/Sia/statuses/0da5a8c840d904da3376254977b8f908cbc05a4e"}}}}