Conversation
A quick check to enforce the minimum fee for the amount of slots used in a block relative to the number of transactions. This check implies that if someone overpays for a slot, another tx could still have a lower fee while the block stays valid. This added block validation condition secures equal distribution of fees among blocks and miners. And this change makes fat block forging still possible when really needed. By sending a tx with a high fee.
…sactions. (And rejects fat blocks). Because that feature would still favors rich miners. Where the miner would use a privately held UT (not propagated) which is only self rewarding if a block is forged.
Added another option with a stricter fee verification, that doesn't allow paying for other transactions. (And rejects fat blocks). Because that feature would still favor rich miners. Where the miner would use a privately held UT (not propagated) which is only self rewarding if a block is forged. |
src/brs/BlockchainProcessorImpl.java
Outdated
} | ||
|
||
if (Burst.getFluxCapacitor().isActive(FeatureToggle.SLOT_FEE_ENFORCING) | ||
&& Constants.FEE_QUANT * ((block.getTransactions().size() / 2) * (1 + block.getTransactions().size())) > block.getTotalFeeNQT())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably deserves to be broken out into it's own function and properly unit tested.
yes ofc. committed your suggestions. The unit test sounds like a good plan for the formula. Perhaps it needs to cast to a float for a proper division. |
This is a hard fork change and as such should be added to some other code fork of the BRS. |
A proposal for a quick check to enforce the minimum fee for the amount of slots used in a block relative to the number of transactions.
This check implies that if someone 'overpays' for a slot, another tx could still have a lower fee while the block stays valid. This added block validation condition improves fair distribution of fees among the blocks and miners.
Note that this change makes fat block forging still possible when really needed. By sending a tx with a high fee.