8000 Migrate v2 commitments by n8maninger · Pull Request #1895 · SiaFoundation/renterd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Migrate v2 commitments #1895

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

Merged
merged 1 commit into from
May 27, 2025
Merged

Migrate v2 commitments #1895

merged 1 commit into from
May 27, 2025

Conversation

n8maninger
Copy link
Member

Adds a check when creating the consensus to trigger a resync if the commitment does not match.

@github-project-automation github-project-automation bot moved this to In Progress in Sia May 26, 2025
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an automatic migration step for v2 commitments by validating the consensus database during startup and triggering a reset if the tip block’s commitment does not match the expected value.

  • Introduces the migrateConsensusDB function to examine and, if necessary, reset the consensus database.
  • Integrates the migration step into the node creation process by invoking migrateConsensusDB before initializing the chain database.
  • Adds documentation for the migration in the changeset.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/renterd/node.go Added the migrateConsensusDB function and integrated it into newBus()
.changeset/added_automatic_migration_for_v2_commitments.md Added documentation for the v2 commitment migration feature

@ChrisSchinnerl ChrisSchinnerl merged commit b714877 into master May 27, 2025
47 of 50 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the nate/migrate-v2 branch May 27, 2025 07:41
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants
0