I am seeing this portal
When i type some data hash changes and when i click on mine button, hash changes again. I guess hash after mine is final one. Whats the logic for mine hash?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
The act of mining is generating a random nonce to try to get the hash below a certain number. So when you change data in the "Data" field, it just changes the hash to whatever the hash of the block number/nonce/data is. Then when you click "Mine", it's changing the nonce field until it finds one that comes with a hash below a certain number.
As far as I can understand, the form contains three editable fields:
Data; and one non-editable field
Hash field always contains hash of the values of three editable fields combined together. So, value of
Hash field changes every time any of the values in editable fields change.
Mine try to find
Nonce value that will make hash low, i.e. such a value that, combined with values in two other editable fields, will make hash to start with at least four hexadecimal zeros. Once such
Nonce value is found, is it placed into
Nonce field. As long as
Mine button updates value of
Nonce field, it triggers hash recalculation and thus value in
Hash field changes as well.
Background color of the form tells whether current hash is low enough (green background) or not (red background).