# Config generated by `ckb init --chain dev` # {{
# see => resource/src/template.rs
# mainnet => # Config generated by `ckb init --chain mainnet`
# testnet => # Config generated by `ckb init --chain testnet`
# staging => # Config generated by `ckb init --chain staging`
# preview => # Config generated by `ckb init --chain preview`
# }}
data_dir = "data"
[chain]
# Choose the kind of chains to run, possible values:
# - { file = "specs/dev.toml" }
# - { bundled = "specs/preview.toml" }
# - { bundled = "specs/testnet.toml" }
# - { bundled = "specs/mainnet.toml" }
spec = { file = "specs/dev.toml" } # {{
# preview => spec = { {spec_source} = "specs/preview.toml" }
# testnet => spec = { {spec_source} = "specs/testnet.toml" }
# mainnet => spec = { {spec_source} = "specs/mainnet.toml" }
# staging => spec = { {spec_source} = "specs/staging.toml" }
# integration => spec = { file = "specs/integration.toml" }
# }}
[logger]
filter = "info" # {{
# integration => filter = "info,ckb-rpc=debug,ckb-sync=debug,ckb-relay=debug,ckb-tx-pool=debug,ckb-network=debug"
# }}
color = true
log_to_file = true # {{
# _ => log_to_file = {log_to_file}
# }}
log_to_stdout = true # {{
# _ => log_to_stdout = {log_to_stdout}
# }}
[sentry]
# set to blank to disable sentry error collection
dsn = "" # {{
# preview => dsn = "https://dda4f353e15f4b62800d273a2afe70c2@sentry.nervos.org/4"
# testnet => dsn = "https://dda4f353e15f4b62800d273a2afe70c2@sentry.nervos.org/4"
# staging => dsn = "https://dda4f353e15f4b62800d273a2afe70c2@sentry.nervos.org/4"
# mainnet => 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.
# org_contact = ""
# # **Experimental** Monitor memory changes.
# [memory_tracker]
# # Seconds between checking the process, 0 is disable, default is 0.
# interval = 600
[db]
# The capacity of RocksDB cache, which caches uncompressed data blocks, indexes and filters, default is 256MB.
# Rocksdb will automatically create and use an 32MB internal cache for each column family by default 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.
cache_size = 268435456
# 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).
options_file = "default.db-options"
[network]
listen_addresses = ["/ip4/0.0.0.0/tcp/8115"] # {{
# _ => listen_addresses = ["/ip4/0.0.0.0/tcp/{p2p_port}"]
# }}
### Specify the public and routable network addresses
# 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.
bootnodes = [] # {{
# mainnet => bootnodes = [\n # Hongkong, Asia\n "/ip4/16.163.82.218/tcp/8114/p2p/QmaZMemLXSsxKUrYNucjEbPxVX3rBKsGhWW2muWtWxUWyh",\n # Tokyo, Asia\n "/ip4/35.79.196.111/tcp/8114/p2p/QmYCRVonLfP18LSoz2WCHaXDorUYxuUMfhtcXK1TuZ1iwF",\n # Mumbai, Asia\n "/ip4/13.234.144.148/tcp/8114/p2p/QmbT7QimcrcD5k2znoJiWpxoESxang6z1Gy9wof1rT1LKR",\n # Seoul, Asia\n "/ip4/34.64.120.143/tcp/8114/p2p/QmejEJEbDcGGMp4D6WtftMMVLkR1ZuBfMgyLFDMJymkDt6",\n # Virginia, North America\n "/ip4/3.218.170.86/tcp/8114/p2p/QmShw2vtVt49wJagc1zGQXGS6LkQTcHxnEV3xs6y8MAmQN",\n # Los Angeles, North America\n "/ip4/35.236.107.161/tcp/8114/p2p/QmSRj57aa9sR2AiTvMyrEea8n1sEM1cDTrfb2VHVJxnGuu",\n # Texas, North America\n "/ip4/23.101.191.12/tcp/8114/p2p/QmexvXVDiRt2FBGptgK4gBJusWyyTEEaHeuCAa35EPNkZS",\n # Toronto, North America\n "/ip4/20.151.143.237/tcp/8114/p2p/QmNsGNQjYA6iP472bNnNE2GR31kCYBifhY1XcaUxRjZ1py",\n # Frankfurt, Europe\n "/ip4/52.59.155.249/tcp/8114/p2p/QmRHqhSGMGm5FtnkW8D6T83X7YwaiMAZXCXJJaKzQEo3rb",\n # London, Europe\n "/ip4/3.10.216.39/tcp/8114/p2p/QmagxSv7GNwKXQE7mi1iDjFHghjUpbqjBgqSot7PmMJqHA",\n # Paris, Europe\n "/ip4/13.37.172.80/tcp/8114/p2p/QmXJg4iKbQzMpLhX75RyDn89Mv7N2H8vLePBR7kgZf6hYk",\n # Warsaw, Europe\n "/ip4/34.118.49.255/tcp/8114/p2p/QmeCzzVmSAU5LNYAeXhdJj8TCq335aJMqUxcvZXERBWdgS",\n # Victoria, Oceania\n "/ip4/40.115.75.216/tcp/8114/p2p/QmW3P1WYtuz9hitqctKnRZua2deHXhNePNjvtc9Qjnwp4q",\n # Santiago, South America\n "/ip4/34.176.239.95/tcp/8114/p2p/QmQoWrmuFauCn3zZ2mYYKAciG9opTbjzC2wVEfWveZNDt8",\n # Capetown, Africa\n "/ip4/13.245.217.98/tcp/8114/p2p/Qmf4t1SzFhRWuGcFcgs7r4pXvkACsz3FcaBMcmMKQMMpn7"\n]
# testnet => bootnodes = [\n # Ohio, North America\n "/ip4/18.217.146.65/tcp/8111/p2p/QmT6DFfm18wtbJz3y4aPNn3ac86N4d4p4xtfQRRPf73frC",\n # Singapore, Asia\n "/ip4/18.136.60.221/tcp/8111/p2p/QmTt6HeNakL8Fpmevrhdna7J4NzEMf9pLchf1CXtmtSrwb",\n # London, Europe\n "/ip4/35.176.207.239/tcp/8111/p2p/QmSJTsMsMGBjzv1oBNwQU36VhQRxc2WQpFoRu1ZifYKrjZ",\n # Singapore, Asia\n "/ip4/13.228.149.113/tcp/8111/p2p/QmQoTR39rBkpZVgLApDGDoFnJ2YDBS9hYeiib1Z6aoAdEf",\n # Bahrain, Asia\n "/ip4/157.241.73.87/tcp/8111/p2p/QmSPkAyXqsWpRiS7HpHLTProVdhQWLKFHCXbRjaLpJj7ZL",\n # Japan, Asia\n "/ip4/4.241.132.26/tcp/8111/p2p/QmX5D6aJiAQ5Fxn4BfVqSn6zrgyuQM1oXVC9yvmzLuHXnx",\n # Korea, Asia\n "/ip4/52.147.120.180/tcp/8111/p2p/QmPcJY2gZLUm66szYA9QaG1P3rzwseWCMgbj6AyNCyW4G2",\n # Hong Kong, Asia\n "/ip4/18.167.196.121/tcp/8111/p2p/QmQMjFrNGaphzfHin3mbYybbJcFMDUihKAcknquYvm9J3W",\n # Oregon, North America\n "/ip4/34.216.103.183/tcp/8111/p2p/Qmd41MaByDprkC5gP1XBKgamZ9DTLNk37zbPgwtiWCzRV6",\n # Canada, North America\n "/ip4/3.98.152.180/tcp/8111/p2p/QmWVuW5KquiWDSqgMJRFW1xRtVqkYJrWz6S9NNk6fFn3wh",\n # Frankfurt, Europe\n "/ip4/18.192.147.65/tcp/8111/p2p/QmWcEhsMNRcfJit62EbKgzpgtAJZX1G3Ur4shXjcvLsYDb",\n # Sydney, Oceania\n "/ip4/13.236.13.195/tcp/8111/p2p/QmfUTZxsse7rFJTJfoUv8bbStoDLETxst5nJEpJozNuAnH"\n]
# preview => bootnodes = [\n "/ip4/43.198.48.141/tcp/8118/p2p/QmQDJWySDgJC8eKmdZBMJuYiin5cJUhbYeBjNWvrXRYYUK",\n "/ip4/13.39.144.196/tcp/8118/p2p/QmZQbkHeN2NP9mze3QZMRBAoFePZ7UHCkaJX3uJzxze48V",\n "/ip4/13.213.203.124/tcp/8118/p2p/QmNiVYpv19KgeP6duwqzJHM6754vc82t4Kq6TUGxKbRb4a",\n "/ip4/18.214.154.228/tcp/8118/p2p/QmaiSHpGDiBVbs6hfM3tuF77GaX14mVhGueRH48ibCyQpL" \n]
# staging => bootnodes = []
# }}
### Whitelist-only mode
# whitelist_only = false
### Whitelist peers connecting from the given IP addresses
# whitelist_peers = []
### Enable `SO_REUSEPORT` feature to reuse port on Linux, not supported on other OS yet
# reuse_port_on_linux = true
max_peers = 125
max_outbound_peers = 8
# 2 minutes
ping_interval_secs = 120
# 20 minutes
ping_timeout_secs = 1200
connect_outbound_interval_secs = 15
# If set to true, try to register upnp
upnp = false
# If set to true, network service will add discovered local address to peer store, it's helpful for private net development
discovery_local_address = false # {{
# dev => 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
bootnode_mode = false
# Supported protocols list, only "Sync" and "Identify" are mandatory, others are optional
support_protocols = ["Ping", "Discovery", "Identify", "Feeler", "DisconnectMessage", "Sync", "Relay", "Time", "Alert", "LightClient", "Filter"]
# [network.sync.header_map]
# memory_limit = "256MB"
[rpc]
# 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.
listen_address = "127.0.0.1:8114" # {{
# _ => listen_address = "127.0.0.1:{rpc_port}"
# }}
# Default is 10MiB = 10 * 1024 * 1024
max_request_body_size = 10485760
# List of API modules: ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug", "Indexer", "RichIndexer"]
modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment"] # {{
# dev => modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug"]
# integration => modules = ["Net", "Pool", "Miner", "Chain", "Experiment", "Stats", "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"
reject_ill_transactions = true
# By default deprecated rpc methods are disabled.
enable_deprecated_rpc = false # {{
# integration => enable_deprecated_rpc = true
# }}
# By default, there is no limitation on the size of batch request size
# a huge batch request may cost a lot of memory or makes the RPC server slow,
# to avoid this, you may want to add a limit for the batch request size.
# rpc_batch_limit = 2000
[tx_pool]
max_tx_pool_size = 180_000_000 # 180mb
min_fee_rate = 1_000 # Here fee_rate are calculated directly using size in units of shannons/KB
# min_rbf_rate > min_fee_rate means RBF is enabled
min_rbf_rate = 1_500 # Here fee_rate are calculated directly using size in units of shannons/KB
max_tx_verify_cycles = 70_000_000
max_ancestors_count = 25
[store]
header_cache_size = 4096
cell_data_cache_size = 128
block_proposals_cache_size = 30
block_tx_hashes_cache_size = 30
block_uncles_cache_size = 30
# [notify]
# # Execute command when the new tip block changes, first arg is block hash.
# new_block_notify_script = "your_new_block_notify_script.sh"
# # Execute command when node received an network alert, first arg is alert message string.
# network_alert_notify_script = "your_network_alert_notify_script.sh"
# 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 --ba-arg <lock_arg>
#
# # {{
# _ => {block_assembler}
# }}
# #
# # CKB will prepend the binary version to message, to identify the block miner client. (default true, false to disable it)
# use_binary_version_as_message_prefix = true
# #
# # Block assembler will notify new block template through http post to specified endpoints when update
# notify = ["http://127.0.0.1:8888"]
# # Execute command when the block template changes, first arg is block template.
# notify_scripts = ["your_notify_scripts.sh"]
#
# # CKB built-in indexer/rich-indexer settings.
# # Utilize the `ckb reset-data --indexer` and `ckb reset-data --rich-indexer` subcommands to efficiently clean existing indexes.
# [indexer_v2]
# # Indexing the pending txs in the ckb tx-pool
# index_tx_pool = false
# # Customize block filtering rules to index only retained blocks
# block_filter = "block.header.number.to_uint() >= \"0x0\".to_uint()"
# # Customize cell filtering rules to index only retained cells
# cell_filter = "let script = output.type;script!=() && script.code_hash == \"0x00000000000000000000000000000000000000000000000000545950455f4944\""
# # The initial tip can be set higher than the current indexer tip as the starting height for indexing.
# init_tip_hash = "0x8fbd0ec887159d2814cee475911600e3589849670f5ee1ed9798b38fdeef4e44"
# By default, there is no limitation on the size of indexer request
# However, because serde json serialization consumes too much memory(10x),
# it may cause the physical machine to become unresponsive.
# We recommend a consumption limit of 2g, which is 400 as the limit,
# which is a safer approach
# request_limit = 400
#
# # CKB rich-indexer has its unique configuration.
# [indexer_v2.rich_indexer]
# # By default, it uses an embedded SQLite database.
# # Alternatively, you can set up a PostgreSQL database service and provide the connection parameters.
# db_type = "postgres"
# db_name = "ckb-rich-indexer"
# db_host = "127.0.0.1"
# db_port = 5432
# db_user = "postgres"
# db_password = "123456"