{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1166","labels_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1166/labels{/name}","comments_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1166/comments","events_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1166/events","html_url":"https://github.com/bitcoinj/bitcoinj/pull/1166","id":127259502,"number":1166,"title":"Implemented version 2 payment channels using CLTV micropayments","user":{"login":"w-shackleton","id":2139216,"avatar_url":"https://avatars.githubusercontent.com/u/2139216?v=3","gravatar_id":"","url":"https://api.github.com/users/w-shackleton","html_url":"https://github.com/w-shackleton","followers_url":"https://api.github.com/users/w-shackleton/followers","following_url":"https://api.github.com/users/w-shackleton/following{/other_user}","gists_url":"https://api.github.com/users/w-shackleton/gists{/gist_id}","starred_url":"https://api.github.com/users/w-shackleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w-shackleton/subscriptions","organizations_url":"https://api.github.com/users/w-shackleton/orgs","repos_url":"https://api.github.com/users/w-shackleton/repos","events_url":"https://api.github.com/users/w-shackleton/events{/privacy}","received_events_url":"https://api.github.com/users/w-shackleton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-18T16:16:04Z","updated_at":"2016-01-26T17:43:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoinj/bitcoinj/pulls/1166","html_url":"https://github.com/bitcoinj/bitcoinj/pull/1166","diff_url":"https://github.com/bitcoinj/bitcoinj/pull/1166.diff","patch_url":"https://github.com/bitcoinj/bitcoinj/pull/1166.patch"},"body":"Right, it's a big one.\r\n\r\nKey changes:\r\n* `PaymentChannelServerState` is now `PaymentChannelV1ServerState extends PaymentChannelServerState` and `PaymentChannelV2ServerState extends PaymentChannelServerState` (and the same for `PaymentChannelClientState`)\r\n* Protocol V2 uses P2SH CLTV micropayments, since the created script would otherwise be considered 'non-standard' by the Satoshi client.\r\n* There is now a `StateMachine` class for more easily tracking which state transitions are allowed.\r\n* All the tests are parameterised for version 1 and version 2\r\n* The protocol can negotiate version 1 and 2 to some extent; `VersionSelector` can be used to indicate which versions should be allowed by default.\r\n\r\n@schildbach is this squashed enough? I can squash further if need be. There are a few changes later on that were very hard to move around in the commit history."},"comment":{"url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/comments/175137415","html_url":"https://github.com/bitcoinj/bitcoinj/pull/1166#issuecomment-175137415","issue_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1166","id":175137415,"user":{"login":"schildbach","id":743306,"avatar_url":"https://avatars.githubusercontent.com/u/743306?v=3","gravatar_id":"","url":"https://api.github.com/users/schildbach","html_url":"https://github.com/schildbach","followers_url":"https://api.github.com/users/schildbach/followers","following_url":"https://api.github.com/users/schildbach/following{/other_user}","gists_url":"https://api.github.com/users/schildbach/gists{/gist_id}","starred_url":"https://api.github.com/users/schildbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schildbach/subscriptions","organizations_url":"https://api.github.com/users/schildbach/orgs","repos_url":"https://api.github.com/users/schildbach/repos","events_url":"https://api.github.com/users/schildbach/events{/privacy}","received_events_url":"https://api.github.com/users/schildbach/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T17:43:25Z","updated_at":"2016-01-26T17:43:25Z","body":"Ok I think the one class rename is fine. We can mention it in the release notes.\r\n\r\nApart from the one in-line comment I made, I'm happy. Again I can't really review the functionality, I trust you and your unit tests (thanks for making the effort). If anyone else – proficient in payment channels – wants to comment, please do.\r\n\r\nWill the feature be finished with this PR? I'd like to get it into a releasable state so we can enter the stabilization phase for bitcoinj 0.14 soonish.\r\n\r\nAbout the squashing: Ideally it would have been 1 commit, implementing the entire new feature. I guess we missed that goal, since half of the feature is already merged (-:  So I tend to recommend squashing this PR into 1 commit. Except if you see a certain \"sub-task\" that makes sense on its own and could be merged separately. Example: if there would be a refactoring that prepares for your feature but also cleans up the code a but."}}