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

multi: Remove no longer relevant blake256 pad code. #408

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Oct 11, 2023

This removes the blake256 padding code since it no longer applies.

This removes the blake256 padding code since it no longer applies.
Copy link
Member

@jholdstock jholdstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more comment to update, otherwise looks good.

dcrpool/pool/hub.go

Lines 46 to 56 in 73a5cd5

// getworkDataLen is the length of the data field of the getwork RPC.
// It consists of the serialized block header plus the internal blake256
// padding. The internal blake256 padding consists of a single 1 bit
// followed by zeros and a final 1 bit in order to pad the message out
// to 56 bytes followed by length of the message in bits encoded as a
// big-endian uint64 (8 bytes). Thus, the resulting length is a
// multiple of the blake256 block size (64 bytes). Given the padding
// requires at least a 1 bit and 64 bits for the padding, the following
// converts the block header length and hash block size to bits in order
// to ensure the correct number of hash blocks are calculated and then
// multiplies the result by the block hash block size in bytes.

@davecgh
Copy link
Member Author

davecgh commented Oct 12, 2023

I was planning to update that in the separate blake3 commit, because it has to change for that.

@jholdstock jholdstock merged commit db3cd29 into decred:master Oct 12, 2023
2 checks passed
@davecgh davecgh deleted the pool_remove_old_blake256_code branch October 12, 2023 15:24
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.

2 participants