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

Bank::new_from_fields() always gets the accounts lt hash from the snapshot #3519

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

brooksprumo
Copy link

Problem

While prototype testing feature activation of the accounts lt hash I found an issue when restarting from a snapshot.

If the snapshot was created with the accounts lt hash CLI arg ON, but loaded with the cli arg OFF, then the accounts verification at startup would fail.

This is because we copy the accounts lt hash from the snapshot based on the CLI arg, but verify the accounts based on the snapshot value. This is a mismatch in logic; both need to be the same.

Summary of Changes

In Bank::new_from_fields(), copy the accounts lt hash from the snapshot always (if present). This now matches the behavior used to verify the accounts at startup.

@brooksprumo brooksprumo self-assigned this Nov 7, 2024
@brooksprumo brooksprumo marked this pull request as ready for review November 7, 2024 17:35
Copy link

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

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

lgtm

@brooksprumo brooksprumo merged commit 7688d91 into anza-xyz:master Nov 7, 2024
40 checks passed
@brooksprumo brooksprumo deleted the lthash/snapshot branch November 7, 2024 20:13
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.

3 participants