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

feat(networking): change storage cost formula #692

Merged
merged 5 commits into from Sep 7, 2023

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented Sep 1, 2023

The storage cost is an exponential calculation, but was adjusted for
readability and so that the store cost stays lower for longer. The cost
only starts ramping up when we're nearing 50% of capacity.

Here are the costs associated with steps:

///    1 =         0.000000010
///    2 =         0.000000010
///    4 =         0.000000011
///    8 =         0.000000012
///   16 =         0.000000014
///   32 =         0.000000018
///   64 =         0.000000033
///  128 =         0.000000111
///  256 =         0.000001238
///  512 =         0.000153173
/// 1024 =         2.346196716
/// 1280 =       290.372529764
/// 1536 =     35937.398370712
/// 1792 =   4447723.077333529
/// 2048 = 550463903.051128626 (about 13% of TOTAL_SUPPLY at moment of writing)

@reviewpad reviewpad bot added Small Pull request is small waiting-for-review labels Sep 1, 2023
@joshuef joshuef added this pull request to the merge queue Sep 4, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 4, 2023
@b-zee b-zee enabled auto-merge September 5, 2023 09:20
b-zee and others added 5 commits September 7, 2023 09:31
The storage cost is an exponential calculation, but was adjusted for
readability and so that the store cost stays lower for longer. The cost
only starts ramping up when we're nearing 50% of capacity.

Here are the costs associated with steps:
```
   1 =          0.000000010
   2 =          0.000000010
   4 =          0.000000011
   8 =          0.000000012
  16 =          0.000000014
  32 =          0.000000019
  64 =          0.000000036
 128 =          0.000000126
 256 =          0.000001591
 512 =          0.000253098
1024 =          6.405837009
2048 = 4103474778.282772064
```
Tweaked the formula to have a lower maximum and use MAX_RECORDS_COUNT
const.
@b-zee b-zee added this pull request to the merge queue Sep 7, 2023
Merged via the queue into maidsafe:main with commit e081675 Sep 7, 2023
24 checks passed
@b-zee b-zee deleted the feat-store-cost-formula branch September 7, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Small Pull request is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants