{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5510","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5510/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5510/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5510/events","html_url":"https://github.com/bitcoin/bitcoin/pull/5510","id":52480621,"number":5510,"title":"Big endian support","user":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Feature","name":"Feature","color":"7cf575"},{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Priority%20Medium","name":"Priority Medium","color":"E5993F"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-12-19T13:02:51Z","updated_at":"2015-02-22T08:40:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/5510","html_url":"https://github.com/bitcoin/bitcoin/pull/5510","diff_url":"https://github.com/bitcoin/bitcoin/pull/5510.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/5510.patch"},"body":"Fix issue #888.\r\n\r\nThis has been structured so that each compatibility change is one commit that touches only one file. After the initial build change, they are independent.\r\n\r\nMost extensive changes are in **'src/serialize.h: base serialization level endianness neutrality'**. I had to replace READDATA and WRITEDATA with functions that take sized integer types to make use of the proper `endian.h` functions. I'm confident that the end result is the same, although this may require more tests.\r\n\r\nI've tested this on mipsbe32. \r\n\r\n- All tests pass\r\n- Testnet syncs correctly\r\n- Node can successfully function on P2P mainnet\r\n- Checked that data directory can be copied between endians with no adverse results (only peers.dat required special attention here)\r\n\r\nKnown issues (to be fixed before merge):\r\n\r\n- ~~DNS seeding always comes with 0 results on BE~~ (confirmed as working by @paveljanik on real hardware, must have been issue with my qemu-user setup)\r\n"},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/75425835","html_url":"https://github.com/bitcoin/bitcoin/pull/5510#issuecomment-75425835","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/5510","id":75425835,"user":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=3","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":"2015-02-22T08:40:04Z","updated_at":"2015-02-22T08:40:04Z","body":"Untested ACK.\r\n\r\nWe do have a few special-cased pieces of code for little-endian vs generic. Do we need all of them? I would suggest to either:\r\n* get rid of all WORDS_BIGENDIAN ifdefs (except in compat), and use the generic code everywhere\r\n* have a mechanism to enable generic code at compile-time, and do at least one automated test with generic code."}}