-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(api): chain export v2 support #13395
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
base: master
Are you sure you want to change the base?
feat(api): chain export v2 support #13395
Conversation
@rjan90 This pr needs a changelog, I will add it later |
3742e10
to
9adf222
Compare
I did a manual test of import and export on cali-network with the latest snapshot and it works fine |
// If oldmsgskip is set, messages from before the requested roots are also not included. | ||
ChainExport(ctx context.Context, nroots abi.ChainEpoch, oldmsgskip bool, tsk types.TipSetKey) (<-chan []byte, error) //perm:read | ||
// | ||
ChainExport(ctx context.Context, nroots abi.ChainEpoch, oldmsgskip bool, tsk types.TipSetKey, version uint64) (<-chan []byte, error) //perm:read |
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.
this is going to be an annoyingly breaking change .. of the type we've kind of agreed to avoid if at all possible in v1
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.
Yes, this is a change that needs careful consideration, so I'm putting it in a separate PR now.
We will need it eventually, and using lotus-shed to export is not always convenient (need to take the node offline). But I agree that we can discuss it more. I just submitted it first so that you can see the diff
Co-authored-by: Rod Vagg <rod@vagg.org>
Related Issues
Follow-up to #13282
Proposed Changes
Add a
version
parameters to the ChainExport API to specify the version of the exported snapshot (1 or 2).The lotus chain cmd exports the V2Snapshot by default. Use the
--version 1
option to export a V1 snapshot.Additional Info
Checklist
Before you mark the PR ready for review, please make sure that: