Configuration Options
This page provides a complete reference of all configuration options available in the Starknet Staking v2 validator.
In addition to the core configuration described in the Setup page, the tool allows for other non-essential customization. You can see all available options by using the --help flag:
# Standalone binary
./build/validator --help
Complete Options Reference
Flags take priority over environment variables, which take priority over the config file. The Config File column is the key path in the JSON file: reward.claimMaxFee is {"reward": {"claimMaxFee": ...}}. An option with - in both columns can only be set as a flag.
| Option | Environment Variable | Config File | Default |
|---|---|---|---|
--config, -c | - | - | - |
Path to JSON config file | |||
--provider-http | PROVIDER_HTTP_URL | provider.http | - |
Provider http address | |||
--provider-ws | PROVIDER_WS_URL | provider.ws | - |
Provider ws address | |||
--signer-url | SIGNER_EXTERNAL_URL | signer.url | - |
Signer url address, required if using an external signer. Exclusive with --signer-priv-key | |||
--signer-priv-key | SIGNER_PRIVATE_KEY | signer.privateKey | - |
Signer private key, required if using internal signing. Exclusive with --signer-url | |||
--signer-op-address | SIGNER_OPERATIONAL_ADDRESS | signer.operationalAddress | - |
Signer operational address, required for attesting | |||
--reward-address | REWARD_ADDRESS | reward.address | - |
(Optional) Reward account address. Required for the auto-claim reward feature. | |||
--reward-claim-max-fee | REWARD_CLAIM_MAX_FEE | reward.claimMaxFee | Unlimited |
(Optional) Max fee, in FRI, to pay for the claim transaction. Defaults to 'unlimited' if not specified (max uint64, which is ~18.4 STRK) | |||
--reward-claim-threshold | REWARD_CLAIM_THRESHOLD | reward.claimThreshold | - |
(Optional) Amount of unclaimed rewards, in STRK, that triggers an automatic claim. Required for the auto-claim reward feature. | |||
--reward-priv-key | REWARD_PRIVATE_KEY | reward.privateKey | - |
(Optional) Reward account private key, used for internal signing of the reward account. Required for the auto-claim reward feature. Can be replaced by the 'reward-signer-url' flag. | |||
--reward-signer-url | REWARD_EXTERNAL_URL | reward.url | - |
(Optional) Reward signer url address, used for external signing of the reward account. Required for the auto-claim reward feature. Can be replaced by the 'reward-priv-key' flag. | |||
--attest-contract-address | - | - | auto |
Attestation contract address. Default values are provided for Sepolia and Mainnet | |||
--staking-contract-address | - | - | auto |
Staking contract address. Default values are provided for Sepolia and Mainnet | |||
--metrics | - | - | false |
Enable metric tracking via Prometheus | |||
--metrics-host | - | - | localhost |
Host for the metric server. An empty value listens on all interfaces | |||
--metrics-port | - | - | 9090 |
Port for the metric server | |||
--max-retries | - | - | infinite |
How many times to retry to get information required for attestation. It can be either a positive integer or the key word 'infinite' | |||
--balance-threshold | - | - | 100 |
Triggers a warning if it detects the signer account (i.e. operational address) stark balance below the specified threshold. If the auto-claim reward feature is configured, the reward account balance is checked as well. The threshold is in STRK (1 STRK = 1e18 FRI). | |||
--log-level | - | - | info |
Options: trace, debug, info, warn, error. | |||
Additional Configuration Details
-
Contract Addresses:
--staking-contract-addressand--attest-contract-addressset the staking and attestation contract addresses. On Mainnet and Sepolia they default to the official contracts. On any other network both are required. -
Max Retries:
--max-retriessets how many times the tool retries getting the information it needs to attest. It can be any positive integer or "infinite", the default, so the tool never stops retrying. -
Balance Threshold:
--balance-thresholdrepresents the balance amount you want your signer account to be above of. If the auto-claim reward feature is configured, the same threshold also applies to the reward account. Checks are performed after every attestation window ends and if a balance is below the specified amount a warning is emitted. Defaults to 100 STRK. -
Log Level:
--log-levelsets the tool logging level. Defaults toinfo. -
Auto-Claim Rewards: the
--reward-*options configure the optional automatic claiming of the staking rewards. If any of them is set,--reward-address,--reward-claim-thresholdand exactly one of--reward-priv-keyor--reward-signer-urlare required. See Auto-Claim Rewards for the details.