Skip to content
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

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

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

skunert
Copy link
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
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
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
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.

@skunert skunert added the A4-needs-backport Pull request must be backported to all maintained releases. label Dec 13, 2024
Copy link
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
232 of 244 checks passed
@bkchr bkchr deleted the skunert/omni-node-detect-upgrade branch December 16, 2024 09:47
@paritytech-cmd-bot-polkadot-sdk

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

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

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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A4-needs-backport Pull request must be backported to all maintained releases. T9-cumulus This PR/Issue is related to cumulus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants