wip: introduce postgres db as storage#75
Draft
zdravko61 wants to merge 20 commits intoTHCLab:masterfrom
Draft
Conversation
build was failing with rust 1.85, with around 20+ errors, added batch on two deps in order to make the build work with 1.85, it does work with latest version now too.
- Add location_oobis and end_role_oobis tables to migrations - Introduce OobiStorageBackend trait for pluggable storage - Refactor OobiManager to be generic over storage backend - Implement RedbOobiStorage as default backend - Update methods to use new trait and error handling Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
- Implement PostgresOobiStorage as an OOBI storage backend - Make SimpleController and OobiManager generic over OOBI storage - Add test for SimpleController with Postgres backend - Preserve backward compatibility with RedbOobiStorage Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
- Refactor EventStorage to support Option<MailboxData> for Postgres - Implement log_event for PostgresLogDatabase - Add log_event_with_tx for transactional event logging - Implement get_from_sn for PostgresSnKeyEscrow - Add update_key_state and save_to_kel for PostgresDatabase - Update tests to handle mailbox_data as Option - Adjust trait bounds for OobiManager and process_reply Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
event retrieval methods Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
Signed-off-by: Zdravko Iliev <zdravko.iliev@vereign.com>
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.
Adds an optional PostgreSQL storage backend for both
keri-coreandteliox, gated behind apostgres-backendfeature flag.What's included
keri-core:PostgresDatabaseimplementingEventDatabase,LogDatabase, escrow, KSN log, and OOBI storage — backed bysqlxwith migrationsteliox:PostgresLogDatabaseimplementing TEL-specific log and receipt storageOobiManagergeneralized to support both ReDB and Postgres backends viaOobiStorageBackendtraitSimpleControllergeneralized over OOBI storage backendEventStoragerefactored to supportOption<MailboxData>for Postgres compatibilityNotes
This overlaps in scope with PR #69 which introduces a similar storage abstraction. Coordination may be needed to align trait interfaces and feature flag conventions before merging either.
Remaining
KnownEventsgeneric overD,T,S(known_events.rs)Controllergeneric (controller/mod.rs)Identifiergeneric (identifier/mod.rs)