Skip to content
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

Database update #146

Merged
merged 32 commits into from
May 10, 2024
Merged

Database update #146

merged 32 commits into from
May 10, 2024

Conversation

Maelkum
Copy link
Collaborator

@Maelkum Maelkum commented May 9, 2024

This PR introduces new database format. Instead of having two databases like before, now we have a single one. This also eliminates the weird scenario where head node had a function database that it never really used nor needed. Currently we support two types of records - peers and functions - which isn't different from before. This can easily be extended to support more stuff, if needed. Also - the database accepts a configurable codec - we still use JSON, but if needed we could switch to something faster/smaller.

Database format is NOT backwards compatible - I thought that is okay. If there's need we could introduce a migration tool or something like that.

This PR also adds two new config options - --purge-dialback-peers and --purge-functions which enables the node to remove any past peers or functions on startup, if one wants a clean slate.

I also added an integration test for fstore which goes through the whole process of function install from an IPFS-deployed hello-world function.

@Maelkum Maelkum self-assigned this May 9, 2024
@Maelkum Maelkum requested a review from dmikey May 9, 2024 12:31
Copy link
Contributor

@dmikey dmikey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some discussion points. I think this is great over all, but wanted to get your thoughts on a couple of points.

cmd/node/dialback.go Outdated Show resolved Hide resolved
cmd/node/README.md Outdated Show resolved Hide resolved
@dmikey dmikey merged commit 58df468 into main May 10, 2024
2 checks passed
@dmikey dmikey deleted the db-v2 branch May 13, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants