-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: sync: harden chain sync #10756
Conversation
Just in case. This shouldn't be necessary, but we might as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Stebalien I think the 2 changes you describe in the PR description make sense and are good to go. I don't understand why we're no longer putting the maybeHead
, though.
We should already be doing that here: Lines 1191 to 1198 in 3f03e63
We check that Lines 1184 to 1186 in 3f03e63
|
@Stebalien I do not think you're right here -- this is
I think dropping that code will break everything, though I'm admittedly not 100% sure. |
Put != Persist
Oh! Yes, you're right. I saw |
Proposed Changes
This makes two changes:
collectChain
to collect the correct chain. This shouldn't matter, but we might as well (as long as it's safe).WRT 1, I'm worried about the following:
My concern is that, while badger will write synchronously, it doesn't call
fsync
on the file itself, and the directory containing the file. That means, if the machine crashes, the new vlog might just disappear.Of course, the right solution would be to fix badger to sync the file/directory metadata, but that's not likely to happen, ever.
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps