Skip to content

apollo_network: wire DiallingBehaviour into Discovery with RequestDial event#13217

Merged
sirandreww-starkware merged 1 commit intomainfrom
03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event
Mar 17, 2026
Merged

apollo_network: wire DiallingBehaviour into Discovery with RequestDial event#13217
sirandreww-starkware merged 1 commit intomainfrom
03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

@sirandreww-starkware sirandreww-starkware commented Mar 12, 2026

Note

Medium Risk
Adds a new dialing sub-behaviour to discovery and introduces a new cross-behaviour RequestDial event, which can affect peer connection flow and retry behaviour. Risk is moderate because it changes swarm behaviour composition and event routing but is scoped to discovery/dial logic.

Overview
Discovery now includes an explicit peer-dialing behaviour with retry support, and routes dial requests through the discovery event bridge.

This renames the dialling behaviour/module to dialing, exports DialingBehaviour, adds ToOtherBehaviourEvent::RequestDial, and updates Behaviour::new and on_other_behaviour_event to instantiate the dialer and invoke dialing.request_dial when the new event is received.

Written by Cursor Bugbot for commit 8120ff7. This will update automatically on new commits. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

sirandreww-starkware commented Mar 12, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread crates/apollo_network/src/discovery/mod.rs Outdated
Copy link
Copy Markdown
Contributor

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

@guy-starkware reviewed 3 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ShahakShama and sirandreww-starkware).

@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_propagate_multiaddresses_from_kad_query_results branch from f63f46d to 7dc0560 Compare March 12, 2026 14:38
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 13aac61 to 25d474d Compare March 12, 2026 14:38
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_propagate_multiaddresses_from_kad_query_results branch from 7dc0560 to e1e0d81 Compare March 12, 2026 15:29
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 25d474d to 3ce8c4d Compare March 12, 2026 15:29
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_propagate_multiaddresses_from_kad_query_results branch from e1e0d81 to d2ba146 Compare March 15, 2026 07:30
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 3ce8c4d to af4bcfb Compare March 15, 2026 07:30
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from af4bcfb to 2ec06fb Compare March 15, 2026 09:54
Copy link
Copy Markdown
Contributor Author

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

@sirandreww-starkware made 1 comment.
Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on guy-starkware and ShahakShama).

Comment thread crates/apollo_network/src/discovery/mod.rs Outdated
Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

@ShahakShama reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on guy-starkware and sirandreww-starkware).


a discussion (no related file):
Throughout the enitre PR: Dialling -> Dialing
We use American English (As long as libp2p allows us 😅 )


crates/apollo_network/src/discovery/mod.rs line 100 at r2 (raw file):

    /// Manages ongoing Kademlia queries for peer discovery.
    kad_requesting: KadRequestingBehaviour,
    /// Manages dialling to peers with exponential backoff.

I wouldn't state the exponential backoff here. How about // Manages dialing to peers with retries

@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_propagate_multiaddresses_from_kad_query_results branch from d2ba146 to d47f3ac Compare March 16, 2026 07:51
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 2ec06fb to 734c3f6 Compare March 16, 2026 07:51
Copy link
Copy Markdown
Contributor Author

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

@sirandreww-starkware made 2 comments.
Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on guy-starkware and ShahakShama).


a discussion (no related file):

Previously, ShahakShama wrote…

Throughout the enitre PR: Dialling -> Dialing
We use American English (As long as libp2p allows us 😅 )

Done


crates/apollo_network/src/discovery/mod.rs line 100 at r2 (raw file):

Previously, ShahakShama wrote…

I wouldn't state the exponential backoff here. How about // Manages dialing to peers with retries

Done.

Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama partially reviewed 5 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on guy-starkware).

@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 734c3f6 to 01d86d9 Compare March 16, 2026 12:26
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_propagate_multiaddresses_from_kad_query_results branch from d47f3ac to 13382ca Compare March 16, 2026 12:26
@graphite-app graphite-app bot changed the base branch from 03-11-apollo_network_propagate_multiaddresses_from_kad_query_results to main March 16, 2026 13:32
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 01d86d9 to 7f887ac Compare March 16, 2026 13:34
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Mar 16, 2026

Merge activity

  • Mar 16, 1:34 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 7f887ac to 2492cef Compare March 16, 2026 13:57
@sirandreww-starkware sirandreww-starkware force-pushed the 03-11-apollo_network_wire_diallingbehaviour_into_discovery_with_requestdial_event branch from 2492cef to 8120ff7 Compare March 16, 2026 15:13
@sirandreww-starkware sirandreww-starkware added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit f833912 Mar 17, 2026
46 of 63 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants