Skip to content

Conversation

danlaine
Copy link

@danlaine danlaine commented Dec 6, 2023

Why this should be merged

When a sync client asks a sync server for a change proof, and the server doesn't have sufficient history to generate and return a change proof, it falls back to trying to generate and return a range proof. However, we might find out while trying to generate the change proof that we lack sufficient history to return even a range proof. If this is the case, we shouldn't fall back to generating a range proof.

How this works

Add an additional ErrNoEndRoot type, which indicates that we lack sufficient history to generate even a range proof. If GetChangeProof returns ErrNoEndRoot, we immediately return drop the request instead of trying to generate a range proof.

How this was tested

Update existing UT.

@danlaine danlaine self-assigned this Dec 6, 2023
@danlaine danlaine added this to the v1.10.18 milestone Dec 6, 2023
@danlaine danlaine marked this pull request as ready for review December 7, 2023 15:26
@danlaine danlaine requested a review from darioush as a code owner December 7, 2023 15:26
@danlaine danlaine merged commit a754118 into dev Dec 7, 2023
@danlaine danlaine deleted the merkledb-handle-no-end-root branch December 7, 2023 18:52
@danlaine danlaine mentioned this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants