-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[pallet-transaction-storage] Configurable RetentionPeriod #10656
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
Open
bkontur
wants to merge
21
commits into
master
Choose a base branch
from
bko-tx-pallet-storage-period
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−31
Conversation
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
… for substrate-node
Contributor
Author
|
/cmd prdoc --audience runtime_dev node_dev --bump patch |
…time_dev node_dev --bump patch'
x3c41a
reviewed
Dec 16, 2025
bkontur
commented
Dec 16, 2025
bkontur
commented
Dec 16, 2025
Contributor
Author
|
/cmd fmt |
bkontur
commented
Dec 16, 2025
10 tasks
bkontur
commented
Dec 16, 2025
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
Contributor
Author
|
/cmd fmt |
bkontur
commented
Dec 17, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 24, 2025
Relates to: paritytech/polkadot-bulletin-chain#74 This PR adds the required support and features for running Bulletin as a parachain. It is a top-level PR that merges three partial features/PRs, which can also be reviewed/merged separately: 1. Add `transaction_index::HostFunctions` with NO-OP impl to the cumulus ParachainSystem `validate_block` for polkadot-prepare/execute-worker - #10370 2. Add custom inherent provider for pallet-transaction-storage to omni node - #10494 3. Configurable StoragePeriod feeded to the inherent provider over runtime API - #10656 --------- Signed-off-by: Iulian Barbu <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Iulian Barbu <[email protected]> Co-authored-by: Iulian Barbu <[email protected]> Co-authored-by: EgorPopelyaev <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
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.
Relates to: paritytech/polkadot-bulletin-chain#60
Context/Problem
This PR refactors
pallet-transaction-storageandsp-transaction-storage-proof(thenew_data_providerinherent provider), both of which rely on a hard-codedDEFAULT_STORAGE_PERIOD.The
new_data_provideruses a hard-codedpub const DEFAULT_STORAGE_PERIOD: u32 = 100800;, which forces the runtime to use the same value. This value corresponds to 7 days for 6-second blocks. We want to make this constant configurable and driven by the runtime — exposed via a runtime API. For example, if we switch to 2-second blocks but still want to keep the 7-day period, we won’t need to coordinate and restart the collators with a new hard-coded constant and so on. Basically, we want to have possibility to set this constant with arbitrary value without affecting the collators or anything.Solution
This PR:
storage_periodto thenew_data_providerTransactionStorageApi::storage_periodruntime API, which the runtime can specify arbitrarynew_data_provider, with the node client calling the runtime API when constructing inherent provider dataretrieve_storage_perioduses just directcall_api_at("TransactionStorageApi_storage_period", at_block)pub trait IndexedBody, but anyway at some point we need to call the runtime API.TODO
Is there any alternative toSolved by @skunert comment: Bulletin as parachain missing features #10662 (comment)call_api_atfor how a node’s custom inherent data provider can call a runtime API declared viadecl_runtime_apis?Follow-up
It will be used for Bulletin setup here: #10494