Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

PVF: Fix external workers being required for non-collator full nodes #7566

Merged
merged 4 commits into from
Aug 1, 2023

Conversation

mrcnski
Copy link
Contributor

@mrcnski mrcnski commented Jul 31, 2023

See title and this thread.

Cumulus companion: paritytech/cumulus#2929

@mrcnski mrcnski added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Jul 31, 2023
Comment on lines -74 to -83
#[allow(missing_docs)]
#[derive(Debug, Parser)]
pub struct ValidationWorkerCommand {
/// The path to the validation host's socket.
#[arg(long)]
pub socket_path: String,
/// Calling node implementation version
#[arg(long)]
pub node_impl_version: String,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for unrelated change, this was dead code

@@ -909,7 +909,7 @@ pub fn new_full<OverseerGenerator: OverseerGen>(
slot_duration_millis: slot_duration.as_millis() as u64,
};

let candidate_validation_config = if is_collator.is_collator() {
let candidate_validation_config = if role.is_authority() && !is_collator.is_collator() {
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't this instantiate a dummy subsystem for candidate validation for every node that's an authority and is not a collator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, did that too fast!

Wanted to keep the conditional as role.is_authority() && !is_collator.is_collator() instead of negating it, since it's the same conditional that's used for pre_checker_enabled above.

Copy link
Contributor

Choose a reason for hiding this comment

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

This might as well be if role.is_authority() as there aren't really any nodes that are both authorities and collators. But if there were a node that is an authority and a collator, it'd probably want to validate candidates (in its role as an authority).

Copy link
Contributor

Choose a reason for hiding this comment

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

The check above is probably wrong too, based on first principles.

Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't capture the possibility of nodes not being authorities and also checking parablocks, but we can cross that bridge when we get to it. Currently dispute infrastructure doesn't allow it, so kind of a moot point. I do wish these interfaces were a bit more forward thinking...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The check above is probably wrong too, based on first principles.

I'm kind of scared to touch it here. Changed the current check though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rphmeier The zombienet tests were failing without the !is_collator check so I guess it is needed. (local cumulus tests had worked without it though.) Perhaps this is something I can revisit in the refactor, for now I will merge this in to fix CI.

mrcnski added 2 commits July 31, 2023 20:59
> This might as well be if role.is_authority() as there aren't really any nodes
> that are both authorities and collators. But if there were a node that is an
> authority and a collator, it'd probably want to validate candidates (in its
> role as an authority).
Copy link
Contributor

@skunert skunert left a comment

Choose a reason for hiding this comment

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

LGTM

@mrcnski mrcnski requested a review from rphmeier July 31, 2023 19:29
Copy link
Contributor

@rphmeier rphmeier 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 as a quick fix

@mrcnski
Copy link
Contributor Author

mrcnski commented Aug 1, 2023

bot merge

@paritytech-processbot
Copy link

Error: Statuses failed for 36264cb

@mrcnski
Copy link
Contributor Author

mrcnski commented Aug 1, 2023

bot merge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants