feat: make redb storage optional with feature-flagged dual-mode architecture#69
Open
seriouscoderone wants to merge 1 commit intoTHCLab:masterfrom
Open
feat: make redb storage optional with feature-flagged dual-mode architecture#69seriouscoderone wants to merge 1 commit intoTHCLab:masterfrom
seriouscoderone wants to merge 1 commit intoTHCLab:masterfrom
Conversation
…tecture Gate redb behind `storage-redb` feature flag (default ON) in keri-core and teliox so the core protocol logic can compile and run without redb. This enables future alternative storage backends (e.g., DynamoDB for serverless). Key changes: - Split EventStorage constructors: generic `new()` (no mailbox) vs `new_redb()` (RedbDatabase with mailbox) vs `new_with_mailbox()` (inject) - Make mailbox_data an Option<MailboxData> to support non-redb backends - Remove Any bound from EventValidator - Gate TelLogDatabase, teliox EscrowDatabase, and escrow module behind storage-redb feature - Genericize teliox escrow structs over K: EventDatabase for KEL storage - Add in-memory MemoryDatabase implementing all database traits for validation and testing - Move rkyv_adapter to database::rkyv_adapter (not under database::redb) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
|
Awesome contribution @seriouscoderone ! The PR mentions |
Author
|
Its kind of big, it was collapsed in the PR default view. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
redbbehind astorage-redbfeature flag (default ON) in keri-core and teliox, enabling the core protocol logic to compile and run without redbEventStorageconstructors: genericnew()(no mailbox),new_redb()(RedbDatabase-specific), andnew_with_mailbox()(dependency injection)MissingIssuerEscrow,OutOfOrderEscrow,MissingRegistryEscrow) overK: EventDatabasefor KEL storageMemoryDatabaseimplementing all database traits for validation and testingrkyv_adapterfromdatabase::redb::rkyv_adaptertodatabase::rkyv_adapter(not redb-specific)This enables future alternative storage backends (e.g., DynamoDB for serverless deployments) to slot in by implementing the
EventDatabase,LogDatabase,EscrowCreator, andTelEventDatabasetraits.Test plan
cargo test --all-features— all 118 tests passcargo check --package keri-core --no-default-features --features query— compiles without redbcargo check --package teliox --no-default-features— compiles without redbtest_memory_db_process_icp— in-memory backend processes KERI inception events correctly🤖 Generated with Claude Code