Skip to content

[Storehouse] 015 - add util to extract payloadless - #8608

Open
zhangchiqing wants to merge 1 commit into
leo/payloadless-util-create-v6-checkpoint-from-v7from
leo/payloadless-util-extract-payloadless
Open

[Storehouse] 015 - add util to extract payloadless#8608
zhangchiqing wants to merge 1 commit into
leo/payloadless-util-create-v6-checkpoint-from-v7from
leo/payloadless-util-extract-payloadless

Conversation

@zhangchiqing

Copy link
Copy Markdown
Member

This PR adds a execution-state-extract-payloadless util to extract a v7 checkpoint (payloadless) from wal files.

It does not support migration, because migration can be done by generating a wal file with migrated trie updates.

@zhangchiqing
zhangchiqing requested a review from a team as a code owner July 10, 2026 17:55
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 27eee133-8694-4912-9078-2d4ff0d10cdc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch leo/payloadless-util-extract-payloadless

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.


log.Info().Msg("loading V7 checkpoint and replaying WAL until the target trie is found")

found, err := diskWal.ReplayOnPayloadlessForestUntil(forest, targetRootHash)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use a different replay function because the original replay would always replay ALL wal files, even if we have found a trie root hash.

For instance, given we have a root.checkpoint.v7 file and 3 wal files: 000, 001, 002. And wal file 001 contains a trie update of root hash A. If we need to extract state for root hash A, the original replay would initialize the DiskWAL by replaying all 3 wal files, if 002 has 1000 trie updates, then the final forest will not include A. However, we could stop wal replaying as soon as replaying 001 and found root hash A, so that the final forest has A as last trie's root hash, and can be used for extracting state.

@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-create-v6-checkpoint-from-v7 branch from 415f130 to 8a646c8 Compare July 13, 2026 17:27
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-extract-payloadless branch from 92167ff to 3f7b070 Compare July 13, 2026 17:28
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-create-v6-checkpoint-from-v7 branch from 8a646c8 to 2998458 Compare July 14, 2026 20:02
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-extract-payloadless branch from 3f7b070 to 9269e95 Compare July 14, 2026 20:02
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-create-v6-checkpoint-from-v7 branch from 2998458 to 58dc7cd Compare July 31, 2026 04:38
@zhangchiqing
zhangchiqing force-pushed the leo/payloadless-util-extract-payloadless branch from 9269e95 to ccdfa7e Compare July 31, 2026 04:39
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.

1 participant