ckb-resource 0.37.0

TODO(doc): crate description
Documentation
# 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`
# }}

data_dir = "data"

[chain]
# Choose the kind of chains to run, possible values:
# - { file = "specs/dev.toml" }
# - { bundled = "specs/testnet.toml" }
# - { bundled = "specs/mainnet.toml" }
spec = { file = "specs/dev.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 = "" # {{
# 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 = ""

# [memory_tracker]
# # Seconds between checking the process, 0 is disable, default is 0.
# interval = 600

[db]
# 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  # Hangzhou, Asia\n  "/ip4/47.110.15.57/tcp/8114/p2p/QmXS4Kbc9HEeykHUTJCm2tNmqghbvWyYpUp6BtE5b6VrAU",\n  # Tokyo, Asia\n  "/ip4/47.245.31.79/tcp/8114/p2p/QmUaSuEdXNGJEKvkE4rCn3cwBrpRFUm5TsouF4M3Sjursv",\n  # Mumbai, Asia\n  "/ip4/13.234.144.148/tcp/8114/p2p/QmbT7QimcrcD5k2znoJiWpxoESxang6z1Gy9wof1rT1LKR",\n  # Virginia, North America\n  "/ip4/3.218.170.86/tcp/8114/p2p/QmShw2vtVt49wJagc1zGQXGS6LkQTcHxnEV3xs6y8MAmQN",\n  # Frankfurt, Europe\n  "/ip4/52.59.155.249/tcp/8114/p2p/QmRHqhSGMGm5FtnkW8D6T83X7YwaiMAZXCXJJaKzQEo3rb",\n  # Beijing, Asia\n  "/ip4/39.107.100.85/tcp/8114/p2p/QmeQwD2GGuZyFzDPbQEKFJUjmNaY9FG3X7WHPL823zFD3a",\n  # Shanghai, Asia\n  "/ip4/47.103.44.208/tcp/8114/p2p/QmWVt9kNFv8XM1CMqeJj2nmG4tJ4ViqgwzJMr7yYynp6qd",\n  # Shenzhen, Asia\n  "/ip4/120.24.85.239/tcp/8114/p2p/QmaJP1sDiWZuwAEMghNHt7TrTgaMCyYaEMMYLc4YvoUGSV",\n  # Hong Kong, Asia\n  "/ip4/47.91.238.128/tcp/8114/p2p/QmTjLAewCM6SivjpW7BJfSj1ABuPA7x6FsFu5ga7Xy2xig",\n  # Jakarta, Asia\n  "/ip4/147.139.137.53/tcp/8114/p2p/QmQBLw9TqkS8yu2Kg8UtiYzvxEQ7DfKiXLx8iD7bF8XRyj",\n  # California, North America\n  "/ip4/13.52.18.181/tcp/8114/p2p/QmcEK1wUR287qSYdw8eHNWeQrFitQsCaZHHTM9wgvakxnS",\n  # Singapore, Asia\n  "/ip4/18.140.240.153/tcp/8114/p2p/QmVi7reKhqVnoBYzW2nJYnrujVeckrZXhwuYbX7P2whPJg",\n  # Quebec, North America\n  "/ip4/35.183.172.68/tcp/8114/p2p/QmNRAvtC6L85hwp6vWnqaKonJw3dz1q39B4nXVQErzC4Hx",\n  # London, Europe\n  "/ip4/3.10.216.39/tcp/8114/p2p/QmagxSv7GNwKXQE7mi1iDjFHghjUpbqjBgqSot7PmMJqHA",\n  # Sydney, Oceania\n  "/ip4/3.105.209.193/tcp/8114/p2p/QmQidJaxciY3NT2PjsaCR4Gz8vB8kFn3Avwz96u6b3jGc1",\n  # Sao Paulo, South America\n  "/ip4/18.229.214.173/tcp/8114/p2p/QmVeeCh81GTLGRwB7vRHXeTRdUHRYcfn6qKEfewhtiRJZC"\n]
# testnet => bootnodes = [\n  # Hangzhou, Asia\n  "/ip4/47.111.169.36/tcp/8111/p2p/QmNQ4jky6uVqLDrPU7snqxARuNGWNLgSrTnssbRuy3ij2W",\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]
# staging => bootnodes = []
# }}

### Whitelist-only mode
# whitelist_only = false
### Whitelist peers connecting from the given IP addresses
# whitelist_peers = []

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

[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", "Indexer", "Experiment", "Debug"]
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", "Indexer", "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
# }}

[tx_pool]
max_mem_size = 20_000_000 # 20mb
max_cycles = 200_000_000_000
max_verify_cache_size = 100_000
max_conflict_cache_size = 1_000
max_committed_txs_hash_cache_size = 100_000
min_fee_rate = 1_000 # 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
cellbase_cache_size        = 30

# [indexer]
# # The minimum time (in milliseconds) between indexing execution, default is 500
# batch_interval = 500
# # The maximum number of blocks in a single indexing execution batch, default is 200
# batch_size = 200

# [notifier]
# # 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 <lock_arg>
#
# # {{
# _ => {block_assembler}
# }}