Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Enforcing the fee structure #431

Closed
wants to merge 5 commits into from
Closed

Enforcing the fee structure #431

wants to merge 5 commits into from

Conversation

CurbShifter
Copy link

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.

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.
@CurbShifter
Copy link
Author

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.

}

if (Burst.getFluxCapacitor().isActive(FeatureToggle.SLOT_FEE_ENFORCING)
&& Constants.FEE_QUANT * ((block.getTransactions().size() / 2) * (1 + block.getTransactions().size())) > block.getTotalFeeNQT())) {

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.

@CurbShifter
Copy link
Author

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.

@rico666
Copy link
Collaborator

rico666 commented Feb 9, 2019

This is a hard fork change and as such should be added to some other code fork of the BRS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants