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

minimum block reward #8605

Merged
merged 5 commits into from
Apr 13, 2021
Merged

minimum block reward #8605

merged 5 commits into from
Apr 13, 2021

Conversation

deepthiskumar
Copy link
Member

Added a new flag --minimum-block-reward to the daemon command.
If the total reward of a block generated by a node is less than the minimum-block-reward configured by the node then it discards the diff (consisting of transactions and snark work) and creates an empty block (no coinbase or transactions) instead.

This is temporary solution to a problem described in #8576. The long term solution is described here #8585

Closes #8576

@deepthiskumar deepthiskumar requested a review from a team as a code owner April 8, 2021 20:52
@deepthiskumar deepthiskumar added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Apr 9, 2021
src/lib/block_producer/block_producer.ml Outdated Show resolved Hide resolved
@bkase
Copy link
Member

bkase commented Apr 9, 2021

!approved-for-mainnet

@mrmr1993 mrmr1993 merged commit 9ffa708 into compatible Apr 13, 2021
@mrmr1993 mrmr1993 deleted the fix/min-block-rewards branch April 13, 2021 16:09
@lampardlamps
Copy link

Hi, as a BP I'm wondering what benefits this solution brings please? The snark fees cannot exceed the coinbase rewards in the first place, so the reward without this solution will always be positive or 0. This solution, when triggered, seems to ditch the small, positive reward and produce an empty block with 0 reward. Why would a BP use this please?

@garethtdavies
Copy link
Contributor

garethtdavies commented Jun 7, 2021

It's due to the Foundation rules as they do not include fees see https://docs.minaprotocol.com/en/advanced/foundation-delegation-program. If you produced a block with 720 rewards you are responsible to pay the same proportion of block rewards (less fees) regardless if you only received a net 20 after buying a snark for 700. So it guards against this case. At least, that is my understanding :)

@lampardlamps
Copy link

It's due to the Foundation rules as they do not include fees see https://docs.minaprotocol.com/en/advanced/foundation-delegation-program. If you produced a block with 720 rewards you are responsible to pay the same proportion of block rewards (less fees) regardless if you only received a net 20 after buying a snark for 700. So it guards against this case.

understood. Thanks Gareth!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants