Skip to content

Ignore trie nodes while recording a proof#8172

Merged
alvicsam merged 79 commits intomasterfrom
bkchr-ignore-trie-nodes
Jul 31, 2025
Merged

Ignore trie nodes while recording a proof#8172
alvicsam merged 79 commits intomasterfrom
bkchr-ignore-trie-nodes

Conversation

@bkchr
Copy link
Copy Markdown
Member

@bkchr bkchr commented Apr 7, 2025

This pull requests implements support for ignoring trie nodes while recording a proof. It directly includes the feature into basic-authorship to later make use of it in Cumulus for multi-block PoVs.

The idea behind this is when you have multiple blocks per PoV that trie nodes accessed or produced by a block before (in the same PoV), are not required to be added to the storage proof again. So, all the blocks in one PoV basically share the same storage proof. This also impacts things like storage weight reclaim, because ignored trie node do not contribute a to the storage proof size (similar to when this would happen in the same block).

Example

Let's say block A access key X and block B accesses key X again. As A already has read it, we know that it is part of the storage proof and thus, don't need to add it again to the storage proof when building B. The same applies for storage values produced by an earlier block (in the same PoV). These storage values are an output of the execution and thus, don't need to be added to the storage proof :)

Depends on #6137. Base branch will be changed when this got merged.

Part of: #6495

bkchr and others added 30 commits October 16, 2024 22:41
…om:paritytech/polkadot-sdk into bkchr-parachain-block-data-multiple-blocks
@bkchr
Copy link
Copy Markdown
Member Author

bkchr commented Jun 18, 2025

/cmd prdoc --audience node_dev

@skunert skunert self-requested a review July 14, 2025 17:44
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/16632483207
Failed job name: fmt

@bkchr
Copy link
Copy Markdown
Member Author

bkchr commented Jul 30, 2025

/cmd fmt

@bkchr bkchr added this pull request to the merge queue Jul 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 31, 2025
@alvicsam alvicsam added this pull request to the merge queue Jul 31, 2025
Merged via the queue into master with commit 5633cf5 Jul 31, 2025
242 of 245 checks passed
@alvicsam alvicsam deleted the bkchr-ignore-trie-nodes branch July 31, 2025 10:41
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
This pull requests implements support for ignoring trie nodes while
recording a proof. It directly includes the feature into
`basic-authorship` to later make use of it in Cumulus for multi-block
PoVs.

The idea behind this is when you have multiple blocks per PoV that trie
nodes accessed or produced by a block before (in the same `PoV`), are
not required to be added to the storage proof again. So, all the blocks
in one `PoV` basically share the same storage proof. This also impacts
things like storage weight reclaim, because ignored trie node do not
contribute a to the storage proof size (similar to when this would
happen in the same block).

# Example 

Let's say block `A` access key `X` and block `B` accesses key `X` again.
As `A` already has read it, we know that it is part of the storage proof
and thus, don't need to add it again to the storage proof when building
`B`. The same applies for storage values produced by an earlier block
(in the same PoV). These storage values are an output of the execution
and thus, don't need to be added to the storage proof :)


Depends on #6137. Base
branch will be changed when this got merged.

Part of: #6495

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michal Kucharczyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”. T18-zombienet_tests Trigger zombienet CI tests.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants