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

Custom spawn_tasks #2973

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Custom spawn_tasks #2973

merged 3 commits into from
Aug 15, 2024

Conversation

nazar-pc
Copy link
Member

Finally we can do this.

Still can't remove sp-session dependency due to RPC layer requiring it (alongside with keystore which consensus chain doesn't have), I'm still thinking what to do about it without copy-pasting a bunch of non-trivial boilerplate.

Code contributor checklist:

@nazar-pc nazar-pc changed the title Custom spawn tasks Custom spawn_tasks Aug 14, 2024
Copy link
Member

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

Do you mind adding context?

@nazar-pc
Copy link
Member Author

Context is basically in the second commit, PR description and partly in paritytech/polkadot-sdk#5364 mentioned in TODO

We don't need Substrate's prometheus server, we don't want its RPC server in some cases and we also don't want sp-session, though RPC is tightly coupled with it right now unfortunately. Once paritytech/polkadot-sdk#5364 is in our fork we'll no longer need to convert our full configuration data structure into Substrate's Configuration, which will make code simpler and more straightforward.

Copy link
Member

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

A small refactoring request - otherwise looks OK.

@@ -31,6 +31,7 @@ pub mod dsn;
mod metrics;
pub(crate) mod mmr;
pub mod rpc;
mod spawn_tasks;
Copy link
Member

Choose a reason for hiding this comment

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

Consider changing to task_spawner: spawn_tasks::spawn_tasks looks awkward.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed, though it is really a bad name in Substrate, I wouldn't call that function spawn_tasks in the first place.

@nazar-pc
Copy link
Member Author

One more thing: this finally allows us to customize informer, which we'll extend to show Subspace networking stats in addition to Substrate networking as well as various DSN sync stages, etc.

@nazar-pc nazar-pc added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit 72575a0 Aug 15, 2024
9 checks passed
@nazar-pc nazar-pc deleted the custom-spawn_tasks branch August 15, 2024 12:26
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