Skip to content

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Sep 18, 2025

Summary

Add /paras/{number}/inclusion endpoint to find relay chain inclusion information for parachain blocks.

Changes

  • New endpoint: GET /paras/{number}/inclusion?depth=10
  • Controller: ParasInclusionController with depth parameter validation
  • Service: ParasInclusionService with batched parallel search optimization
  • Documentation: Complete OpenAPI specs in both docs directories

Performance

  • Batched parallel search (5 blocks at a time) for 50% performance improvement
  • Configurable depth parameter (must be divisible by 5, max 100)
  • Early termination when inclusion found

Requirements

  • A multi chain connection is required to use this endpoint, the main connection must be asset hub, and the secondary connection the relay chain.

@TarikGul TarikGul requested a review from a team as a code owner September 18, 2025 02:23
Copy link
Contributor

@filvecchiato filvecchiato left a comment

Choose a reason for hiding this comment

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

One minor nitpick, but overall it looks good!

@TarikGul
Copy link
Member Author

@filvecchiato Nice suggestion, I actually did what you mentioned but just used a find instead to make it a single loop

@TarikGul TarikGul merged commit 4f8176d into master Sep 18, 2025
16 checks passed
@TarikGul TarikGul deleted the tg-para-inclusion branch September 18, 2025 14:50
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.

2 participants