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
[Storage] Introduce support for namespace in state store #324
Conversation
✅ Deploy Preview for aptos-developer-docs canceled.
|
1dfb149
to
c13f507
Compare
/canary |
💔 Test Failed - build-test-deploy |
/canary |
/canary |
This PR is already being canaried |
💔 Test Failed - build-test-deploy |
/canary |
Forge run: https://circleci.com/gh/aptos-labs/aptos-core/5977 |
💔 Test Failed - build-test-deploy |
/canary |
Forge run: https://circleci.com/gh/aptos-labs/aptos-core/5983 |
💔 Test Failed - build-test-deploy |
/canary |
b7e7bcb
to
c8ffd3d
Compare
Forge run: https://circleci.com/gh/aptos-labs/aptos-core/6238 |
/canary |
@sitalkedia Makes sense! (And it's a tricky one!) |
I think we can squash the two commits before landing this one. |
Forge run: https://circleci.com/gh/aptos-labs/aptos-core/6268 |
☀️ Canary successful |
cacb3f2
to
9f042f0
Compare
/land |
🔒 Merge Conflict |
9f042f0
to
b263459
Compare
/land |
Forge run: https://circleci.com/gh/aptos-labs/aptos-core/6300 |
b263459
to
90646f5
Compare
Forge run: https://circleci.com/gh/aptos-labs/aptos-core/6306 |
Motivation
First PR for introducing fine-grained state storage support. This diff introduces a concept of namespace in the state store - with only account blob based namespace support to start with. The key to the state store for a namespace object can be
namespace_
+rawkey
. This way we can support different namespace objects within the same state store with the guarantee that there will not be any key collision. In order to support this, all account related concept has been moved out of the storage layer and instead the storage layer majorly understands the concept ofStateStoreKey
andStateStoreValue
, which are arbitrary byte arrays. Please note that this is a major format change on the storage side and is not backward compatible - we need to wipe out the previous data from dev-net before rolling this out.The diff touches many files because of the extensive API change, however, important changes to be reviewed at
types/src/state_store/state_store_key.rs
types/src/state_store/state_store_value.rs
storage/storage-interface/src/state_view.rs
storage/aptosdb/src/state_store/mod.rs
execution/executor/src/components/apply_chunk_output.rs
Test Plan
Modified existing UTs for new API interface.