Closed
Conversation
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com>
Contributor
|
Review required! Latest push from author must always be reviewed |
6b05dea to
309c1ca
Compare
309c1ca to
4f2c6e2
Compare
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 28, 2025
# Description Fixes #7533. Part of launching smart contracts on AssetHub. The current task involves warming up the state and performing sanity checks to ensure that memory usage remains within reasonable limits; otherwise, it should abort gracefully. Here is a breakdown of the task by parts: - **Configuration.** We use a CLI flag to trigger the warm up. To increase the cache size, we use an existing flag. - **Warm-up.** We populate the trie cache with values from the database using a best hash as a storage root. For normal use we spawn a background task for it, for testing purposes we warm up in a blocking manner. - **Sanity checks.** If we find that the configured cache size is too large, we warn. Variants of the added flag: | Flag | Meaning | |---------------------------------|---------------------------------------------| | [no flag] | no warm-up | | warm-up-trie-cache | non-blocking warmup | | warm-up-trie-cache non-blocking | non-blocking warmup (same as just the flag) | | —warm-up-trie-cache blocking | blocking warmup | ## Integration Tested on a snapshot from polkadot-asset-hub: 5426064 keys, ~900MIB state. Populating Trie cache takes 1.5–2 minutes on Macbook Pro M2. ## Aditional Notes Initially, we thought about putting the entire state into memory using a CLI flag or a runtime parameter, but decided against it. That’s up to collators to decide on which setup run their machines, they can use the current cache size setting to increase the throughput. ## Todos Testing moved to #8644 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
pgherveou
pushed a commit
that referenced
this pull request
Jun 11, 2025
# Description Fixes #7533. Part of launching smart contracts on AssetHub. The current task involves warming up the state and performing sanity checks to ensure that memory usage remains within reasonable limits; otherwise, it should abort gracefully. Here is a breakdown of the task by parts: - **Configuration.** We use a CLI flag to trigger the warm up. To increase the cache size, we use an existing flag. - **Warm-up.** We populate the trie cache with values from the database using a best hash as a storage root. For normal use we spawn a background task for it, for testing purposes we warm up in a blocking manner. - **Sanity checks.** If we find that the configured cache size is too large, we warn. Variants of the added flag: | Flag | Meaning | |---------------------------------|---------------------------------------------| | [no flag] | no warm-up | | warm-up-trie-cache | non-blocking warmup | | warm-up-trie-cache non-blocking | non-blocking warmup (same as just the flag) | | —warm-up-trie-cache blocking | blocking warmup | ## Integration Tested on a snapshot from polkadot-asset-hub: 5426064 keys, ~900MIB state. Populating Trie cache takes 1.5–2 minutes on Macbook Pro M2. ## Aditional Notes Initially, we thought about putting the entire state into memory using a CLI flag or a runtime parameter, but decided against it. That’s up to collators to decide on which setup run their machines, they can use the current cache size setting to increase the throughput. ## Todos Testing moved to #8644 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Contributor
Author
|
Included to #7979 |
alvicsam
pushed a commit
that referenced
this pull request
Oct 17, 2025
# Description Fixes #7533. Part of launching smart contracts on AssetHub. The current task involves warming up the state and performing sanity checks to ensure that memory usage remains within reasonable limits; otherwise, it should abort gracefully. Here is a breakdown of the task by parts: - **Configuration.** We use a CLI flag to trigger the warm up. To increase the cache size, we use an existing flag. - **Warm-up.** We populate the trie cache with values from the database using a best hash as a storage root. For normal use we spawn a background task for it, for testing purposes we warm up in a blocking manner. - **Sanity checks.** If we find that the configured cache size is too large, we warn. Variants of the added flag: | Flag | Meaning | |---------------------------------|---------------------------------------------| | [no flag] | no warm-up | | warm-up-trie-cache | non-blocking warmup | | warm-up-trie-cache non-blocking | non-blocking warmup (same as just the flag) | | —warm-up-trie-cache blocking | blocking warmup | ## Integration Tested on a snapshot from polkadot-asset-hub: 5426064 keys, ~900MIB state. Populating Trie cache takes 1.5–2 minutes on Macbook Pro M2. ## Aditional Notes Initially, we thought about putting the entire state into memory using a CLI flag or a runtime parameter, but decided against it. That’s up to collators to decide on which setup run their machines, they can use the current cache size setting to increase the throughput. ## Todos Testing moved to #8644 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up for #7556
For tests we use v15 westend-asset-hub metadata. This one doesn’t work with the old version of subxt, which we use in polkadot-sdk: metadata types break the subxt macro.
Blocking issue for the test: #8592