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
NRD rules and "recent" kernel pos index #3302
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
139e24a
variants for output_pos linked list entries (head/tail/middle/unique)
antiochp 978bf60
get_pos on enum
antiochp e3bd7a3
break list and list entries out into separate enums
antiochp cabbc44
track output features in the new output_pos index, so we can determin…
antiochp af889ff
push entry impl for none and unique
antiochp 3fd78ad
some test coverage for output_pos_list
antiochp 34b4ed4
commit
antiochp 7841a3e
wip - FooListEntry
antiochp 2f95e55
use instance of the index
antiochp f489e77
linked list of output_pos and commit_pos both now supported
antiochp 9cbb550
linked_list
antiochp c65f09d
cleanup and rename
antiochp 61bd320
rename
antiochp 5e44e2f
peek_pos
antiochp 82e3c99
push some, peek some, pop some
antiochp 536b8ed
cleanup
antiochp 3357273
commit pos
antiochp f3e589a
split list and entry out into separate db prefixes
antiochp 6e6e498
cleanup and add placeholder for pop_back
antiochp 888c49b
pop_pos_back (for popping off the back of the linked list)
antiochp 48d0deb
wip
antiochp 3f16218
placeholder for prune via a trait
antiochp c311be8
rewind kernel_pos_idx when calling rewind_single_block
antiochp a55fab8
RewindableListIndex with rewind support.
antiochp c830daa
test coverage for rewindable list index
antiochp bc26131
test coverage for rewind back to 0
antiochp 88b6e95
rewind past end of list
antiochp ae0a99c
add tests for kernel_pos_idx with multiple commits
antiochp cc9c06a
Merge remote-tracking branch 'upstream/master' into kernel_pos
antiochp 47e9093
commit
antiochp e60ab72
cleanup
antiochp 933b39e
hook NRD relative lock height validation into block processing and tx…
antiochp a038389
cleanup
antiochp 4b64991
set local chain type for kernel_idx tests
antiochp 8ed26c8
add test coverage for NRD rules in block processing
antiochp fa6f1df
NRD test coverage and cleanup
antiochp 9c87a23
NRD relative height 1 test
antiochp 3d4fe1f
test coverage for NRD kernels in block processing
antiochp f260771
cleanup
antiochp 188e289
start of test coverage for txpool NRD kernel rules
antiochp 580b414
wip
antiochp cb885a0
rework pool tests to use real chain (was mock chain) to better reflec…
antiochp 3f1defe
cleanup
antiochp a544108
Merge branch 'master' into kernel_pos
antiochp 13af16f
Merge branch 'pool_real_chain' into kernel_pos
antiochp 1612201
Merge branch 'master' into kernel_pos
antiochp fb11b5d
cleanup pruneable trait for kernel pos index
antiochp f73688b
add clear() to kernel_pos idx and test coverage
antiochp de8ba23
hook kernel_pos rebuild into node startup, compaction and fast sync
antiochp 7df028b
verify full NRD history on fast sync
antiochp adca6b0
return early if nrd disabled
antiochp 7435987
Merge remote-tracking branch 'upstream/master' into kernel_pos
antiochp 4acbf8c
fix header sync issue
antiochp File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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 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.
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.
in what cases would we call process_block_single without having validated/processed the header already?
(I would naively expect never)
Does header validation not commit it to db?
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.
In most cases we will have processed "header first".
The first broadcast hop from a miner after mining a new block is done as a "full block" and skips the "header first" propagation as we know nobody has seen this block yet.
In this case the receiving node is here in the code, processing the new block without having seen the header yet.
We were validating the header in the later call to
pipe::process_block()
.We want to validate/process the header here, in a db transaction and a write to the MMR backend files, before we begin processing/validating the full block.
The issue was that if the full block failed validation for any reason then the entire db transaction rolled back, including the header processing. But leaving the header MMR updated with the latest header.