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

refactor and harden check_core_index #6217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alindima
Copy link
Contributor

Resolves #6179

Still have to fix tests

@alindima alindima added the T8-polkadot This PR/Issue is related to/affects the Polkadot network. label Oct 24, 2024
}

match UMPSignal::decode(&mut core_selector_message.as_slice())
.map_err(|_| CandidateReceiptError::InvalidSelectedCore)?
Copy link
Contributor

Choose a reason for hiding this comment

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

This is error should read as invalid ump signal.

Some(core_index)
})
let core_selector = core_selector
.or_else(|| if assigned_cores.len() == 1 { Some(CoreSelector(0)) } else { None })
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to still allow v2 candidates without core selectors, only if the MVP bit is enabled, because they will have an injected core index and will be valid candidates in the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime: unify and harden UMP signal checks in check_core_index
2 participants