refactor: extract provider-types crate for shared provider identity types - #402
Open
danielbui12 wants to merge 3 commits into
Open
refactor: extract provider-types crate for shared provider identity types#402danielbui12 wants to merge 3 commits into
danielbui12 wants to merge 3 commits into
Conversation
- Add crates/providers/types (provider-types), Apache-2.0 - Move KeyScheme and ProviderKeypair out of provider-node's crate root - Gate KeyScheme's clap::ValueEnum derive behind an optional clap feature - Move ProviderInfo out of provider-coordinator into provider-types - Rewire provider-coordinator and its chain_state_integration test onto provider-types - Drop provider-coordinator's now-unused serde dependency
- Import KeyScheme and ProviderKeypair from provider-types directly in cli.rs and replica_sync_coordinator.rs, instead of through a crate-root re-export - Import ProviderInfo from provider-types in negotiate.rs, types.rs, and lib.rs's signing-key guard - Retarget provider-node's integration tests and the storage-client register_provider example onto provider-types - Add provider-types to the coverage script's measured package list
bkontur
reviewed
Sep 10, 2026
| /// Replica sync price (None if not accepting replicas). | ||
| pub replica_sync_price: Option<u128>, | ||
| /// Whether accepting extensions. | ||
| pub accepting_extensions: bool, |
Collaborator
There was a problem hiding this comment.
@danielbui12 can we do those stats refactor here?
bkontur
reviewed
Sep 10, 2026
bkontur
reviewed
Sep 10, 2026
| @@ -0,0 +1,45 @@ | |||
| // SPDX-License-Identifier: Apache-2.0 | |||
Collaborator
There was a problem hiding this comment.
not sure if registration.rs is the best, maybe just provider.rs or put directly to the lib.rs?
bkontur
reviewed
Sep 10, 2026
| @@ -401,113 +329,14 @@ mod tests { | |||
| /// `sr25519::Signature`, asserting the variant tag. | |||
| fn sig_from_hex(sig_hex: &str) -> sr25519::Signature { | |||
Collaborator
There was a problem hiding this comment.
@danielbui12 don't we already have some helper for this somewhere?
bkontur
reviewed
Sep 10, 2026
| } | ||
|
|
||
| /// Derive a keypair from a SURI like `//Alice`. | ||
| fn keypair_for(seed: &str) -> sr25519::Pair { |
Collaborator
There was a problem hiding this comment.
most places we are using sr25519::Pair::from_string and keypair_for is just used 3x, I would probably remove keypair_for and align all the usage across
bkontur
approved these changes
Sep 10, 2026
bkontur
left a comment
Collaborator
There was a problem hiding this comment.
lgtm, left just some ultranits (that can be omitted or follow-uped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primary changes
KeySchemeandProviderKeypairout of provider-node's crate root into provider-types, gating theclap::ValueEnumderive behind an optional clap featureProviderInfoout of provider-coordinator into provider-typesIssues