├── .editorconfig ├── .gitignore ├── .travis.yml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── rust-toolchain ├── rustfmt.toml └── src ├── cli.yml ├── config.rs ├── main.rs └── worker.rs /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | [*.rs] 3 | indent_style=space 4 | indent_size=4 5 | tab_width=8 6 | end_of_line=lf 7 | charset=utf-8 8 | trim_trailing_whitespace=true 9 | max_line_length=120 10 | insert_final_newline=true 11 | 12 | [*.yml] 13 | indent_style=space 14 | indent_size=2 15 | tab_width=8 16 | end_of_line=lf 17 | charset=utf-8 18 | trim_trailing_whitespace=true 19 | insert_final_newline=true 20 | 21 | [*.toml] 22 | indent_style=space 23 | indent_size=4 24 | tab_width=8 25 | end_of_line=lf 26 | charset=utf-8 27 | trim_trailing_whitespace=true 28 | insert_final_newline=true 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # These are backup files generated by rustfmt 6 | **/*.rs.bk 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | rust: 3 | - 1.38.0 4 | install: 5 | - rustup toolchain install nightly-2019-10-13 6 | - rustup component add rustfmt --toolchain nightly-2019-10-13 7 | - rustup component add clippy --toolchain nightly-2019-10-13 8 | before_script: 9 | - cargo fetch --verbose 10 | script: 11 | - cargo +nightly-2019-10-13 fmt -- --check 12 | - cargo +nightly-2019-10-13 clippy --all --all-targets -- -D warnings 13 | - RUST_BACKTRACE=1 cargo test --verbose 14 | matrix: 15 | allow_failures: 16 | - rust: nightly 17 | include: 18 | - os: linux 19 | - os: osx 20 | cache: cargo 21 | git: 22 | depth: 1 23 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.6.6" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 9 | ] 10 | 11 | [[package]] 12 | name = "ansi_term" 13 | version = "0.11.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | dependencies = [ 16 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 17 | ] 18 | 19 | [[package]] 20 | name = "arrayvec" 21 | version = "0.4.7" 22 | source = "registry+https://github.com/rust-lang/crates.io-index" 23 | dependencies = [ 24 | "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 25 | ] 26 | 27 | [[package]] 28 | name = "atty" 29 | version = "0.2.11" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | dependencies = [ 32 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 33 | "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 34 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 35 | ] 36 | 37 | [[package]] 38 | name = "bitflags" 39 | version = "1.0.4" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | 42 | [[package]] 43 | name = "byteorder" 44 | version = "1.2.4" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | 47 | [[package]] 48 | name = "bytes" 49 | version = "0.4.9" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | dependencies = [ 52 | "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 53 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 54 | ] 55 | 56 | [[package]] 57 | name = "cfg-if" 58 | version = "0.1.5" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | 61 | [[package]] 62 | name = "clap" 63 | version = "2.32.0" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | dependencies = [ 66 | "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 67 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 68 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 70 | "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 71 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 72 | "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 73 | "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 74 | ] 75 | 76 | [[package]] 77 | name = "codechain-cuckoo-miner" 78 | version = "0.1.0" 79 | dependencies = [ 80 | "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 81 | "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", 82 | "codechain-miner 0.1.0 (git+https://github.com/CodeChain-io/codechain-miner.git?rev=820e11e)", 83 | "cuckoo 0.1.0 (git+https://github.com/CodeChain-io/rust-cuckoo.git?rev=280cab9c)", 84 | "env_logger 0.5.12 (registry+https://github.com/rust-lang/crates.io-index)", 85 | "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 86 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 87 | "rlp 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 88 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 89 | "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 90 | ] 91 | 92 | [[package]] 93 | name = "codechain-miner" 94 | version = "0.1.0" 95 | source = "git+https://github.com/CodeChain-io/codechain-miner.git?rev=820e11e#820e11e526d4fc49911eac7864152c21bdf8b6de" 96 | dependencies = [ 97 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 98 | "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 100 | "hyper 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 102 | "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 103 | "serde 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)", 104 | "serde_derive 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)", 105 | "serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", 106 | "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 107 | "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 108 | ] 109 | 110 | [[package]] 111 | name = "crossbeam-deque" 112 | version = "0.3.1" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | dependencies = [ 115 | "crossbeam-epoch 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 116 | "crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 117 | ] 118 | 119 | [[package]] 120 | name = "crossbeam-epoch" 121 | version = "0.4.3" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | dependencies = [ 124 | "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", 125 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 126 | "crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 127 | "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 128 | "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 129 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 130 | ] 131 | 132 | [[package]] 133 | name = "crossbeam-utils" 134 | version = "0.3.2" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | dependencies = [ 137 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 138 | ] 139 | 140 | [[package]] 141 | name = "crunchy" 142 | version = "0.1.6" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | 145 | [[package]] 146 | name = "cuckoo" 147 | version = "0.1.0" 148 | source = "git+https://github.com/CodeChain-io/rust-cuckoo.git?rev=280cab9c#280cab9c777ed4c736b9590ebf62b9fc440fadbd" 149 | dependencies = [ 150 | "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 151 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 152 | ] 153 | 154 | [[package]] 155 | name = "elastic-array" 156 | version = "0.10.0" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | dependencies = [ 159 | "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 160 | ] 161 | 162 | [[package]] 163 | name = "env_logger" 164 | version = "0.5.12" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | dependencies = [ 167 | "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 168 | "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 169 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 170 | "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 171 | "termcolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 172 | ] 173 | 174 | [[package]] 175 | name = "ethbloom" 176 | version = "0.5.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | dependencies = [ 179 | "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 181 | "fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 182 | "serde 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)", 183 | "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 184 | ] 185 | 186 | [[package]] 187 | name = "ethereum-types" 188 | version = "0.3.2" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | dependencies = [ 191 | "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 192 | "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 193 | "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 194 | "fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 195 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 196 | "serde 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)", 197 | "uint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 198 | ] 199 | 200 | [[package]] 201 | name = "ethereum-types-serialize" 202 | version = "0.2.1" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | dependencies = [ 205 | "serde 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)", 206 | ] 207 | 208 | [[package]] 209 | name = "fixed-hash" 210 | version = "0.2.1" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | dependencies = [ 213 | "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 216 | "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 217 | ] 218 | 219 | [[package]] 220 | name = "fnv" 221 | version = "1.0.6" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | 224 | [[package]] 225 | name = "fuchsia-zircon" 226 | version = "0.3.3" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | dependencies = [ 229 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 230 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 231 | ] 232 | 233 | [[package]] 234 | name = "fuchsia-zircon-sys" 235 | version = "0.3.3" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | 238 | [[package]] 239 | name = "futures" 240 | version = "0.1.23" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | 243 | [[package]] 244 | name = "futures-cpupool" 245 | version = "0.1.8" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | dependencies = [ 248 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 249 | "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 250 | ] 251 | 252 | [[package]] 253 | name = "gcc" 254 | version = "0.3.54" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | 257 | [[package]] 258 | name = "h2" 259 | version = "0.1.12" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | dependencies = [ 262 | "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 263 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 264 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 265 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 266 | "http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 267 | "indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 268 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 269 | "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 270 | "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 271 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 272 | ] 273 | 274 | [[package]] 275 | name = "heapsize" 276 | version = "0.4.2" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | dependencies = [ 279 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 280 | ] 281 | 282 | [[package]] 283 | name = "http" 284 | version = "0.1.10" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | dependencies = [ 287 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 288 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 289 | "itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 290 | ] 291 | 292 | [[package]] 293 | name = "httparse" 294 | version = "1.3.2" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | 297 | [[package]] 298 | name = "humantime" 299 | version = "1.1.1" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | dependencies = [ 302 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 303 | ] 304 | 305 | [[package]] 306 | name = "hyper" 307 | version = "0.12.8" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | dependencies = [ 310 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 311 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 312 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 313 | "h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 314 | "http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 315 | "httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 316 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 317 | "itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 318 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 319 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 320 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 321 | "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 322 | "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 323 | "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 324 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 325 | "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 326 | "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 327 | "tokio-timer 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 328 | "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 329 | ] 330 | 331 | [[package]] 332 | name = "indexmap" 333 | version = "1.0.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | 336 | [[package]] 337 | name = "iovec" 338 | version = "0.1.2" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | dependencies = [ 341 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 342 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 343 | ] 344 | 345 | [[package]] 346 | name = "itoa" 347 | version = "0.4.2" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | 350 | [[package]] 351 | name = "kernel32-sys" 352 | version = "0.2.2" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | dependencies = [ 355 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 356 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 357 | ] 358 | 359 | [[package]] 360 | name = "lazy_static" 361 | version = "1.1.0" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | dependencies = [ 364 | "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 365 | ] 366 | 367 | [[package]] 368 | name = "lazycell" 369 | version = "0.6.0" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | 372 | [[package]] 373 | name = "libc" 374 | version = "0.2.43" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | 377 | [[package]] 378 | name = "log" 379 | version = "0.4.4" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | dependencies = [ 382 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 383 | ] 384 | 385 | [[package]] 386 | name = "memchr" 387 | version = "2.0.1" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | dependencies = [ 390 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 391 | ] 392 | 393 | [[package]] 394 | name = "memoffset" 395 | version = "0.2.1" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | 398 | [[package]] 399 | name = "mio" 400 | version = "0.6.15" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | dependencies = [ 403 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 404 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 405 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 406 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 407 | "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 408 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 409 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 410 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 411 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 412 | "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 413 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 414 | ] 415 | 416 | [[package]] 417 | name = "miow" 418 | version = "0.2.1" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | dependencies = [ 421 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 422 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 423 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 424 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 425 | ] 426 | 427 | [[package]] 428 | name = "net2" 429 | version = "0.2.33" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | dependencies = [ 432 | "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 433 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 434 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 435 | ] 436 | 437 | [[package]] 438 | name = "nodrop" 439 | version = "0.1.12" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | 442 | [[package]] 443 | name = "num_cpus" 444 | version = "1.8.0" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | dependencies = [ 447 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 448 | ] 449 | 450 | [[package]] 451 | name = "proc-macro2" 452 | version = "0.4.13" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | dependencies = [ 455 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 456 | ] 457 | 458 | [[package]] 459 | name = "quick-error" 460 | version = "1.2.2" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | 463 | [[package]] 464 | name = "quote" 465 | version = "0.6.6" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | dependencies = [ 468 | "proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", 469 | ] 470 | 471 | [[package]] 472 | name = "rand" 473 | version = "0.3.22" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | dependencies = [ 476 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 477 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 478 | "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 479 | ] 480 | 481 | [[package]] 482 | name = "rand" 483 | version = "0.4.3" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | dependencies = [ 486 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 487 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 489 | ] 490 | 491 | [[package]] 492 | name = "redox_syscall" 493 | version = "0.1.40" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | 496 | [[package]] 497 | name = "redox_termios" 498 | version = "0.1.1" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | dependencies = [ 501 | "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 502 | ] 503 | 504 | [[package]] 505 | name = "regex" 506 | version = "1.0.2" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | dependencies = [ 509 | "aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 510 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 511 | "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 512 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 513 | "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 514 | ] 515 | 516 | [[package]] 517 | name = "regex-syntax" 518 | version = "0.6.2" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | dependencies = [ 521 | "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 522 | ] 523 | 524 | [[package]] 525 | name = "rlp" 526 | version = "0.2.2" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | dependencies = [ 529 | "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 530 | "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 531 | "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 532 | "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 533 | ] 534 | 535 | [[package]] 536 | name = "rust-crypto" 537 | version = "0.2.36" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | dependencies = [ 540 | "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", 541 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 542 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 543 | "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", 544 | "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 545 | ] 546 | 547 | [[package]] 548 | name = "rustc-hex" 549 | version = "1.0.0" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | 552 | [[package]] 553 | name = "rustc-serialize" 554 | version = "0.3.24" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | 557 | [[package]] 558 | name = "rustc_version" 559 | version = "0.2.3" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | dependencies = [ 562 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 563 | ] 564 | 565 | [[package]] 566 | name = "ryu" 567 | version = "0.2.4" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | 570 | [[package]] 571 | name = "scopeguard" 572 | version = "0.3.3" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | 575 | [[package]] 576 | name = "semver" 577 | version = "0.9.0" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | dependencies = [ 580 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 581 | ] 582 | 583 | [[package]] 584 | name = "semver-parser" 585 | version = "0.7.0" 586 | source = "registry+https://github.com/rust-lang/crates.io-index" 587 | 588 | [[package]] 589 | name = "serde" 590 | version = "1.0.72" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | 593 | [[package]] 594 | name = "serde_derive" 595 | version = "1.0.72" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | dependencies = [ 598 | "proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", 599 | "quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 600 | "syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)", 601 | ] 602 | 603 | [[package]] 604 | name = "serde_json" 605 | version = "1.0.26" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | dependencies = [ 608 | "itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 609 | "ryu 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "serde 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)", 611 | ] 612 | 613 | [[package]] 614 | name = "slab" 615 | version = "0.4.1" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | 618 | [[package]] 619 | name = "string" 620 | version = "0.1.1" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | 623 | [[package]] 624 | name = "strsim" 625 | version = "0.7.0" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | 628 | [[package]] 629 | name = "syn" 630 | version = "0.14.9" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | dependencies = [ 633 | "proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", 634 | "quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 635 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 636 | ] 637 | 638 | [[package]] 639 | name = "termcolor" 640 | version = "1.0.1" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | dependencies = [ 643 | "wincolor 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 644 | ] 645 | 646 | [[package]] 647 | name = "termion" 648 | version = "1.5.1" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | dependencies = [ 651 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 652 | "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 653 | "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 654 | ] 655 | 656 | [[package]] 657 | name = "textwrap" 658 | version = "0.10.0" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | dependencies = [ 661 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 662 | ] 663 | 664 | [[package]] 665 | name = "thread_local" 666 | version = "0.3.6" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | dependencies = [ 669 | "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 670 | ] 671 | 672 | [[package]] 673 | name = "time" 674 | version = "0.1.40" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | dependencies = [ 677 | "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", 678 | "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", 679 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 680 | ] 681 | 682 | [[package]] 683 | name = "tiny-keccak" 684 | version = "1.4.2" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | dependencies = [ 687 | "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 688 | ] 689 | 690 | [[package]] 691 | name = "tokio" 692 | version = "0.1.7" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | dependencies = [ 695 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 696 | "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", 697 | "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 698 | "tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 699 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 700 | "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 701 | "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 702 | "tokio-threadpool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 703 | "tokio-timer 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 704 | "tokio-udp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 705 | ] 706 | 707 | [[package]] 708 | name = "tokio-codec" 709 | version = "0.1.0" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | dependencies = [ 712 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 713 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 714 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 715 | ] 716 | 717 | [[package]] 718 | name = "tokio-executor" 719 | version = "0.1.3" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | dependencies = [ 722 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 723 | ] 724 | 725 | [[package]] 726 | name = "tokio-fs" 727 | version = "0.1.3" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | dependencies = [ 730 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 731 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 732 | "tokio-threadpool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 733 | ] 734 | 735 | [[package]] 736 | name = "tokio-io" 737 | version = "0.1.7" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | dependencies = [ 740 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 741 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 742 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 743 | ] 744 | 745 | [[package]] 746 | name = "tokio-reactor" 747 | version = "0.1.3" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | dependencies = [ 750 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 751 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 752 | "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", 753 | "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 754 | "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 755 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 756 | ] 757 | 758 | [[package]] 759 | name = "tokio-tcp" 760 | version = "0.1.1" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | dependencies = [ 763 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 764 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 765 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 766 | "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", 767 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 768 | "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 769 | ] 770 | 771 | [[package]] 772 | name = "tokio-threadpool" 773 | version = "0.1.5" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | dependencies = [ 776 | "crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 777 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 778 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 779 | "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 780 | "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 781 | "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 782 | ] 783 | 784 | [[package]] 785 | name = "tokio-timer" 786 | version = "0.2.5" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | dependencies = [ 789 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 790 | "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 791 | ] 792 | 793 | [[package]] 794 | name = "tokio-udp" 795 | version = "0.1.1" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | dependencies = [ 798 | "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 799 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 800 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 801 | "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", 802 | "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 803 | "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 804 | "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 805 | ] 806 | 807 | [[package]] 808 | name = "try-lock" 809 | version = "0.2.2" 810 | source = "registry+https://github.com/rust-lang/crates.io-index" 811 | 812 | [[package]] 813 | name = "ucd-util" 814 | version = "0.1.1" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | 817 | [[package]] 818 | name = "uint" 819 | version = "0.2.1" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | dependencies = [ 822 | "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 823 | "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 824 | "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 825 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 826 | ] 827 | 828 | [[package]] 829 | name = "unicode-width" 830 | version = "0.1.5" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | 833 | [[package]] 834 | name = "unicode-xid" 835 | version = "0.1.0" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | 838 | [[package]] 839 | name = "utf8-ranges" 840 | version = "1.0.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | 843 | [[package]] 844 | name = "vec_map" 845 | version = "0.8.1" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | 848 | [[package]] 849 | name = "version_check" 850 | version = "0.1.4" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | 853 | [[package]] 854 | name = "want" 855 | version = "0.0.6" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | dependencies = [ 858 | "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", 859 | "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 860 | "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 861 | ] 862 | 863 | [[package]] 864 | name = "winapi" 865 | version = "0.2.8" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | 868 | [[package]] 869 | name = "winapi" 870 | version = "0.3.5" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | dependencies = [ 873 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 874 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 875 | ] 876 | 877 | [[package]] 878 | name = "winapi-build" 879 | version = "0.1.1" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | 882 | [[package]] 883 | name = "winapi-i686-pc-windows-gnu" 884 | version = "0.4.0" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | 887 | [[package]] 888 | name = "winapi-x86_64-pc-windows-gnu" 889 | version = "0.4.0" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | 892 | [[package]] 893 | name = "wincolor" 894 | version = "1.0.0" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | dependencies = [ 897 | "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 898 | ] 899 | 900 | [[package]] 901 | name = "ws2_32-sys" 902 | version = "0.2.1" 903 | source = "registry+https://github.com/rust-lang/crates.io-index" 904 | dependencies = [ 905 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 906 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 907 | ] 908 | 909 | [[package]] 910 | name = "yaml-rust" 911 | version = "0.3.5" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | 914 | [metadata] 915 | "checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa" 916 | "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 917 | "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" 918 | "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 919 | "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 920 | "checksum byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8389c509ec62b9fe8eca58c502a0acaf017737355615243496cde4994f8fa4f9" 921 | "checksum bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e178b8e0e239e844b083d5a0d4a156b2654e67f9f80144d48398fcd736a24fb8" 922 | "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" 923 | "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" 924 | "checksum codechain-miner 0.1.0 (git+https://github.com/CodeChain-io/codechain-miner.git?rev=820e11e)" = "" 925 | "checksum crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8153ef04a7594ded05b427ffad46ddeaf22e63fd48d42b3e1e3bb4db07cae7" 926 | "checksum crossbeam-epoch 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2af0e75710d6181e234c8ecc79f14a97907850a541b13b0be1dd10992f2e4620" 927 | "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b" 928 | "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" 929 | "checksum cuckoo 0.1.0 (git+https://github.com/CodeChain-io/rust-cuckoo.git?rev=280cab9c)" = "" 930 | "checksum elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "88d4851b005ef16de812ea9acdb7bece2f0a40dd86c07b85631d7dafa54537bb" 931 | "checksum env_logger 0.5.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f4d7e69c283751083d53d01eac767407343b8b69c4bd70058e08adc2637cb257" 932 | "checksum ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a93a43ce2e9f09071449da36bfa7a1b20b950ee344b6904ff23de493b03b386" 933 | "checksum ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c48729b8aea8aedb12cf4cb2e5cef439fdfe2dda4a89e47eeebd15778ef53b6" 934 | "checksum ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ac59a21a9ce98e188f3dace9eb67a6c4a3c67ec7fbc7218cb827852679dc002" 935 | "checksum fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18d6fd718fb4396e7a9c93ac59ba7143501467ca7a143c145b5555a571d5576" 936 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 937 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 938 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 939 | "checksum futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "884dbe32a6ae4cd7da5c6db9b78114449df9953b8d490c9d7e1b51720b922c62" 940 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 941 | "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" 942 | "checksum h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a27e7ed946e8335bdf9a191bc1b9b14a03ba822d013d2f58437f4fabcbd7fc2c" 943 | "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" 944 | "checksum http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "dca621d0fa606a5ff2850b6e337b57ad6137ee4d67e940449643ff45af6874c6" 945 | "checksum httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b6288d7db100340ca12873fd4d08ad1b8f206a9457798dfb17c018a33fee540" 946 | "checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" 947 | "checksum hyper 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)" = "035400578c621d699f64d7220363d0301da39ed54546b0c1df7ad71abf8268f4" 948 | "checksum indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08173ba1e906efb6538785a8844dd496f5d34f0a2d88038e95195172fc667220" 949 | "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 950 | "checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606" 951 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 952 | "checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" 953 | "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" 954 | "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" 955 | "checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2" 956 | "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" 957 | "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" 958 | "checksum mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4fcfcb32d63961fb6f367bfd5d21e4600b92cd310f71f9dca25acae196eb1560" 959 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 960 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 961 | "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" 962 | "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" 963 | "checksum proc-macro2 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5697238f0d893c7f0ecc59c0999f18d2af85e424de441178bcacc9f9e6cf67" 964 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 965 | "checksum quote 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ed7d650913520df631972f21e104a4fa2f9c82a14afc65d17b388a2e29731e7c" 966 | "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" 967 | "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" 968 | "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" 969 | "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 970 | "checksum regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbbea44c5490a1e84357ff28b7d518b4619a159fed5d25f6c1de2d19cc42814" 971 | "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" 972 | "checksum rlp 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "89db7f8dfdd5eb7ab3ac3ece7a07fd273a680b4b224cb231181280e8996f9f0b" 973 | "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" 974 | "checksum rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ceb8ce7a5e520de349e1fa172baeba4a9e8d5ef06c47471863530bc4972ee1e" 975 | "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" 976 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 977 | "checksum ryu 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0568787116e13c652377b6846f5931454a363a8fdf8ae50463ee40935b278b" 978 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 979 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 980 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 981 | "checksum serde 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)" = "98b72cb11d2f90a50789254281aac9211092fd1ba87e067b45c94652fffe1cf1" 982 | "checksum serde_derive 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)" = "ccb40724ad173e215530b5217ffba55cdf34ef811e90023a43c948c5b04dc41f" 983 | "checksum serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "44dd2cfde475037451fa99b7e5df77aa3cfd1536575fa8e7a538ab36dcde49ae" 984 | "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" 985 | "checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" 986 | "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" 987 | "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" 988 | "checksum termcolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "722426c4a0539da2c4ffd9b419d90ad540b4cff4a053be9069c908d4d07e2836" 989 | "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 990 | "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" 991 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 992 | "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" 993 | "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" 994 | "checksum tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ee337e5f4e501fc32966fec6fe0ca0cc1c237b0b1b14a335f8bfe3c5f06e286" 995 | "checksum tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881e9645b81c2ce95fcb799ded2c29ffb9f25ef5bef909089a420e5961dd8ccb" 996 | "checksum tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "424f0c87ecd66b863045d84e384cb7ce0ae384d8b065b9f0363d29c0d1b30b2f" 997 | "checksum tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5cbe4ca6e71cb0b62a66e4e6f53a8c06a6eefe46cc5f665ad6f274c9906f135" 998 | "checksum tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a5c9635ee806f26d302b8baa1e145689a280d8f5aa8d0552e7344808da54cc21" 999 | "checksum tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8703a5762ff6913510dc64272c714c4389ffd8c4b3cf602879b8bd14ff06b604" 1000 | "checksum tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5b4c329b47f071eb8a746040465fa751bd95e4716e98daef6a9b4e434c17d565" 1001 | "checksum tokio-threadpool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "24ab84f574027b0e875378f31575cf175360891919e93a3490f07e76e00e4efb" 1002 | "checksum tokio-timer 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1c76b4e97a4f61030edff8bd272364e4f731b9f54c7307eb4eb733c3926eb96a" 1003 | "checksum tokio-udp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "43eb534af6e8f37d43ab1b612660df14755c42bd003c5f8d2475ee78cc4600c0" 1004 | "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 1005 | "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" 1006 | "checksum uint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "38051a96565903d81c9a9210ce11076b2218f3b352926baa1f5f6abbdfce8273" 1007 | "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" 1008 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1009 | "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" 1010 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 1011 | "checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" 1012 | "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" 1013 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1014 | "checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" 1015 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1016 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1017 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1018 | "checksum wincolor 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9dc3aa9dcda98b5a16150c54619c1ead22e3d3a5d458778ae914be760aa981a" 1019 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1020 | "checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" 1021 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "codechain-cuckoo-miner" 3 | version = "0.1.0" 4 | license = "AGPL-3.0" 5 | authors = ["CodeChain Team "] 6 | 7 | [dependencies] 8 | byteorder = "1.2" 9 | clap = { version = "2", features = ["yaml"] } 10 | codechain-miner = { git = "https://github.com/CodeChain-io/codechain-miner.git", rev = "820e11e" } 11 | cuckoo = { git = "https://github.com/CodeChain-io/rust-cuckoo.git", rev = "280cab9c" } 12 | ethereum-types = "0.3.2" 13 | env_logger = "0.5.10" 14 | log = "0.4.3" 15 | rlp = "0.2.2" 16 | rust-crypto = "0.2.36" 17 | rustc-hex = "1.0" 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CodeChain Cuckoo Miner [![Build Status](https://travis-ci.org/CodeChain-io/codechain-cuckoo-miner.svg?branch=master)](https://travis-ci.org/CodeChain-io/codechain-cuckoo-miner) 2 | Mining worker for Cuckoo algorithms in [CodeChain](https://github.com/CodeChain-io/codechain). 3 | 4 | ## Build 5 | 6 | CodeChain cuckoo miner is written in Rust. We recommend setting up a build environment with [rustup](https://rustup.rs/). 7 | 8 | To build an executable in release mode, run the following command. 9 | ``` 10 | cargo build --release 11 | ``` 12 | 13 | The resulting binary file can be found at `target/release/codechain-cuckoo-miner`. 14 | 15 | ## Usage 16 | 17 | ``` 18 | codechain-cuckoo-miner [OPTIONS] [SUBCOMMAND] 19 | ``` 20 | 21 | ### Usage Examples 22 | 23 | * N=0x10, M=0x8, L=6, **1** concurrent jobs : 24 | 25 | Using HTTP (listening on port **3333**, submitting on port **8080**) 26 | ``` 27 | codechain-cuckoo-miner -n 0x10 -m 0x8 -l 6 -j 1 http -p 3333 -s 8080 28 | ``` 29 | 30 | or 31 | 32 | Using Stratum 33 | ``` 34 | codechain-cuckoo-miner -n 0x10 -m 0x8 -l 6 -j 1 stratum 35 | ``` 36 | 37 | ## Configuration 38 | 39 | ### Common options 40 | 41 | | Option | Description | Default | Required | 42 | | :----: | ------------------------------ |:-------------:|:--------:| 43 | | `-n` | Number of vertices in graph | None | Yes | 44 | | `-m` | Number of edges in graph | None | Yes | 45 | | `-l` | Length of cycle to detect | None | Yes | 46 | | `-j` | Number of concurrent jobs | 1 | No | 47 | 48 | ### RPC Subcommands 49 | 50 | * HTTP 51 | 52 | | Option | Description | Default | Required | 53 | | :----: | ------------------------------ |:-------------:|:--------:| 54 | | `-p` | Port number to receive job | 3333 | No | 55 | | `-s` | Port number to submit solution | 8080 | No | 56 | 57 | * Stratum 58 | 59 | | Option | Description | Default | Required | 60 | | :----: | ------------------------------ |:-------------:|:--------:| 61 | | `-p` | Port number to stratum server | 8008 | No | 62 | | `-i` | Miner name | | No | 63 | | `-w` | Miner password | | No | 64 | -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | 1.38.0 2 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | indent_style = "Block" 2 | use_small_heuristics = "Off" # "Default" 3 | binop_separator = "Front" 4 | # combine_control_expr = true 5 | comment_width = 120 # 80 6 | condense_wildcard_suffixes = true # false 7 | control_brace_style = "AlwaysSameLine" 8 | # disable_all_formatting = false 9 | error_on_line_overflow = false # true 10 | # error_on_unformatted = false 11 | fn_args_layout = "Tall" 12 | brace_style = "PreferSameLine" # "SameLineWhere" 13 | empty_item_single_line = true 14 | enum_discrim_align_threshold = 0 15 | fn_single_line = false 16 | # where_single_line = false 17 | force_explicit_abi = true 18 | format_strings = false 19 | format_macro_matchers = false 20 | format_macro_bodies = true 21 | hard_tabs = false 22 | imports_indent = "Block" # "Visual" 23 | imports_layout = "Mixed" 24 | merge_imports = false 25 | match_block_trailing_comma = false 26 | max_width = 120 # 100 27 | merge_derives = true 28 | # force_multiline_blocks = false 29 | newline_style = "Unix" 30 | normalize_comments = false 31 | remove_nested_parens = true 32 | reorder_imports = true 33 | reorder_modules = true 34 | # reorder_impl_items = false 35 | # report_todo = "Never" 36 | # report_fixme = "Never" 37 | # skip_children = false 38 | space_after_colon = true 39 | space_before_colon = false 40 | struct_field_align_threshold = 0 41 | spaces_around_ranges = false 42 | ## struct_lit_single_line = true 43 | tab_spaces = 4 44 | trailing_comma = "Vertical" 45 | trailing_semicolon = false # true 46 | # type_punctuation_density = "Wide" 47 | use_field_init_shorthand = true # false 48 | use_try_shorthand = true # false 49 | # format_code_in_doc_comments = false 50 | wrap_comments = false 51 | match_arm_blocks = true 52 | overflow_delimited_expr = true 53 | blank_lines_upper_bound = 2 # 1 54 | blank_lines_lower_bound = 0 55 | # required_version 56 | hide_parse_errors = false 57 | color = "Always" # "Auto" 58 | unstable_features = false 59 | # license_template_path 60 | # ignore 61 | edition = "2018" 62 | # version 63 | normalize_doc_attributes = true # false 64 | inline_attribute_width = 0 65 | -------------------------------------------------------------------------------- /src/cli.yml: -------------------------------------------------------------------------------- 1 | name: codechain-cuckoo-miner 2 | version: "0.1.0" 3 | version_short: "v" 4 | author: CodeChain Team 5 | about: CodeChian Cuckoo Miner 6 | args: 7 | - max vertex: 8 | short: n 9 | long: max-vertex 10 | takes_value: true 11 | required: true 12 | - max edge: 13 | short: m 14 | long: max-edge 15 | takes_value: true 16 | required: true 17 | - cycle length: 18 | short: l 19 | long: length 20 | takes_value: true 21 | required: true 22 | - concurrent jobs: 23 | short: j 24 | long: jobs 25 | takes_value: true 26 | default_value: "1" 27 | 28 | subcommands: 29 | - http: 30 | about: HTTP RPC for Miner 31 | args: 32 | - listening port: 33 | short: p 34 | long: port 35 | takes_value: true 36 | default_value: "3333" 37 | - submitting port: 38 | short: s 39 | long: submit 40 | takes_value: true 41 | default_value: "8080" 42 | - stratum: 43 | about: Stratum RPC for Miner 44 | args: 45 | - server port: 46 | short: p 47 | long: port 48 | takes_value: true 49 | default_value: "8008" 50 | - miner name: 51 | short: i 52 | long: name 53 | takes_value: true 54 | default_value: "" 55 | - miner pwd: 56 | short: w 57 | long: pwd 58 | takes_value: true 59 | default_value: "" 60 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Kodebox, Inc. 2 | // This file is part of CodeChain. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as 6 | // published by the Free Software Foundation, either version 3 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | use codechain_miner::{Config, RpcConfig, Worker}; 18 | 19 | use super::worker::CuckooWorker; 20 | 21 | #[derive(Clone)] 22 | pub struct CuckooConfig { 23 | pub max_vertex: usize, 24 | pub max_edge: usize, 25 | pub cycle_length: usize, 26 | pub rpc_config: RpcConfig, 27 | pub concurrent_jobs: u16, 28 | } 29 | 30 | impl Config for CuckooConfig { 31 | fn rpc_config(&self) -> RpcConfig { 32 | self.rpc_config.clone() 33 | } 34 | 35 | fn jobs(&self) -> usize { 36 | self.concurrent_jobs as usize 37 | } 38 | 39 | fn worker(&self) -> Box { 40 | Box::new(CuckooWorker::new(self.clone())) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Kodebox, Inc. 2 | // This file is part of CodeChain. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as 6 | // published by the Free Software Foundation, either version 3 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | extern crate byteorder; 18 | #[macro_use] 19 | extern crate clap; 20 | extern crate codechain_miner; 21 | extern crate crypto; 22 | extern crate cuckoo; 23 | extern crate env_logger; 24 | extern crate ethereum_types; 25 | #[macro_use] 26 | extern crate log; 27 | extern crate rlp; 28 | extern crate rustc_hex; 29 | 30 | mod config; 31 | mod worker; 32 | 33 | use codechain_miner::{run, HttpConfig, RpcConfig, StratumConfig}; 34 | 35 | use self::config::CuckooConfig; 36 | 37 | macro_rules! hex_value_t { 38 | ($m:ident, $v:expr) => {{ 39 | let val = value_t!($m, $v, String).map_err(|_| format!("Invalid value"))?; 40 | if val.len() > 2 && &val[0..2] == "0x" { 41 | usize::from_str_radix(&val[2..], 16).map_err(|_| format!("'{}' isn't parsed", val)) 42 | } else { 43 | Err(format!("'{}' isn't a hexadecimal number", val)) 44 | } 45 | }}; 46 | } 47 | 48 | fn get_options() -> Result { 49 | let yaml = load_yaml!("./cli.yml"); 50 | let matches = clap::App::from_yaml(yaml).get_matches(); 51 | 52 | let max_vertex = hex_value_t!(matches, "max vertex").map_err(|e| format!("Invalid max vertex: {}", e))?; 53 | let max_edge = hex_value_t!(matches, "max edge").map_err(|e| format!("Invalid max edge: {}", e))?; 54 | let cycle_length = value_t!(matches, "cycle length", usize).map_err(|_| "Invalid cycle length")?; 55 | let concurrent_jobs = value_t!(matches, "concurrent jobs", u16).map_err(|_| "Invalid concurrent jobs")?; 56 | 57 | let rpc_config: RpcConfig = if let Some(ref matches) = matches.subcommand_matches("http") { 58 | let listening_port = value_t!(matches, "listening port", u16).map_err(|_| "Invalid listening port")?; 59 | let submitting_port = value_t!(matches, "submitting port", u16).map_err(|_| "Invalid submitting port")?; 60 | 61 | RpcConfig::Http(HttpConfig { 62 | listen_port: listening_port, 63 | submitting_port, 64 | }) 65 | } else if let Some(ref matches) = matches.subcommand_matches("stratum") { 66 | let server_port = value_t!(matches, "server port", u16).map_err(|_| "Invalid server port")?; 67 | let miner_name = value_t!(matches, "miner name", String).map_err(|_| "Invalid miner name")?; 68 | let miner_pwd = value_t!(matches, "miner pwd", String).map_err(|_| "Invalid miner password")?; 69 | 70 | RpcConfig::Stratum(StratumConfig { 71 | port: server_port, 72 | id: miner_name, 73 | pwd: miner_pwd, 74 | }) 75 | } else { 76 | return Err("Invalid RPC Config".to_string()) 77 | }; 78 | 79 | Ok(CuckooConfig { 80 | max_vertex, 81 | max_edge, 82 | cycle_length, 83 | rpc_config, 84 | concurrent_jobs, 85 | }) 86 | } 87 | 88 | fn main() -> Result<(), String> { 89 | env_logger::init(); 90 | let worker_config = get_options()?; 91 | 92 | run(worker_config); 93 | Ok(()) 94 | } 95 | -------------------------------------------------------------------------------- /src/worker.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Kodebox, Inc. 2 | // This file is part of CodeChain. 3 | // 4 | // This program is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU Affero General Public License as 6 | // published by the Free Software Foundation, either version 3 of the 7 | // License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU Affero General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Affero General Public License 15 | // along with this program. If not, see . 16 | 17 | use byteorder::{ByteOrder, LittleEndian}; 18 | use codechain_miner::Worker; 19 | use crypto::blake2b::Blake2b; 20 | use crypto::digest::Digest; 21 | use cuckoo::Cuckoo; 22 | use ethereum_types::{H256, U256}; 23 | use rlp; 24 | 25 | use super::config::CuckooConfig; 26 | 27 | pub fn blake256>(s: T) -> H256 { 28 | let input = s.as_ref(); 29 | let mut result = H256::default(); 30 | let mut hasher = Blake2b::new(32); 31 | hasher.input(input); 32 | hasher.result(&mut *result); 33 | result 34 | } 35 | 36 | pub struct CuckooWorker { 37 | message: Vec, 38 | nonce: u64, 39 | target: U256, 40 | is_executed: bool, 41 | solver: Cuckoo, 42 | } 43 | 44 | impl CuckooWorker { 45 | pub fn new(config: CuckooConfig) -> Self { 46 | Self { 47 | message: Vec::new(), 48 | nonce: 0, 49 | target: U256::zero(), 50 | is_executed: false, 51 | solver: Cuckoo::new(config.max_vertex, config.max_edge, config.cycle_length), 52 | } 53 | } 54 | } 55 | 56 | impl Worker for CuckooWorker { 57 | fn init(&mut self, message: &[u8], nonce: u64, target: &U256) { 58 | self.message = message.to_vec(); 59 | // FIXME: check message length 60 | LittleEndian::write_u64(&mut self.message, nonce); 61 | 62 | self.nonce = nonce; 63 | self.target = *target; 64 | 65 | self.is_executed = false; 66 | } 67 | 68 | fn proceed(&mut self) -> Option>> { 69 | if self.is_finished() { 70 | return None 71 | } 72 | self.is_executed = true; 73 | if let Some(proof) = self.solver.solve(&self.message) { 74 | let hash = blake256(rlp::encode_list(&proof)); 75 | let current_score = U256::from(hash); 76 | if current_score <= self.target { 77 | info!("Solution found.\n nonce: {}\n proof: {:?}", self.nonce, proof); 78 | let nonce_bytes = ::rlp::encode(&self.nonce).to_vec(); 79 | let proof_bytes = ::rlp::encode_list(&proof).to_vec(); 80 | 81 | return Some(vec![nonce_bytes, proof_bytes]) 82 | } 83 | trace!("Retry.\n score : {:#0128x}\n target: {:#0128x}", current_score, self.target); 84 | } 85 | None 86 | } 87 | 88 | fn is_finished(&self) -> bool { 89 | self.is_executed 90 | } 91 | } 92 | --------------------------------------------------------------------------------