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

Evaluate an exponential curve for calculating the write fees per kb to have smooth transition with bucketlist size #1364

Open
anupsdf opened this issue Mar 14, 2024 · 3 comments
Assignees

Comments

@anupsdf
Copy link
Contributor

anupsdf commented Mar 14, 2024

What problem does your feature solve?

Currently, the write fees per kb is a straight line that depends on current bucketlist size. When the slope of this line is steep, then fees can drop significantly lower when bucketlist size drops. We also have a target bucketlist size after which fees instantly jump by 1000 times.

What would you like to see?

Evaluate if having an exponential curve would solve these two problems.
For example,

y = b ^ x + k
where, y = write fee per 1 kb
b = some base (we could start with natural base e which is 2.717828)
x = current bucketlist size
k = some constant

Here is a chart on how this would look like,
Screenshot 2024-03-14 at 10 30 41 AM

@MonsieurNicolas
Copy link
Contributor

An exponential curve was something we actually considered before (even for the second part, passed the bucketListTargetSizeBytes as mentioned in the CAP), but in both cases, the "back pressure" from fees increasing just kicks in too slowly: from your chart you can see that most of the growth is happening when the ledger is getting very close to full.

@anupsdf
Copy link
Contributor Author

anupsdf commented Mar 14, 2024

One thought I have is that if we are going to revisit the fees more often, then in an exponential curve we can have the network settings such that current bucketlist size is 1 (or 2) GB away from when fees start to drastically increase. We then constantly adjust network settings and shift the curve as needed with bucketlist size increases.

@MonsieurNicolas
Copy link
Contributor

when you "zoom in" on the last X bytes, exponential curve always have that property I mentioned above that price does not grow fast enough until it's too late -- one of the things we could consider is making MINIMUM_WRITE_FEE_PER_1KB a setting.

The thing to keep in mind is that the reason there is an explicit bucketListTargetSizeBytes is that this allows to reason about minimum hardware specs to run nodes, so whatever we do has to be parametrized around that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@MonsieurNicolas @dmkozh @anupsdf and others