{"action":"created","comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/181862120","pull_request_review_id":112560529,"id":181862120,"diff_hunk":"@@ -118,6 +122,77 @@ func (r *RootKeyStorage) CreateUnlock(password *[]byte) error {\n \t})\n }\n \n+// ChangeEncKey updates the encryption key used to encrypt/decrypt the root keys\n+// stored.\n+func (r *RootKeyStorage) ChangeEncKey(old, new []byte) error {\n+\treturn r.Update(func(tx *bolt.Tx) error {\n+\t\tbucket := tx.Bucket(rootKeyBucketName)\n+\t\tdbKey := bucket.Get(encryptedKeyID)\n+\n+\t\t// First, we'll make sure the macaroon store has been created.\n+\t\tif len(dbKey) == 0 {\n+\t\t\treturn ErrStoreNotCreated\n+\t\t}\n+\n+\t\t// If it is, we'll verify that it is correct and create a new\n+\t\t// encryption key with the new password.\n+\t\toldEncKey := &snacl.SecretKey{}\n+\t\terr := oldEncKey.Unmarshal(dbKey)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\n+\t\terr = oldEncKey.DeriveKey(&old)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+","path":"macaroons/store.go","position":null,"original_position":46,"commit_id":"200b716c1ee599aa851a7bdaf8b18d2bbd62605e","original_commit_id":"64971fd9d56d77d6b83c768bba49c479a71cc997","user":{"login":"wpaulino","id":9447167,"avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"body":"Fixed.","created_at":"2018-04-16T19:43:13Z","updated_at":"2018-04-16T19:43:13Z","html_url":"https://github.com/lightningnetwork/lnd/pull/618#discussion_r181862120","pull_request_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments/181862120"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/618#discussion_r181862120"},"pull_request":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618"}},"in_reply_to_id":180274600},"pull_request":{"url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618","id":163546362,"html_url":"https://github.com/lightningnetwork/lnd/pull/618","diff_url":"https://github.com/lightningnetwork/lnd/pull/618.diff","patch_url":"https://github.com/lightningnetwork/lnd/pull/618.patch","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/618","number":618,"state":"open","locked":false,"title":"Change wallet password","user":{"login":"wpaulino","id":9447167,"avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"body":"Fixes #607.\r\n\r\nThis PR introduces the following changes:\r\n\r\n* Updates the `lnwallet.WalletController` interface and `BtcWallet` to handle changing the wallet's private and public passwords.\r\n* Adds RPC call for `ChangePassword`.\r\n* Adds `changepassword` command to `lncli`. The wallet must be unlocked first.","created_at":"2018-01-17T20:38:16Z","updated_at":"2018-04-16T19:43:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3813198b8373d8d55309d0183bf40f8e7c214956","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":431182550,"url":"https://api.github.com/repos/lightningnetwork/lnd/labels/rpc","name":"rpc","color":"006b75","default":false},{"id":431221659,"url":"https://api.github.com/repos/lightningnetwork/lnd/labels/wallet","name":"wallet","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618/commits","review_comments_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618/comments","review_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/618/comments","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/200b716c1ee599aa851a7bdaf8b18d2bbd62605e","head":{"label":"wpaulino:change-wallet-password","ref":"change-wallet-password","sha":"200b716c1ee599aa851a7bdaf8b18d2bbd62605e","user":{"login":"wpaulino","id":9447167,"avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"repo":{"id":115386014,"name":"lnd","full_name":"wpaulino/lnd","owner":{"login":"wpaulino","id":9447167,"avatar_url":"https://avatars0.githubusercontent.com/u/9447167?v=4","gravatar_id":"","url":"https://api.github.com/users/wpaulino","html_url":"https://github.com/wpaulino","followers_url":"https://api.github.com/users/wpaulino/followers","following_url":"https://api.github.com/users/wpaulino/following{/other_user}","gists_url":"https://api.github.com/users/wpaulino/gists{/gist_id}","starred_url":"https://api.github.com/users/wpaulino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpaulino/subscriptions","organizations_url":"https://api.github.com/users/wpaulino/orgs","repos_url":"https://api.github.com/users/wpaulino/repos","events_url":"https://api.github.com/users/wpaulino/events{/privacy}","received_events_url":"https://api.github.com/users/wpaulino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wpaulino/lnd","description":"Lightning Network Daemon ⚡️","fork":true,"url":"https://api.github.com/repos/wpaulino/lnd","forks_url":"https://api.github.com/repos/wpaulino/lnd/forks","keys_url":"https://api.github.com/repos/wpaulino/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wpaulino/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wpaulino/lnd/teams","hooks_url":"https://api.github.com/repos/wpaulino/lnd/hooks","issue_events_url":"https://api.github.com/repos/wpaulino/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/wpaulino/lnd/events","assignees_url":"https://api.github.com/repos/wpaulino/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/wpaulino/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/wpaulino/lnd/tags","blobs_url":"https://api.github.com/repos/wpaulino/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wpaulino/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wpaulino/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/wpaulino/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wpaulino/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/wpaulino/lnd/languages","stargazers_url":"https://api.github.com/repos/wpaulino/lnd/stargazers","contributors_url":"https://api.github.com/repos/wpaulino/lnd/contributors","subscribers_url":"https://api.github.com/repos/wpaulino/lnd/subscribers","subscription_url":"https://api.github.com/repos/wpaulino/lnd/subscription","commits_url":"https://api.github.com/repos/wpaulino/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/wpaulino/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/wpaulino/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/wpaulino/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/wpaulino/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/wpaulino/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wpaulino/lnd/merges","archive_url":"https://api.github.com/repos/wpaulino/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wpaulino/lnd/downloads","issues_url":"https://api.github.com/repos/wpaulino/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/wpaulino/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/wpaulino/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/wpaulino/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wpaulino/lnd/labels{/name}","releases_url":"https://api.github.com/repos/wpaulino/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/wpaulino/lnd/deployments","created_at":"2017-12-26T04:40:40Z","updated_at":"2018-04-13T04:54:49Z","pushed_at":"2018-04-16T19:42:42Z","git_url":"git://github.com/wpaulino/lnd.git","ssh_url":"git@github.com:wpaulino/lnd.git","clone_url":"https://github.com/wpaulino/lnd.git","svn_url":"https://github.com/wpaulino/lnd","homepage":"","size":13748,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lightningnetwork:master","ref":"master","sha":"b0709b45f7af9314481d06e617b1cee088fd708e","user":{"login":"lightningnetwork","id":13424735,"avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":49765480,"name":"lnd","full_name":"lightningnetwork/lnd","owner":{"login":"lightningnetwork","id":13424735,"avatar_url":"https://avatars0.githubusercontent.com/u/13424735?v=4","gravatar_id":"","url":"https://api.github.com/users/lightningnetwork","html_url":"https://github.com/lightningnetwork","followers_url":"https://api.github.com/users/lightningnetwork/followers","following_url":"https://api.github.com/users/lightningnetwork/following{/other_user}","gists_url":"https://api.github.com/users/lightningnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/lightningnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightningnetwork/subscriptions","organizations_url":"https://api.github.com/users/lightningnetwork/orgs","repos_url":"https://api.github.com/users/lightningnetwork/repos","events_url":"https://api.github.com/users/lightningnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/lightningnetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lightningnetwork/lnd","description":"Lightning Network Daemon ⚡️","fork":false,"url":"https://api.github.com/repos/lightningnetwork/lnd","forks_url":"https://api.github.com/repos/lightningnetwork/lnd/forks","keys_url":"https://api.github.com/repos/lightningnetwork/lnd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightningnetwork/lnd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightningnetwork/lnd/teams","hooks_url":"https://api.github.com/repos/lightningnetwork/lnd/hooks","issue_events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/events{/number}","events_url":"https://api.github.com/repos/lightningnetwork/lnd/events","assignees_url":"https://api.github.com/repos/lightningnetwork/lnd/assignees{/user}","branches_url":"https://api.github.com/repos/lightningnetwork/lnd/branches{/branch}","tags_url":"https://api.github.com/repos/lightningnetwork/lnd/tags","blobs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightningnetwork/lnd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightningnetwork/lnd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightningnetwork/lnd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightningnetwork/lnd/statuses/{sha}","languages_url":"https://api.github.com/repos/lightningnetwork/lnd/languages","stargazers_url":"https://api.github.com/repos/lightningnetwork/lnd/stargazers","contributors_url":"https://api.github.com/repos/lightningnetwork/lnd/contributors","subscribers_url":"https://api.github.com/repos/lightningnetwork/lnd/subscribers","subscription_url":"https://api.github.com/repos/lightningnetwork/lnd/subscription","commits_url":"https://api.github.com/repos/lightningnetwork/lnd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightningnetwork/lnd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lightningnetwork/lnd/contents/{+path}","compare_url":"https://api.github.com/repos/lightningnetwork/lnd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightningnetwork/lnd/merges","archive_url":"https://api.github.com/repos/lightningnetwork/lnd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightningnetwork/lnd/downloads","issues_url":"https://api.github.com/repos/lightningnetwork/lnd/issues{/number}","pulls_url":"https://api.github.com/repos/lightningnetwork/lnd/pulls{/number}","milestones_url":"https://api.github.com/repos/lightningnetwork/lnd/milestones{/number}","notifications_url":"https://api.github.com/repos/lightningnetwork/lnd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/labels{/name}","releases_url":"https://api.github.com/repos/lightningnetwork/lnd/releases{/id}","deployments_url":"https://api.github.com/repos/lightningnetwork/lnd/deployments","created_at":"2016-01-16T08:19:33Z","updated_at":"2018-04-16T16:56:40Z","pushed_at":"2018-04-16T19:42:43Z","git_url":"git://github.com/lightningnetwork/lnd.git","ssh_url":"git@github.com:lightningnetwork/lnd.git","clone_url":"https://github.com/lightningnetwork/lnd.git","svn_url":"https://github.com/lightningnetwork/lnd","homepage":"","size":13610,"stargazers_count":2452,"watchers_count":2452,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":540,"mirror_url":null,"archived":false,"open_issues_count":153,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":540,"open_issues":153,"watchers":2452,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618"},"html":{"href":"https://github.com/lightningnetwork/lnd/pull/618"},"issue":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/618"},"comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/issues/618/comments"},"review_comments":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618/comments"},"review_comment":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightningnetwork/lnd/pulls/618/commits"},"statuses":{"href":"https://api.github.com/repos/lightningnetwork/lnd/statuses/200b716c1ee599aa851a7bdaf8b18d2bbd62605e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wpaulino"}}