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

Introduce account Touched/Cleared/None state in CacheDB #140

Merged
merged 5 commits into from Jun 30, 2022

Conversation

rakita
Copy link
Member

@rakita rakita commented Jun 30, 2022

Structure DbAccount added to CachedDB

#[derive(Debug, Clone)]
pub struct DbAccount {
    pub info: AccountInfo,
    /// If account is selfdestructed or newly created, storage will be cleared.
    pub account_state: AccountState,
    /// storage slots
    pub storage: BTreeMap<U256, U256>,
}

BTreeMap is used for storage as storage needs to be sorted when merkilized.

@mattsse when this is merged, you can integrate it inside foundry, CacheDB now has one structure for an account and cache is renamed to accounts so it will be easier to see where it breaks.

@rakita rakita mentioned this pull request Jun 30, 2022
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.

None yet

1 participant