Skip to content

Conversation

@rotem-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rotem-starkware rotem-starkware marked this pull request as ready for review November 11, 2025 13:28
@rotem-starkware rotem-starkware force-pushed the rotem/committer_benchmark/rocksdb_column_family branch from f1e39e9 to cbe5330 Compare November 11, 2025 13:30
@rotem-starkware rotem-starkware force-pushed the rotem/committer_benchmark/rocksdb_column_family branch from cbe5330 to 9727056 Compare November 11, 2025 13:34
@rotem-starkware rotem-starkware changed the title starknet_storage,starknet_committer_cli: add an option to RocksdbStorage to use Column Families starknet_patricia_storage,starknet_committer_cli: add an option to RocksdbStorage to use Column Families Nov 11, 2025
@rotem-starkware rotem-starkware changed the title starknet_patricia_storage,starknet_committer_cli: add an option to RocksdbStorage to use Column Families starknet_patricia_storage,starknet_committer_cli: add optional Column Families in RocksDbStorage Nov 11, 2025
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArielElp)


crates/starknet_patricia_storage/src/rocksdb_storage.rs line 39 at r1 (raw file):

const MAX_BACKGROUND_JOBS: i32 = 8;

const BYTE: usize = 8;

I don't think you need this const, you can use u8::BITS when you need it

Code quote:

const BYTE: usize = 8;

crates/starknet_patricia_storage/src/rocksdb_storage.rs line 124 at r1 (raw file):

    pub fn get_column_family(&self, key: &DbKey) -> &ColumnFamily {
        if self.column_families {
            let last_byte = key.0.last().unwrap();

we should allow writing to null keys without panic (i.e. a DB key of &[])

Suggestion:

let last_byte = key.0.last().unwrap_or(0u8);

crates/starknet_committer_cli/src/main.rs line 105 at r1 (raw file):

    /// If true, the storage will use 256 column families. Only relevant for Rocksdb.
    #[clap(long, action=ArgAction::SetTrue)]
    use_column_families: bool,

heads up: if you rebase over this it will look nicer :)
non-blocking of course

Code quote:

    /// If true, the storage will use 256 column families. Only relevant for Rocksdb.
    #[clap(long, action=ArgAction::SetTrue)]
    use_column_families: bool,

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArielElp and @rotem-starkware)


crates/starknet_patricia_storage/src/rocksdb_storage.rs line 112 at r1 (raw file):

        let cfs = if column_families {
            (0..1 << BYTE)
                .map(|i| ColumnFamilyDescriptor::new(format!("{i}"), Options::default()))

columns must be strings? not bytes/integers?

Code quote:

ColumnFamilyDescriptor::new(

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.

4 participants