Skip to content

feat: add support for signer-sidekick - #31

Open
rafa-stacks wants to merge 4 commits into
nextfrom
signer-sidekick
Open

feat: add support for signer-sidekick#31
rafa-stacks wants to merge 4 commits into
nextfrom
signer-sidekick

Conversation

@rafa-stacks

@rafa-stacks rafa-stacks commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

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 grant still to come).

[signer-sidekick]
mode = "enabled"
manager_principal = "SP....signer-manager"   # your deployed PoX-5 signer-manager (required)
# engine_mode = "observe"                    # or "operator-run" (deliberate opt-in)

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 no chainstate/ directory, so chainstate wipe reports 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 rm fails (for example, because another container still references the volume). The command has promised to delete this database, so propagate non-no such volume failures 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.

Comment thread src/config/mod.rs
Comment thread src/config/mod.rs
Comment thread src/chainstate/mod.rs Outdated
Comment thread README.md Outdated
Comment thread src/config/mod.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 as SP….Signer_Manager is rejected, but invalid names such as .1manager or .-manager pass 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 == '-')

Comment thread src/config/render.rs Outdated
Comment thread src/upgrade.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants