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

[draft] Storage Deposit #6514

Closed
wants to merge 14 commits into from
Closed

[draft] Storage Deposit #6514

wants to merge 14 commits into from

Conversation

msmouse
Copy link
Contributor

@msmouse msmouse commented Feb 6, 2023

in preparation for exposing StateValue### Description

Test Plan

@msmouse msmouse changed the title trivial: StateView::get_state_value_bytes [draft] Storage Deposit Feb 6, 2023
@msmouse msmouse force-pushed the 0205alden_deposit branch 4 times, most recently from a854b49 to f1ecc6f Compare February 8, 2023 22:30
let entry = vector::borrow(&slot_charges, i);
let coin = coin::extract_from_aggregatable_coin(&mut global_storage_deposit.deposit, entry.amount);
coin::deposit(entry.account, coin);
// FIXME(aldenhu): central events kills concurrency, probably need to augment Account with these events
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Considering that there'd be no way to know why you get refunds, I'm not sure a way around this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that it's part of the gas, I'm thinking being obscure (just like other gas charges) is fine 🤡

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh.. the refund won't be deducted from gas_used though..

Copy link
Contributor

Choose a reason for hiding this comment

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

With the movement toward objects, we could consider explicit user-owned objects for reimbursements, but there's a whole host of other issues that need to be addressed, such as opt-in, what to do if the user has only one -- do we have a framework to maximize parallelization..

@msmouse msmouse force-pushed the 0205alden_deposit branch 9 times, most recently from 7447ff9 to 084b912 Compare February 15, 2023 15:32
in preparation for exposing StateValue
We only had a "New mistakenly converted to Modification" issue for normal resources.
Modules and resource groups were never affected.
…king

* StateValue now has a new flavor which carries StateValueMetadata.
* similarly there is now WriteOp::CreationWithMetadata and friends
…nish()

SessionOutput is removed entirely, SessionExt::finish() directly returns
ChangeSetExt
So that in the VM adapter and session it's possible to access on-chain
configs and state slot metadata
@msmouse msmouse force-pushed the 0205alden_deposit branch 2 times, most recently from 9863cb1 to e9e5328 Compare February 15, 2023 17:05

let existing_value_opt = self
.remote
.get_state_value(state_key)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to access the metadata on the existing state value here. @zekun000 @gelash

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Jul 21, 2023
@github-actions github-actions bot closed this Aug 6, 2023
@msmouse msmouse reopened this Aug 7, 2023
@github-actions github-actions bot removed the Stale label Aug 8, 2023
@msmouse msmouse closed this Aug 21, 2023
@msmouse msmouse deleted the 0205alden_deposit branch August 25, 2023 22:00
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

Successfully merging this pull request may close these issues.

3 participants