-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Mismatch between Finalized Block And Epoch #5827
Comments
This worries me. I wonder how it could happen |
Yeah it is off in a few places, if helpers.SlotToEpoch(blk.Block.Slot) != msg.FinalizedEpoch {
return errInvalidEpoch
} is there anything wrong with doing this ? @terencechain . I feel like I might be missing something, I was looking at our code for indexing finalized blocks in the db, and it seems like there are quite a few gotchas on determining which block is finalized and for what epoch it is finalized. |
@nisdas that won't work if there's skip slot. You have to account for skip slot scenario similar to this: fBlkSlot := helpers.SlotToEpoch(blk.Block.Slot)
fEpochStartSlot := helpers.StartSlot(msg.FinalizedEpoch)
if fEpochStartSlot > fBlkSlot {
filter := filters.NewFilter().SetStartSlot(fBlkSlot).SetEndSlot(fEpochStartSlot)
blks, err := s.beaconDB.Blocks(ctx, filter)
if len(blks) != empty {
// Should be empty if skipped.
return errInvalidEpoch
}
}
... Probably best to write a test for this |
Is this still an issue @terencechain and @nisdas ? |
Bump @terencechain @nisdas have we observed this since? |
Still an issue @rauljordan , we still need to verify it. |
This is actually quite important, can someone take a look at this please? |
@protolambda been on my todo list for too long, will take a look at it today. Thanks for the reminder. |
🐞 Bug Report
Description
Currently there is a mismatch between finalized epochs and their related blocks. The finalized
epoch does not exactly match the one provided by the slot in the block.
Has this worked before in a previous version?
Before #5811
🔬 Minimal Reproduction
Run the node and look at the handshake errors from it from other peers.
🔥 Error
What version of Prysm are you running? (Which release)
baf9ec6
The text was updated successfully, but these errors were encountered: