Skip to content

apollo_propeller: add core unit struct with accessors#11054

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

apollo_propeller: add core unit struct with accessors#11054
sirandreww-starkware merged 2 commits intomain-v0.14.1-committerfrom
12-24-apollo_propeller_add_core_unit_struct_with_accessors

Conversation

@sirandreww-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

sirandreww-starkware commented Dec 24, 2025

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

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


crates/apollo_propeller/src/unit.rs line 67 at r1 (raw file):

        self.root
    }
}

Do we really need all these getters? I haven't seen other structs get everything re-routed into getters in other places.

Code quote:

    pub fn channel(&self) -> Channel {
        self.channel
    }

    pub fn publisher(&self) -> PeerId {
        self.publisher
    }

    pub fn signature(&self) -> &[u8] {
        &self.signature
    }

    pub fn index(&self) -> ShardIndex {
        self.index
    }

    pub fn shard(&self) -> &[u8] {
        &self.shard
    }

    pub fn shard_mut(&mut self) -> &mut Vec<u8> {
        &mut self.shard
    }

    pub fn proof(&self) -> &MerkleProof {
        &self.proof
    }

    pub fn root(&self) -> MessageRoot {
        self.root
    }
}

crates/apollo_propeller/src/unit.rs line 70 at r1 (raw file):

#[cfg(test)]
mod tests {

You should move these to a different file, then you would have a file named unit_test which is apt

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 made 1 comment.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @noamsp-starkware, @ShahakShama, and @sirandreww-starkware).


crates/apollo_propeller/src/unit.rs line 70 at r1 (raw file):

Previously, guy-starkware wrote…

You should move these to a different file, then you would have a file named unit_test which is apt

Although the tests seems pretty trivial IMHO, I would be ok removing these altogether. But that's for your consideration.

@sirandreww-starkware sirandreww-starkware changed the base branch from 12-23-apollo_propeller_add_signature_verification_module to graphite-base/11054 January 4, 2026 17:57
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_core_unit_struct_with_accessors branch from b9190d4 to 194c67b Compare January 4, 2026 18:52
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 2 comments.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @guy-starkware, @noamsp-starkware, and @ShahakShama).


crates/apollo_propeller/src/unit.rs line 67 at r1 (raw file):

Previously, guy-starkware wrote…

Do we really need all these getters? I haven't seen other structs get everything re-routed into getters in other places.

These are used throughout the code to do validation and checking, I could have made these fields public but this way I control the mutability of the object very tightly. I added a TODO to consider making all fields public in the future.


crates/apollo_propeller/src/unit.rs line 70 at r1 (raw file):

Previously, guy-starkware wrote…

Although the tests seems pretty trivial IMHO, I would be ok removing these altogether. But that's for your consideration.

I removed the test

@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/11054 to 12-23-apollo_propeller_add_signature_verification_module January 4, 2026 18:52
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 2 files and all commit messages, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (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 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-23-apollo_propeller_add_signature_verification_module branch from e6dbf88 to d526a1d Compare January 12, 2026 14:23
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_core_unit_struct_with_accessors branch from 194c67b to 48fbc99 Compare January 12, 2026 14:23
@sirandreww-starkware sirandreww-starkware changed the base branch from 12-23-apollo_propeller_add_signature_verification_module to graphite-base/11054 January 13, 2026 11:14
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_core_unit_struct_with_accessors branch from 48fbc99 to f5eb4f8 Compare January 13, 2026 14:54
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/11054 to 12-23-apollo_propeller_add_signature_verification_module January 13, 2026 14:54
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_signature_verification_module branch from 270ea07 to 81bf74b Compare January 14, 2026 09:16
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_core_unit_struct_with_accessors branch 2 times, most recently from 1a26016 to 8078cb0 Compare January 15, 2026 09:26
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_signature_verification_module branch from 81bf74b to 2768240 Compare January 15, 2026 09:26
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_signature_verification_module branch from 2768240 to 5e29cdb Compare January 15, 2026 17:52
@sirandreww-starkware sirandreww-starkware force-pushed the 12-24-apollo_propeller_add_core_unit_struct_with_accessors branch from 8078cb0 to 8654325 Compare January 15, 2026 17:52
@sirandreww-starkware sirandreww-starkware changed the base branch from 12-23-apollo_propeller_add_signature_verification_module to main-v0.14.1-committer January 15, 2026 18:26
@github-actions
Copy link

Artifacts upload workflows:

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 6 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 2653db8 Jan 18, 2026
25 of 33 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 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