-
Notifications
You must be signed in to change notification settings - Fork 756
feat: marf squash engine #7060
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
Open
francesco-stacks
wants to merge
40
commits into
stacks-network:develop
Choose a base branch
from
francesco-stacks:feat/marf-squash-engine
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: marf squash engine #7060
Changes from 7 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
7f94df2
add squash logic and squash-aware trie lookups
francesco-stacks 04f3aad
Merge branch 'feat/marf-squash-foundation' into feat/marf-squash-engine
francesco-stacks d142bf5
Merge branch 'feat/marf-squash-foundation' into feat/marf-squash-engine
francesco-stacks 60e19dc
Merge branch 'feat/marf-squash-foundation' into feat/marf-squash-engine
francesco-stacks 3ac2225
add changelog fragment
francesco-stacks a4007b4
Merge branch 'feat/marf-squash-foundation' into feat/marf-squash-engine
francesco-stacks eb62b95
Merge branch 'upstream-develop' into feat/marf-squash-engine
francesco-stacks 8eb6275
refactor: stream blobs child-before-parent like dump_consume
francesco-stacks 5db9691
refactor: remove unused code
francesco-stacks 8b8832d
use is_squashed where possible
francesco-stacks 70eafc0
use is_inline_child_ptr where possible
francesco-stacks cb393af
merge update_inline_child_ptrs and remap_ptrs_to_blob_offsets
francesco-stacks d38f8bd
feat: disable proofs for squashed marfs
francesco-stacks 50d601b
feat: disable blocks lookups before squash height
francesco-stacks 56cba88
error if output marf db or blobs already exist
francesco-stacks 23ba282
varius nits and improved tests
francesco-stacks ce22a2a
rename InlineOnlyBlockMap -> BackptrFreeBlockMap
francesco-stacks 0d24e87
fix: atomically commit squash finalization in a single sql transaction
francesco-stacks 4e6dcad
remove compute_blob_offsets; stream_squash_blob computes its own offsets
francesco-stacks c207c61
reject leaf iteration below squash height
francesco-stacks 67a8ffa
build NodeStore temp paths with PathBuf
francesco-stacks 6eb0265
track writer offsets without per-node stream_position
francesco-stacks 88d8a06
split MARF squash internals
francesco-stacks 06a84b3
Merge branch 'develop' into feat/marf-squash-engine
francesco-stacks f1736df
crc: clear db and blobs on failure. improve logged info
francesco-stacks 6e175b8
crc: user a single writer
francesco-stacks 71ed7da
avoid copying hash when possible
francesco-stacks a642873
various nits
francesco-stacks e820a0e
crc: rename update_inline_child_ptrs -> resolve_inline_child_offsets
francesco-stacks a7e5652
simplify some gates for squashed marf
francesco-stacks 20739d6
add read_squashed_block_root_hash_by_hash and give more consistent na…
francesco-stacks 70a1aa1
crc: query Trie before SQL side tables
francesco-stacks db15da7
crc: remove redundant squash guard
francesco-stacks 35f9d01
clippy
francesco-stacks cd0a433
crc: add cleanup log on error
francesco-stacks 13186f1
crc: internalize reader into NodeStore
francesco-stacks 2289f6b
Merge branch 'develop' into feat/marf-squash-engine
francesco-stacks fcb3f3a
crc: re-add comment
francesco-stacks 820e32e
crc: remove old retry and open Reader at creation time
francesco-stacks 6324b34
skip redundand seek in overwrite_node, collapse finish_writing and flush
francesco-stacks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add MARF squash engine (`squash_to_path`) and squash-aware trie lookups for root hashes and block heights |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
I assume that in the vast majority of cases, this function is going to becalled with the chain tip or very close to it.
If that's true, wouldn't it be better if we tried the MARF first, and only fall back to SQL later?
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.
I believe this is a valid point. In normal operations that will be the case. we'll mostly read from the squash during clarity lookups, block replay, and the RPC endpoints in general. Anyway I did the change , it was a bit more involved than I expected, because the sql lookup first removed a couple of edge cases 70a1aa1