Skip to content

apollo_propeller: add tree topology core logic#11057

Merged
sirandreww-starkware merged 2 commits intomain-v0.14.1-committerfrom
12-24-apollo_propeller_add_tree_topology_core_logic
Jan 18, 2026
Merged

apollo_propeller: add tree topology core logic#11057
sirandreww-starkware merged 2 commits intomain-v0.14.1-committerfrom
12-24-apollo_propeller_add_tree_topology_core_logic

Conversation

@sirandreww-starkware
Copy link
Contributor

No description provided.

Copy link
Contributor Author

sirandreww-starkware commented Dec 24, 2025

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

@reviewable-StarkWare
Copy link

This change is Reviewable

@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from 60f745c to 59d480b Compare January 12, 2026 14:23
Copy link
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 11 comments and resolved 4 discussions.
Reviewable status: 1 of 2 files reviewed, 8 unresolved discussions (waiting on @guy-starkware, @noamsp-starkware, and @ShahakShama).


crates/apollo_propeller/src/tree.rs line 23 at r1 (raw file):

Previously, ShahakShama wrote…

Rename Tree to Schedule or Router

Done.


crates/apollo_propeller/src/tree.rs line 25 at r1 (raw file):

Previously, ShahakShama wrote…

+1

Decided to go with a sorted vector for efficiency


crates/apollo_propeller/src/tree.rs line 25 at r1 (raw file):

Previously, ShahakShama wrote…

I thought this is a channel. Rename it to channel and consider adding a dedicated type / type alias

Done.


crates/apollo_propeller/src/tree.rs line 50 at r1 (raw file):

Previously, ShahakShama wrote…

Just because we wrote it on the board as f doesn't mean in the code it should be f as well. Rename to num_data_shards

Done.


crates/apollo_propeller/src/tree.rs line 53 at r1 (raw file):

Previously, ShahakShama wrote…

Why? I want propeller to work with 1 node as well

Added a TODO


crates/apollo_propeller/src/tree.rs line 69 at r1 (raw file):

Previously, ShahakShama wrote…

Add comment that we deduct the publisher

Done.


crates/apollo_propeller/src/tree.rs line 84 at r1 (raw file):

Previously, ShahakShama wrote…

cluster nodes?

Done.


crates/apollo_propeller/src/tree.rs line 86 at r1 (raw file):

Previously, ShahakShama wrote…

Rename to move_to_new_channel

I actually want to change this struct to be immutable after it is created. I want to do this because I want to tie this with the fact the same channel should not change the set inside of it once it is created. I moved this code to new. Please take another look


crates/apollo_propeller/src/tree.rs line 108 at r1 (raw file):

Previously, ShahakShama wrote…

+1

Done


crates/apollo_propeller/src/tree.rs line 162 at r1 (raw file):

Previously, guy-starkware wrote…

Seems superfluous.

Done


crates/apollo_propeller/src/tree.rs line 62 at r1 (raw file):

    }

    pub fn calculate_data_shards(&self) -> usize {

Done

@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from 59d480b to a5e50a1 Compare January 13, 2026 14:54
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_shard_validation_error_type branch from e1c75d6 to d0e51d1 Compare January 13, 2026 14:54
Copy link
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, and resolved 1 discussion.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @noamsp-starkware and @ShahakShama).

Copy link
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 1 file and all commit messages, made 7 comments, and resolved 6 discussions.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @noamsp-starkware and @sirandreww-starkware).


crates/apollo_propeller/src/tree.rs line 23 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

Done.

rename the file as well (or add a TODO)


crates/apollo_propeller/src/tree.rs line 25 at r2 (raw file):

pub struct PropellerScheduleManager {
    /// All nodes in the channel with their stake, sorted by (stake, peer_id) descending.
    channel_nodes: Vec<(PeerId, Stake)>,

I tend to think it's better to not store the Stake as long as we don't do anything with it


crates/apollo_propeller/src/tree.rs line 38 at r2 (raw file):

impl PropellerScheduleManager {
    /// Create a new propeller tree manager.

comment is outdated. I think it's unneccesary to begin with and can be deleted


crates/apollo_propeller/src/tree.rs line 60 at r2 (raw file):

        let total_nodes = nodes.len();
        // Ensure num_data_shards is at least 1 for small networks (N=2,3)
        // Standard formula: num_data_shards = floor((N-1)/3)

Add the comment here that you reduce N by 1 because you exclude the publisher


crates/apollo_propeller/src/tree_test.rs line 7 at r2 (raw file):

#[test]
fn test_create_empty_tree_manager() {

Rename tree across this file too


crates/apollo_propeller/src/tree_test.rs line 21 at r2 (raw file):

#[test]
fn test_update_nodes_and_f_calculation() {

rename f here
Also rename update_nodes


crates/apollo_propeller/src/tree_test.rs line 63 at r2 (raw file):

#[test]
fn test_update_nodes_missing_local_peer() {

rename update_nodes to new

@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_shard_validation_error_type branch from d0e51d1 to 76fe8e9 Compare January 14, 2026 09:16
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from a5e50a1 to 628be45 Compare January 14, 2026 09:16
Copy link
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 7 comments.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @noamsp-starkware and @ShahakShama).


crates/apollo_propeller/src/tree.rs line 23 at r1 (raw file):

Previously, ShahakShama wrote…

rename the file as well (or add a TODO)

Done.


crates/apollo_propeller/src/tree.rs line 25 at r2 (raw file):

Previously, ShahakShama wrote…

I tend to think it's better to not store the Stake as long as we don't do anything with it

I would rather change this implementation to the "build = 1/3 stake" than go backwards here. Would you allow that in this PR?


crates/apollo_propeller/src/tree.rs line 38 at r2 (raw file):

Previously, ShahakShama wrote…

comment is outdated. I think it's unneccesary to begin with and can be deleted

Done.


crates/apollo_propeller/src/tree.rs line 60 at r2 (raw file):

Previously, ShahakShama wrote…

Add the comment here that you reduce N by 1 because you exclude the publisher

Done.


crates/apollo_propeller/src/tree_test.rs line 7 at r2 (raw file):

Previously, ShahakShama wrote…

Rename tree across this file too

Done.


crates/apollo_propeller/src/tree_test.rs line 21 at r2 (raw file):

Previously, ShahakShama wrote…

rename f here
Also rename update_nodes

Done.


crates/apollo_propeller/src/tree_test.rs line 63 at r2 (raw file):

Previously, ShahakShama wrote…

rename update_nodes to new

Done.

@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_shard_validation_error_type branch from 76fe8e9 to c4ac8b9 Compare January 15, 2026 08:00
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from 628be45 to a076411 Compare January 15, 2026 08:00
Copy link
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 reviewed 4 files and all commit messages, made 1 comment, and resolved 7 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware).

@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from a076411 to 47c436e Compare January 15, 2026 09:26
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_shard_validation_error_type branch from c4ac8b9 to 430d3e9 Compare January 15, 2026 09:26
Copy link
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 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware).

@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_shard_validation_error_type branch from 430d3e9 to ad7c4c3 Compare January 15, 2026 17:52
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from 47c436e to af6baee Compare January 15, 2026 17:52
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_shard_validation_error_type branch from ad7c4c3 to ec7cad8 Compare January 18, 2026 09:26
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_tree_topology_core_logic branch from af6baee to 4b7f792 Compare January 18, 2026 09:26
@graphite-app graphite-app bot changed the base branch from 12-24-apollo_propeller_add_shard_validation_error_type to graphite-base/11057 January 18, 2026 09:26
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/11057 to 12-24-apollo_propeller_add_shard_validation_error_type January 18, 2026 09:27
@sirandreww-starkware sirandreww-starkware changed the base branch from 12-24-apollo_propeller_add_shard_validation_error_type to main-v0.14.1-committer January 18, 2026 12:15
Copy link
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 reviewed 4 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware).

@sirandreww-starkware sirandreww-starkware added this pull request to the merge queue Jan 18, 2026
Merged via the queue into main-v0.14.1-committer with commit 83fcd09 Jan 18, 2026
19 of 33 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 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

Comments