This repository was archived by the owner on Jan 11, 2024. It is now read-only.
SQL Merkle State#160
Merged
peterschwarz merged 3 commits intohyperledger-archives:mainfrom Jun 24, 2021
Merged
Conversation
2029efd to
89d018a
Compare
agunde406
suggested changes
Jun 14, 2021
|
|
||
| /// Set the path for the Sqlite database. | ||
| /// | ||
| /// This is a require field. |
89d018a to
ec07fe7
Compare
agunde406
previously approved these changes
Jun 15, 2021
Caleb-Hill
previously approved these changes
Jun 17, 2021
vaporos
suggested changes
Jun 17, 2021
ec07fe7 to
de4edd5
Compare
agunde406
previously approved these changes
Jun 18, 2021
Caleb-Hill
previously approved these changes
Jun 21, 2021
vaporos
reviewed
Jun 21, 2021
| /// | ||
| /// This struct provides the backend implementation details for SQLite databases. | ||
| #[derive(Clone)] | ||
| pub struct Sqlite { |
Contributor
There was a problem hiding this comment.
Should this be called SqliteBackend, being the primary purpose is an impl of Backend for sqlite?
Contributor
Author
There was a problem hiding this comment.
I was mirroring the diesel back-end naming convention. I would be open to changing it.
de4edd5 to
c172af9
Compare
This commit introduces the transact-specific Backend and Connection trait, that can be used for SQL implementations. These traits help to minimize the exposure of dependencies to the transact public API. The SqliteBackend includes a builder and a set of enums for configuring the connection pool instance. Signed-off-by: Peter Schwarz <pschwarz@bitwise.io>
This change includes a MigrationManager trait in order to provide migration capabilities to a Backend. It also includes an implementation for SqliteBackend. Signed-off-by: Peter Schwarz <pschwarz@bitwise.io>
This struct provides the SQL implementation of MerkleState, via the state::Read, Write traits, as well as the MerkleRadixLeafReader trait. Likewise, the integration tests have been added for this implementation. This includes a new test that allows for comparisons between MerkleState implementations only using the Read and Write traits. It omits the state::Prune trait for now (this will be implemented in a future commit). Signed-off-by: Peter Schwarz <pschwarz@bitwise.io>
c172af9 to
6efc3a8
Compare
vaporos
approved these changes
Jun 23, 2021
agunde406
approved these changes
Jun 23, 2021
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds an implementation of state that applies a Merkle-Radix tree using a SQL database as its back-end. This PR includes a diesel/SQLite implementation
Experimental feature implementation of RFC 10