Questions tagged [midstate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
68 views

How do i create/implement a midstate function (One that can accurately calculate the midstate of already mined blocks)

I'm creating an AI controlled bitcoin miner but I'm having trouble manually & locally creating a midstate function to be used for optimizing the mining process. Basically I've created independent ...
user avatar
2 votes
2 answers
365 views

What is the duration of a ban?

I read somewhere that a node is banned for 24 hours. However I found the Misbehaving() function which makes state->fShouldBan = true;. But I could not find any other function that makes state->...
user avatar
10 votes
1 answer
924 views

Did Satoshi intend to allow midstate computation to speed up hashing?

The design of Bitcoin allows computers to compute a hash with 2 iterations of the SHA256 compression function instead of 3 on all but 1 out of every 2^32 attempts. When Satoshi chose SHA256d for ...
user avatar
  • 28.6k
5 votes
2 answers
1k views

What is a midstate? How does using a midstate speed up hashing?

This defines "midstate" as the "precomputed hash state after hashing the first half of the data." I've heard "midstate" used in the context of speeding up hashing. How does using a midstate speed up ...
user avatar
  • 4,297