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

collation-generation: resolve mismatch between descriptor and commitments core index #7104

Merged
merged 14 commits into from
Jan 22, 2025

Conversation

sw10pa
Copy link
Member

@sw10pa sw10pa commented Jan 9, 2025

Issue

[#7107] Core Index Mismatch in Commitments and Descriptor

Description

This PR resolves a bug where normal (non-malus) undying collators failed to generate and submit collations, resulting in the following error:

ERROR tokio-runtime-worker parachain::collation-generation: Failed to construct and distribute collation: V2 core index check failed: The core index in commitments doesn't match the one in descriptor.

More details about the issue and reproduction steps are described in the related issue.

Summary of Fix

  • When core selectors are provided in the UMP signals, core indexes will be chosen using them;
  • The fix ensures that functionality remains unchanged for parachains not using UMP signals;
  • Added checks to stop processing if the same core is selected repeatedly.

TODO

  • Implement the fix;
  • Add tests;
  • Add PRdoc.

@sw10pa sw10pa requested a review from alindima January 9, 2025 14:40
@sw10pa sw10pa linked an issue Jan 9, 2025 that may be closed by this pull request
@sw10pa sw10pa self-assigned this Jan 9, 2025
@sw10pa sw10pa added I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known. labels Jan 9, 2025
@sw10pa sw10pa requested a review from sandreim January 10, 2025 12:18
Copy link
Contributor

@alindima alindima left a comment

Choose a reason for hiding this comment

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

Good catch!

polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
@sw10pa sw10pa changed the title [WIP] collation-generation: resolve mismatch between descriptor and commitments core index collation-generation: resolve mismatch between descriptor and commitments core index Jan 16, 2025
@sw10pa sw10pa marked this pull request as ready for review January 16, 2025 07:32
Copy link
Contributor

@alindima alindima left a comment

Choose a reason for hiding this comment

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

I haven't yet looked deeply at the test, will do later. Looks good

polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Show resolved Hide resolved
prdoc/pr_7104.prdoc Outdated Show resolved Hide resolved
prdoc/pr_7104.prdoc Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
prdoc/pr_7104.prdoc Outdated Show resolved Hide resolved
Copy link
Contributor

@alindima alindima left a comment

Choose a reason for hiding this comment

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

Looks good to me, nice work!
Some nits remaining

prdoc/pr_7104.prdoc Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/lib.rs Outdated Show resolved Hide resolved
@sw10pa sw10pa requested a review from sandreim January 21, 2025 12:27
Copy link
Contributor

@sandreim sandreim left a comment

Choose a reason for hiding this comment

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

🚀

polkadot/node/collation-generation/src/tests.rs Outdated Show resolved Hide resolved
polkadot/node/collation-generation/src/tests.rs Outdated Show resolved Hide resolved
@sw10pa sw10pa added this pull request to the merge queue Jan 22, 2025
Merged via the queue into master with commit 4eb9228 Jan 22, 2025
199 of 202 checks passed
@sw10pa sw10pa deleted the sw10pa/descriptor-vs-commitments-core-index-mismatch branch January 22, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

Core Index Mismatch in Commitments and Descriptor
3 participants