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(chain): Fix panic when upgrading chain db #125

Closed
wants to merge 2 commits into from

Conversation

lukechampine
Copy link
Member

Not sure how to test this. Do we have a corrupted consensus.db anywhere that we can use?

@n8maninger
Copy link
Member

n8maninger commented Dec 2, 2024

Download walletd v0.8.0, sync Zen, then upgrade to master. Should reproduce the panic pretty easily.

@lukechampine
Copy link
Member Author

ok, this is working. The breakage was due to SiaFoundation/core#199, which changed the encoding of all state elements. Mercifully, although there were other encoding changes, they only affect v2 types, so they don't require compat code.

@n8maninger n8maninger changed the title chain: Add fallback supplementBlock decoding fix(chain): fix panic when upgrading chain db Dec 4, 2024
@n8maninger
Copy link
Member

Would it be better to do an explicit upgrade rather than to fallback on failure? It would slow down startup, but I'm a little concerned that fallbacks will accumulate and eventually get lost.

@lukechampine
Copy link
Member Author

hmm, yeah, you're right, don't want old encodings to stick around forever. I'll knock that out tomorrow.

@n8maninger n8maninger changed the title fix(chain): fix panic when upgrading chain db fix(chain): Fix panic when upgrading chain db Dec 8, 2024
@lukechampine lukechampine deleted the decode-block branch December 9, 2024 20:03
@lukechampine
Copy link
Member Author

Closed in favor of #132

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