-
Notifications
You must be signed in to change notification settings - Fork 246
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
maindb v4 #868
base: feat/db
Are you sure you want to change the base?
maindb v4 #868
Conversation
This PR is a successor of PR #635. |
@libotony could you sync the branch with |
* disk usage reduced by 33% (force embedding shortnode) * new encoding method for storing nodes * optimize trie hashing * versioning standalone nodes * remove extended trie * improve trie interface * simplify NodeIterator, remove unused codes
* remove leafbank stuff * simplify muxdb.Trie implementation * improve root node cache using ttl eviction * add leaf key filter
* improve block content storage scheme * remove steady block tracking * remove tx & receipt cache
b43bbfb
to
ef814c0
Compare
Done. |
Wired that tests won't run with this PR only, might be caused by the on-pull-request.yaml wasn't updated in the master branch, but after PR #871 was opened, CI was trigger for targeting master then with the same commit hash of this PR, the workflow was also linked here. |
@libotony looks like
|
Should be fixed. |
@@ -24,6 +24,7 @@ require ( | |||
github.com/prometheus/client_model v0.5.0 | |||
github.com/prometheus/common v0.45.0 | |||
github.com/qianbin/directcache v0.9.7 | |||
github.com/qianbin/drlp v0.0.0-20240102101024-e0e02518b5f9 |
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.
Seems the dependency is quite small, should we just copy the files over to this repo?
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.
wdyt? @qianbin
} | ||
|
||
// AddNodeBlob adds encoded node blob into the cache. | ||
func (c *cache) AddNodeBlob(keyBuf *[]byte, name string, path []byte, ver trie.Version, blob []byte, isCommitting bool) { |
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.
Looks like most of these methods are exported but not used outside the package. Maybe I'm wrong ? Probably doesn't matter too much anyhow
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.
Itself can be treated a standalone "class" to other ones, even it's inside the same package. IMHO, it's a good practice to define public/private functions even it's internal only.
Description
This PR upgrades maindb to v4. It greatly reduces the storage space occupied and significantly reduces the This PR upgrades maindb to v4. It greatly reduces the storage space occupied and significantly reduces the synchronization time.
Check out commits for more detail.
Type of change
Please delete options that are not relevant.
Checklist: