Replies: 2 comments 1 reply
-
Validated by @qdrn and @sebastien-forestier |
Beta Was this translation helpful? Give feedback.
0 replies
-
I’m interested in understanding how the price of creating a new address will compare to a simple transaction. Whether the difference will be negligible or not. Also, will storage costs be the same for every address or will it become more expensive when there are more accounts/addresses? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
RFC: Storage costs
Intro
Currently, storing data in the ledger only costs gas, and creating new addresses inside the ledger is free.
This is a problem since the ledger max size is about 1TB.
We need a scheme to limit storage and add a cost to it.
Proposal
General case
In order to add
N
extra bytes to the ledger, the writer needs to spendN*LEDGER_COST_PER_BYTE
coins from their parallel balance, plus the existing gas fee. Writing fails if not enough parallel coins are available. When removingN
bytes from the ledger, the writer pays gas and getsN*LEDGER_COST_PER_BYTE
coins back to their parallel balance.LEDGER_COST_PER_BYTE
is chosen in such a way that when the total coin supply is invested in storage, then the 1TB ledger is full. This naturally limits the ledger size, and allows its max size to slowly grow with monetary mass inflation.Creating a new address, deleting an address
When sending coins to a new address that didn't exist before, it implies spending the storage costs to store the empty ledger entry.
For example, if an empty ledger entry uses 100 bytes, then sending X coins to a new address will create the new address with a balance of
X - 100*LEDGER_COST_PER_BYTE
. If X is not high enough to cover storage costs, the operation fails.When deleting an address, the possibility of sending the freed storage coins to another address' parallel balance should be added.
Beta Was this translation helpful? Give feedback.
All reactions