-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add VersionedSMT
for historical queries
#20
Closed
Conversation
This file contains 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
h5law
changed the title
feat: add initial versioned trees
feat: add Sep 1, 2023
VersionedSMT
for historical queries
reviewpad
bot
added
the
waiting-for-review
This PR is currently waiting to be reviewed
label
Sep 1, 2023
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## kvstore #20 +/- ##
===========================================
- Coverage 84.89% 79.11% -5.78%
===========================================
Files 8 11 +3
Lines 1092 1408 +316
===========================================
+ Hits 927 1114 +187
- Misses 122 219 +97
- Partials 43 75 +32
☔ View full report in Codecov by Sentry. |
@h5law Is this still a high priority? |
@Olshansk No this is not priority anymore afaik |
Let's close this out if its no longer relevant |
This PR is no longer needed closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
large
Pull request is large
waiting-for-review
This PR is currently waiting to be reviewed
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.
Description
Summary generated by Reviewpad on 03 Sep 23 16:34 UTC
This pull request includes changes in multiple files:
The
go.mod
file was updated to change the Go version to 1.20 and add a new dependency ongolang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
while removing the dependency ongithub.com/google/go-cmp v0.5.8
.The file
immutable.go
introduces a new typeImmutableTree
that wraps theSMT
struct. It also implements various methods related to the immutable behavior of the tree, such asUpdate
,Delete
,Commit
, andSetInitialVersion
. Additionally, it provides methods for versions and retrieval of data based on versions.The file diff introduces a new interface called
VersionedSMT
, which extends theSparseMerkleTree
interface and adds methods for versioning and managing previous versions of the tree. It also introduces theTreeSpec
struct with a helper function for custom hashers.The file
.github/workflows/test.yml
was modified to update theTARGET_GOLANG_VERSION
environment variable and thego
version in both jobs.The file diff for
badgerKVStore.go
includes the addition of thebytes
package import, a new method calledClone
in thebadgerKVStore
struct, and updates to comments and existing code.The file diff introduces a new file
encoding.go
with functions related to encoding and decoding of stored trees usinggob
encoding.The file
Versioned.md
includes changes related to the introduction and implementation details of theVersionedSMT
interface, theVersionedTree
andImmutableTree
types, and database lifecycle details.The file diff for the test file includes test functions for an immutable tree, covering various scenarios and functionalities.
The file diff for
utils.go
includes new functions and imports related to numeric directory handling and directory existence checks.The file diff introduces a new test file
versioned_test.go
with multiple test functions for a versioned tree.The file diff for
smt_utils_test.go
includes changes related to introducing hashing capabilities in the code.The file
README.md
includes changes in the required Go version and additional subsections.The file
encoding_test.go
contains test functions for encoding and decoding a stored tree.The file
go.sum
contains changes to the dependencies.The file
hasher.go
includes changes related to thePathHasher
,ValueHasher
,treeHasher
,pathHasher
, andvalueHasher
types.Please review these changes carefully.
Issue
Fixes N/A
Type of change
Please mark the relevant option(s):
List of changes
VersionedSMT
interface andImmutableTree
andVersionedTree
implementations to wrap the SMTTesting
go test ...
go test ...
go test -v
Required Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist