-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
369: feat: Embed testnet chain spec in compiled binary r=doitian a=xxuejie Co-authored-by: Xuejie Xiao <[email protected]>
- Loading branch information
Showing
14 changed files
with
340 additions
and
31 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 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 |
---|---|---|
|
@@ -4,6 +4,8 @@ version = "0.8.0-pre" | |
license = "MIT" | ||
authors = ["Nervos Core Dev <[email protected]>"] | ||
edition = "2018" | ||
build = "build.rs" | ||
include = ["/chainspecs"] | ||
|
||
[dependencies] | ||
serde = "1.0" | ||
|
@@ -13,3 +15,8 @@ numext-fixed-hash = { version = "0.1", features = ["support_rand", "support_heap | |
numext-fixed-uint = { version = "0.1", features = ["support_rand", "support_heapsize", "support_serde"] } | ||
ckb-core = { path = "../core" } | ||
ckb-pow = { path = "../pow" } | ||
includedir = "0.5.0" | ||
phf = "0.7.21" | ||
|
||
[build-dependencies] | ||
includedir_codegen = "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use includedir_codegen::Compression; | ||
|
||
fn main() { | ||
includedir_codegen::start("FILES") | ||
.dir("chainspecs", Compression::Gzip) | ||
.build("chainspecs.rs") | ||
.unwrap(); | ||
} |
Binary file not shown.
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_testnet" | ||
|
||
[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/secp256k1_blake2b_lock" |
Oops, something went wrong.