{"action":"closed","issue":{"url":"https://api.github.com/repos/raiden-network/raiden/issues/3777","repository_url":"https://api.github.com/repos/raiden-network/raiden","labels_url":"https://api.github.com/repos/raiden-network/raiden/issues/3777/labels{/name}","comments_url":"https://api.github.com/repos/raiden-network/raiden/issues/3777/comments","events_url":"https://api.github.com/repos/raiden-network/raiden/issues/3777/events","html_url":"https://github.com/raiden-network/raiden/issues/3777","id":430946787,"node_id":"MDU6SXNzdWU0MzA5NDY3ODc=","number":3777,"title":"Simplify queue serialization","user":{"login":"hackaugusto","id":310139,"node_id":"MDQ6VXNlcjMxMDEzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/310139?v=4","gravatar_id":"","url":"https://api.github.com/users/hackaugusto","html_url":"https://github.com/hackaugusto","followers_url":"https://api.github.com/users/hackaugusto/followers","following_url":"https://api.github.com/users/hackaugusto/following{/other_user}","gists_url":"https://api.github.com/users/hackaugusto/gists{/gist_id}","starred_url":"https://api.github.com/users/hackaugusto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackaugusto/subscriptions","organizations_url":"https://api.github.com/users/hackaugusto/orgs","repos_url":"https://api.github.com/users/hackaugusto/repos","events_url":"https://api.github.com/users/hackaugusto/events{/privacy}","received_events_url":"https://api.github.com/users/hackaugusto/received_events","type":"User","site_admin":false},"labels":[{"id":318426947,"node_id":"MDU6TGFiZWwzMTg0MjY5NDc=","url":"https://api.github.com/repos/raiden-network/raiden/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-04-09T12:44:51Z","updated_at":"2019-07-02T10:22:30Z","closed_at":"2019-07-02T10:22:30Z","author_association":"COLLABORATOR","body":"## Abstract\r\n\r\nThe message queue serialization is unnecessarily dumping the `repr(QueueIdentifier)` into the state snapshot. \r\n\r\n## Motivation\r\n\r\nThis is a bit surprising and confusing, so we should probably remove the unnecessary extra key.\r\n\r\n## Specification\r\n\r\nChange the de/serialization functions to **and** write a data migration.\r\n\r\n```python\r\ndef serialize_queueid_to_queue(data: typing.Dict):\r\n    return [\r\n        [queue_id, queue]\r\n        for queue_id, queue in data.items()\r\n    ]\r\n\r\n\r\ndef deserialize_queueid_to_queue(data: typing.Dict):\r\n    return {\r\n        queue_id: queue\r\n        for queue_id, queue in data\r\n    }\r\n```\r\n\r\n## Backwards Compatibility\r\n\r\nThis is backwards compatible with the protocol and smart contracts, and with the migration the storage is forward compatible with new clients\r\n"}}
{"actor":{"display_login":"rakanalh"}}