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

client/network: Allow Kademlia queries to be prematurely finished #550

Open
mxinden opened this issue Sep 7, 2020 · 0 comments
Open

client/network: Allow Kademlia queries to be prematurely finished #550

mxinden opened this issue Sep 7, 2020 · 0 comments
Labels
D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task.

Comments

@mxinden
Copy link

mxinden commented Sep 7, 2020

While libp2p Kademlia allows queries to be finished early via Kademlia::query_mut, NetworkService does not surface this functionality.

With paritytech/substrate#7018 the authority discovery module resets the targeted authorities every 10 minutes, ignoring succeeding queries from previous iterations. Instead of ignoring the result of these queries, one should cancel the queries instead.

Possible solution

  1. Have NetworkService::get_value and NetworkService::put_value return a Future resolving to the QueryId.

  2. Add new method NetworkService::cancel_query accepting a QueryId.

Importance

Given that the authority discovery module restricts the amount of in-flight queries to a low maximum, the amount of ignored in-flight requests from previous iterations is likely negligible. Thus this feature is a nice to have.

@mxinden mxinden added I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. I8-footprint labels Sep 7, 2020
@altonen altonen transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. and removed I8-footprint labels Aug 25, 2023
helin6 pushed a commit to boolnetwork/polkadot-sdk that referenced this issue Feb 5, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 26, 2024
…h#550)

* Rialto -> Millau message relay && generator

* removed obsolete file

* changed uids

* fix datasource in alerts

* Update deployments/bridges/rialto-millau/dashboard/grafana/provisioning/dashboards/relay-millau-to-rialto-messages-dashboard.json

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update deployments/bridges/rialto-millau/dashboard/grafana/provisioning/dashboards/relay-rialto-to-millau-messages-dashboard.json

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task.
Projects
Status: Backlog 🗒
Development

No branches or pull requests

2 participants