Configuration
Every Snowblossom program is configured by a single Java properties file (key=value, # comments) given as its only command-line argument. The same conventions apply everywhere; the per-program options are documented on the Node, Wallet, Mining and Explorer pages.
Format and environment overrides
Config files are read with duckutil.ConfigFile, a thin wrapper over java.util.Properties. Rules:
- One
key=valueper line; whitespace around=is tolerated; lines starting with#are comments. Lists are comma-separated (shards=3,4,node_uri=grpc://a,grpc+tls://b). - Booleans:
1,true,yes,y(case-insensitive) are true; anything else or an unset key is false. - Environment variables override the file. Every program constructs its config with the prefix
snowblossom_, so for any keyfoothe variablesnowblossom_foowins if it exists. A file may change the prefix withenv_override_prefix=…. This is how the Docker images are parameterised and a handy way to run several instances from one file:
export snowblossom_wallet_path=wallets/trading
export snowblossom_network=testnet
java -jar SnowBlossomClient_deploy.jar configs/client.conf balance
- A missing required key aborts with
Missing required key: <key>. - Paths are relative to the working directory, not to the config file.
Selecting the network
The network key picks the parameter set (see Networks & parameters). When it is missing, mainnet is assumed.
| network= | Network | Address prefix | Default port / TLS |
|---|---|---|---|
snowblossom or mainnet | Mainnet | snow: | 2338 / 2348 |
testnet or teapot | Public testnet (“teapot”) | snowtest: | 2339 / 2349 |
regtest or spoon | Regression test network, 1-second blocks | snowreg: | 2340 / 2350 |
testshard, demoshard, regshard | Small networks used to exercise sharding | snowtestshard:, snowdemoshard:, snowshardo: | 2361, 2371, 2341 |
Wallet files record their network and refuse to load under a different one; addresses carry a network-specific checksum, so a testnet address cannot be pasted into a mainnet send by accident.
Connecting to a node
Clients, miners, pools and the explorer find their node with one of these (mutually exclusive) settings:
| Key | Meaning |
|---|---|
node_uri | One or more URIs: grpc://host[:port] (plaintext) or grpc+tls://host[:port][?key=node:…] (TLS; with ?key= the node's identity is pinned). With several URIs, all are queried in parallel and the fastest to answer GetNodeStatus is used (MrPlow instead uses all of them). Preferred form since 1.5.2. |
node_host, node_port | Legacy plaintext form; node_port defaults to the network's default port. |
node_seed | If set, race the network's built-in TLS seed nodes. |
| (none) | Wallets fall back to the built-in seed nodes automatically. |
TLS requires a 64-bit JVM; on 32-bit JVMs the plaintext fallback seeds are used. See TLS and node identities.
Logging
Logging uses java.util.logging. Point log_config_file at a properties file such as the shipped configs/logging.properties:
handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler
.level=INFO
snowblossom.level=INFO
io.grpc.level=SEVERE
io.netty.level=SEVERE
java.util.logging.ConsoleHandler.level=INFO
java.util.logging.FileHandler.level=FINEST
java.util.logging.FileHandler.pattern = logs/snowblossom-%g-%u.log
java.util.logging.FileHandler.limit = 1000000
java.util.logging.FileHandler.count = 6
java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] %4$7s %2$s %5$s%6$s%n
The logs/ directory must exist or the file handler fails at start (“FAILED TO INITIALIZE LOGGING”). Without log_config_file the root level is FINE and gRPC/Netty are silenced. Loggers are named snowblossom.node, snowblossom.peering, snowblossom.userservice, snowblossom.blockchain, snowblossom.db, snowblossom.mempool, snowblossom.client, snowblossom.miner, snowblossom.tls; levels are re-applied to lazily created loggers every 2.5 s, so raising snowblossom.peering.level=FINE works at runtime start.
Example configuration files
The release zip and example/configs/ contain these; they are also the defaults baked into the Docker images.
node.conf
network=snowblossom
log_config_file=configs/logging.properties
db_type=rocksdb
db_path=node_db/mainnet
#addr_index=true
#tx_index=true
service_port=2338
tls_service_port=2348
tls_key_path=node_db/tls_mainnet
trustnet_key_path=node_db/trustnet
client.conf
network=snowblossom
log_config_file=configs/logging.properties
node_host=localhost
#node_port=
wallet_path=wallet
pool-miner.conf
network=snowblossom
log_config_file=configs/logging.properties
pool_host=
#pool_port= # default 23380
snow_path=snow
#auto_snow=true
mine_to_wallet=wallet
#mine_to_address=
#threads=8
#remark=
#memfield=true
pool.conf (MrPlow)
log_config_file=configs/logging.properties
node_uri=grpc://localhost,grpc+tls://snow-b.1209k.com
db_type=atomic_file
db_path=pool_db/mainnet
pool_fee=0.005
pool_address=
pay_the_duck=0.01
#remark=
#vote_yes=1,2,3
#vote_no=4
#report_path=report.txt
explorer.conf
node_uri=grpc://localhost:2338
log_config_file=configs/logging.properties
network=snowblossom
port=8080
JVM options
The Bazel targets for SnowBlossomNode and MrPlow pin -Xms4g -Xmx4g; ShackletonExplorer gets 1 GB. When you run a deploy jar yourself you set the heap: java -Xmx4g -jar …. Miners with memfield=true need a heap larger than the field. The Docker images read extra options from SNOWBLOSSOM_JAVA_OPTIONS and add -XX:OnOutOfMemoryError="kill -9 %p" so a container restarts instead of limping on.