Created
August 12, 2021 03:04
-
-
Save keroro520/c50c7beb4b72e2cd55328130c331f79c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 = "ckb-spec-staging.toml" } | |
[logger] | |
filter = "info,ckb=debug" | |
color = false | |
log_to_file = true | |
log_to_stdout = false | |
[sentry] | |
# set to blank to disable sentry error collection | |
dsn = "http://[email protected]/4" | |
org_ident = "ckb-dev" | |
[network] | |
listen_addresses = ["/ip4/0.0.0.0/tcp/8117"] | |
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 = [ | |
"/ip4/13.212.176.249/tcp/8117/p2p/QmVsGtVF7soLeeduPp9hZm71zK9qowPTtZtfUpaeAFWDVK", | |
"/ip4/13.229.90.74/tcp/8117/p2p/QmYEUtBZQBGFnPk4TSVSS2erUG6ecpwnrZ3fQ4B6DQSzxH", | |
"/ip4/13.212.90.129/tcp/8117/p2p/QmbQHaywHRcvaxLaqSkjbkm1gGi2PQrvAfY9rnVHwqgAxr", | |
] | |
reserved_peers = [] | |
reserved_only = false | |
### Whitelist-only mode | |
# whitelist_only = false | |
### Whitelist peers connecting from the given IP addresses | |
# whitelist_peers = [] | |
max_peers = 200 | |
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 | |
# 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 = true | |
[rpc] | |
listen_address = "0.0.0.0:18127" | |
tcp_listen_address = "127.0.0.1:18114" | |
# Default is 10MiB = 10 * 1024 * 1024 | |
max_request_body_size = 10485760 | |
modules = ["Net", "Pool", "Miner", "Chain", "Stats", "Subscription", "Experiment", "Debug", "IntegrationTest"] | |
[sync] | |
orphan_block_limit = 1024 | |
[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 | |
[script] | |
runner = "Assembly" | |
[store] | |
header_cache_size = 4096 | |
cell_data_cache_size = 128 | |
block_proposals_cache_size = 30 | |
block_tx_hashes_cache_size = 20 | |
block_uncles_cache_size = 10 | |
cellbase_cache_size = 20 | |
# [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 | |
# [alert_notifier] | |
# # Script will be notified when node received an alert, first arg is alert message string. | |
# notify_script = "echo" | |
# 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 OpenSSL to generate the key pair: | |
# | |
# **WARNING**: This command will print the private key to screen. | |
# | |
# openssl ecparam -genkey -name secp256k1 -text -noout -outform DER | \ | |
# xxd -p -c 1000 | \ | |
# sed 's/41534e31204f49443a20736563703235366b310a30740201010420/PrivKey: /' | \ | |
# sed 's/a00706052b8104000aa144034200/\'$'\nPubKey: /' | |
# | |
# Once you get your public key, generate the args for block assembler: | |
# | |
# ckb cli secp256k1-lock <pubkey> | |
# | |
# The command `ckb init` also accepts options to generate the block assembler | |
# directly. See `ckb init --help` for details. And `ckb cli secp256k1-lock` can | |
# also prints the command line options for `ckb init`. | |
# | |
# ckb cli secp256k1-lock <pubkey> --format cmd | |
# | |
# The two commands can be combined together: | |
# | |
# ckb init $(ckb cli secp256k1-lock <pubkey> --format cmd) | |
# | |
# secp256k1_blake160_sighash_all example: | |
[block_assembler] | |
code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" | |
# @keroro520 | |
args = "0xee70201e96ff3b4f90f20c737faf2a91ac1b60aa" | |
hash_type = "type" | |
message = "0xdeadbeef" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment