forked from keroro520/ansible-ckb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
197 lines (159 loc) · 6.69 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
ckb_download_url: https://github.com/nervosnetwork/ckb/releases/download/v0.101.1/ckb_v0.101.1_x86_64-unknown-linux-gnu.tar.gz
# ckb_local_source: ""
ckb_database_url: ""
ckb_workspace: /var/lib/ckb
ckb_download_tmp_dir: /tmp
### ckb data, Some ckb old data
# ckb_data_local_source : ""
# ckb_data_download_url : ""
# CKB node systemd service name
ckb_service: ckb
### Node generates random network secret key by default.
ckb_network_secret_key: ""
############################################################
###################### ckb.toml ######################
############################################################
ckb_data_dir: /var/lib/ckb/data
## ckb_chain_spec_bundled and ckb_chain_spec_file are mutex
#
## Choose the kind of chains to run, possible values:
## - "specs/testnet.toml"
## - "specs/mainnet.toml"
ckb_chain_spec_bundled: specs/mainnet.toml
# ckb_chain_spec_file: <local spec file path>
## ckb_logger
ckb_logger_filter: info
ckb_logger_color: "true"
ckb_logger_log_to_file: "true"
ckb_logger_log_to_stdout: "true"
## ckb_sentry
# set to blank to disable sentry error collection
ckb_sentry_dsn: ''
# if you are willing to help us to improve,
# please leave a way to contact you when we have troubles to reproduce the errors.
ckb_sentry_org_contact: ''
# The capacity of RocksDB cache, which caches uncompressed data blocks, indexes and filters, default is 128MB.
# Rocksdb will automatically create and use an 8MB internal cache if you set this value to 0.
# To turning off cache, you need to set this value to 0 and set `no_block_cache = true` in the options_file,
# however, we strongly discourage this setting, it may lead to severe performance degradation.
ckb_db_cache_size: 134217728
# Provide an options file to tune RocksDB for your workload and your system configuration.
# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide).
ckb_db_options_file: default.db-options
ckb_network_listen_addresses:
- /ip4/0.0.0.0/tcp/8115
# Specify the public and routable network addresses
ckb_network_public_addresses: []
# Node connects to nodes listed here to discovery other peers when there's no local stored peers.
# When chain.spec is changed, this usually should also be changed to the bootnodes in the new chain.
ckb_network_bootnodes: []
# Whitelist-only mode
ckb_network_whitelist_only: "false"
# Whitelist peers connecting from the given IP addresses
ckb_network_whitelist_peers: []
ckb_network_max_peers: 125
ckb_network_max_outbound_peers: 8
# 2 minutes
ckb_network_ping_interval_secs: 120
# 20 minutes
ckb_network_ping_timeout_secs: 1200
ckb_network_connect_outbound_interval_secs: 15
# If set to true, try to register upnp
ckb_network_upnp: "false"
# If set to true, network service will add discovered local address to peer store, it's helpful for private net development
ckb_network_discovery_local_address: "true"
# If set to true, random cleanup when there are too many inbound nodes
# Ensure that itself can continue to serve as a bootnode node
ckb_network_bootnode_mode: "false"
# By default RPC only binds to localhost, thus it only allows accessing from the same machine.
#
# Allowing arbitrary machines to access the JSON-RPC port is dangerous and strongly discouraged.
# Please strictly limit the access to only trusted machines.
ckb_rpc_listen_address: '127.0.0.1:8114'
# Default is 10MiB = 10 * 1024 * 1024
ckb_rpc_max_request_body_size: 10485760
# List of API modules: ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug"]
ckb_rpc_modules:
- Net
- Pool
- Miner
- Chain
- Stats
- Subscription
- Experiment
- Debug
- IntegrationTest
# By default RPC only binds to HTTP service, you can bind it to TCP and WebSocket.
# tcp_listen_address = "127.0.0.1:18114"
# ws_listen_address = "127.0.0.1:28114"
ckb_rpc_reject_ill_transactions: "true"
# By default deprecated rpc methods are disabled.
ckb_rpc_enable_deprecated_rpc: "false"
ckb_tx_pool_max_mem_size: 20000000
ckb_tx_pool_max_cycles: 200000000000
ckb_tx_pool_max_verify_cache_size: 100000
ckb_tx_pool_max_conflict_cache_size: 1000
ckb_tx_pool_max_committed_txs_hash_cache_size: 100000
ckb_tx_pool_min_fee_rate: 1000
ckb_tx_pool_max_tx_verify_cycles: 70000000
ckb_tx_pool_max_ancestors_count: 25
ckb_store_header_cache_size: 4096
ckb_store_cell_data_cache_size: 128
ckb_store_block_proposals_cache_size: 30
ckb_store_block_tx_hashes_cache_size: 30
ckb_store_block_uncles_cache_size: 30
ckb_store_cellbase_cache_size: 30
# Set the lock script to protect mined CKB.
#
# CKB uses CS architecture for miner. Miner process (ckb miner) gets block
# template from the Node process (ckb run) via RPC. Thus the lock script is
# configured in ckb.toml instead of ckb-miner.toml, and the config takes effect
# after restarting Node process.
#
# The `code_hash` identifies different cryptography algorithm. Read the manual
# of the lock script provider about how to generate this config.
#
# CKB provides an secp256k1 implementation, it requires a hash on the
# compressed public key. The hash algorithm is blake2b, with personal
# "ckb-default-hash". The first 160 bits (20 bytes) are used as the only arg.
#
# You can use any tool you trust to generate a Bitcoin private key and public
# key pair, which can be used in CKB as well. CKB CLI provides the function for
# you to convert the public key into block assembler configuration parameters.
#
# Here is an example using ckb-cli to generate an account, this command will
# print the block assembler args(lock_arg) to screen:
#
# ckb-cli account new
#
# If you already have a raw secp256k1 private key, you can get the lock_arg by:
#
# ckb-cli util key-info --privkey-path <privkey-path>
#
# The command `ckb init` also accepts options to generate the block assembler
# directly. See `ckb init --help` for details.
#
# ckb init <lock_arg>
#
# secp256k1_blake160_sighash_all example:
# [block_assembler]
# code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
# args = "ckb-cli util blake2b --prefix-160 <compressed-pubkey>"
# hash_type = "type"
# message = "A 0x-prefixed hex string"
# ckb_block_assembler:
# code_hash: "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
# args: "ckb-cli util blake2b --prefix-160 <compressed-pubkey>"
# hash_type: "type"
# message: "A 0x-prefixed hex string"
#
############################################################
###################### ckb-miner.toml ################
############################################################
ckb_miner_data_dir: "{{ ckb_data_dir }}"
ckb_miner_block_on_submit: "true"
ckb_miner_poll_interval: "1_000_000_000_000"
ckb_miner_workers:
- worker_type: "Dummy"
delay_type: "Constant"
value: 1000