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

Restore --tipset flag to snapshot export command #3027

Merged

Conversation

jdjaustin
Copy link
Contributor

@jdjaustin jdjaustin commented Jun 20, 2023

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes #2999 and #3171

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@jdjaustin
Copy link
Contributor Author

Forest and Lotus snapshot sizes are a few hundred bytes different, similar to the status of snapshots prior to PR #2540. Haven't pinpointed a cause yet.

@lemmih
Copy link
Contributor

lemmih commented Jun 21, 2023

Forest and Lotus snapshot sizes are a few hundred bytes different, similar to the status of snapshots prior to PR #2540. Haven't pinpointed a cause yet.

Are you comparing the compressed files or uncompressed files?

@ruseinov
Copy link
Contributor

Forest and Lotus snapshot sizes are a few hundred bytes different, similar to the status of snapshots prior to PR #2540. Haven't pinpointed a cause yet.

Could have something to do with this: #3015 ?

@jdjaustin
Copy link
Contributor Author

jdjaustin commented Jun 28, 2023

Forest and Lotus snapshot sizes are a few hundred bytes different, similar to the status of snapshots prior to PR #2540. Haven't pinpointed a cause yet.

Are you comparing the compressed files or uncompressed files?

Uncompressed.

@jdjaustin
Copy link
Contributor Author

Forest and Lotus snapshot sizes are a few hundred bytes different, similar to the status of snapshots prior to PR #2540. Haven't pinpointed a cause yet.

Could have something to do with this: #3015 ?

Yes, that might be it. I'll re-check now that that change has been merged.

@jdjaustin
Copy link
Contributor Author

(Uncompressed) Forest snapshot is still larger than (uncompressed) Lotus snapshot by a few hundred bytes.

@lemmih
Copy link
Contributor

lemmih commented Jun 28, 2023

(Uncompressed) Forest snapshot is still larger than (uncompressed) Lotus snapshot by a few hundred bytes.

Try using the ipfs tool to inspect the CAR files. Something like ipfs dag import and then ipfs dag stat.

@jdjaustin

This comment was marked as outdated.

@jdjaustin
Copy link
Contributor Author

(Uncompressed) Forest snapshot is still larger than (uncompressed) Lotus snapshot by a few hundred bytes.

Try using the ipfs tool to inspect the CAR files. Something like ipfs dag import and then ipfs dag stat.

Do you know how long the ipfs dag import step should take for a calibnet snapshot? I let it run overnight and it still hadn't finished this morning. Since I already had an older version of ipfs installed and had some issues with getting this command running, I might just try on a fresh droplet.

@lemmih
Copy link
Contributor

lemmih commented Jun 29, 2023

(Uncompressed) Forest snapshot is still larger than (uncompressed) Lotus snapshot by a few hundred bytes.

Try using the ipfs tool to inspect the CAR files. Something like ipfs dag import and then ipfs dag stat.

Do you know how long the ipfs dag import step should take for a calibnet snapshot? I let it run overnight and it still hadn't finished this morning. Since I already had an older version of ipfs installed and had some issues with getting this command running, I might just try on a fresh droplet.

I wouldn't expect it to take more than a few seconds.

@lemmih
Copy link
Contributor

lemmih commented Jun 29, 2023

@jdjaustin You can also use this tool: https://github.com/ipld/go-car/tree/master/cmd/car

@ruseinov
Copy link
Contributor

Perhaps this could be useful to check: https://ipld.io/specs/transport/car/carv1/#determinism, some of this could potentially influence the file size.

If it's only several hundred bytes - perhaps checking the headers might help, starting with HEAD.

@jdjaustin
Copy link
Contributor Author

Today @aatifsyed and I did a binary diff and located the mismatch at byte a33fe8ec. We were able to inspect the mismatch by using modified code from PR #3085 . Here are the results:
Screen Shot 2023-06-29 at 12 32 56 PM

Still need to investigate why the CIDs at this block do not match.

@ruseinov
Copy link
Contributor

Today @aatifsyed and I did a binary diff and located the mismatch at byte a33fe8ec. We were able to inspect the mismatch by using modified code from PR #3085 . Here are the results: Screen Shot 2023-06-29 at 12 32 56 PM

Still need to investigate why the CIDs at this block do not match.

Nice, all that's left now is to debug it on both Lotus and Forest to see what the differences are in terms of stack traces and such.

@jdjaustin jdjaustin changed the title [WIP] Restore --tipset flag to snapshot export command Restore --tipset flag to snapshot export command Jul 14, 2023
@jdjaustin jdjaustin marked this pull request as ready for review July 14, 2023 14:31
@lemmih lemmih requested review from a team, creativcoder and hanabi1224 and removed request for a team July 17, 2023 13:30
@jdjaustin jdjaustin added this pull request to the merge queue Jul 19, 2023
Merged via the queue into main with commit 7ea9736 Jul 19, 2023
@jdjaustin jdjaustin deleted the jdjaustin/issue-2999-restore-tipset-flag-to-snapshot-export branch July 19, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore --tipset functionality to forest-cli snapshot export
5 participants