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

Miners are now get rewards #7

Merged
merged 4 commits into from
Jan 9, 2018
Merged

Miners are now get rewards #7

merged 4 commits into from
Jan 9, 2018

Conversation

tbrand
Copy link
Contributor

@tbrand tbrand commented Jan 9, 2018

Currently miners will not get any rewards even if it find a correct nonce.
This update allows miners to get rewards according to it's hash rate.

  1. Miners will get 3/4 of total served amounts of coinbase, remaining amounts(1/4) will serve to the hosting node.
  2. The ratio of the rewards depends on it's hash rate.
    1. The hash rate is calculated from the # of the nonces sent by miners
    2. Since the difficulty of the miner's PoW is easy comparing to the real difficulty, multiple nonces are sent from miners. (It's the same idea of well known Mining Pool)

For example, let's assume that

  • Total served amount from coinbase is 10.0.
  • Miner A found 8 nonces
  • Miner B found 4 nonces

Then,

  • Miner A will get 5.0 coins: (10.0 * 3/4) * (8/12)
  • Miner B will get 2.5 coins: (10.0 * 3/4) * (4/12)
  • Node will get 2.5 coins: 10.0 - 5.0 - 2.5

This commit also includes many bug fixes.

@tbrand tbrand merged commit e9a7f76 into master Jan 9, 2018
@tbrand tbrand deleted the miners-rewards branch January 9, 2018 15:56
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