-
Notifications
You must be signed in to change notification settings - Fork 33
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
[WIP][Persistence][Core][Savepoints/Rollbacks] Implement KISS SavePoints - Serialize WorldState from Persistence - KV Stores POC - (Issue #327) #657
Conversation
…avepoint-serialize-worldstate-w-kv Signed-off-by: Alessandro De Blasis <[email protected]>
…point-serialize-worldstate-w-kv Signed-off-by: Alessandro De Blasis <[email protected]>
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables for this repo. you could follow readme for more information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: persistence/
Missing changelog in module: shared/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
AI-Generated Summary: This pull request includes changes across multiple files related to the persistence package, introducing new functionality for handling historical states, JSON formatted queries, KVStore backups, and improvements in error handling. Notable updates include the addition of a savepoint module with the implementation of the modules.PersistenceReadContext interface, the SavepointFactory interface, backupable KVStores, new methods for getting actors in JSON format, and modifications to the KVStore with names and Backup methods. Additionally, a new method GetAllJSONQuery has been introduced to various protocol schema interfaces, and error handling has been improved by adding the errCannotScanNULL constant. This pull request also updates the go.mod file with a new version of the dependency github.com/mattn/go-isatty, and introduces a test file savepoints_test.go for testing the GetAccountAmount method in the savepoints package. |
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables for this repo. you could follow readme for more information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: persistence/
Missing changelog in module: shared/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
AI-Generated Summary: This pull request includes several changes across multiple files, primarily focusing on implementing savepoints and introducing related functionality such as backups of node stores and value stores. Major updates include:
These updates lay the groundwork for a more robust and efficient savepoint feature in the persistence module. Please review these changes and let me know if any additional modifications are required. |
Closing out the draft PR as it'll be used as a reference and reopened if/when we fully implement it. |
Description
⚒️ work in progress - proof of concept ⚒️
This PR is meant to provide an example of how the implementation that relies on a serialized state that uses the
stateTrees
would look like.The implementation is not complete.
The goal of this POC was to achieve feature parity with #645 but unfortunately I am like ~70% there.
The test:

(source:
persistence/test/savepoints_test.go
)should succeed but currently it fails because
GetAllAccounts
andGetAccountAmount
are not implemented.What's also missing is the fact that the backup(s) that's created by the
SavepointFactory
has to be passed to thesavepoint
in a way that makes it queriable.An alternative way could be to extend the SMT functionality to provide access to all the keys, loop through them and recreate
KVStores
with that data...Perhaps a backup-restore is more efficient and less complex.
I'll leave to the reader/implementoooor to choose the best path forward 🙂
Issue
If we choose to complete the implementation, it would fix #327
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test
; if any code changes were madeRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)