Skip to main content

Module upgrade

Module upgrade 

Source
Expand description

Auto-upgrade system with ML-DSA signature verification.

This module handles:

  • Polling GitHub releases for new versions
  • Verifying ML-DSA-65 signatures on binaries
  • Replacing the running binary with rollback support
  • Staged rollout to prevent mass network restarts
  • Auto-apply: download, extract, verify, replace, restart

Structs§

Asset
GitHub release asset (attached file).
AutoApplyUpgrader
Auto-apply upgrader with archive support.
BinaryCache
On-disk cache for downloaded upgrade binaries.
GitHubRelease
GitHub release API response.
ReleaseCache
On-disk cache for GitHub release metadata.
StagedRollout
Staged rollout configuration and delay calculation.
UpgradeInfo
Information about an available upgrade.
UpgradeMonitor
Monitors GitHub releases for new versions.
Upgrader
Upgrade orchestrator with rollback support.

Enums§

UpgradeResult
Result of an upgrade operation.

Constants§

PUBLIC_KEY_SIZE
ML-DSA-65 public key size in bytes.
RESTART_EXIT_CODE
Exit code that signals the service manager to restart the process.
SIGNATURE_SIZE
ML-DSA-65 signature size in bytes.
SIGNING_CONTEXT
Signing context for domain separation (prevents cross-protocol attacks).

Functions§

find_platform_asset
Find the appropriate binary asset for the current platform.
perform_upgrade
Legacy function for backward compatibility.
upgrade_cache_dir
Return the shared upgrade cache directory, creating it on demand.
verify_binary_signature
Verify the ML-DSA signature on a binary file using the embedded release key.
verify_binary_signature_with_key
Verify signature with an explicit public key.
verify_from_file
Verify a signature from a detached .sig file.
verify_from_file_with_key
Verify from file with explicit key.
version_from_tag
Parse version from git tag.