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(iota-framework): replace storage_fund with storage deposits #960

Conversation

Dkwcs
Copy link
Contributor

@Dkwcs Dkwcs commented Jul 2, 2024

Description of change

Replacing storage_fund with storage deposits
Increase storage_rebate_rate to 100%
Removing rebates from the total_object_storage_rebates
Putting refundable charges into total_object_storage_rebates
Putting non-refundable charges (which are gonna be 0 for now if we set the refund rate to 100%) into non_refundable_balance

Links to any relevant issues

fixes #939 and #948 .

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Run tests - kinesis/crates/iota-framework/packages/iota-system

@Dkwcs Dkwcs requested a review from a team as a code owner July 2, 2024 19:12
@Dkwcs Dkwcs added the sc-platform Issues related to the Smart Contract Platform group. label Jul 2, 2024
@Dkwcs Dkwcs self-assigned this Jul 2, 2024
Copy link

@PhilippGackstatter PhilippGackstatter left a comment

Choose a reason for hiding this comment

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

Looks good. You linked issue #938 but that issue is not fixed by this PR.

Comment on lines 23 to 24
// At the beginning there's no object in the storage yet
storage_balance: initial_balance,

Choose a reason for hiding this comment

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

If there's no object in storage at the beginning, shouldn't it be initialized as storage_balance: 0, then, instead of with the parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implementation has been changed

@Dkwcs
Copy link
Contributor Author

Dkwcs commented Jul 3, 2024

Looks good. You linked issue #938 but that issue is not fixed by this PR.

Sorry, I got the numbers mixed up
Fixed the right task number

Dkwcs added 2 commits July 3, 2024 11:38
…s in storage_fund.

Removing rebates from the total_object_storage_rebates
Putting refundable charges into total_object_storage_rebates
Putting non-refundable charges (which are gonna be 0 for now if we set the refund rate to 100%) into non_refundable_balance
Copy link

@PhilippGackstatter PhilippGackstatter 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 hundreds of results in the codebase when searching for the string "storage_fund". Do you want to update all of them in this PR, or do it later in a pure-rename only PR? I think the latter is preferable, to keep the logic changes separate from the name changes, but we need to keep track of this issue somewhere.

@Dkwcs
Copy link
Contributor Author

Dkwcs commented Jul 3, 2024

There are hundreds of results in the codebase when searching for the string "storage_fund". Do you want to update all of them in this PR, or do it later in a pure-rename only PR? I think the latter is preferable, to keep the logic changes separate from the name changes, but we need to keep track of this issue somewhere.

I suppose we have to deal with it in the same way as storage_fund_reinvest_rate naming clearing
Create separate issue for renaming all related stuff

@Dkwcs Dkwcs marked this pull request as draft July 10, 2024 08:36
@Dkwcs Dkwcs closed this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants