{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/17238","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/17238/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/17238/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/17238/events","html_url":"https://github.com/bitcoin/bitcoin/issues/17238","id":511917580,"node_id":"MDU6SXNzdWU1MTE5MTc1ODA=","number":17238,"title":"Serialization-deserialization roundtrip of CPubKey does not necessarily result in an equal object","user":{"login":"practicalswift","id":7826565,"node_id":"MDQ6VXNlcjc4MjY1NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/7826565?v=4","gravatar_id":"","url":"https://api.github.com/users/practicalswift","html_url":"https://github.com/practicalswift","followers_url":"https://api.github.com/users/practicalswift/followers","following_url":"https://api.github.com/users/practicalswift/following{/other_user}","gists_url":"https://api.github.com/users/practicalswift/gists{/gist_id}","starred_url":"https://api.github.com/users/practicalswift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/practicalswift/subscriptions","organizations_url":"https://api.github.com/users/practicalswift/orgs","repos_url":"https://api.github.com/users/practicalswift/repos","events_url":"https://api.github.com/users/practicalswift/events{/privacy}","received_events_url":"https://api.github.com/users/practicalswift/received_events","type":"User","site_admin":false},"labels":[{"id":477890092,"node_id":"MDU6TGFiZWw0Nzc4OTAwOTI=","url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Questions%20and%20Help","name":"Questions and Help","color":"006688","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2019-10-24T12:40:03Z","updated_at":"2019-10-24T16:56:40Z","closed_at":null,"author_association":"MEMBER","body":"When fuzzing the serialization code for `CPubKey` I noticed that `Deserialize<CPubKey>(Serialize(obj)) == obj` does not hold true for all `CPubKey obj`.\r\n\r\nIs there any reason to why `CPubKey` is deviating from the other serializable classes (for which equality is defined) in this regard? :)\r\n\r\nContext:\r\n\r\n```\r\ntemplate <typename T>\r\nCDataStream Serialize(const T& obj)\r\n{\r\n    CDataStream ds(SER_NETWORK, INIT_PROTO_VERSION);\r\n    ds << obj;\r\n    return ds;\r\n}\r\n\r\ntemplate <typename T>\r\nT Deserialize(CDataStream ds)\r\n{\r\n    T obj;\r\n    ds >> obj;\r\n    return obj;\r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/546009048","html_url":"https://github.com/bitcoin/bitcoin/issues/17238#issuecomment-546009048","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/17238","id":546009048,"node_id":"MDEyOklzc3VlQ29tbWVudDU0NjAwOTA0OA==","user":{"login":"sipa","id":548488,"node_id":"MDQ6VXNlcjU0ODQ4OA==","avatar_url":"https://avatars1.githubusercontent.com/u/548488?v=4","gravatar_id":"","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"created_at":"2019-10-24T16:56:40Z","updated_at":"2019-10-24T16:56:40Z","author_association":"MEMBER","body":"Equality is not defined for invalid CPubKeys.\n\nThere is no good reason why it isn't (except a likely negligiable performance gain perhaps) but also no good reason why it should be, as nothing ever happens with those apart from signalling \"no pubkey here\"."}}
{"actor":{"display_login":"sipa"}}