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

proposal: Fee Market for Storage #27575

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Sep 2, 2022

This PR continues the discussion from #27029, as a proper proposal.

Update: This proposal has been moved over to the SIMD repo/process here:
solana-foundation/solana-improvement-documents#8

@brooksprumo brooksprumo force-pushed the accounts-data-fee-market-proposal branch from bf3f96c to 520050a Compare September 2, 2022 16:59
@brooksprumo brooksprumo marked this pull request as ready for review September 2, 2022 17:00
@brooksprumo
Copy link
Contributor Author

Tagging the folks that already commented over in the other issue:
@jstarry @taozhu-chicago @joncinque

Please tag in others that would be valuable for the discussion. TIA!

@brooksprumo brooksprumo changed the title Add proposal: Fee Markets for Storage proposal: Fee Markets for Storage Sep 14, 2022
@brooksprumo brooksprumo changed the title proposal: Fee Markets for Storage proposal: Fee Market for Storage Sep 14, 2022
@aeyakovenko
Copy link
Member

my gut on how to price storage is to allow Xkb per block, and any remaining storage goes into a "large slab allocator". Devs can request Zmb from the slab allocator that runs an auction every minute or something, then sub allocate from the slab.

@aeyakovenko
Copy link
Member

aeyakovenko commented Sep 23, 2022

@brooksprumo so the other idea

  1. network sets a maximum target state size in GB for the state
  2. when the state hits that size, the lowest accounts by lamport balance compress - gets put into a Merkle tree
  3. compressing mans the account stays in the index, but the data is merkelized, like the NFT merkle tree
  4. anyone can provide the data and decompress the account as long as the lamport balance > min

We need some way to deal with the corner case of the hard cap, the idea I have is that

  1. When state size hits 100% of the target maximum size, price doubles at every half way point to 120%, so 110, 115, 117.5...
  2. at 120% of the target state size allocations fail
  3. every epoch the state shrinks back down to at most 80% of the target maximum.

@brooksprumo
Copy link
Contributor Author

  1. when the state hits that size, the lowest accounts by lamport balance compress - gets put into a Merkle tree

Sounds like this would require scanning all the accounts to find those particular accounts, which may be expensive.

  1. every epoch the state shrinks back down to at least 80% of the target maximum.

I assume "at most" instead of "at least", yes? Is this the thought of when to perform the compression?

@aeyakovenko
Copy link
Member

3. when the state hits that size, the lowest accounts by lamport balance compress - gets put into a Merkle tree

Sounds like this would require scanning all the accounts to find those particular accounts, which may be expensive.

Yea, we would do this asynchronously.

  1. every epoch the state shrinks back down to at least 80% of the target maximum.

I assume "at most" instead of "at least", yes? Is this the thought of when to perform the compression?

Yes, correct.

@aeyakovenko
Copy link
Member

@brooksprumo in theory, once the state fills up and lowest price is actually > default, it means that there is more economically useful state that can fit into the chain. Validators should be motivated to bump up the capacity to capture all of it.

@brooksprumo brooksprumo removed their assignment Oct 31, 2022
@brooksprumo
Copy link
Contributor Author

This proposal has been moved over to the SIMD repo/process here:
solana-foundation/solana-improvement-documents#8

@brooksprumo brooksprumo deleted the accounts-data-fee-market-proposal branch December 12, 2022 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noCI Suppress CI on this Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants