-
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(events): compare-amt option for lotus-shed indexes inspect-events #12571
Conversation
4358 epochs in my splitstore that it can do this comparison on, and only 12 fail with these address lookup errors:
|
9c46baa
to
e6c4c71
Compare
I think this is also close to the “validation tool” in my head & I think it provides a more reliable response compare to the count checks (this should be a part of the reconciliation process or recommended for index providers to run on a regular basis) |
e6c4c71
to
b8f5b73
Compare
Cleaned this up a bit and now it's faster than just doing the counts because I managed to reduce the number of API calls. So, I've just made this the normal behaviour, not bothering with counts. I left the counting code in there so it can provide some informative output in the case of a mismatch but there's not really a good reason to keep doing it that way if we can be accurate. |
90d4808
to
2502aad
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.
nice
Instead of relying just on entry counts, compare the regenerated AMT root using just what we have in the db with the message receipt event root. This should tell us precisely that we have what we should or not. Ref: #12570
d8bbdf0
to
d585f34
Compare
Instead of relying just on entry counts, compare the regenerated AMT root using just what we have in the db with the message receipt event root. This should tell us precisely that we have what we should or not.
Ref: #12570
--
I mainly just wanted to see if this was practical for the discussion in #12570, and it seems to be. The only problem is address lookup. Some of my tipsets don't resolve f410 addresses. I get back 1,500 tipsets, to epoch 4339494 and get a
actor not found
error so I'm not sure what to do about that. I've turned that into a "problem" rather than an error and left a TODO to figure out if it can be resolved. I assumed that we could get this mapping at the tipset, but I obviously don't understand something about addresses.With addresses sorted out, this could work for ChainIndexer too. It's more expensive than comparing lengths (0.5s compared to 0.3s to do 20 epochs from head in a quick test), which is a bit of a surprise because to compare lengths you need to load the original AMT from the blockstore, but the expense comes from doing the address lookups via the API, which may be slightly cheaper when run in-daemon rather than via the RPC like lotus-shed does.