|
| 1 | +# Config generated by `ckb init --chain dev` |
| 2 | + |
| 3 | +data_dir = "{{ ckb_data_dir | default("data") }}" |
| 4 | + |
| 5 | + |
| 6 | +[chain] |
| 7 | +# Choose the kind of chains to run, possible values: |
| 8 | +# - { file = "specs/dev.toml" } |
| 9 | +# - { bundled = "specs/testnet.toml" } |
| 10 | +# - { bundled = "specs/mainnet.toml" } |
| 11 | +spec = {{ ckb_chain_spec }} |
| 12 | + |
| 13 | + |
| 14 | +[logger] |
| 15 | +filter = "{{ ckb_logger_filter | default("info") }}" |
| 16 | +color = {{ ckb_logger_color | default("true") }} |
| 17 | +log_to_file = {{ ckb_logger_log_to_file | default("true") }} |
| 18 | +log_to_stdout = {{ ckb_logger_log_to_stdout | default("true") }} |
| 19 | + |
| 20 | + |
| 21 | +[sentry] |
| 22 | +# set to blank to disable sentry error collection |
| 23 | +dsn = "{{ ckb_sentry_dsn | default("") }}" |
| 24 | +# if you are willing to help us to improve, |
| 25 | +# please leave a way to contact you when we have troubles to reproduce the errors. |
| 26 | +org_contact = "{{ ckb_sentry_org_contact | default("") }}" |
| 27 | + |
| 28 | + |
| 29 | +# # **Experimental** Monitor memory changes. |
| 30 | +# [memory_tracker] |
| 31 | +# # Seconds between checking the process, 0 is disable, default is 0. |
| 32 | +# interval = 600 |
| 33 | + |
| 34 | +[db] |
| 35 | +# The capacity of RocksDB cache, which caches uncompressed data blocks, indexes and filters, default is 128MB. |
| 36 | +# Rocksdb will automatically create and use an 8MB internal cache if you set this value to 0. |
| 37 | +# To turning off cache, you need to set this value to 0 and set `no_block_cache = true` in the options_file, |
| 38 | +# however, we strongly discourage this setting, it may lead to severe performance degradation. |
| 39 | +cache_size = {{ ckb_db_cache_size | default("134217728") }} |
| 40 | + |
| 41 | +# Provide an options file to tune RocksDB for your workload and your system configuration. |
| 42 | +# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide). |
| 43 | +options_file = "{{ ckb_db_options_file | default("default.db-options") }}" |
| 44 | + |
| 45 | +[network] |
| 46 | +listen_addresses = {{ ckb_network_listen_addresses | default(["/ip4/0.0.0.0/tcp/8115"]) | to_json }} |
| 47 | +### Specify the public and routable network addresses |
| 48 | +public_addresses = {{ ckb_network_public_addresses | default([]) | to_json }} |
| 49 | + |
| 50 | +# Node connects to nodes listed here to discovery other peers when there's no local stored peers. |
| 51 | +# When chain.spec is changed, this usually should also be changed to the bootnodes in the new chain. |
| 52 | +bootnodes = {{ ckb_network_bootnodes | default([]) | to_json }} |
| 53 | + |
| 54 | +### Whitelist-only mode |
| 55 | +whitelist_only = {{ ckb_network_whitelist_only | default("false") }} |
| 56 | +### Whitelist peers connecting from the given IP addresses |
| 57 | +whitelist_peers = {{ ckb_network_whitelist_peers | default([]) | to_json }} |
| 58 | +### Enable `SO_REUSEPORT` feature to reuse port on Linux, not supported on other OS yet |
| 59 | +# reuse_port_on_linux = true |
| 60 | + |
| 61 | +max_peers = {{ ckb_network_max_peers | default(125) }} |
| 62 | +max_outbound_peers = {{ ckb_network_max_outbound_peers | default(8) }} |
| 63 | +# 2 minutes |
| 64 | +ping_interval_secs = {{ ckb_network_ping_interval_secs | default(120) }} |
| 65 | +# 20 minutes |
| 66 | +ping_timeout_secs = {{ ckb_network_ping_timeout_secs | default(1200) }} |
| 67 | +connect_outbound_interval_secs = 15 |
| 68 | +# If set to true, try to register upnp |
| 69 | +upnp = {{ ckb_network_upnp | default("false") }} |
| 70 | +# If set to true, network service will add discovered local address to peer store, it's helpful for private net development |
| 71 | +discovery_local_address = {{ ckb_network_discovery_local_address | default("true") }} |
| 72 | +# If set to true, random cleanup when there are too many inbound nodes |
| 73 | +# Ensure that itself can continue to serve as a bootnode node |
| 74 | +bootnode_mode = {{ ckb_network_bootnode_mode | default("false") }} |
| 75 | + |
| 76 | +# Supported protocols list, only "Sync" and "Identify" are mandatory, others are optional |
| 77 | +support_protocols = ["Ping", "Discovery", "Identify", "Feeler", "DisconnectMessage", "Sync", "Relay", "Time", "Alert", "LightClient", "Filter"] |
| 78 | +# reuse_tcp_with_ws = true |
| 79 | +reuse_tcp_with_ws = {{ ckb_network_reuse_tcp_with_ws | default("false") }} |
| 80 | +# [network.sync.header_map] |
| 81 | +# memory_limit = "600MB" |
| 82 | + |
| 83 | +[rpc] |
| 84 | +# By default RPC only binds to localhost, thus it only allows accessing from the same machine. |
| 85 | +# |
| 86 | +# Allowing arbitrary machines to access the JSON-RPC port is dangerous and strongly discouraged. |
| 87 | +# Please strictly limit the access to only trusted machines. |
| 88 | +listen_address = "{{ ckb_rpc_listen_address | default("127.0.0.1:8114") }}" |
| 89 | + |
| 90 | +# Default is 10MiB = 10 * 1024 * 1024 |
| 91 | +max_request_body_size = {{ ckb_rpc_max_request_body_size | default(10485760) }} |
| 92 | + |
| 93 | +# List of API modules: ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug", "Indexer"] |
| 94 | +#modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug"] |
| 95 | +modules = {{ ckb_rpc_modules | to_json }} |
| 96 | + |
| 97 | +# By default RPC only binds to HTTP service, you can bind it to TCP and WebSocket. |
| 98 | +#{% if ckb_tcp_listen_address is defined %} |
| 99 | +tcp_listen_address = "{{ ckb_tcp_listen_address }}" |
| 100 | +#{% endif %} |
| 101 | + |
| 102 | +#{% if ckb_ws_listen_address is defined %} |
| 103 | +ws_listen_address = "{{ ckb_ws_listen_address }}" |
| 104 | +#{% endif %} |
| 105 | + |
| 106 | +reject_ill_transactions = {{ ckb_rpc_reject_ill_transactions | default("true") }} |
| 107 | + |
| 108 | +# By default deprecated rpc methods are disabled. |
| 109 | +enable_deprecated_rpc = {{ ckb_rpc_enable_deprecated_rpc | default("false") }} |
| 110 | + |
| 111 | + |
| 112 | +{% if ckb_rpc_batch_limit is defined %} |
| 113 | +rpc_batch_limit = {{ ckb_rpc_batch_limit | default("2000") }} |
| 114 | +{% endif %} |
| 115 | + |
| 116 | + |
| 117 | +[tx_pool] |
| 118 | +max_tx_pool_size = {{ ckb_tx_pool_max_tx_pool_size | default("180_000_000") }} |
| 119 | +min_fee_rate = {{ ckb_tx_pool_min_fee_rate | default("1_000") }} |
| 120 | +max_tx_verify_cycles = {{ ckb_tx_pool_max_tx_verify_cycles | default("70_000_000") }} |
| 121 | +max_ancestors_count = {{ ckb_tx_pool_max_ancestors_count | default("25") }} |
| 122 | +min_rbf_rate = {{ ckb_tx_pool_min_rbf_rate | default("1_500") }} |
| 123 | + |
| 124 | + |
| 125 | +[store] |
| 126 | +header_cache_size = {{ ckb_store_header_cache_size | default("4096")}} |
| 127 | +cell_data_cache_size = {{ ckb_store_cell_data_cache_size | default("128")}} |
| 128 | +block_proposals_cache_size = {{ ckb_store_block_proposals_cache_size | default("30")}} |
| 129 | +block_tx_hashes_cache_size = {{ ckb_store_block_tx_hashes_cache_size | default("30")}} |
| 130 | +block_uncles_cache_size = {{ ckb_store_block_uncles_cache_size | default("30")}} |
| 131 | + |
| 132 | + |
| 133 | +# [notify] |
| 134 | +# # Execute command when the new tip block changes, first arg is block hash. |
| 135 | +# new_block_notify_script = "your_new_block_notify_script.sh" |
| 136 | +# # Execute command when node received an network alert, first arg is alert message string. |
| 137 | +# network_alert_notify_script = "your_network_alert_notify_script.sh" |
| 138 | + |
| 139 | + |
| 140 | +# Set the lock script to protect mined CKB. |
| 141 | +# |
| 142 | +# CKB uses CS architecture for miner. Miner process (ckb miner) gets block |
| 143 | +# template from the Node process (ckb run) via RPC. Thus the lock script is |
| 144 | +# configured in ckb.toml instead of ckb-miner.toml, and the config takes effect |
| 145 | +# after restarting Node process. |
| 146 | +# |
| 147 | +# The `code_hash` identifies different cryptography algorithm. Read the manual |
| 148 | +# of the lock script provider about how to generate this config. |
| 149 | +# |
| 150 | +# CKB provides an secp256k1 implementation, it requires a hash on the |
| 151 | +# compressed public key. The hash algorithm is blake2b, with personal |
| 152 | +# "ckb-default-hash". The first 160 bits (20 bytes) are used as the only arg. |
| 153 | +# |
| 154 | +# You can use any tool you trust to generate a Bitcoin private key and public |
| 155 | +# key pair, which can be used in CKB as well. CKB CLI provides the function for |
| 156 | +# you to convert the public key into block assembler configuration parameters. |
| 157 | +# |
| 158 | +# Here is an example using ckb-cli to generate an account, this command will |
| 159 | +# print the block assembler args(lock_arg) to screen: |
| 160 | +# |
| 161 | +# ckb-cli account new |
| 162 | +# |
| 163 | +# If you already have a raw secp256k1 private key, you can get the lock_arg by: |
| 164 | +# |
| 165 | +# ckb-cli util key-info --privkey-path <privkey-path> |
| 166 | +# |
| 167 | +# The command `ckb init` also accepts options to generate the block assembler |
| 168 | +# directly. See `ckb init --help` for details. |
| 169 | +# |
| 170 | +# ckb init <lock_arg> |
| 171 | +# |
| 172 | +# secp256k1_blake160_sighash_all example: |
| 173 | +# [block_assembler] |
| 174 | +# code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" |
| 175 | +# args = "ckb-cli util blake2b --prefix-160 <compressed-pubkey>" |
| 176 | +# hash_type = "type" |
| 177 | +# message = "A 0x-prefixed hex string" |
| 178 | +# # |
| 179 | +# # CKB will prepend the binary version to message, to identify the block miner client. (default true, false to disable it) |
| 180 | +# use_binary_version_as_message_prefix = true |
| 181 | +# # |
| 182 | +# # Block assembler will notify new block template through http post to specified endpoints when update |
| 183 | +# notify = ["http://127.0.0.1:8888"] |
| 184 | +# # Or you may want use more flexible scripts, block template as arg. |
| 185 | +# notify_scripts = ["{cmd} {blocktemplate}"] |
| 186 | + |
| 187 | + |
| 188 | +{% if ckb_request_limit is defined %} |
| 189 | +[indexer_v2] |
| 190 | +request_limit = {{ ckb_request_limit | default("400") }} |
| 191 | +{% endif %} |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | +# # Indexing the pending txs in the ckb tx-pool |
| 196 | +# index_tx_pool = false |
| 197 | +# # Customize block filtering rules to index only retained blocks |
| 198 | +#block_filter = "block.header.number.to_uint() >= \"0x0\".to_uint()" |
| 199 | +# # Customize cell filtering rules to index only retained cells |
| 200 | +#cell_filter = "let script = output.type;script!=() && script.code_hash == \"0x00000000000000000000000000000000000000000000000000545950455f4944\"" |
| 201 | +# # The initial tip can be set higher than the current indexer tip as the starting height for indexing. |
| 202 | +# init_tip_hash = "0x8fbd0ec887159d2814cee475911600e3589849670f5ee1ed9798b38fdeef4e44" |
| 203 | +# |
| 204 | +# # CKB rich-indexer has its unique configuration. |
| 205 | + |
| 206 | +#[indexer_v2.rich_indexer] |
| 207 | +# # By default, it uses an embedded SQLite database. |
| 208 | +# # Alternatively, you can set up a PostgreSQL database service and provide the connection parameters. |
| 209 | +# db_type = "postgres" |
| 210 | +# db_name = "ckb-rich-indexer" |
| 211 | +# db_host = "127.0.0.1" |
| 212 | +# db_port = 5432 |
| 213 | +# db_user = "postgres" |
| 214 | +# db_password = "123456" |
| 215 | + |
| 216 | +[block_assembler] |
| 217 | +code_hash = "{{ ckb_block_assembler_code_hash }}" |
| 218 | +args = "{{ ckb_block_assembler_args }}" |
| 219 | +hash_type = "{{ ckb_block_assembler_hash_type }}" |
| 220 | +message = "{{ ckb_block_assembler_message }}" |
0 commit comments