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

feat(collator) add export pov on slot base collator #7585

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MrishoLukamba
Copy link
Contributor

@MrishoLukamba MrishoLukamba commented Feb 16, 2025

@@ -140,6 +146,28 @@ async fn handle_collation_message<Block: BlockT>(
);

if let MaybeCompressedPoV::Compressed(ref pov) = collation.proof_of_validity {

if let Ok(relay_parent_header) = relay_client.header(BlockId::Hash(relay_parent)).await {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please adjust this a bit:

  • You can pattern match directly for Ok(Some(relay_parent_header))
  • Check for export_pov as outermost check, otherwise we always fetch the relay_parent_header here even though we don't need to (most of the time, export_pov will be false, it is rarely used).

@@ -74,7 +74,7 @@ use crate::{collator as collator_util, LOG_TARGET};
///
/// The `parent_header`, `relay_parent_storage_root` and `relay_parent_number` will also be
/// stored in the file alongside the `pov`. This enables stateless validation of the `pov`.
fn export_pov_to_path<Block: BlockT>(
pub fn export_pov_to_path<Block: BlockT>(
Copy link
Member

Choose a reason for hiding this comment

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

Please just move the method to the lib.rs of this crate.

@MrishoLukamba
Copy link
Contributor Author

Done, all the failing checks arent related to PR @skunert @bkchr except the fmt

@MrishoLukamba
Copy link
Contributor Author

Done, and one suggestion, I want to also refactor lookahead collators to just include the export_pov inside the Params

@skunert @bkchr

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.

Add pov-export to slot-based collator
3 participants