Skip to content

feat: migrate storage to trie#410

Merged
fmoletta merged 75 commits into
mainfrom
storage-trie
Sep 19, 2024
Merged

feat: migrate storage to trie#410
fmoletta merged 75 commits into
mainfrom
storage-trie

Conversation

@fmoletta

@fmoletta fmoletta commented Sep 17, 2024

Copy link
Copy Markdown
Contributor

Motivation

Move account storage storage tries

Description

  • Add a TrieDB implementation for dusport libmdbx tables (the idea here is to use the same table for multiple tries, so one of the keys will be used to indicate which trie nodes are being stored (in the case of storage trie this will be the account's address) and the other key will be the node hash)
  • Replace current storage backend with tries
  • Remove public methods to mutate storage from Store
  • Store::get_storage_at now also receives a block_number so it can fetch historical data

Closes #349

@fmoletta fmoletta changed the base branch from main to integrate-trie-part-two September 17, 2024 16:39
Base automatically changed from integrate-trie-part-two to main September 17, 2024 18:54
@fmoletta fmoletta changed the title feat: [WIP] migrate storage to trie feat: migrate storage to trie Sep 17, 2024
@fmoletta fmoletta marked this pull request as ready for review September 17, 2024 21:38
@fmoletta fmoletta requested a review from a team as a code owner September 17, 2024 21:38
}
}

pub fn is_latest(&self, storage: &Store) -> Result<bool, StoreError> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we want to keep this for future use maybe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clippy wanted it gone, but we can add #[allow(unused)] if we want to keep it

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's keep it for now

@fmoletta fmoletta enabled auto-merge September 19, 2024 14:58
@fmoletta fmoletta added this pull request to the merge queue Sep 19, 2024
Merged via the queue into main with commit 4e4b019 Sep 19, 2024
@fmoletta fmoletta deleted the storage-trie branch September 19, 2024 15:02
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.

Update RPC endpoints adding support to historical querying

3 participants