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

Divergence between 32- and 64-bit when hashing >4GB affects gettxoutsetinfo #395

Merged
merged 2 commits into from
Apr 28, 2018

Conversation

dagurval
Copy link
Member

bitcoin/bitcoin#7848

Skipped the release-notes commit when cherry-picking.

Byte counts for SHA256, SHA512, SHA1 and RIPEMD160 must be 64 bits.
`size_t` has a different size per platform, causing divergent results
when hashing more than 4GB of data.
The key (transaction id for the following outputs) should be serialized
to the HashWriter.

This is a problem as it means different transactions in the same
position with the same outputs will potentially result in the same hash.

Fixes primary concern of #7758.
@dgenr8
Copy link
Member

dgenr8 commented Apr 28, 2018

utACK

@dgenr8 dgenr8 merged commit 1ecdbc3 into bitcoinxt:master Apr 28, 2018
@dagurval dagurval deleted the hash_4gb_utxoset branch April 28, 2018 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants