-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use toml for miner and chain spec (#311)
BREAKING CHANGE: nodes need to copy and use new toml configs and remove/backup old json config files.
- Loading branch information
Showing
15 changed files
with
180 additions
and
204 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
data_dir = "default" | ||
txs_verify_cache_size = 100000 | ||
|
||
[db] | ||
path = "default/db" | ||
|
||
[chain] | ||
spec = "spec/dev.toml" | ||
|
||
[logger] | ||
file = "ckb.log" | ||
filter = "info" | ||
color = true | ||
|
||
[network] | ||
listen_addresses = ["/ip4/0.0.0.0/tcp/8115"] | ||
bootnodes = [] | ||
reserved_nodes = [] | ||
only_reserved_peers = false | ||
min_peers = 4 | ||
max_peers = 8 | ||
secret_file = "secret" | ||
nodes_file = "nodes.toml" | ||
|
||
[rpc] | ||
listen_address = "0.0.0.0:8114" | ||
|
||
# Default is 10MiB = 10 * 1024 * 1024 | ||
max_request_body_size = 10485760 | ||
|
||
# List of API modules: ["Net", "Pool", "Miner", "Chain", "Trace"] | ||
modules = ["Net", "Pool", "Miner", "Chain"] | ||
|
||
[sync] | ||
verification_level = "Full" | ||
orphan_block_limit = 1024 | ||
|
||
[pool] | ||
max_pool_size = 10000 | ||
max_orphan_size = 10000 | ||
max_proposal_size = 10000 | ||
max_cache_size = 1000 | ||
max_pending_size = 10000 | ||
trace = 100 | ||
|
||
[block_assembler] | ||
type_hash = "0x0da2fe99fe549e082d4ed483c2e968a89ea8d11aabf5d79e5cbf06522de6e674" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
data_dir = "default" | ||
chain = "spec/dev.toml" | ||
rpc_url = "http://127.0.0.1:8114/" | ||
cycles_limit = 100000000 | ||
bytes_limit = 10000000 | ||
max_version = 0 | ||
block_on_submit = true | ||
|
||
# block template polling interval in milliseconds | ||
poll_interval = 1000 | ||
|
||
[logger] | ||
file = "miner.log" | ||
filter = "info" | ||
color = true |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name = "ckb" | ||
|
||
[genesis] | ||
version = 0 | ||
parent_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
timestamp = 0 | ||
txs_commit = "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
txs_proposal = "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
difficulty = "0x100" | ||
cellbase_id = "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
uncles_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
|
||
[genesis.seal] | ||
nonce = 0 | ||
proof = [0] | ||
|
||
[params] | ||
initial_block_reward = 50000 | ||
max_block_cycles = 100000000 | ||
|
||
[pow] | ||
func = "Cuckoo" | ||
|
||
[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 | ||
|
||
# An array list paths to system cell files, which is absolute or relative to | ||
# the directory containing this config file. | ||
[[system_cells]] | ||
path = "cells/always_success" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,12 @@ authors = ["Nervos Core Dev <[email protected]>"] | |
edition = "2018" | ||
|
||
[dependencies] | ||
serde_json = "1.0" | ||
serde = "1.0" | ||
serde_derive = "1.0" | ||
toml = "0.4" | ||
numext-fixed-hash = { version = "0.1", features = ["support_rand", "support_heapsize", "support_serde"] } | ||
numext-fixed-uint = { version = "0.1", features = ["support_rand", "support_heapsize", "support_serde"] } | ||
ckb-core = { path = "../core" } | ||
serde_derive = "1.0" | ||
serde = "1.0" | ||
ckb-pow = { path = "../pow" } | ||
ckb-protocol = { path = "../protocol" } | ||
flatbuffers = "0.5.0" |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.