Skip to content

Commit 94dd822

Browse files
committed
Adds a stored config and skips the network arg in tracing instrument
1 parent 72d7ab1 commit 94dd822

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

zebrad/src/components/miner.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ where
209209
}
210210

211211
/// Generates block templates using `rpc`, and sends them to mining threads using `template_sender`.
212-
#[instrument(skip(rpc, template_sender))]
212+
#[instrument(skip(rpc, template_sender, network))]
213213
pub async fn generate_block_templates<
214214
Mempool,
215215
State,
@@ -266,8 +266,9 @@ where
266266

267267
// Wait for the chain to sync so we get a valid template.
268268
let Ok(template) = template else {
269-
info!(
269+
warn!(
270270
?BLOCK_TEMPLATE_WAIT_TIME,
271+
?template,
271272
"waiting for a valid block template",
272273
);
273274

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Default configuration for zebrad.
2+
#
3+
# This file can be used as a skeleton for custom configs.
4+
#
5+
# Unspecified fields use default values. Optional fields are Some(field) if the
6+
# field is present and None if it is absent.
7+
#
8+
# This file is generated as an example using zebrad's current defaults.
9+
# You should set only the config options you want to keep, and delete the rest.
10+
# Only a subset of fields are present in the skeleton, since optional values
11+
# whose default is None are omitted.
12+
#
13+
# The config format (including a complete list of sections and fields) is
14+
# documented here:
15+
# https://docs.rs/zebrad/latest/zebrad/config/struct.ZebradConfig.html
16+
#
17+
# zebrad attempts to load configs in the following order:
18+
#
19+
# 1. The -c flag on the command line, e.g., `zebrad -c myconfig.toml start`;
20+
# 2. The file `zebrad.toml` in the users's preference directory (platform-dependent);
21+
# 3. The default config.
22+
#
23+
# The user's preference directory and the default path to the `zebrad` config are platform dependent,
24+
# based on `dirs::preference_dir`, see https://docs.rs/dirs/latest/dirs/fn.preference_dir.html :
25+
#
26+
# | Platform | Value | Example |
27+
# | -------- | ------------------------------------- | ---------------------------------------------- |
28+
# | Linux | `$XDG_CONFIG_HOME` or `$HOME/.config` | `/home/alice/.config/zebrad.toml` |
29+
# | macOS | `$HOME/Library/Preferences` | `/Users/Alice/Library/Preferences/zebrad.toml` |
30+
# | Windows | `{FOLDERID_RoamingAppData}` | `C:\Users\Alice\AppData\Local\zebrad.toml` |
31+
32+
[consensus]
33+
checkpoint_sync = true
34+
35+
[mempool]
36+
eviction_memory_time = "1h"
37+
tx_cost_limit = 80000000
38+
debug_enable_at_height = 0
39+
40+
[metrics]
41+
42+
[mining]
43+
miner_address = 't27eWDgjFYJGVXmzrXeVjnb5J3uXDM9xH9v'
44+
internal_miner = true
45+
46+
[network]
47+
cache_dir = true
48+
crawl_new_peer_interval = "1m 1s"
49+
initial_mainnet_peers = [
50+
"dnsseed.z.cash:8233",
51+
"dnsseed.str4d.xyz:8233",
52+
"mainnet.seeder.zfnd.org:8233",
53+
"mainnet.is.yolo.money:8233",
54+
]
55+
initial_testnet_peers = [
56+
"dnsseed.testnet.z.cash:18233",
57+
"testnet.seeder.zfnd.org:18233",
58+
"testnet.is.yolo.money:18233",
59+
]
60+
listen_addr = "0.0.0.0:8233"
61+
max_connections_per_ip = 1
62+
network = "Testnet"
63+
peerset_initial_target_size = 25
64+
65+
[rpc]
66+
debug_force_finished_sync = false
67+
parallel_cpu_threads = 0
68+
69+
[state]
70+
cache_dir = "cache_dir"
71+
delete_old_database = true
72+
ephemeral = false
73+
74+
[sync]
75+
checkpoint_verify_concurrency_limit = 1000
76+
download_concurrency_limit = 50
77+
full_verify_concurrency_limit = 20
78+
parallel_cpu_threads = 0
79+
80+
[tracing]
81+
buffer_limit = 128000
82+
force_use_color = false
83+
use_color = true
84+
use_journald = false

0 commit comments

Comments
 (0)