{"action":"created","issue":{"url":"https://api.github.com/repos/ExchangeUnion/xud/issues/712","repository_url":"https://api.github.com/repos/ExchangeUnion/xud","labels_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/712/labels{/name}","comments_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/712/comments","events_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/712/events","html_url":"https://github.com/ExchangeUnion/xud/pull/712","id":385395711,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0Mzc2Mzk3","number":712,"title":"feat(p2p): protobuf serialization/validation","user":{"login":"moshababo","id":17073733,"node_id":"MDQ6VXNlcjE3MDczNzMz","avatar_url":"https://avatars2.githubusercontent.com/u/17073733?v=4","gravatar_id":"","url":"https://api.github.com/users/moshababo","html_url":"https://github.com/moshababo","followers_url":"https://api.github.com/users/moshababo/followers","following_url":"https://api.github.com/users/moshababo/following{/other_user}","gists_url":"https://api.github.com/users/moshababo/gists{/gist_id}","starred_url":"https://api.github.com/users/moshababo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshababo/subscriptions","organizations_url":"https://api.github.com/users/moshababo/orgs","repos_url":"https://api.github.com/users/moshababo/repos","events_url":"https://api.github.com/users/moshababo/events{/privacy}","received_events_url":"https://api.github.com/users/moshababo/received_events","type":"User","site_admin":false},"labels":[{"id":930952990,"node_id":"MDU6TGFiZWw5MzA5NTI5OTA=","url":"https://api.github.com/repos/ExchangeUnion/xud/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"moshababo","id":17073733,"node_id":"MDQ6VXNlcjE3MDczNzMz","avatar_url":"https://avatars2.githubusercontent.com/u/17073733?v=4","gravatar_id":"","url":"https://api.github.com/users/moshababo","html_url":"https://github.com/moshababo","followers_url":"https://api.github.com/users/moshababo/followers","following_url":"https://api.github.com/users/moshababo/following{/other_user}","gists_url":"https://api.github.com/users/moshababo/gists{/gist_id}","starred_url":"https://api.github.com/users/moshababo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshababo/subscriptions","organizations_url":"https://api.github.com/users/moshababo/orgs","repos_url":"https://api.github.com/users/moshababo/repos","events_url":"https://api.github.com/users/moshababo/events{/privacy}","received_events_url":"https://api.github.com/users/moshababo/received_events","type":"User","site_admin":false},"assignees":[{"login":"moshababo","id":17073733,"node_id":"MDQ6VXNlcjE3MDczNzMz","avatar_url":"https://avatars2.githubusercontent.com/u/17073733?v=4","gravatar_id":"","url":"https://api.github.com/users/moshababo","html_url":"https://github.com/moshababo","followers_url":"https://api.github.com/users/moshababo/followers","following_url":"https://api.github.com/users/moshababo/following{/other_user}","gists_url":"https://api.github.com/users/moshababo/gists{/gist_id}","starred_url":"https://api.github.com/users/moshababo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshababo/subscriptions","organizations_url":"https://api.github.com/users/moshababo/orgs","repos_url":"https://api.github.com/users/moshababo/repos","events_url":"https://api.github.com/users/moshababo/events{/privacy}","received_events_url":"https://api.github.com/users/moshababo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-11-28T18:13:58Z","updated_at":"2018-12-11T15:03:35Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/ExchangeUnion/xud/pulls/712","html_url":"https://github.com/ExchangeUnion/xud/pull/712","diff_url":"https://github.com/ExchangeUnion/xud/pull/712.diff","patch_url":"https://github.com/ExchangeUnion/xud/pull/712.patch"},"body":"Closes #159.\r\n\r\nStill some more cleanup & testing left to do, but it's basically done. \r\n\r\nMain points:\r\n* p2p serialization changed from JSON to protobuf.\r\n* type and length are written to the buffer before the actual packet. parser doesn't rely on the delimiter string anymore. I didn't thought this approach is reasonable anymore, when we don't have a string-based serialization.\r\n* strong validation is applied on the packets. This could have been done in a higher-layer, but I thought that enforcing it on the packet level would be the better.  Tests were added.\r\n\r\nOpen:\r\n* packet hash is still applied to the JSON representation. We might want to change that.\r\n* I haven't optimized the packet classes yet, just went for the simplest solution (static methods on the derived classes). Seems to be working fine.\r\n* need to improve the parser error handling "},"comment":{"url":"https://api.github.com/repos/ExchangeUnion/xud/issues/comments/446233900","html_url":"https://github.com/ExchangeUnion/xud/pull/712#issuecomment-446233900","issue_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/712","id":446233900,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjIzMzkwMA==","user":{"login":"moshababo","id":17073733,"node_id":"MDQ6VXNlcjE3MDczNzMz","avatar_url":"https://avatars2.githubusercontent.com/u/17073733?v=4","gravatar_id":"","url":"https://api.github.com/users/moshababo","html_url":"https://github.com/moshababo","followers_url":"https://api.github.com/users/moshababo/followers","following_url":"https://api.github.com/users/moshababo/following{/other_user}","gists_url":"https://api.github.com/users/moshababo/gists{/gist_id}","starred_url":"https://api.github.com/users/moshababo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshababo/subscriptions","organizations_url":"https://api.github.com/users/moshababo/orgs","repos_url":"https://api.github.com/users/moshababo/repos","events_url":"https://api.github.com/users/moshababo/events{/privacy}","received_events_url":"https://api.github.com/users/moshababo/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T15:03:35Z","updated_at":"2018-12-11T15:03:35Z","author_association":"COLLABORATOR","body":"In regards to the serialization for hashing/signing - I looked into into what I suggested some more, and I was wrong in assuming that [protobuf serialization](https://gist.github.com/kchristidis/39c8b310fd9da43d515c4394c3cd9510) is deterministic.\r\nSo I think we should stick with `JSON.stringify` for the sake of simplicity, but add a wrapper for a deterministic output, similar to [this](https://www.npmjs.com/package/json-stringify-deterministic). \r\n"}}
{"actor":{"display_login":"moshababo"}}