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

Fix a calculation sequence error. #510

Closed
wants to merge 2 commits into from
Closed

Fix a calculation sequence error. #510

wants to merge 2 commits into from

Conversation

steven004
Copy link
Contributor

I would like to propose another one, which might be better for this calculation. You could compare the two.

Why we have this: 
This algorithm here directly follow the rule of ratio to win, and easier to understand. Just think about a smaller space, e.g. 100, instead of 2^256. 
When one miner has 10% power, it should have 10% ratio to win. that is, when the h is in {0..9}, it wins. Simply speaking, it is: 
     (h + 1) / 100 <= 10% ,  instead of     h / 99 < 10%    (both are equivalent when h is an integer and power < 1), 
but the former is easier to understand.
@steven004 steven004 closed this Oct 31, 2019
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.

1 participant