dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Proposer finalization rewards #1081

Closed Nizametdinov closed 2 years ago

Nizametdinov commented 5 years ago

This pull request implements proposer finalization rewards.

The first block of every epoch must contain finalization rewards for the block proposers of the previous epoch. The number of finalization reward outputs equals the epoch length. The scripts to which finalization rewards are sent are taken from the reward (0th) outputs of the previous epoch coinbase transactions. The reward amount must depend on the percentage of votes included in the previous epoch, but this will be implemented in following PRs.

See some additional details in #418.

pep8speaks commented 5 years ago

Hello @Nizametdinov! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 62:87: W504 line break after binary operator

Comment last updated at 2019-06-05 15:34:34 UTC
scravy commented 5 years ago

Needs rebase.

scravy commented 5 years ago

rpc_getblockstats failed.

I guess you should run it with the --gen-test-data argument to update the testdata in rpc_getblockstats.json as the block structure changed.

Gnappuraz commented 5 years ago

utACK 19a3a3b

scravy commented 5 years ago

The CI build failed due to https://github.com/dtr-org/unit-e/issues/1105

Nizametdinov commented 5 years ago

Where is the BlockRewardValidator actually called from, at which step from CheckBlock, ContextualCheckBlock, to ConnectBlock and CheckStake?

It's called from ConnectBlock.

scravy commented 5 years ago

utACK 5320157edbeafb59ef92e7e4939fbed15afe7755