-
Couldn't load subscription status.
- Fork 2.9k
chore(compression): disable merkleized compression for now #3053
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
Changes from all commits
fc536d4
610da8b
370e4d3
396675b
2247ce4
eadb4ba
c52400a
996c85a
6fec8ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Disabled merkleization of compression tables. New tables are located separately. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,8 @@ | ||
| //! Column enum for the database. | ||
|
|
||
| use fuel_core_storage::merkle::{ | ||
| column::{ | ||
| AsU32, | ||
| MerkleizedColumn, | ||
| }, | ||
| sparse::MerkleizedTableColumn, | ||
| use fuel_core_storage::{ | ||
| kv_store::StorageColumn, | ||
| merkle::column::AsU32, | ||
| }; | ||
|
|
||
| /// Enum representing the columns in the storage. | ||
|
|
@@ -22,27 +19,29 @@ use fuel_core_storage::merkle::{ | |
| Hash, | ||
| )] | ||
| pub enum CompressionColumn { | ||
| /// Metadata table | ||
| Metadata = 0, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it a good idea to add metadata and change the table numbers now? Doing that over an existing database means database will be corrupted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fairly certain it will reuse metadata table from before, we will have to prune the compression database first There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should get confirmation on this. @rymnc are you saying that since we didn't put the SMT's into the mainnet compression yet, this is essentially reverting a breaking change that hasn't been deployed yet? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's already in mainnet, I can clone a devnet database and see how it works There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i checked locally running a testnet node with 0.43.2 with compression enabled and then after with this branch. queries for compressed blocks that were processed with 0.43.2 yield
it will work without errors. |
||
| /// CompressedBlocks, see [`CompressedBlocks`](crate::storage::compressed_blocks::CompressedBlocks) | ||
| CompressedBlocks = 0, | ||
| CompressedBlocks = 1, | ||
| /// RegistryKey to Address index, see [`Address`](crate::storage::address::Address) | ||
| Address = 1, | ||
| Address = 2, | ||
| /// RegistryKey to AssetId index, see [`AssetId`](crate::storage::asset_id::AssetId) | ||
| AssetId = 2, | ||
| AssetId = 3, | ||
| /// RegistryKey to ContractId index, see [`ContractId`](crate::storage::contract_id::ContractId) | ||
| ContractId = 3, | ||
| ContractId = 4, | ||
| /// RegistryKey to ScriptCode index, see [`ScriptCode`](crate::storage::script_code::ScriptCode) | ||
| ScriptCode = 4, | ||
| ScriptCode = 5, | ||
| /// RegistryKey to PredicateCode index, see [`PredicateCode`](crate::storage::predicate_code::PredicateCode) | ||
| PredicateCode = 5, | ||
| PredicateCode = 6, | ||
| /// RegistryKey to ReverseKey index, see [`RegistryIndex`](crate::storage::registry_index::RegistryIndex) | ||
| RegistryIndex = 6, | ||
| RegistryIndex = 7, | ||
| /// Keeps track of keys to remove, see [`EvictorCache`](crate::storage::evictor_cache::EvictorCache) | ||
| EvictorCache = 7, | ||
| EvictorCache = 8, | ||
| /// Keeps track of timestamps, will be removed eventually, see [`Timestamps`](crate::storage::timestamps::Timestamps) | ||
| Timestamps = 8, | ||
| Timestamps = 9, | ||
| #[cfg(feature = "fault-proving")] | ||
| /// Keeps track of registrations per table associated with a compressed block, see [`Registrations`](crate::storage::registrations::Registrations) | ||
| Registrations = 9, | ||
| Registrations = 10, | ||
| } | ||
|
|
||
| impl AsU32 for CompressionColumn { | ||
|
|
@@ -51,6 +50,13 @@ impl AsU32 for CompressionColumn { | |
| } | ||
| } | ||
|
|
||
| /// Type alias to get the `MerkleizedColumn` for some type that implements `MerkleizedTableColumn`. | ||
| pub type MerkleizedColumnOf<TC> = | ||
| MerkleizedColumn<<TC as MerkleizedTableColumn>::TableColumn>; | ||
| impl StorageColumn for CompressionColumn { | ||
| fn name(&self) -> String { | ||
| let str: &str = self.into(); | ||
| str.to_string() | ||
| } | ||
|
|
||
| fn id(&self) -> u32 { | ||
| self.as_u32() | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, curious how it will affect the storage. It looks like we still will have trash in the Merkle-related tables. Maybe we need to come up with the solution how to cleanup them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we can wipe compression database manually I think?