deprecate midstate and hash1 in getwork #538

pull tcatm wants to merge 1 commits into bitcoin:master from tcatm:deprecate-midstate changing 1 files +4 −4
  1. tcatm commented at 4:23 PM on September 28, 2011: none

    This adds (DEPRECATED) to both midstate and hash1 in help getwork-RPC. The idea is to remove both fields "soon".

    hash1 is a buffer the miner should use to insert the hash between both SHA256() calls. It contains some bytes for padding. These are standardized in the SHA256 spec and all the popular miners have them hardcoded for performance reasons so there is no need to provide it with every getwork.

    midstate contains the internal SHA256 state after hashing the first half of the blockheader. This can be easily done in miners as they are already doing lots of SHA256 iterations and have probably faster algorithms than bitcoind.

    Deprecating these fields will allow for cleaner code in main.cpp /BitcoinMiner (i.e. only build blockheader without any hashing or formatting of buffers) and will make it easier to remove cryptopp from the source tree.

  2. deprecate midstate and hash1 in getwork f8acc29fca
  3. sipa commented at 2:27 PM on September 29, 2011: member

    ACK; we can re-evaluate how many miners are still using midstate or hash1 when 0.5 or 0.6 is released.

  4. gavinandresen referenced this in commit e8e0e23d20 on Sep 29, 2011
  5. gavinandresen merged this on Sep 29, 2011
  6. gavinandresen closed this on Sep 29, 2011

  7. coblee referenced this in commit fc71bd4d20 on Jul 17, 2012
  8. ptschip referenced this in commit f524c09a53 on May 10, 2017
  9. kallewoof referenced this in commit 298c2fb482 on Oct 4, 2019
  10. KolbyML referenced this in commit bc86927231 on Sep 4, 2020
  11. rajarshimaitra referenced this in commit a46272d0ac on Aug 5, 2021
  12. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me