Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upstream] [Core] Big endian support #247

Merged
merged 12 commits into from
Aug 15, 2022

Conversation

lyricidal
Copy link

First step in getting our serialization code up to par with upstream. Backports bitcoin#5510 with only minor adjustments.

Fix issue bitcoin#888.
This has been structured so that each compatibility change is one commit that touches only one file. After the initial build change, they are independent.
Most 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.
I've tested this on mipsbe32.
All tests pass
Testnet syncs correctly
Node can successfully function on P2P mainnet
Checked that data directory can be copied between endians with no adverse results (only peers.dat required special attention here)
Known issues (to be fixed before merge):
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)

from PIVX-Project/PIVX#1554

additional info:

  • required a cherry picked commit to update our crypto/common.h - in 20973da
  • Big Endian hashing for PoA is currently just commented out -> we can add it in an additional PR if required, but we do not have any Big Endian users right now anyway
  • Code adapted for use with our current block version (5) - TODO: update this code for when we bump block versions

@lyricidal lyricidal merged commit d419dba into develop Aug 15, 2022
@lyricidal lyricidal deleted the upstream-big_endian-pr1554-squashed branch August 15, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream Upstream backports/fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants