-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Rent Collection for Blockchain Data #755
Conversation
EIPS/rentcollector.md
Outdated
modified by miner vote is introduced. It is initialized at 0 and is | ||
assumed to have been zero before its introduction. The miner validating | ||
a particular block can increase rent in a bounded way at the cost of | ||
forfeiting a proportional part of the mining reward. Similarly, if |
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.
Forfeiting the reward for the present block, or for all subsequent blocks?
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.
The idea was for only the present block, because doing it for all subsequent blocks would mean that miners would have no incentive to increase the rent at all, as the sum of the increased rent and decreased mining reward would get smaller (if the proportion is smaller than 1, as it should be).
Should I make it explicit?
EIPS/rentcollector.md
Outdated
balance is the same as their normal balance. With each new block, an | ||
account is chosen in a deterministically random fashion with a | ||
probability proportional to the amount of storage that they use. The | ||
current value of `rent` is subtracted from their `lease` and if the |
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.
Does the rent get credited to the miner?
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.
Yes.
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.
So, if the rent is X
, and the balance is Y
, and X
> Y
, does the miner get X
or Y
? Creating new money or not?
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.
If rent
exceeds lease
, only lease
is credited to the miner (no money created) and the account is removed.
EIPS/rentcollector.md
Outdated
Each contract account gets a new balance called `lease` used for paying | ||
rent that is initialized at 0 and is assumed to have been zero before | ||
its introduction. For externally controlled accounts, their `lease` | ||
balance is the same as their normal balance. With each new block, an |
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.
Limiting this to one per block seems likely to make the effective probability of having rent levied extremely low. It also means that every new account created actually decreases the expected rent-per-account.
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.
As for the first objection, the probability would be proportional to the accounts' state in the total state. That is, if one contract had a state that takes up half the state space, it would be taxed on average in every other block. Externally controlled accounts would, indeed, have a rent levied on them extremely rarely, but that corresponds to those imposing an essentially negligible cost.
However, there is a better argument in favor of taxing more than one account in a block; assuming that nobody pays rent, there can only be one account removed per block, which would be too slow, given the huge number of accounts. In other words, deadbeat accounts would have a very long time before they get evicted.
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.
As for the second objection, I do not see why that would be a problem. Does it create any perverse incentives?
EIPS/rentcollector.md
Outdated
rent that is initialized at 0 and is assumed to have been zero before | ||
its introduction. For externally controlled accounts, their `lease` | ||
balance is the same as their normal balance. With each new block, an | ||
account is chosen in a deterministically random fashion with a |
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.
Choosing accounts weighted by their storage usage is going to require another consensus disk structure - one that has to be updated for every new storage slot allocated or unallocated.
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.
Not necessarily. If miners are full nodes, they can keep track of contract sizes in a canonical way off-consensus; after all the information is part of consensus implicitly and it is cheap to keep it up to-date.
An alternative solution could assume that state tries are balanced (deliberately unbalanced tries would only increase expected rent due to Jensen's inequality) and the size of each contract is assumed to be an exponential function of the length of a deterministically random branch in their state trie. In this case, the taxed account would be picked with uniform probability, but the levied rent would be rent
multiplied by the estimated size of the state, going down the state trie along a deterministically random branch.
This Pull Request needs a much better title. |
EIPS/rentcollector.md
Outdated
receive the same additional mining reward that would need to be | ||
forfeited to raise it back. | ||
|
||
Each contract account gets a new balance called `lease` used for paying |
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.
Why have a separate lease
balance rather than just using eth
balance? Should the lease balance run out and the contract is pruned it seems wasteful to have any ETH the contract was holding suddenly be black holed when that ETH could have gone to paying rent. Similarly, adding a separate source of ETH adds complexity and I don't see any advantage to separating the balance.
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.
Agreed. The lease
balance is redundant.
As pointed out by reviewers, there is no need for a separate balance for paying rent.
So far this is the simplest example of creating rent collection I have seen and thus far imo the best. Still...I can't help but feel that the node shouldn't be random but rather chosen by economic factors of tx fees that flow from the address compared to the fee that could be given by a deposit to destruct the state of the contract. In a way I think it shouldn't be rent but rather a bribe from end users to miners to destruct said contract via a special balance appended to the state of every contract (this could be thought of as rent in a way but at any time consumable by a miner) and be dividended a reward for all previous users of that contract + miner (to prevent people just bribing miners blowing up just any contract to screw over users). Unfortunately that may not scale...this could work though...just would like to see some other means of being able to value the state. |
EIPS/rentcollector.md
Outdated
forfeited to raise it back. | ||
|
||
With each new block, an account is chosen in a deterministically random | ||
fashion with a probability proportional to the amount of storage that |
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.
How do you enforce deterministically random choosing of an account with storage on it? This seems like a detail that's being handwaved over, when there may be a means to create an economic incentive to focus on "useless" accounts (accounts that have are outdated, low use, etc.)
Is this valid for accounts only or contracts too? If it's valid for contracts then it seems we can fall in an issue where a very important contract with 0 ether can be deleted and therefore delete or freeze other people's funds. If it's valid for accounts only then it creates a weird scenario that might make people prefer to use more complex wallets or even to use a wrapped eth token instead |
This is a courtesy notice to let you know that the format for EIPs has been modified slightly. If you want your draft merged, you will need to make some small changes to how your EIP is formatted:
If your PR is editing an existing EIP rather than creating a new one, this has already been done for you, and you need only rebase your PR. In addition, a continuous build has been setup, which will check your PR against the rules for EIP formatting automatically once you update your PR. This build ensures all required headers are present, as well as performing a number of other checks. Please rebase your PR against the latest master, and edit your PR to use the above format for frontmatter. For convenience, here's a sample header you can copy and adapt:
|
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.
There are a lot of TODO's in this EIP
And it's also missing a new required discussions-to
URL.
an unreasonable waste of a scarce resource. | ||
|
||
## Specification | ||
### TODO |
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.
TODO
with acceptance by miners. | ||
|
||
## Test Cases | ||
### TODO |
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.
TODO
### TODO | ||
|
||
## Implementation | ||
### TODO |
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.
TODO
Ping @nagydani @zsfelfoldi |
There has been no activity on this pull request for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This pull request was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
Introducing a way to collect rent from accounts that is proportional to the cost that they impose on the network by storing a large state over a long period of time.