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

IBD sync: recover sampled window #598

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

michaelsutton
Copy link
Contributor

@michaelsutton michaelsutton commented Nov 15, 2024

Fixes a rare bug in TN11 where the syncer does not send sufficient DAA window blocks required for recovering the sampled DAA window.
The sampling mechanism relies on DAA indexes which can only be calculated correctly if the full mergesets covering all sampled blocks are sent.

Note: fixes a (future) bug from the recent PR where cache entries were not filtered by origin. See commit.

Edit: added also a refactor to tx time lock validation and some long due renames for various tx validation modules

@michaelsutton michaelsutton marked this pull request as ready for review November 19, 2024 14:58
@@ -20,8 +20,13 @@ pub(crate) enum LockTimeArg {
}

impl TransactionValidator {
pub(crate) fn utxo_free_tx_validation_with_args(&self, tx: &Transaction, ctx_daa_score: u64, ctx_block_time: u64) -> TxResult<()> {
self.utxo_free_tx_validation(
pub(crate) fn header_contextual_tx_validation_with_args(
Copy link
Contributor

Choose a reason for hiding this comment

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

I would write here or in the top of the file something like: "Validations that depend on this header and its past headers (and not related to UTXO or other transactions)"

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