Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

nagydani
Copy link
Contributor

@nagydani nagydani commented Nov 1, 2017

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.

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
Copy link
Contributor

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?

Copy link
Contributor Author

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?

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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@MicahZoltu
Copy link
Contributor

MicahZoltu commented Nov 4, 2017

This Pull Request needs a much better title.

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@nagydani nagydani changed the title EIP: Initial writeup Rent Collection for Blockchain Data Nov 9, 2017
As pointed out by reviewers, there is no need for a separate balance for paying rent.
@VoR0220
Copy link
Member

VoR0220 commented Nov 10, 2017

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.

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
Copy link
Member

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.)

@pirapira pirapira added the EIP label Dec 1, 2017
@alexvandesande
Copy link

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

@Arachnid
Copy link
Contributor

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:

  • Frontmatter is now contained between lines with only a triple dash ('---')
  • Headers in the frontmatter are now lowercase.

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:

---
eip: <num>
title: <title>
author: <author>
type: [Standards Track|Informational|Meta]
category: [Core|Networking|Interface|ERC] (for type: Standards Track only)
status: Draft
created: <date>
---

Copy link
Contributor

@nicksavers nicksavers left a 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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

### TODO

## Implementation
### TODO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

@axic
Copy link
Member

axic commented May 24, 2019

@nagydani @zsfelfoldi are you still pursuing this EIP in the light of #1418, #1682 and #2026 / #2027 / #2029 / #2031 ?

@axic
Copy link
Member

axic commented Jun 28, 2019

Ping @nagydani @zsfelfoldi

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Sep 22, 2020
@github-actions
Copy link

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.

@github-actions github-actions bot closed this Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants