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

fix!: prune mode sync #5124

Merged
merged 2 commits into from
Jan 18, 2023
Merged

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Jan 17, 2023

Description

Fixes the syncing of pruned nodes

Motivation and Context

The utxo and kernel keys are stored as LE bytes, but when reading with the order, they need to be BE bytes to return them in the same order as they were written. When we retrieve these for normal block sync, we call .sort() on them with the construction of the block so the order does not matter.
But prune mode streams the utxo and kernels via MMR positions. For this, the order is important and needs to be returned in the same order as requested.

This broke to do no cucumber tests testing prune mode sync. This should be fixed when enabling pruned mode.

How Has This Been Tested?

Manual and new unit tests.

Fixes: #5099


REQUIRES THAT BASE NODES RESYNC AND RECALCULATE DB KEYS

@stringhandler
Copy link
Collaborator

CI failing

@stringhandler stringhandler changed the title fix: prune mode sync fix!: prune mode sync Jan 18, 2023
@CjS77 CjS77 added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Jan 18, 2023
@CjS77 CjS77 removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Jan 18, 2023
@stringhandler stringhandler merged commit 8fa076a into tari-project:development Jan 18, 2023
@SWvheerden SWvheerden deleted the sw_fix_mmr branch January 19, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Horizon sync fails with kernel MMR mismatch at height 206 on Esme
3 participants