feat: add support for signer-sidekick - #31
Open
rafa-stacks wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Signer Sidekick as an optional managed service with configuration, secrets, telemetry, lifecycle, and documentation support.
Changes:
- Adds Sidekick image/version, network, API, and secret configuration.
- Renders a hardened Sidekick container with profiles and persistent storage.
- Integrates Sidekick into upgrades, logging, ports, and chainstate wiping.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents Sidekick setup and operation. |
networks/mainnet.toml |
Adds the mainnet Hiro API URL. |
networks/testnet.toml |
Adds the testnet Hiro API URL. |
src/chainstate/mod.rs |
Adds Sidekick volume wiping. |
src/config/mod.rs |
Defines and validates Sidekick configuration. |
src/config/network.rs |
Adds indexed API URLs to network definitions. |
src/config/render.rs |
Renders Sidekick configuration and Compose service. |
src/logs/export.rs |
Redacts Sidekick secrets. |
src/upgrade.rs |
Includes Sidekick in upgrade checks. |
src/utils/secrets.rs |
Loads, validates, and generates Sidekick secrets. |
src/utils/services.rs |
Adds Sidekick image, ports, and service registration. |
src/utils/versions.rs |
Supports v-prefixed versions. |
Suppressed comments (2)
src/chainstate/mod.rs:342
- A full wipe still returns early on the existing
!chainstate.exists()path. A supported Sidekick deployment using an external node can have only the named volume and nochainstate/directory, sochainstate wipereports nothing to wipe and leaves the Sidekick database intact. Route this case through the named-volume wipe.
pub fn wipe(data_dir: &Path, service: Option<&str>, yes: bool) -> Result<()> {
if service == Some("signer-sidekick") {
return wipe_sidekick_volume(data_dir, yes);
}
src/chainstate/mod.rs:437
- The full-wipe path silently succeeds when
docker volume rmfails (for example, because another container still references the volume). The command has promised to delete this database, so propagate non-no such volumefailures as the service-specific path does rather than returning success with data left behind.
if out.status.success() {
println!("Deleted volume {volume}");
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/config/mod.rs:234
- The contract-name check does not match Stacks contract-name syntax: valid names may contain uppercase letters and
_, while names must begin with a letter. As written, a valid principal such asSP….Signer_Manageris rejected, but invalid names such as.1manageror.-managerpass and fail later in Sidekick. Validate the actual contract-name grammar here.
&& !name.is_empty()
&& name.len() <= 40
&& name
.chars()
.all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-')
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.
Adds signer-sidekick — the PoX-5 operations dashboard for signer and pool operators — as an optional service (PR 1 of the integration plan; supersedes #5, #7, #8 of the #4 feature set, with #6
signer grantstill to come).Requires a node. A signer in the deployment is recommended, not required. Sidekick can monitor any deployed, compatible manager read-only; without a signer the dashboard works and validation warns that the Signer Health page will lack direct telemetry.