celo-org / celo-blockchain

Official repository for the golang Celo Blockchain
https://celo.org
GNU Lesser General Public License v3.0
562 stars 200 forks source link

Refactor tx fee payments #540

Closed timmoreton closed 4 years ago

timmoreton commented 5 years ago

Expected Behavior

In state_transition.go change how transaction fees are distributed:

And update the documentation.

Background: with our current scheme, there is an attack if any part of the base is allocated to an entity (i.e a validator or a full node) whereby they have an incentive to fill blocks with dummy transactions (with low or no cost, since they receive [a portion of] the base) and push the gas price minimum up.

We will be adding a new fixed fee for payments to full nodes. See #541

nategraf commented 5 years ago

The initial proposal here is to send the entire gas fee base to the infrastructure fund. We could alternatively burn part or even all of it (as decided through governance), which is closer to the original design discussed in EIP1559 [1].

One edge case worth noting is when the the Governance contract has not yet been deployed or otherwise cannot be found. In that case my intuition is to burn the gas fee, but that may be worth discussing.

[1] https://medium.com/@eric.conner/fixing-the-ethereum-fee-market-eip-1559-9109f1c1814b