Skip to content

apollo_propeller: add ShardSignatureVerificationError#11049

Merged
sirandreww-starkware merged 1 commit intomain-v0.14.1-committerfrom
12-23-apollo_propeller_add_shardsignatureverificationerror
Jan 15, 2026
Merged

apollo_propeller: add ShardSignatureVerificationError#11049
sirandreww-starkware merged 1 commit intomain-v0.14.1-committerfrom
12-23-apollo_propeller_add_shardsignatureverificationerror

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

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


crates/apollo_propeller/src/types.rs line 70 at r2 (raw file):

        }
    }
}

I think the way we usually do it is implement Error and then add annotations above each variant.

Code quote:

impl std::fmt::Display for ShardSignatureVerificationError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            ShardSignatureVerificationError::NoPublicKeyAvailable(publisher) => {
                write!(f, "No public key available for signer {}", publisher)
            }
            ShardSignatureVerificationError::EmptySignature => {
                write!(f, "Shard has empty signature")
            }
            ShardSignatureVerificationError::VerificationFailed => {
                write!(f, "Shard signature is invalid")
            }
        }
    }
}

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: all files reviewed, 1 unresolved discussion (waiting on @noamsp-starkware, @ShahakShama, and @sirandreww-starkware).


crates/apollo_propeller/src/types.rs line 70 at r2 (raw file):

Previously, guy-starkware wrote…

I think the way we usually do it is implement Error and then add annotations above each variant.

I mean thiserror

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


crates/apollo_propeller/src/types.rs line 70 at r2 (raw file):

Previously, guy-starkware wrote…

I mean thiserror

+1


crates/apollo_propeller/src/types.rs line 46 at r2 (raw file):

}

// ****************************************************************************

Remove this


crates/apollo_propeller/src/types.rs line 51 at r2 (raw file):

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ShardSignatureVerificationError {
    NoPublicKeyAvailable(PeerId),

It's unclear whose peer id is this. Make this a named fields variant

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


a discussion (no related file):
It's hard for me to review these errors without seeing them used. I think that you should start with no variants and add each variant in the PR where you use it for the first time

@sirandreww-starkware sirandreww-starkware changed the base branch from 12-23-apollo_propeller_add_base_types_channel_shardindex_messageroot_ to graphite-base/11049 January 4, 2026 16:43
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_shardsignatureverificationerror branch from 5540d79 to f8c70d8 Compare January 4, 2026 17:07
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 4 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @guy-starkware, @noamsp-starkware, and @ShahakShama).


a discussion (no related file):

Previously, ShahakShama wrote…

It's hard for me to review these errors without seeing them used. I think that you should start with no variants and add each variant in the PR where you use it for the first time

I tried building PRs this way and it was really hard to keep them small. Also at this point this requires a huge change in the PR order/structure. If you give me enough time we can do this but we definitely will not hit our February deadline.


crates/apollo_propeller/src/types.rs line 46 at r2 (raw file):

Previously, ShahakShama wrote…

Remove this

please review response in last PR


crates/apollo_propeller/src/types.rs line 51 at r2 (raw file):

Previously, ShahakShama wrote…

It's unclear whose peer id is this. Make this a named fields variant

I think it is very clear that this error is saying "I do not know the public key of this PeerID"


crates/apollo_propeller/src/types.rs line 70 at r2 (raw file):

Previously, ShahakShama wrote…

+1

I'll add a TODO to do this after this file contains all the error types instead of updating all the PRs that add errors

@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/11049 to 12-23-apollo_propeller_add_base_types_channel_shardindex_messageroot_ January 4, 2026 17:07
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, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noamsp-starkware and @ShahakShama).


crates/apollo_propeller/src/types.rs line 51 at r2 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

I think it is very clear that this error is saying "I do not know the public key of this PeerID"

I think this is the sort of thing you can get "thiserror" to make explicit. When you reach that TODO above and add thiserror, make sure to spell out the errors so the poor debuggers looking at our logs will have an easy time.

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


crates/apollo_propeller/src/types.rs line 46 at r2 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

please review response in last PR

I still think we should remove this


crates/apollo_propeller/src/types.rs line 51 at r2 (raw file):

Previously, guy-starkware wrote…

I think this is the sort of thing you can get "thiserror" to make explicit. When you reach that TODO above and add thiserror, make sure to spell out the errors so the poor debuggers looking at our logs will have an easy time.

Fair point @guy-starkware

@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_base_types_channel_shardindex_messageroot_ branch from 2193ed5 to 7a08a3c Compare January 12, 2026 14:23
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_shardsignatureverificationerror branch from f8c70d8 to 78e61e7 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 2 comments.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @guy-starkware, @noamsp-starkware, and @ShahakShama).


crates/apollo_propeller/src/types.rs line 46 at r2 (raw file):

Previously, ShahakShama wrote…

I still think we should remove this

Done.


crates/apollo_propeller/src/types.rs line 51 at r2 (raw file):

Previously, ShahakShama wrote…

Fair point @guy-starkware

Done
I decided to bite the bullet and do it now that I have your attention

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 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware).

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


crates/apollo_propeller/src/types.rs line 24 at r4 (raw file):

needs to be provided explicitly
Is that an option? If not, erase that part of the sentence

@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_base_types_channel_shardindex_messageroot_ branch from 7a08a3c to 8bed384 Compare January 13, 2026 10:54
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_shardsignatureverificationerror branch from 78e61e7 to 6a3e6f6 Compare January 13, 2026 10:54
@graphite-app graphite-app bot changed the base branch from 12-23-apollo_propeller_add_base_types_channel_shardindex_messageroot_ to graphite-base/11049 January 13, 2026 15:06
@sirandreww-starkware sirandreww-starkware force-pushed the 12-23-apollo_propeller_add_shardsignatureverificationerror branch from 6a3e6f6 to 1523328 Compare January 14, 2026 08:05
@graphite-app graphite-app bot changed the base branch from graphite-base/11049 to main-v0.14.1-committer January 14, 2026 08:05
@graphite-app
Copy link

graphite-app bot commented Jan 14, 2026

Merge activity

  • Jan 14, 8:05 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

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 3 files and all commit messages, and resolved 1 discussion.
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 15, 2026
Merged via the queue into main-v0.14.1-committer with commit d6128a3 Jan 15, 2026
67 of 128 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 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