Skip to content

Conversation

@ljedrz
Copy link
Collaborator

@ljedrz ljedrz commented Nov 10, 2025

This PR enables support for RocksDB's secondary instances. This could be used by all sorts of tools that require an insight into the storage of a running node.

Filing as a draft, as it depends on a pending aleo-std PR.

Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
@ljedrz ljedrz requested review from niklaslong and vicsn November 10, 2025 08:31
@ljedrz ljedrz changed the title [Feat] Allow the RocksDB instance to be used in secondary storage [Feat] Allow the RocksDB instance to be used in secondary mode Nov 10, 2025
@ljedrz ljedrz changed the title [Feat] Allow the RocksDB instance to be used in secondary mode [Feat] Facilitate RocksDB's secondary instances Nov 10, 2025
@vicsn
Copy link
Collaborator

vicsn commented Nov 10, 2025

secondary instances.

Very cool. Any evidence on how stable this is, or whether "read-only" instance historically had less bugs?

@ljedrz
Copy link
Collaborator Author

ljedrz commented Nov 10, 2025

Any evidence on how stable this is

It has been stable since at least 2021.

whether "read-only" instance historically had less bugs?

Compared to a read-only primary instance? I don't think either is any more stable, and I'm not sure if a read-only primary instance can be used while a primary read/write session is in progress. Secondary instances are also better suited for continued use (via try_catch_up_with_primary).

Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
@ljedrz
Copy link
Collaborator Author

ljedrz commented Nov 10, 2025

The stability question reminded me that we're actually a bit behind in terms of the version of RocksDB we're using. I pushed a commit updating it to 0.24; I've also confirmed that snarkOS builds with it.

@ljedrz
Copy link
Collaborator Author

ljedrz commented Nov 10, 2025

Hmm, not sure why the CI jobs are failing with a clang-related build error, it works for me locally, even without CXXFLAGS = "-include cstdint" (commented out in .cargo/config.toml).

In any case, an update isn't required for this feature; if I don't find a solution, I'll revert back to 0.21 when updating the aleo-std branch.

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.

2 participants