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

Coretime Chain: mitigate behaviour with many assignments on one core #434

Merged

Conversation

seadanda
Copy link
Contributor

@seadanda seadanda commented Aug 14, 2024

We can handle a maximum of 28 assignments inside one XCM, while it's possible to have 80 (if a region is interlaced 79 times).
This can be chunked on the coretime chain side but currently the scheduler on the relay makes assumptions that means we can't send more than one chunk for a given core.

I've made a mitigation here that requires no sdk release, but it just truncates the additional assignments until we can extend the relay to support this. This means that the first 27 assignments are taken, the final 28th is used to pad with idle to complete the mask (the relay also assumes that every schedule is complete). Any other assignments are dropped.

@seadanda seadanda marked this pull request as ready for review August 14, 2024 20:58
@seadanda seadanda changed the title Mitigate behaviour with many assignments on one core Coretime Chain: mitigate behaviour with many assignments on one core Aug 15, 2024
@seadanda seadanda mentioned this pull request Aug 15, 2024
9 tasks
Copy link
Contributor

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

When the relay chain accepts multiple assignments, we should make the XCM call generation more flexible and not just assume that 28 the magic number will always work. Thus, I see no need to keep the chunking right now.

seadanda and others added 2 commits August 15, 2024 12:47
@seadanda
Copy link
Contributor Author

/merge

@fellowship-merge-bot fellowship-merge-bot bot enabled auto-merge (squash) August 15, 2024 14:50
@fellowship-merge-bot
Copy link
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@fellowship-merge-bot fellowship-merge-bot bot merged commit 437ebb3 into polkadot-fellows:main Aug 15, 2024
46 of 47 checks passed
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 21, 2024
)

Fixed in Polkadot and Kusama in
polkadot-fellows/runtimes#434 and this PR just
adds to testnets.

We can handle a maximum of 28 assignments inside one XCM, while it's
possible to have 80 (if a region is interlaced 79 times).
This can be chunked on the coretime chain side but currently the
scheduler on the relay makes assumptions that means we can't send more
than one chunk for a given core.

This just truncates the additional assignments until we can extend the
relay to support this. This means that the first 27 assignments are
taken, the final 28th is used to pad with idle to complete the mask (the
relay also assumes that every schedule is complete). Any other
assignments are dropped.

---------

Co-authored-by: Kian Paimani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants