Skip to content

Omni-node: Detect pending code in storage and send go ahead signal in dev-mode.#6885

Merged
bkchr merged 4 commits intomasterfrom
skunert/omni-node-detect-upgrade
Dec 16, 2024
Merged

Omni-node: Detect pending code in storage and send go ahead signal in dev-mode.#6885
bkchr merged 4 commits intomasterfrom
skunert/omni-node-detect-upgrade

Conversation

@skunert
Copy link
Copy Markdown
Contributor

@skunert skunert commented Dec 13, 2024

We check if there is a pending validation code in storage. If there is, add the go-ahead signal in the relay chain storage proof.

Not super elegant, but should get the job done for development.

@skunert skunert added the T9-cumulus This PR/Issue is related to cumulus. label Dec 13, 2024
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Dec 13, 2024

/cmd prdoc --bump patch --audience runtime_dev

Comment on lines +161 to +163
let should_send_go_ahead = client_for_cidp
.storage(block, &StorageKey(PENDING_VALIDATION_CODE_KEY.to_vec()))
.ok()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If someone names ParachainSystem differently in construct_runtime!, this will fail.

IMO it is better to call collect_collation_info at block and check if new_validation_code is Some(_).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was totally willing to take that risk :D. But yeah your idea is better. Not checking the runtime api version though, 3 year old runtimes with the manual seal of omni node seems exotic.

Copy link
Copy Markdown
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

Thank you very much!

Would be great to backport this into the next patch of 202412 so it can be used in documentation

update: bot should open the PR automatically: https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md

@bkchr bkchr added this pull request to the merge queue Dec 16, 2024
Merged via the queue into master with commit cee63ac Dec 16, 2024
@bkchr bkchr deleted the skunert/omni-node-detect-upgrade branch December 16, 2024 09:47
@paritytech-cmd-bot-polkadot-sdk
Copy link
Copy Markdown
Contributor

Created backport PR for stable2407:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-6885-to-stable2407
git worktree add --checkout .worktree/backport-6885-to-stable2407 backport-6885-to-stable2407
cd .worktree/backport-6885-to-stable2407
git reset --hard HEAD^
git cherry-pick -x cee63ac0a34f356c66f1305073fa3d1210550a0c
git push --force-with-lease

@paritytech-cmd-bot-polkadot-sdk
Copy link
Copy Markdown
Contributor

Created backport PR for stable2409:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-6885-to-stable2409
git worktree add --checkout .worktree/backport-6885-to-stable2409 backport-6885-to-stable2409
cd .worktree/backport-6885-to-stable2409
git reset --hard HEAD^
git cherry-pick -x cee63ac0a34f356c66f1305073fa3d1210550a0c
git push --force-with-lease

github-actions bot pushed a commit that referenced this pull request Dec 16, 2024
… dev-mode. (#6885)

We check if there is a pending validation code in storage. If there is,
add the go-ahead signal in the relay chain storage proof.

Not super elegant, but should get the job done for development.

---------

Co-authored-by: command-bot <>
(cherry picked from commit cee63ac)
@paritytech-cmd-bot-polkadot-sdk
Copy link
Copy Markdown
Contributor

Successfully created backport PR for stable2412:

EgorPopelyaev pushed a commit that referenced this pull request Dec 16, 2024
Backport #6885 into `stable2412` from skunert.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
dudo50 pushed a commit to paraspell-research/polkadot-sdk that referenced this pull request Jan 4, 2025
… dev-mode. (paritytech#6885)

We check if there is a pending validation code in storage. If there is,
add the go-ahead signal in the relay chain storage proof.

Not super elegant, but should get the job done for development.

---------

Co-authored-by: command-bot <>
undercover-cactus added a commit to Moonsong-Labs/storage-hub that referenced this pull request Apr 30, 2025
undercover-cactus added a commit to Moonsong-Labs/storage-hub that referenced this pull request May 21, 2025
* rename `state_version` to `system_version` for xcm-simulator

* replace 'sp_runtime::RuntimeString' with 'alloc::string::String' (see paritytech/polkadot-sdk#5693)

* missed a place to rename state_version to system_version

* update dry_run_call to include xcm result version (see paritytech/polkadot-sdk#7438)

* introduce SelectCore into the runtime for the parachain system pallet (see paritytech/polkadot-sdk#8153)

* introduce DoneSlashHandler in the runtime for the balances pallet and set it empty because we are not using it (see paritytech/polkadot-sdk#5623)

* introduce WeightInfo type for transaction pallets which is part of the biggest change regarding the TransactionExtension (see paritytech/polkadot-sdk#3685)

* fix conversion from String to str

* replicate the changes in xcm-simulator

* DispatchInfo is now DispatchEventInfo in the client (see paritytech/polkadot-sdk#3685)

* sc_offchain::Offchainworker::new() now return Result fix (see paritytech/polkadot-sdk#5919)

* Update TransactionPool build to work with the new pool struct (see paritytech/polkadot-sdk#4639)

* fix instant sealing command

* enable runtime upgrade in dev mode (see paritytech/polkadot-sdk#6885)

* check for default backend network when starting node

* fix unresolved import in benchmarking

* fix format error in benchmarking

* fix mock pallets

* fixing xcm simulator

* forgot to save file before commit

* fix xcm test

* upgrade @PolkaDot to 15.10.2; fix typegen;

* update utils polkadot deps

* attempting to fix zombienet

* use a more recent polkadot binary

* install stable2412 binary in CI too

* fix fee in reaping account test

* typegen

* fix last test

* remove console.log; use rpc_port config everywhere

* spec version updated in test

---------

Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
margaretphillips96627margaretphillips added a commit to margaretphillips96627margaretphillips/storage-hub that referenced this pull request Oct 6, 2025
* rename `state_version` to `system_version` for xcm-simulator

* replace 'sp_runtime::RuntimeString' with 'alloc::string::String' (see paritytech/polkadot-sdk#5693)

* missed a place to rename state_version to system_version

* update dry_run_call to include xcm result version (see paritytech/polkadot-sdk#7438)

* introduce SelectCore into the runtime for the parachain system pallet (see paritytech/polkadot-sdk#8153)

* introduce DoneSlashHandler in the runtime for the balances pallet and set it empty because we are not using it (see paritytech/polkadot-sdk#5623)

* introduce WeightInfo type for transaction pallets which is part of the biggest change regarding the TransactionExtension (see paritytech/polkadot-sdk#3685)

* fix conversion from String to str

* replicate the changes in xcm-simulator

* DispatchInfo is now DispatchEventInfo in the client (see paritytech/polkadot-sdk#3685)

* sc_offchain::Offchainworker::new() now return Result fix (see paritytech/polkadot-sdk#5919)

* Update TransactionPool build to work with the new pool struct (see paritytech/polkadot-sdk#4639)

* fix instant sealing command

* enable runtime upgrade in dev mode (see paritytech/polkadot-sdk#6885)

* check for default backend network when starting node

* fix unresolved import in benchmarking

* fix format error in benchmarking

* fix mock pallets

* fixing xcm simulator

* forgot to save file before commit

* fix xcm test

* upgrade @PolkaDot to 15.10.2; fix typegen;

* update utils polkadot deps

* attempting to fix zombienet

* use a more recent polkadot binary

* install stable2412 binary in CI too

* fix fee in reaping account test

* typegen

* fix last test

* remove console.log; use rpc_port config everywhere

* spec version updated in test

---------

Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
dominic5perezd added a commit to dominic5perezd/storage-hub that referenced this pull request Oct 10, 2025
* rename `state_version` to `system_version` for xcm-simulator

* replace 'sp_runtime::RuntimeString' with 'alloc::string::String' (see paritytech/polkadot-sdk#5693)

* missed a place to rename state_version to system_version

* update dry_run_call to include xcm result version (see paritytech/polkadot-sdk#7438)

* introduce SelectCore into the runtime for the parachain system pallet (see paritytech/polkadot-sdk#8153)

* introduce DoneSlashHandler in the runtime for the balances pallet and set it empty because we are not using it (see paritytech/polkadot-sdk#5623)

* introduce WeightInfo type for transaction pallets which is part of the biggest change regarding the TransactionExtension (see paritytech/polkadot-sdk#3685)

* fix conversion from String to str

* replicate the changes in xcm-simulator

* DispatchInfo is now DispatchEventInfo in the client (see paritytech/polkadot-sdk#3685)

* sc_offchain::Offchainworker::new() now return Result fix (see paritytech/polkadot-sdk#5919)

* Update TransactionPool build to work with the new pool struct (see paritytech/polkadot-sdk#4639)

* fix instant sealing command

* enable runtime upgrade in dev mode (see paritytech/polkadot-sdk#6885)

* check for default backend network when starting node

* fix unresolved import in benchmarking

* fix format error in benchmarking

* fix mock pallets

* fixing xcm simulator

* forgot to save file before commit

* fix xcm test

* upgrade @PolkaDot to 15.10.2; fix typegen;

* update utils polkadot deps

* attempting to fix zombienet

* use a more recent polkadot binary

* install stable2412 binary in CI too

* fix fee in reaping account test

* typegen

* fix last test

* remove console.log; use rpc_port config everywhere

* spec version updated in test

---------

Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T9-cumulus This PR/Issue is related to cumulus.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants