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

meaning of colors on Mining Sim. "Computed block hash" #16

Open
7yl4r opened this issue Nov 18, 2017 · 4 comments
Open

meaning of colors on Mining Sim. "Computed block hash" #16

7yl4r opened this issue Nov 18, 2017 · 4 comments

Comments

@7yl4r
Copy link

7yl4r commented Nov 18, 2017

It's not clear to me what the colorization below indicates

image

A popover explanation on the title "Computed block hash" or even just a note in the project README would be helpful.

PS: really cool tool. thank you for making this.

@7yl4r 7yl4r changed the title explaination of colors on Mining Sim. "Computed block hash" meaning of colors on Mining Sim. "Computed block hash" Nov 18, 2017
@JornC
Copy link
Collaborator

JornC commented Nov 19, 2017

I'll quickly leave a comment here to explain the colors:

The more bits that are 0, the 'more valid' one could consider the byte in question, hence the more bits that are 1s, the redder the colour will be. This is irrespective if bit order and thus higher numbers can be 'greener' than lower numbers that are 'redder'.

For example take the orange-ish 0x37 in the above screenshot, in binary that's 0011 0111, 3 0s and 5 1s. That's 5 bits that make the block 'more invalid', and 3 bits that are 'valid', and so the colour chosen for this byte is 5/8ths worth of 'wrong', which is the color FFBF00 (as per https://github.com/JornC/bitcoin-transaction-explorer/blob/master/bitcoin-transactions-core/src/main/java/com/yoghurt/crypto/transactions/client/widget/TargettedHashHexViewer.java#L18)

@JornC
Copy link
Collaborator

JornC commented Nov 19, 2017

To illustrate further, the number 0x4F above has the some colour.

In binary that's 0100 1111: 3 zeroes, 5 ones. Same 'validness' as 0x37 if you will, so same colour.

@7yl4r
Copy link
Author

7yl4r commented Nov 19, 2017

Ah, thanks. That makes perfect sense.

@Giszmo
Copy link

Giszmo commented Nov 11, 2020

The colors are confusing and don't give much feedback even if you know the above. To be more accurate, you could color each hex symbol individually, considering those to the left. Then you would have only one symbol with a redish green, green to its left (if any) and red to its right. If you then tune up the speed some orders of magnitude and keep around the "best hit so far", it might become more clear.

I did the above without colors and keeping around all prior best hits in this simulator.

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

No branches or pull requests

3 participants