运行dev chain时报错,请帮忙分析一下

1
使用运行ckb dev chain 时,报上面截图的错误。请大神帮忙分析一下问题在哪,谢谢!
dev.toml配置如下

dev.toml

name = “ckb_dev”

[genesis]
version = 0
parent_hash = “0x0000000000000000000000000000000000000000000000000000000000000000”
timestamp = 0
difficulty = “0x100”
uncles_hash = “0x0000000000000000000000000000000000000000000000000000000000000000”

run cargo run cli hashes -b to get the genesis hash

hash = “0xfc3ad90e38598032598c90b4ad4fefb420bacabaa7c5b40111daca7dfcc1f9d4”
issued_cells = []

[genesis.seal]
nonce = 0
proof = [0]

[genesis.genesis_cell]
message = “”

[genesis.genesis_cell.lock]
code_hash = “0xb35557e7e9854206f7bc13e3c3a7fa4cf8892c84a09237fb0aab40aab3771eee”
args = []

An array list paths to system cell files, which is absolute or relative to

the directory containing this config file.

[genesis.system_cells]
files = [
“cells/secp256k1_blake160_sighash_all”
]

[genesis.system_cells.lock]
code_hash = “0xb35557e7e9854206f7bc13e3c3a7fa4cf8892c84a09237fb0aab40aab3771eee”
args = []

[params]
epoch_reward = 1_250_000_00000000
secondary_epoch_reward = 600_000_00000000
max_block_cycles = 10_000_000_000
cellbase_maturity = 0
initial_block_reward = 500_000_000_000_000

#[pow]
#func = “Cuckoo”

[pow]
func = “Dummy”

[pow.params.delay]
type = “constant”
value = 5000

[pow.params]

the 2-log of the graph size, which is the size in bits of the node

identifiers

edge_bits = 15

length of the cycle to be found, must be an even number, a minimum of 12 is

recommended

cycle_length = 12

ckb.toml配置配置如下

ckb.toml

Config generated by ckb init

data_dir = “data”

[chain]

Choose the kind of chains to run, possible values:

- specs/dev.toml

- specs/testnet.toml

spec = “specs/dev.toml”

[logger]
filter = “info”
color = true
log_to_file = true
log_to_stdout = true

[sentry]

set to blank to disable sentry error collection

dsn = “”

[network]
listen_addresses = ["/ip4/0.0.0.0/tcp/8115"]
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 = []

reserved_peers = []
reserved_only = false
max_peers = 125
max_outbound_peers = 8

2 minutes

ping_interval_secs = 120

20 minutes

ping_timeout_secs = 1200
connect_outbound_interval_secs = 15

[rpc]
listen_address = “127.0.0.1:8114”

Default is 10MiB = 10 * 1024 * 1024

max_request_body_size = 10485760

List of API modules: [“Net”, “Pool”, “Miner”, “Chain”, “Stats”, “Experiment”]

modules = [“Net”, “Pool”, “Miner”, “Chain”, “Stats”, “Experiment”]

[sync]
orphan_block_limit = 1024

[tx_pool]
max_mem_size = 20_000_000 # 20mb
max_cycles = 200_000_000_000
max_verfify_cache_size = 100_000

[script]
runner = “Assembly”

[store]
header_cache_size = 4096
cell_output_cache_size = 128

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 block assembler parameters:

ckb cli secp256k1-lock

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 --format cmd

The two commands can be combined together:

ckb init $(ckb cli secp256k1-lock --format cmd)

secp256k1_blake160_sighash_all example:

[block_assembler]

code_hash = “0xf1951123466e4479842387a66fabfd6b65fc87fd84ae8e6cd3053edb27fff2fd”

args = [ "ckb cli blake160 " ]

ckb-miner.toml配置如下

ckb-miner.toml

Config generated by ckb init

data_dir = “data”

[chain]

Choose the kind of chains to run, possible values:

- specs/dev.toml

- specs/testnet.toml

spec = “specs/dev.toml”

[logger]
filter = “info”
color = true
log_to_file = true
log_to_stdout = true

[sentry]

set to blank to disable sentry error collection

dsn = “”

[miner.client]
rpc_url = “http://127.0.0.1:8114/
block_on_submit = true

block template polling interval in milliseconds

poll_interval = 1000

#[[miner.workers]]
#worker_type = “CuckooSimple”
#threads = 1

Below is an example dummy worker configuration for development:

[[miner.workers]]
worker_type = “Dummy”
delay_type = “Constant”
value = 5000

code_hash 不对,args也没有改,我觉得你下的版本都错了

本期Code_hash : 0x94334bdda40b69bae067d84937aa6bbccf8acd0df6626d4b9ac70d4612a11933