-
Notifications
You must be signed in to change notification settings - Fork 435
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
(BIDS-2330) misc: add command fix-blocks #2730
base: master
Are you sure you want to change the base?
Conversation
0a510bb
to
d30a9db
Compare
d30a9db
to
223c15a
Compare
…30/fix-historic-orphan-blocks
…axValidatorindexForEpoch for epochs<v2schemacuttoff
…e blocks, just warn
…30/fix-historic-orphan-blocks
2ee9b7d
to
e031e71
Compare
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.
utACK
Just found two minor issues.
lastEpoch := uint64(0) | ||
for _, slot := range slots { | ||
epoch := utils.EpochOfSlot(slot) | ||
if epoch != lastEpoch { | ||
epochs = append(epochs, epoch) | ||
} | ||
lastEpoch = epoch | ||
} |
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.
Question: With this logic, slots of epoch 0 will not cause epoch 0 to be part of epochs
, right?
For the ticket this PR is meant for, this should not cause an issue. But maybe this should be cleaned up nonetheless as you want to keep the PR.
if iEnd > finalizedSlot+1 { | ||
iEnd = finalizedSlot + 1 | ||
} |
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.
Minor: This should also include something like
if iEnd > end {
iEnd = end
}
Because right now it could happen that start
is something like end - 3
and in that case end would still be iEnd
would still result in start + 1000
.
🤖[deprecated] Generated by Copilot at 0569bfe
This pull request introduces new commands and fixes for the database and node synchronization. It adds
fix-exec-txs
andfix-block-roots
commands tocmd/misc/main.go
to correct data inconsistencies. It also improves thedry-run
flag functionality and the error handling and concurrency logic in themain
package.