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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aptos-move/aptos-gas/src/transaction/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl ChangeSetConfigs {
// Bug fixed at gas_feature_version 3 where (non-group) resource creation was converted to
// modification.
// Modules and table items were not affected (https://github.com/aptos-labs/aptos-core/pull/4722/commits/7c5e52297e8d1a6eac67a68a804ab1ca2a0b0f37).
// Resource groups were not affected because they were
// Resource groups and state values with metadata were not affected because they were
// introduced later than feature_version 3 on all networks.
self.gas_feature_version < 3
}
Expand Down
11 changes: 7 additions & 4 deletions aptos-move/aptos-vm/src/data_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//! Scratchpad for on chain values during the execution.

use crate::move_vm_ext::MoveResolverExt;
use crate::move_vm_ext::{MoveResolverExt, MoveVmExt};
#[allow(unused_imports)]
use anyhow::Error;
use aptos_framework::{natives::state_storage::StateStorageUsageResolver, RuntimeModuleMetadataV1};
Expand All @@ -20,21 +20,24 @@ use move_core_types::{
vm_status::StatusCode,
};
use move_table_extension::{TableHandle, TableResolver};
use move_vm_runtime::move_vm::MoveVM;
use std::ops::{Deref, DerefMut};

pub struct MoveResolverWithVMMetadata<'a, 'm, S> {
move_resolver: &'a S,
move_vm: &'m MoveVM,
move_vm: &'m MoveVmExt,
}

impl<'a, 'm, S: MoveResolverExt> MoveResolverWithVMMetadata<'a, 'm, S> {
pub fn new(move_resolver: &'a S, move_vm: &'m MoveVM) -> Self {
pub fn new(move_resolver: &'a S, move_vm: &'m MoveVmExt) -> Self {
Self {
move_resolver,
move_vm,
}
}

pub fn vm(&self) -> &MoveVmExt {
self.move_vm
}
}

impl<'a, 'm, S: MoveResolverExt> MoveResolverExt for MoveResolverWithVMMetadata<'a, 'm, S> {
Expand Down
Loading