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

Populate more data in parachain inherents #2989

Closed
7 tasks
kishansagathiya opened this issue Dec 5, 2022 · 4 comments
Closed
7 tasks

Populate more data in parachain inherents #2989

kishansagathiya opened this issue Dec 5, 2022 · 4 comments
Assignees
Labels
A-triage issue description needs refactor and/or labeled. Epic Issue used to track development status of a complex feature, aggregates several issues S-subsystems-backing issues related to polkadot host backing subsystem functionality.

Comments

@kishansagathiya
Copy link
Contributor

kishansagathiya commented Dec 5, 2022

Issue summary

  • Parachain Inherents have four fields Parent Header, Bitfields, BackedCandidates and Disputes.

  • However, we have populated only Parent Header, because that is our minimum requirement for a node to run (build blocks).

  • We would like to populate other fields as well.

  • The scope of this issue would be find where to and how to get those remaining information (Bitfields, BackedCandidates and Disputes).

  • It would most like require a larger parachain support. In which case, figure out what extra feature we might need to populate these data and create other issues accordingly.

Updates after research

This is a large task, one which requires building systems written below

Details of how these subsystems work in polkadot is https://paritytech.github.io/polkadot/book/node/subsystems-and-jobs.html while spec is at https://spec.polkadot.network/#chapter-anv

Basically in order to populate parachain inherents we should be able to get data from collators, that data will make use of all the above mentioned subsystems and in the end we will get parachain inherents for us to put into new blocks.

I feel like the first systems for us to implement should be collator protocol. The Collator Protocol implements the network protocol by which collators and validators communicate. It is used by collators to distribute collations to validators and used by validators to accept collations by collators.

The Collator Protocol is the first in the journey of a parachain block to become part of the relay chain. Thus, we can test this implementation independently. Whereas, all other systems interact with other not-yet-implemented systems, which would require us to mock behaviour.

Other information and links

There is the Node Implementer's Guide. Node implementer explains how parachain host is implemented in Polkadot (rust implementation). It is really helpful because

  • you can get the exact definitions of data types,
  • description is more detailed than spec
  • you can learn an example of software architecture of parachain host

The is also the spec. Personally, I find spec easy to understand. Spec is good to know just the requirement. With node implementer's guide one can get confused on what is the requirement and what is a implementation choice.

@kishansagathiya
Copy link
Contributor Author

kishansagathiya commented Feb 21, 2023

Make sure we can support https://github.com/paritytech/polkadot/releases/tag/v0.9.38
Check paritytech/polkadot#4097 to see if we have to worry about some things.

@kishansagathiya kishansagathiya self-assigned this Feb 21, 2023
@kishansagathiya
Copy link
Contributor Author

kishansagathiya commented Feb 27, 2023

Polkadot has implementation of https://paritytech.github.io/polkadot/book/node/overseer.html to create parachain inherents. We would also need this.

I feels like we would increasingly need to add everything that is described in https://paritytech.github.io/polkadot/book/node/index.html. Most of these topics are modules in polkadot codebase.

Polkadot's code uses client and overseer to create parachain inherents. But I bet as I get deeper into it, we would need more things.

overseer is a module that manages different subsystems. It would be a design decision whether we need something like overseer.

There is a subsystem called provisioner which is responsible for choosing a backed candidates and getting inherent data. It looks like we will need some equivalent of provisioner and network subsystem to start things.

Will keep updating this space with my findings.

@kishansagathiya
Copy link
Contributor Author

kishansagathiya commented Mar 3, 2023

@timwu20 @danforbes
I have updated issue description based on my research, I am starting implementation with collator protocol. Let me know if I should create issues for individual subsystems, now or make them as things progress.

@P1sar P1sar added Epic Issue used to track development status of a complex feature, aggregates several issues A-triage issue description needs refactor and/or labeled. S-subsystems-backing issues related to polkadot host backing subsystem functionality. and removed BABE labels Jan 15, 2024
@P1sar
Copy link
Member

P1sar commented Apr 3, 2024

Closing this, and keeping track of all parachain implementation inside the zenhub project

@P1sar P1sar closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-triage issue description needs refactor and/or labeled. Epic Issue used to track development status of a complex feature, aggregates several issues S-subsystems-backing issues related to polkadot host backing subsystem functionality.
Projects
None yet
Development

No branches or pull requests

4 participants