Skip to content

Conversation

tediou5
Copy link
Contributor

@tediou5 tediou5 commented Oct 20, 2025

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:

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Oct 20, 2025
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting Review in FilOz Oct 20, 2025
@rjan90 rjan90 requested a review from Kubuxu October 20, 2025 07:10
@rjan90 rjan90 added the skip/changelog This change does not require CHANGELOG.md update label Oct 20, 2025
@tediou5
Copy link
Contributor Author

tediou5 commented Oct 20, 2025

@rjan90 This pr needs a changelog, I will add it later

@tediou5 tediou5 removed the skip/changelog This change does not require CHANGELOG.md update label Oct 20, 2025
@tediou5 tediou5 force-pushed the feat/chain-export-v2-support branch from 3742e10 to 9adf222 Compare October 20, 2025 07:23
@tediou5
Copy link
Contributor Author

tediou5 commented Oct 20, 2025

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
Copy link
Member

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

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Awaiting Review

Development

Successfully merging this pull request may close these issues.

3 participants