This repository was archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
Conversation
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
e6da165
to
44b6908
Compare
9 tasks
75e6ef1
to
68dc336
Compare
fd4e25c
to
1709442
Compare
aidan-kwon
reviewed
Jul 24, 2023
aidan-kwon
reviewed
Jul 24, 2023
aidan-kwon
reviewed
Jul 24, 2023
aidan-kwon
reviewed
Jul 24, 2023
aidan-kwon
reviewed
Jul 24, 2023
@aidan-kwon Fixed the potential concurrency issue regarding |
aidan-kwon
approved these changes
Jul 25, 2023
ian0371
approved these changes
Jul 26, 2023
jeongkyun-oh
approved these changes
Jul 26, 2023
2dvorak
approved these changes
Jul 26, 2023
yoomee1313
approved these changes
Jul 26, 2023
9 tasks
9 tasks
hyunsooda
reviewed
Jul 27, 2023
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.
Learned a good implementation. For the minor question, How did you draw the chart? Did you just simply lookup the directory size?
9 tasks
9 tasks
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.
Proposed changes
See KIP-111 for the background.
Usage:
Changes:
New database schema
PruningEnabled: ["PruningEnabled"] -> true
is a database-stored flag that tells the trie nodes are in prunable format (i.e. with ExtHash).PruningMark: ["Pruning-" + blockNum + ExtHash] -> true
marks an obsolete trie node that's not yet deleted.New CLI flags
kcn init --state.live-pruning
kcn --state.live-pruning
kcn --state.live-pruning-retention <172800>
New struct fields
Pruning actions
Trie.insert
andTrie.delete
marks obsolete nodes as PruningMarks, only if:PruningBlockNumber != 0
(i.e. throughPrunableStateAt()
)blockchain.insertChain
usesPrunableStateAt()
worker.makeCurrent
usesPrunableStateAt()
blockchain.writeStateTrie
asynchronously deletes trie nodes according to PruningMarks.Types of changes
Checklist
$ make test
)Related issues
Further comments