Add transaction_index::HostFunctions with NO-OP impl to the polkadot-prepare/execute-worker#10370
Add transaction_index::HostFunctions with NO-OP impl to the polkadot-prepare/execute-worker#10370
transaction_index::HostFunctions with NO-OP impl to the polkadot-prepare/execute-worker#10370Conversation
… to polkadot execute/prepare workers
|
/cmd prdoc --audience runtime_dev node_dev --bump patch |
…time_dev node_dev --bump patch'
bkchr
left a comment
There was a problem hiding this comment.
The proper way of doing this is that you override these host functions in validate_block/implementation.rs as done for the other host functions.
@bkchr Ooooh, nice :) I had previously just followed the log error, and this is really better since it’s part of the runtime and not the binary. Thank you — tested and working :) |
|
aaah, "check compatibility" now hits the chopsticks issue: https://github.com/paritytech/polkadot-sdk/actions/runs/19652937174/job/56283788628#step:6:29, which is a smol-dot issue: paritytech/smoldot-archive#2182, cc: @tomaka please, please |
| sp_io::offchain_index::host_clear.replace_implementation(host_offchain_index_clear), | ||
| cumulus_primitives_proof_size_hostfunction::storage_proof_size::host_storage_proof_size | ||
| .replace_implementation(host_storage_proof_size), | ||
| sp_io::transaction_index::host_index.replace_implementation(host_transaction_index_index), |
There was a problem hiding this comment.
Could we please put this behind a feature. Otherwise all parachain nodes will require these host functions.
There was a problem hiding this comment.
Could we please put this behind a feature. Otherwise all parachain nodes will require these host functions.
Thank you, good point, fixed: 0f4c666
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
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 <iulian.barbu@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: EgorPopelyaev <egor@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <info@kchr.de>
|
merged as a part of #10662 |
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 <iulian.barbu@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: EgorPopelyaev <egor@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <info@kchr.de>
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 <iulian.barbu@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: EgorPopelyaev <egor@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Bastian Köcher <info@kchr.de>
Relates to: paritytech/polkadot-bulletin-chain#74
Similar issue for smoldot: paritytech/smoldot-archive#2182
Context
The
pallet-transaction-storagepallet and itsstorefunction uses transaction index HostFunctions, e.g.sp_io::transaction_index::index(extrinsic_index, data.len() as u32, content_hash);. All our binaries (polkadot,polkadot-parachain,polkadot-omni-node) support these HostFunctions viasp_io::SubstrateHostFunctions.Problem
When using this pallet within a parachain, the problem arises during parachain validation on the relay chain. The
polkadot-execute/prepare-workerenvironment does not include these HostFunctions — resulting in the error shown below.Solution
This PR adds
sp_io::transaction_index::HostFunctionsas a no-op to thecumulus-pallet-parachain-system'svalidate_block.