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

Remove snapshot; bypass downloading if available locally #7565

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

flcl42
Copy link
Contributor

@flcl42 flcl42 commented Oct 7, 2024

Changes

  • Remove the need in snapshot for snap-synced OP mainnet
  • Optimize snapshot loading in case it's loaded from local path

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

@flcl42 flcl42 force-pushed the remove-snapshot-for-snapsync branch from dd9ce79 to 642f080 Compare October 7, 2024 15:39
@flcl42 flcl42 force-pushed the remove-snapshot-for-snapsync branch from 6d54bb4 to 1df9198 Compare October 8, 2024 08:28
@flcl42 flcl42 requested a review from benaadams October 8, 2024 10:24
@@ -71,44 +71,53 @@ private async Task InitDbFromSnapshot(CancellationToken cancellationToken)

Directory.CreateDirectory(snapshotConfig.SnapshotDirectory);

if (GetCheckpoint(snapshotConfig) < Stage.Downloaded)
if (!File.Exists(snapshotUrl))
Copy link
Member

Choose a reason for hiding this comment

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

Url and file? Did you mean snapshotFileName? Would be good to abstract file manipulation to some methods instead of dign it directly.

@flcl42 flcl42 marked this pull request as draft October 9, 2024 16:29
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.

4 participants