| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A simple version synchronization manager for DoubleZero, keeping your installed version in sync with the recommended version for your cluster (testnet/mainnet-beta).
A validator client counterpart exists at solana-validator-version-sync
git clone https://github.com/sol-strategies/doublezero-version-sync.git
cd doublezero-version-sync
make buildDownload the latest release from the Releases page.
doublezero-version-sync --config config.yaml run# can run this command as a systemd service
doublezero-version-sync --config config.yaml run --on-interval 1hCreate a configuration file (e.g., config.yml) with the following options (see config.yml for a working example):
log:
level: info # optional, default: info, one of debug|info|warn|error|fatal
format: text # optional, default: text, one of text|logfmt|json
validator:
enabled_when_active: false # optional, default: false - sync only when validator is passive
rpc_url: http://localhost:8899 # optional; omit to disable validator role checks
# Preferred: resolve the active validator identity from this vote account via getVoteAccounts.
# Both current and delinquent vote accounts are considered.
vote_account_pubkey: <VOTE_ACCOUNT_PUBKEY>
# Optional explicit passive identity. Public keys avoid reading private key material.
# identities:
# passive_pubkey: <PASSIVE_IDENTITY_PUBKEY>
cluster:
name: mainnet-beta # one of mainnet-beta|testnet
doublezero:
version_constraint: ">= 0.6.9, < 0.7.2" # required - example version constraint
bin: /path/to/bin/doublezero # optional, default: doublezero
sync:
# Commands to run when there is a version change. They will run in the order they are declared.
# cmd, args, and environment values can be template strings and will be interpolated with the following variables:
# .ClusterName cluster the DoubleZero instance is running on (testnet/mainnet-beta)
# .CommandIndex index of the command in the commands array (zero-based)
# .CommandsCount count of commands in the commands array
# .VersionFrom current installed version
# .VersionTo sync target version (semver format, e.g., "0.7.1")
# .PackageVersionTo package version string for installation (e.g., "0.7.1-1" for Debian/Ubuntu)
commands:
- name: "install-doublezero" # required - vanity name for logging purposes
allow_failure: false # optional, default:false - when true, errors are logged and subsequent commands executed
stream_output: true # optional, default: false - when true, command output streamed
disabled: false # optional, default: false - when true, command skipped
cmd: /usr/bin/apt-get # required, supports templated string
args: ["install", "-y", "doublezero={{ .PackageVersionTo }}"] # optional, supports templated strings
environment: # optional, environment variables to pass to cmd, values support templated strings
DEBIAN_FRONTEND: noninteractive
# ...When validator.rpc_url is configured, exactly one active identity source must be configured:
The passive identity is optional. Configure at most one of validator.identities.passive_pubkey or the legacy validator.identities.passive keypair path. In vote-account mode, a local non-active identity without any vote account is considered passive. A local identity voting for another account is unknown and syncing is refused. In static active-key mode without an explicit passive identity, any non-active identity is considered passive. When an explicit passive identity is configured, any identity matching neither active nor passive is unknown.
A static, file-free configuration is also supported:
validator:
enabled_when_active: false
rpc_url: http://localhost:8899
identities:
active_pubkey: <ACTIVE_IDENTITY_PUBKEY>
passive_pubkey: <PASSIVE_IDENTITY_PUBKEY>Legacy active and passive keypair paths remain supported for compatibility. The application warns at startup when either is configured and recommends the equivalent public-key or vote-account configuration.
# Build and run locally
make build
make dev
# Build for all platforms
make build-all
# Run tests
make test
# Clean build artifacts
make cleanThis project is licensed under the MIT License - see the LICENSE file for details.
| Back | FazBrowse Home | New Git URL |