Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec81d67009 | ||
|
|
2a7dc644b7 | ||
|
|
b00a21f39a |
@@ -146,8 +146,9 @@ build-android:
|
|||||||
script:
|
script:
|
||||||
- scripts/gitlab/build-unix.sh
|
- scripts/gitlab/build-unix.sh
|
||||||
tags:
|
tags:
|
||||||
- rust-arm
|
- linux-docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
<<: *collect_artifacts
|
||||||
|
|
||||||
test-beta:
|
test-beta:
|
||||||
stage: optional
|
stage: optional
|
||||||
|
|||||||
72
Cargo.lock
generated
72
Cargo.lock
generated
@@ -276,7 +276,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethjson 0.1.0",
|
"ethjson 0.1.0",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -504,7 +504,7 @@ name = "elastic-array"
|
|||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -635,7 +635,7 @@ dependencies = [
|
|||||||
"fake-hardware-wallet 0.0.1",
|
"fake-hardware-wallet 0.0.1",
|
||||||
"hardware-wallet 1.12.0",
|
"hardware-wallet 1.12.0",
|
||||||
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"journaldb 0.2.0",
|
"journaldb 0.2.0",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -716,7 +716,7 @@ dependencies = [
|
|||||||
"fastmap 0.1.0",
|
"fastmap 0.1.0",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"keccak-hasher 0.1.1",
|
"keccak-hasher 0.1.1",
|
||||||
@@ -769,7 +769,7 @@ dependencies = [
|
|||||||
"ethkey 0.3.0",
|
"ethkey 0.3.0",
|
||||||
"fetch 0.1.0",
|
"fetch 0.1.0",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"hyper 0.12.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hyper 0.12.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -854,7 +854,7 @@ dependencies = [
|
|||||||
"ethkey 0.3.0",
|
"ethkey 0.3.0",
|
||||||
"fetch 0.1.0",
|
"fetch 0.1.0",
|
||||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -963,7 +963,7 @@ dependencies = [
|
|||||||
"ethkey 0.3.0",
|
"ethkey 0.3.0",
|
||||||
"fastmap 0.1.0",
|
"fastmap 0.1.0",
|
||||||
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"keccak-hasher 0.1.1",
|
"keccak-hasher 0.1.1",
|
||||||
"kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -987,7 +987,7 @@ dependencies = [
|
|||||||
"ethjson 0.1.0",
|
"ethjson 0.1.0",
|
||||||
"ethkey 0.3.0",
|
"ethkey 0.3.0",
|
||||||
"evm 0.1.0",
|
"evm 0.1.0",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1109,7 +1109,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1219,7 +1219,7 @@ name = "fixed-hash"
|
|||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1246,6 +1246,11 @@ dependencies = [
|
|||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fs_extra"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fuchsia-zircon"
|
name = "fuchsia-zircon"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
@@ -1361,8 +1366,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "heapsize"
|
name = "heapsize"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/cheme/heapsize.git?branch=ec-macfix#421df390a930cb523a09e5528e6fe57b534b3b26"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"jemallocator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1569,6 +1575,25 @@ name = "itoa"
|
|||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jemalloc-sys"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jemallocator"
|
||||||
|
version = "0.1.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
dependencies = [
|
||||||
|
"jemalloc-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jni"
|
name = "jni"
|
||||||
version = "0.10.2"
|
version = "0.10.2"
|
||||||
@@ -1595,7 +1620,7 @@ dependencies = [
|
|||||||
"ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fastmap 0.1.0",
|
"fastmap 0.1.0",
|
||||||
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"keccak-hasher 0.1.1",
|
"keccak-hasher 0.1.1",
|
||||||
"kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1922,7 +1947,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
name = "memory-cache"
|
name = "memory-cache"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1937,7 +1962,7 @@ version = "0.3.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"plain_hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"plain_hasher 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -2210,7 +2235,7 @@ version = "1.12.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"panic_hook 0.1.0",
|
"panic_hook 0.1.0",
|
||||||
"parity-ethereum 2.2.6",
|
"parity-ethereum 2.2.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2226,7 +2251,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-ethereum"
|
name = "parity-ethereum"
|
||||||
version = "2.2.6"
|
version = "2.2.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2275,7 +2300,7 @@ dependencies = [
|
|||||||
"parity-rpc-client 1.4.0",
|
"parity-rpc-client 1.4.0",
|
||||||
"parity-runtime 0.1.0",
|
"parity-runtime 0.1.0",
|
||||||
"parity-updater 1.12.0",
|
"parity-updater 1.12.0",
|
||||||
"parity-version 2.2.6",
|
"parity-version 2.2.8",
|
||||||
"parity-whisper 0.1.0",
|
"parity-whisper 0.1.0",
|
||||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2430,7 +2455,7 @@ dependencies = [
|
|||||||
"parity-crypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-crypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-runtime 0.1.0",
|
"parity-runtime 0.1.0",
|
||||||
"parity-updater 1.12.0",
|
"parity-updater 1.12.0",
|
||||||
"parity-version 2.2.6",
|
"parity-version 2.2.8",
|
||||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"patricia-trie 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"patricia-trie 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2527,7 +2552,7 @@ dependencies = [
|
|||||||
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-hash-fetch 1.12.0",
|
"parity-hash-fetch 1.12.0",
|
||||||
"parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-path 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-version 2.2.6",
|
"parity-version 2.2.8",
|
||||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -2537,7 +2562,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-version"
|
name = "parity-version"
|
||||||
version = "2.2.6"
|
version = "2.2.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -3745,7 +3770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)",
|
||||||
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -4155,6 +4180,7 @@ dependencies = [
|
|||||||
"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
|
"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
|
||||||
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
||||||
"checksum fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb"
|
"checksum fs-swap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb"
|
||||||
|
"checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674"
|
||||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||||
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||||
"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
|
"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
|
||||||
@@ -4167,7 +4193,7 @@ dependencies = [
|
|||||||
"checksum h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a27e7ed946e8335bdf9a191bc1b9b14a03ba822d013d2f58437f4fabcbd7fc2c"
|
"checksum h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a27e7ed946e8335bdf9a191bc1b9b14a03ba822d013d2f58437f4fabcbd7fc2c"
|
||||||
"checksum hamming 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65043da274378d68241eb9a8f8f8aa54e349136f7b8e12f63e3ef44043cc30e1"
|
"checksum hamming 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65043da274378d68241eb9a8f8f8aa54e349136f7b8e12f63e3ef44043cc30e1"
|
||||||
"checksum hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d91261ee336dd046ac7df28306cb297b7a7228bd1ae25e9a57f4ed5e0ab628c7"
|
"checksum hashdb 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d91261ee336dd046ac7df28306cb297b7a7228bd1ae25e9a57f4ed5e0ab628c7"
|
||||||
"checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461"
|
"checksum heapsize 0.4.2 (git+https://github.com/cheme/heapsize.git?branch=ec-macfix)" = "<none>"
|
||||||
"checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
|
"checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
|
||||||
"checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa"
|
"checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa"
|
||||||
"checksum hidapi 0.3.1 (git+https://github.com/paritytech/hidapi-rs)" = "<none>"
|
"checksum hidapi 0.3.1 (git+https://github.com/paritytech/hidapi-rs)" = "<none>"
|
||||||
@@ -4189,6 +4215,8 @@ dependencies = [
|
|||||||
"checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc"
|
"checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc"
|
||||||
"checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450"
|
"checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450"
|
||||||
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
|
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
|
||||||
|
"checksum jemalloc-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc62c8e50e381768ce8ee0428ee53741929f7ebd73e4d83f669bcf7693e00ae"
|
||||||
|
"checksum jemallocator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9f0cd42ac65f758063fea55126b0148b1ce0a6354ff78e07a4d6806bc65c4ab3"
|
||||||
"checksum jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecfa3b81afc64d9a6539c4eece96ac9a93c551c713a313800dade8e33d7b5c1"
|
"checksum jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecfa3b81afc64d9a6539c4eece96ac9a93c551c713a313800dade8e33d7b5c1"
|
||||||
"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
||||||
"checksum jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-2.2)" = "<none>"
|
"checksum jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-2.2)" = "<none>"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
description = "Parity Ethereum client"
|
description = "Parity Ethereum client"
|
||||||
name = "parity-ethereum"
|
name = "parity-ethereum"
|
||||||
# NOTE Make sure to update util/version/Cargo.toml as well
|
# NOTE Make sure to update util/version/Cargo.toml as well
|
||||||
version = "2.2.6"
|
version = "2.2.8"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
@@ -137,3 +137,6 @@ members = [
|
|||||||
"util/patricia-trie-ethereum",
|
"util/patricia-trie-ethereum",
|
||||||
"util/fastmap",
|
"util/fastmap",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
heapsize = { git = "https://github.com/cheme/heapsize.git", branch = "ec-macfix" }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"blockReward": {
|
"blockReward": {
|
||||||
"0x0": "0x4563918244f40000",
|
"0x0": "0x4563918244f40000",
|
||||||
"0x42ae50": "0x29a2241af62c0000",
|
"0x42ae50": "0x29a2241af62c0000",
|
||||||
"0x6c0840": "0x1bc16d674ec80000"
|
"0x6f1580": "0x1bc16d674ec80000"
|
||||||
},
|
},
|
||||||
"homesteadTransition": "0x118c30",
|
"homesteadTransition": "0x118c30",
|
||||||
"daoHardforkTransition": "0x1d4c00",
|
"daoHardforkTransition": "0x1d4c00",
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
"eip100bTransition": "0x42ae50",
|
"eip100bTransition": "0x42ae50",
|
||||||
"difficultyBombDelays": {
|
"difficultyBombDelays": {
|
||||||
"0x42ae50": "0x2dc6c0",
|
"0x42ae50": "0x2dc6c0",
|
||||||
"0x6c0840": "0x1e8480"
|
"0x6f1580": "0x1e8480"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,10 +162,9 @@
|
|||||||
"eip211Transition": "0x42ae50",
|
"eip211Transition": "0x42ae50",
|
||||||
"eip214Transition": "0x42ae50",
|
"eip214Transition": "0x42ae50",
|
||||||
"eip658Transition": "0x42ae50",
|
"eip658Transition": "0x42ae50",
|
||||||
"eip145Transition": "0x6c0840",
|
"eip145Transition": "0x6f1580",
|
||||||
"eip1014Transition": "0x6c0840",
|
"eip1014Transition": "0x6f1580",
|
||||||
"eip1052Transition": "0x6c0840",
|
"eip1052Transition": "0x6f1580"
|
||||||
"eip1283Transition": "0x6c0840"
|
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
"eip1014Transition": "0x8c6180",
|
"eip1014Transition": "0x8c6180",
|
||||||
"eip1052Transition": "0x8c6180",
|
"eip1052Transition": "0x8c6180",
|
||||||
"eip1283Transition": "0x8c6180",
|
"eip1283Transition": "0x8c6180",
|
||||||
|
"eip1283DisableTransition": "0x9c7b61",
|
||||||
"kip4Transition": "0x8c6180",
|
"kip4Transition": "0x8c6180",
|
||||||
"kip6Transition": "0x8c6180"
|
"kip6Transition": "0x8c6180"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,11 +34,7 @@
|
|||||||
"eip140Transition": "0x0",
|
"eip140Transition": "0x0",
|
||||||
"eip211Transition": "0x0",
|
"eip211Transition": "0x0",
|
||||||
"eip214Transition": "0x0",
|
"eip214Transition": "0x0",
|
||||||
"eip658Transition": "0x0",
|
"eip658Transition": "0x0"
|
||||||
"eip145Transition": 6843780,
|
|
||||||
"eip1014Transition": 6843780,
|
|
||||||
"eip1052Transition": 6843780,
|
|
||||||
"eip1283Transition": 6843780
|
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"eip145Transition": 6464300,
|
"eip145Transition": 6464300,
|
||||||
"eip1014Transition": 6464300,
|
"eip1014Transition": 6464300,
|
||||||
"eip1052Transition": 6464300,
|
"eip1052Transition": 6464300,
|
||||||
"eip1283Transition": 6464300
|
"eip1283Transition": 6464300,
|
||||||
|
"eip1283DisableTransition": 7026400
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
|
|||||||
@@ -45,7 +45,8 @@
|
|||||||
"eip145Transition": "0x408b70",
|
"eip145Transition": "0x408b70",
|
||||||
"eip1014Transition": "0x408b70",
|
"eip1014Transition": "0x408b70",
|
||||||
"eip1052Transition": "0x408b70",
|
"eip1052Transition": "0x408b70",
|
||||||
"eip1283Transition": "0x408b70"
|
"eip1283Transition": "0x408b70",
|
||||||
|
"eip1283DisableTransition": "0x4b5e82"
|
||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
|
|||||||
Submodule ethcore/res/ethereum/tests updated: 2cd62aeec1...420f443477
@@ -1,42 +1,4 @@
|
|||||||
{ "block":
|
{
|
||||||
[
|
"block": [],
|
||||||
{
|
"state": []
|
||||||
"reference": "None",
|
|
||||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
|
||||||
"failing": "GeneralStateTest_stCreate2",
|
|
||||||
"subtests": ["RevertInCreateInInitCreate2_d0g0v0_Constantinople"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "None",
|
|
||||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
|
||||||
"failing": "GeneralStateTest_stRevertTest",
|
|
||||||
"subtests": ["RevertInCreateInInit_d0g0v0_Constantinople"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"state":
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"reference": "None",
|
|
||||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
|
||||||
"failing": "stCreate2Test",
|
|
||||||
"subtests": {
|
|
||||||
"RevertInCreateInInitCreate2": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"reference": "None",
|
|
||||||
"comment": "This failing test is deemed skippable. Could not happen on a mainnet.",
|
|
||||||
"failing": "stRevertTest",
|
|
||||||
"subtests": {
|
|
||||||
"RevertInCreateInInit": {
|
|
||||||
"subnumbers": ["1"],
|
|
||||||
"chain": "Constantinople (test)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,12 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B>
|
|||||||
where T: Tracer, V: VMTracer, B: StateBackend
|
where T: Tracer, V: VMTracer, B: StateBackend
|
||||||
{
|
{
|
||||||
fn initial_storage_at(&self, key: &H256) -> vm::Result<H256> {
|
fn initial_storage_at(&self, key: &H256) -> vm::Result<H256> {
|
||||||
self.state.checkpoint_storage_at(0, &self.origin_info.address, key).map(|v| v.unwrap_or(H256::zero())).map_err(Into::into)
|
if self.state.is_base_storage_root_unchanged(&self.origin_info.address)? {
|
||||||
|
self.state.checkpoint_storage_at(0, &self.origin_info.address, key).map(|v| v.unwrap_or(H256::zero())).map_err(Into::into)
|
||||||
|
} else {
|
||||||
|
warn!(target: "externalities", "Detected existing account {:#x} where a forced contract creation happened.", self.origin_info.address);
|
||||||
|
Ok(H256::zero())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn storage_at(&self, key: &H256) -> vm::Result<H256> {
|
fn storage_at(&self, key: &H256) -> vm::Result<H256> {
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ pub struct CommonParams {
|
|||||||
pub eip1052_transition: BlockNumber,
|
pub eip1052_transition: BlockNumber,
|
||||||
/// Number of first block where EIP-1283 rules begin.
|
/// Number of first block where EIP-1283 rules begin.
|
||||||
pub eip1283_transition: BlockNumber,
|
pub eip1283_transition: BlockNumber,
|
||||||
|
/// Number of first block where EIP-1283 rules end.
|
||||||
|
pub eip1283_disable_transition: BlockNumber,
|
||||||
/// Number of first block where EIP-1014 rules begin.
|
/// Number of first block where EIP-1014 rules begin.
|
||||||
pub eip1014_transition: BlockNumber,
|
pub eip1014_transition: BlockNumber,
|
||||||
/// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin.
|
/// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin.
|
||||||
@@ -188,7 +190,7 @@ impl CommonParams {
|
|||||||
schedule.have_return_data = block_number >= self.eip211_transition;
|
schedule.have_return_data = block_number >= self.eip211_transition;
|
||||||
schedule.have_bitwise_shifting = block_number >= self.eip145_transition;
|
schedule.have_bitwise_shifting = block_number >= self.eip145_transition;
|
||||||
schedule.have_extcodehash = block_number >= self.eip1052_transition;
|
schedule.have_extcodehash = block_number >= self.eip1052_transition;
|
||||||
schedule.eip1283 = block_number >= self.eip1283_transition;
|
schedule.eip1283 = block_number >= self.eip1283_transition && !(block_number >= self.eip1283_disable_transition);
|
||||||
if block_number >= self.eip210_transition {
|
if block_number >= self.eip210_transition {
|
||||||
schedule.blockhash_gas = 800;
|
schedule.blockhash_gas = 800;
|
||||||
}
|
}
|
||||||
@@ -296,6 +298,10 @@ impl From<ethjson::spec::Params> for CommonParams {
|
|||||||
BlockNumber::max_value,
|
BlockNumber::max_value,
|
||||||
Into::into,
|
Into::into,
|
||||||
),
|
),
|
||||||
|
eip1283_disable_transition: p.eip1283_disable_transition.map_or_else(
|
||||||
|
BlockNumber::max_value,
|
||||||
|
Into::into,
|
||||||
|
),
|
||||||
eip1014_transition: p.eip1014_transition.map_or_else(
|
eip1014_transition: p.eip1014_transition.map_or_else(
|
||||||
BlockNumber::max_value,
|
BlockNumber::max_value,
|
||||||
Into::into,
|
Into::into,
|
||||||
|
|||||||
@@ -447,6 +447,11 @@ impl Account {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Whether the base storage root of this account is unchanged.
|
||||||
|
pub fn is_base_storage_root_unchanged(&self) -> bool {
|
||||||
|
self.original_storage_cache.is_none()
|
||||||
|
}
|
||||||
|
|
||||||
/// Storage root where the account changes are based upon.
|
/// Storage root where the account changes are based upon.
|
||||||
pub fn base_storage_root(&self) -> H256 {
|
pub fn base_storage_root(&self) -> H256 {
|
||||||
self.storage_root
|
self.storage_root
|
||||||
|
|||||||
@@ -539,6 +539,13 @@ impl<B: Backend> State<B> {
|
|||||||
|a| a.as_ref().map_or(self.account_start_nonce, |account| *account.nonce()))
|
|a| a.as_ref().map_or(self.account_start_nonce, |account| *account.nonce()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Whether the base storage root of an account remains unchanged.
|
||||||
|
pub fn is_base_storage_root_unchanged(&self, a: &Address) -> TrieResult<bool> {
|
||||||
|
Ok(self.ensure_cached(a, RequireCache::None, true,
|
||||||
|
|a| a.as_ref().map(|account| account.is_base_storage_root_unchanged()))?
|
||||||
|
.unwrap_or(true))
|
||||||
|
}
|
||||||
|
|
||||||
/// Get the storage root of account `a`.
|
/// Get the storage root of account `a`.
|
||||||
pub fn storage_root(&self, a: &Address) -> TrieResult<Option<H256>> {
|
pub fn storage_root(&self, a: &Address) -> TrieResult<Option<H256>> {
|
||||||
self.ensure_cached(a, RequireCache::None, true,
|
self.ensure_cached(a, RequireCache::None, true,
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity Ethereum.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity Ethereum is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
|
|
||||||
// Parity is distributed in the hope that it will be useful,
|
// Parity Ethereum is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Spec params deserialization.
|
//! Spec params deserialization.
|
||||||
|
|
||||||
@@ -112,6 +112,10 @@ pub struct Params {
|
|||||||
/// See `CommonParams` docs.
|
/// See `CommonParams` docs.
|
||||||
#[serde(rename="eip1283Transition")]
|
#[serde(rename="eip1283Transition")]
|
||||||
pub eip1283_transition: Option<Uint>,
|
pub eip1283_transition: Option<Uint>,
|
||||||
|
/// See `CommonParams` docs.
|
||||||
|
#[serde(rename="eip1283DisableTransition")]
|
||||||
|
pub eip1283_disable_transition: Option<Uint>,
|
||||||
|
/// See `CommonParams` docs.
|
||||||
#[serde(rename="eip1014Transition")]
|
#[serde(rename="eip1014Transition")]
|
||||||
pub eip1014_transition: Option<Uint>,
|
pub eip1014_transition: Option<Uint>,
|
||||||
/// See `CommonParams` docs.
|
/// See `CommonParams` docs.
|
||||||
@@ -210,3 +214,4 @@ mod tests {
|
|||||||
let _deserialized: Params = serde_json::from_str(s).unwrap();
|
let _deserialized: Params = serde_json::from_str(s).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,38 +10,36 @@ echo "CARGO_TARGET: " $CARGO_TARGET
|
|||||||
echo "CC: " $CC
|
echo "CC: " $CC
|
||||||
echo "CXX: " $CXX
|
echo "CXX: " $CXX
|
||||||
|
|
||||||
echo "__________CARGO CONFIG__________"
|
echo "_____ Building target: "$CARGO_TARGET" _____"
|
||||||
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
||||||
then
|
then
|
||||||
# use build container's cargo config
|
# only thing we need for android
|
||||||
cat /.cargo/config
|
time cargo build --target $CARGO_TARGET --release -p parity-clib --features final
|
||||||
else
|
else
|
||||||
mkdir -p .cargo
|
time cargo build --target $CARGO_TARGET --release --features final
|
||||||
rm -f .cargo/config
|
time cargo build --target $CARGO_TARGET --release -p evmbin
|
||||||
echo "[target.$CARGO_TARGET]" >> .cargo/config
|
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
|
||||||
echo "linker= \"$CC\"" >> .cargo/config
|
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
|
||||||
cat .cargo/config
|
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "_____ Building target: "$CARGO_TARGET" _____"
|
|
||||||
time cargo build --target $CARGO_TARGET --release --features final
|
|
||||||
time cargo build --target $CARGO_TARGET --release -p evmbin
|
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
|
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
|
|
||||||
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
|
||||||
|
|
||||||
echo "_____ Post-processing binaries _____"
|
echo "_____ Post-processing binaries _____"
|
||||||
rm -rf artifacts
|
rm -rf artifacts
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
cd artifacts
|
cd artifacts
|
||||||
mkdir -p $CARGO_TARGET
|
mkdir -p $CARGO_TARGET
|
||||||
cd $CARGO_TARGET
|
cd $CARGO_TARGET
|
||||||
cp -v ../../target/$CARGO_TARGET/release/parity ./parity
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
||||||
cp -v ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
|
then
|
||||||
cp -v ../../target/$CARGO_TARGET/release/ethstore ./ethstore
|
# only thing we need for android
|
||||||
cp -v ../../target/$CARGO_TARGET/release/ethkey ./ethkey
|
cp -v ../../target/$CARGO_TARGET/release/libparity.so ./libparity.so
|
||||||
cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper
|
else
|
||||||
|
cp -v ../../target/$CARGO_TARGET/release/parity ./parity
|
||||||
|
cp -v ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
|
||||||
|
cp -v ../../target/$CARGO_TARGET/release/ethstore ./ethstore
|
||||||
|
cp -v ../../target/$CARGO_TARGET/release/ethkey ./ethkey
|
||||||
|
cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# stripping can also be done on release build time
|
# stripping can also be done on release build time
|
||||||
|
|||||||
@@ -3,13 +3,17 @@
|
|||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
|
|
||||||
TRACK=`awk -F '=' '/^track/ {print $2}' ./util/version/Cargo.toml`
|
# some necromancy:
|
||||||
|
# gsub(/"/, "", $2) deletes "qoutes"
|
||||||
|
# gsub(/ /, "", $2) deletes whitespaces
|
||||||
|
TRACK=`awk -F '=' '/^track/ {gsub(/"/, "", $2); gsub(/ /, "", $2); print $2}' ./util/version/Cargo.toml`
|
||||||
|
echo Track is: $TRACK
|
||||||
|
|
||||||
case ${TRACK} in
|
case ${TRACK} in
|
||||||
nightly) export GRADE="devel" CHANNEL="edge";;
|
nightly) export GRADE="devel" CHANNEL="edge";;
|
||||||
beta) export GRADE="stable" CHANNEL="beta";;
|
beta) export GRADE="stable" CHANNEL="beta";;
|
||||||
stable) export GRADE="stable" CHANNEL="stable";;
|
stable) export GRADE="stable" CHANNEL="stable";;
|
||||||
*) echo "No release" exit 0;;
|
*) echo "No release" && exit 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
|
SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
|
||||||
|
|||||||
@@ -53,12 +53,15 @@ const REQUEST_BACKOFF: [Duration; 4] = [
|
|||||||
Duration::from_secs(64)
|
Duration::from_secs(64)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const NODE_LAST_SEEN_TIMEOUT: Duration = Duration::from_secs(24*60*60);
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct NodeEntry {
|
pub struct NodeEntry {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
pub endpoint: NodeEndpoint,
|
pub endpoint: NodeEndpoint,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct BucketEntry {
|
pub struct BucketEntry {
|
||||||
pub address: NodeEntry,
|
pub address: NodeEntry,
|
||||||
pub id_hash: H256,
|
pub id_hash: H256,
|
||||||
@@ -89,6 +92,12 @@ struct FindNodeRequest {
|
|||||||
answered: bool,
|
answered: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy)]
|
||||||
|
enum PingReason {
|
||||||
|
Default,
|
||||||
|
FromDiscoveryRequest(NodeId)
|
||||||
|
}
|
||||||
|
|
||||||
struct PingRequest {
|
struct PingRequest {
|
||||||
// Time when the request was sent
|
// Time when the request was sent
|
||||||
sent_at: Instant,
|
sent_at: Instant,
|
||||||
@@ -99,8 +108,10 @@ struct PingRequest {
|
|||||||
// The hash Parity used to respond with (until rev 01f825b0e1f1c4c420197b51fc801cbe89284b29)
|
// The hash Parity used to respond with (until rev 01f825b0e1f1c4c420197b51fc801cbe89284b29)
|
||||||
#[deprecated()]
|
#[deprecated()]
|
||||||
deprecated_echo_hash: H256,
|
deprecated_echo_hash: H256,
|
||||||
|
reason: PingReason
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct NodeBucket {
|
pub struct NodeBucket {
|
||||||
nodes: VecDeque<BucketEntry>, //sorted by last active
|
nodes: VecDeque<BucketEntry>, //sorted by last active
|
||||||
}
|
}
|
||||||
@@ -178,7 +189,7 @@ impl<'a> Discovery<'a> {
|
|||||||
if self.node_buckets[dist].nodes.iter().any(|n| n.id_hash == id_hash) {
|
if self.node_buckets[dist].nodes.iter().any(|n| n.id_hash == id_hash) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.try_ping(e);
|
self.try_ping(e, PingReason::Default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +232,7 @@ impl<'a> Discovery<'a> {
|
|||||||
} else { None }
|
} else { None }
|
||||||
};
|
};
|
||||||
if let Some(node) = ping {
|
if let Some(node) = ping {
|
||||||
self.try_ping(node);
|
self.try_ping(node, PingReason::Default);
|
||||||
}
|
}
|
||||||
Some(TableUpdates { added: added_map, removed: HashSet::new() })
|
Some(TableUpdates { added: added_map, removed: HashSet::new() })
|
||||||
}
|
}
|
||||||
@@ -244,7 +255,7 @@ impl<'a> Discovery<'a> {
|
|||||||
fn update_new_nodes(&mut self) {
|
fn update_new_nodes(&mut self) {
|
||||||
while self.in_flight_pings.len() < MAX_NODES_PING {
|
while self.in_flight_pings.len() < MAX_NODES_PING {
|
||||||
match self.adding_nodes.pop() {
|
match self.adding_nodes.pop() {
|
||||||
Some(next) => self.try_ping(next),
|
Some(next) => self.try_ping(next, PingReason::Default),
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,7 +309,7 @@ impl<'a> Discovery<'a> {
|
|||||||
None // a and b are equal, so log distance is -inf
|
None // a and b are equal, so log distance is -inf
|
||||||
}
|
}
|
||||||
|
|
||||||
fn try_ping(&mut self, node: NodeEntry) {
|
fn try_ping(&mut self, node: NodeEntry, reason: PingReason) {
|
||||||
if !self.is_allowed(&node) {
|
if !self.is_allowed(&node) {
|
||||||
trace!(target: "discovery", "Node {:?} not allowed", node);
|
trace!(target: "discovery", "Node {:?} not allowed", node);
|
||||||
return;
|
return;
|
||||||
@@ -313,7 +324,7 @@ impl<'a> Discovery<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if self.in_flight_pings.len() < MAX_NODES_PING {
|
if self.in_flight_pings.len() < MAX_NODES_PING {
|
||||||
self.ping(&node)
|
self.ping(&node, reason)
|
||||||
.unwrap_or_else(|e| {
|
.unwrap_or_else(|e| {
|
||||||
warn!(target: "discovery", "Error sending Ping packet: {:?}", e);
|
warn!(target: "discovery", "Error sending Ping packet: {:?}", e);
|
||||||
});
|
});
|
||||||
@@ -322,7 +333,7 @@ impl<'a> Discovery<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ping(&mut self, node: &NodeEntry) -> Result<(), Error> {
|
fn ping(&mut self, node: &NodeEntry, reason: PingReason) -> Result<(), Error> {
|
||||||
let mut rlp = RlpStream::new_list(4);
|
let mut rlp = RlpStream::new_list(4);
|
||||||
rlp.append(&PROTOCOL_VERSION);
|
rlp.append(&PROTOCOL_VERSION);
|
||||||
self.public_endpoint.to_rlp_list(&mut rlp);
|
self.public_endpoint.to_rlp_list(&mut rlp);
|
||||||
@@ -336,6 +347,7 @@ impl<'a> Discovery<'a> {
|
|||||||
node: node.clone(),
|
node: node.clone(),
|
||||||
echo_hash: hash,
|
echo_hash: hash,
|
||||||
deprecated_echo_hash: old_parity_hash,
|
deprecated_echo_hash: old_parity_hash,
|
||||||
|
reason: reason
|
||||||
});
|
});
|
||||||
|
|
||||||
trace!(target: "discovery", "Sent Ping to {:?} ; node_id={:#x}", &node.endpoint, node.id);
|
trace!(target: "discovery", "Sent Ping to {:?} ; node_id={:#x}", &node.endpoint, node.id);
|
||||||
@@ -515,7 +527,7 @@ impl<'a> Discovery<'a> {
|
|||||||
if request.deprecated_echo_hash == echo_hash {
|
if request.deprecated_echo_hash == echo_hash {
|
||||||
trace!(target: "discovery", "Got Pong from an old parity-ethereum version.");
|
trace!(target: "discovery", "Got Pong from an old parity-ethereum version.");
|
||||||
}
|
}
|
||||||
Some(request.node.clone())
|
Some((request.node.clone(), request.reason.clone()))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -529,7 +541,10 @@ impl<'a> Discovery<'a> {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(node) = expected_node {
|
if let Some((node, ping_reason)) = expected_node {
|
||||||
|
if let PingReason::FromDiscoveryRequest(target) = ping_reason {
|
||||||
|
self.respond_with_discovery(target, &node)?;
|
||||||
|
}
|
||||||
Ok(self.update_node(node))
|
Ok(self.update_node(node))
|
||||||
} else {
|
} else {
|
||||||
debug!(target: "discovery", "Got unexpected Pong from {:?} ; request not found", &from);
|
debug!(target: "discovery", "Got unexpected Pong from {:?} ; request not found", &from);
|
||||||
@@ -537,21 +552,59 @@ impl<'a> Discovery<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_find_node(&mut self, rlp: &Rlp, _node: &NodeId, from: &SocketAddr) -> Result<Option<TableUpdates>, Error> {
|
fn on_find_node(&mut self, rlp: &Rlp, node_id: &NodeId, from: &SocketAddr) -> Result<Option<TableUpdates>, Error> {
|
||||||
trace!(target: "discovery", "Got FindNode from {:?}", &from);
|
trace!(target: "discovery", "Got FindNode from {:?}", &from);
|
||||||
let target: NodeId = rlp.val_at(0)?;
|
let target: NodeId = rlp.val_at(0)?;
|
||||||
let timestamp: u64 = rlp.val_at(1)?;
|
let timestamp: u64 = rlp.val_at(1)?;
|
||||||
self.check_timestamp(timestamp)?;
|
self.check_timestamp(timestamp)?;
|
||||||
|
|
||||||
|
let node = NodeEntry {
|
||||||
|
id: node_id.clone(),
|
||||||
|
endpoint: NodeEndpoint {
|
||||||
|
address: *from,
|
||||||
|
udp_port: from.port()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if self.is_a_valid_known_node(&node) {
|
||||||
|
self.respond_with_discovery(target, &node)?;
|
||||||
|
} else {
|
||||||
|
// Make sure the request source is actually there and responds to pings before actually responding
|
||||||
|
self.try_ping(node, PingReason::FromDiscoveryRequest(target));
|
||||||
|
}
|
||||||
|
Ok(None)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_a_valid_known_node(&self, node: &NodeEntry) -> bool {
|
||||||
|
let id_hash = keccak(node.id);
|
||||||
|
let dist = match Discovery::distance(&self.id_hash, &id_hash) {
|
||||||
|
Some(dist) => dist,
|
||||||
|
None => {
|
||||||
|
debug!(target: "discovery", "Got an incoming discovery request from self: {:?}", node);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let bucket = &self.node_buckets[dist];
|
||||||
|
if let Some(known_node) = bucket.nodes.iter().find(|n| n.address.id == node.id) {
|
||||||
|
debug!(target: "discovery", "Found a known node in a bucket when processing discovery: {:?}/{:?}", known_node, node);
|
||||||
|
(known_node.address.endpoint == node.endpoint) && (known_node.last_seen.elapsed() < NODE_LAST_SEEN_TIMEOUT)
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn respond_with_discovery(&mut self, target: NodeId, node: &NodeEntry) -> Result<(), Error> {
|
||||||
let nearest = self.nearest_node_entries(&target);
|
let nearest = self.nearest_node_entries(&target);
|
||||||
if nearest.is_empty() {
|
if nearest.is_empty() {
|
||||||
return Ok(None);
|
return Ok(());
|
||||||
}
|
}
|
||||||
let mut packets = Discovery::prepare_neighbours_packets(&nearest);
|
let mut packets = Discovery::prepare_neighbours_packets(&nearest);
|
||||||
for p in packets.drain(..) {
|
for p in packets.drain(..) {
|
||||||
self.send_packet(PACKET_NEIGHBOURS, from, &p)?;
|
self.send_packet(PACKET_NEIGHBOURS, &node.endpoint.address, &p)?;
|
||||||
}
|
}
|
||||||
trace!(target: "discovery", "Sent {} Neighbours to {:?}", nearest.len(), &from);
|
trace!(target: "discovery", "Sent {} Neighbours to {:?}", nearest.len(), &node.endpoint);
|
||||||
Ok(None)
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prepare_neighbours_packets(nearest: &[NodeEntry]) -> Vec<Bytes> {
|
fn prepare_neighbours_packets(nearest: &[NodeEntry]) -> Vec<Bytes> {
|
||||||
@@ -827,7 +880,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// After 4 discovery rounds, the first one should have learned about the rest.
|
// After 4 discovery rounds, the first one should have learned about the rest.
|
||||||
for _round in 0 .. 4 {
|
for _round in 0 .. 5 {
|
||||||
discovery_handlers[0].round();
|
discovery_handlers[0].round();
|
||||||
|
|
||||||
let mut continue_loop = true;
|
let mut continue_loop = true;
|
||||||
@@ -835,9 +888,9 @@ mod tests {
|
|||||||
continue_loop = false;
|
continue_loop = false;
|
||||||
|
|
||||||
// Process all queued messages.
|
// Process all queued messages.
|
||||||
for i in 0 .. 5 {
|
for i in 0 .. 20 {
|
||||||
let src = discovery_handlers[i].public_endpoint.address.clone();
|
let src = discovery_handlers[i%5].public_endpoint.address.clone();
|
||||||
while let Some(datagram) = discovery_handlers[i].dequeue_send() {
|
while let Some(datagram) = discovery_handlers[i%5].dequeue_send() {
|
||||||
let dest = discovery_handlers.iter_mut()
|
let dest = discovery_handlers.iter_mut()
|
||||||
.find(|disc| datagram.address == disc.public_endpoint.address)
|
.find(|disc| datagram.address == disc.public_endpoint.address)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@@ -929,14 +982,14 @@ mod tests {
|
|||||||
let mut discovery = Discovery { request_backoff: &request_backoff, ..discovery };
|
let mut discovery = Discovery { request_backoff: &request_backoff, ..discovery };
|
||||||
|
|
||||||
for _ in 0..2 {
|
for _ in 0..2 {
|
||||||
discovery.ping(&node_entries[101]).unwrap();
|
discovery.ping(&node_entries[101], PingReason::Default).unwrap();
|
||||||
let num_nodes = total_bucket_nodes(&discovery.node_buckets);
|
let num_nodes = total_bucket_nodes(&discovery.node_buckets);
|
||||||
discovery.check_expired(Instant::now() + PING_TIMEOUT);
|
discovery.check_expired(Instant::now() + PING_TIMEOUT);
|
||||||
let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets);
|
let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets);
|
||||||
assert_eq!(removed, 0);
|
assert_eq!(removed, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
discovery.ping(&node_entries[101]).unwrap();
|
discovery.ping(&node_entries[101], PingReason::Default).unwrap();
|
||||||
let num_nodes = total_bucket_nodes(&discovery.node_buckets);
|
let num_nodes = total_bucket_nodes(&discovery.node_buckets);
|
||||||
discovery.check_expired(Instant::now() + PING_TIMEOUT);
|
discovery.check_expired(Instant::now() + PING_TIMEOUT);
|
||||||
let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets);
|
let removed = num_nodes - total_bucket_nodes(&discovery.node_buckets);
|
||||||
@@ -1123,7 +1176,7 @@ mod tests {
|
|||||||
let mut discovery1 = Discovery::new(&key1, ep1.clone(), IpFilter::default());
|
let mut discovery1 = Discovery::new(&key1, ep1.clone(), IpFilter::default());
|
||||||
let mut discovery2 = Discovery::new(&key2, ep2.clone(), IpFilter::default());
|
let mut discovery2 = Discovery::new(&key2, ep2.clone(), IpFilter::default());
|
||||||
|
|
||||||
discovery1.ping(&NodeEntry { id: discovery2.id, endpoint: ep2.clone() }).unwrap();
|
discovery1.ping(&NodeEntry { id: discovery2.id, endpoint: ep2.clone() }, PingReason::Default).unwrap();
|
||||||
let ping_data = discovery1.dequeue_send().unwrap();
|
let ping_data = discovery1.dequeue_send().unwrap();
|
||||||
assert!(!discovery1.any_sends_queued());
|
assert!(!discovery1.any_sends_queued());
|
||||||
let data = &ping_data.payload[(32 + 65)..];
|
let data = &ping_data.payload[(32 + 65)..];
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ pub trait SocketAddrExt {
|
|||||||
fn is_documentation_s(&self) -> bool { false }
|
fn is_documentation_s(&self) -> bool { false }
|
||||||
fn is_global_multicast(&self) -> bool { false }
|
fn is_global_multicast(&self) -> bool { false }
|
||||||
fn is_other_multicast(&self) -> bool { false }
|
fn is_other_multicast(&self) -> bool { false }
|
||||||
|
|
||||||
fn is_reserved(&self) -> bool;
|
fn is_reserved(&self) -> bool;
|
||||||
fn is_usable_public(&self) -> bool;
|
fn is_usable_public(&self) -> bool;
|
||||||
fn is_usable_private(&self) -> bool;
|
fn is_usable_private(&self) -> bool;
|
||||||
@@ -50,38 +50,38 @@ pub trait SocketAddrExt {
|
|||||||
|
|
||||||
impl SocketAddrExt for Ipv4Addr {
|
impl SocketAddrExt for Ipv4Addr {
|
||||||
fn is_global_s(&self) -> bool {
|
fn is_global_s(&self) -> bool {
|
||||||
!self.is_private() &&
|
!self.is_private() &&
|
||||||
!self.is_loopback() &&
|
!self.is_loopback() &&
|
||||||
!self.is_link_local() &&
|
!self.is_link_local() &&
|
||||||
!self.is_broadcast() &&
|
!self.is_broadcast() &&
|
||||||
!self.is_documentation()
|
!self.is_documentation()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for communications between a service provider and its subscribers when using a carrier-grade NAT
|
// Used for communications between a service provider and its subscribers when using a carrier-grade NAT
|
||||||
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||||
fn is_shared_space(&self) -> bool {
|
fn is_shared_space(&self) -> bool {
|
||||||
*self >= Ipv4Addr::new(100, 64, 0, 0) &&
|
*self >= Ipv4Addr::new(100, 64, 0, 0) &&
|
||||||
*self <= Ipv4Addr::new(100, 127, 255, 255)
|
*self <= Ipv4Addr::new(100, 127, 255, 255)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for the IANA IPv4 Special Purpose Address Registry
|
// Used for the IANA IPv4 Special Purpose Address Registry
|
||||||
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||||
fn is_special_purpose(&self) -> bool {
|
fn is_special_purpose(&self) -> bool {
|
||||||
*self >= Ipv4Addr::new(192, 0, 0, 0) &&
|
*self >= Ipv4Addr::new(192, 0, 0, 0) &&
|
||||||
*self <= Ipv4Addr::new(192, 0, 0, 255)
|
*self <= Ipv4Addr::new(192, 0, 0, 255)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for testing of inter-network communications between two separate subnets
|
// Used for testing of inter-network communications between two separate subnets
|
||||||
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||||
fn is_benchmarking(&self) -> bool {
|
fn is_benchmarking(&self) -> bool {
|
||||||
*self >= Ipv4Addr::new(198, 18, 0, 0) &&
|
*self >= Ipv4Addr::new(198, 18, 0, 0) &&
|
||||||
*self <= Ipv4Addr::new(198, 19, 255, 255)
|
*self <= Ipv4Addr::new(198, 19, 255, 255)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reserved for future use
|
// Reserved for future use
|
||||||
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
// see: https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||||
fn is_future_use(&self) -> bool {
|
fn is_future_use(&self) -> bool {
|
||||||
*self >= Ipv4Addr::new(240, 0, 0, 0) &&
|
*self >= Ipv4Addr::new(240, 0, 0, 0) &&
|
||||||
*self <= Ipv4Addr::new(255, 255, 255, 254)
|
*self <= Ipv4Addr::new(255, 255, 255, 254)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ impl SocketAddrExt for Ipv4Addr {
|
|||||||
!self.is_reserved() &&
|
!self.is_reserved() &&
|
||||||
!self.is_private()
|
!self.is_private()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_usable_private(&self) -> bool {
|
fn is_usable_private(&self) -> bool {
|
||||||
self.is_private()
|
self.is_private()
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ impl SocketAddrExt for Ipv4Addr {
|
|||||||
impl SocketAddrExt for Ipv6Addr {
|
impl SocketAddrExt for Ipv6Addr {
|
||||||
fn is_global_s(&self) -> bool {
|
fn is_global_s(&self) -> bool {
|
||||||
self.is_global_multicast() ||
|
self.is_global_multicast() ||
|
||||||
(!self.is_loopback() &&
|
(!self.is_loopback() &&
|
||||||
!self.is_unique_local_s() &&
|
!self.is_unique_local_s() &&
|
||||||
!self.is_unicast_link_local_s() &&
|
!self.is_unicast_link_local_s() &&
|
||||||
!self.is_documentation_s() &&
|
!self.is_documentation_s() &&
|
||||||
@@ -134,7 +134,7 @@ impl SocketAddrExt for Ipv6Addr {
|
|||||||
fn is_unicast_link_local_s(&self) -> bool {
|
fn is_unicast_link_local_s(&self) -> bool {
|
||||||
(self.segments()[0] & 0xffc0) == 0xfe80
|
(self.segments()[0] & 0xffc0) == 0xfe80
|
||||||
}
|
}
|
||||||
|
|
||||||
// reserved for documentation (2001:db8::/32).
|
// reserved for documentation (2001:db8::/32).
|
||||||
fn is_documentation_s(&self) -> bool {
|
fn is_documentation_s(&self) -> bool {
|
||||||
(self.segments()[0] == 0x2001) && (self.segments()[1] == 0xdb8)
|
(self.segments()[0] == 0x2001) && (self.segments()[1] == 0xdb8)
|
||||||
@@ -160,7 +160,7 @@ impl SocketAddrExt for Ipv6Addr {
|
|||||||
!self.is_reserved() &&
|
!self.is_reserved() &&
|
||||||
!self.is_unique_local_s()
|
!self.is_unique_local_s()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_usable_private(&self) -> bool {
|
fn is_usable_private(&self) -> bool {
|
||||||
self.is_unique_local_s()
|
self.is_unique_local_s()
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ impl SocketAddrExt for IpAddr {
|
|||||||
IpAddr::V6(ref ip) => ip.is_usable_public(),
|
IpAddr::V6(ref ip) => ip.is_usable_public(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_usable_private(&self) -> bool {
|
fn is_usable_private(&self) -> bool {
|
||||||
match *self {
|
match *self {
|
||||||
IpAddr::V4(ref ip) => ip.is_usable_private(),
|
IpAddr::V4(ref ip) => ip.is_usable_private(),
|
||||||
@@ -308,7 +308,15 @@ pub fn select_public_address(port: u16) -> SocketAddr {
|
|||||||
|
|
||||||
pub fn map_external_address(local: &NodeEndpoint) -> Option<NodeEndpoint> {
|
pub fn map_external_address(local: &NodeEndpoint) -> Option<NodeEndpoint> {
|
||||||
if let SocketAddr::V4(ref local_addr) = local.address {
|
if let SocketAddr::V4(ref local_addr) = local.address {
|
||||||
match search_gateway_from_timeout(*local_addr.ip(), Duration::new(5, 0)) {
|
let local_ip = *local_addr.ip();
|
||||||
|
let search_gateway_child = ::std::thread::spawn(move || {
|
||||||
|
search_gateway_from_timeout(local_ip, Duration::new(5, 0))
|
||||||
|
});
|
||||||
|
let gateway_result = match search_gateway_child.join() {
|
||||||
|
Err(_) => return None,
|
||||||
|
Ok(gateway_result) => gateway_result,
|
||||||
|
};
|
||||||
|
match gateway_result {
|
||||||
Err(ref err) => debug!("Gateway search error: {}", err),
|
Err(ref err) => debug!("Gateway search error: {}", err),
|
||||||
Ok(gateway) => {
|
Ok(gateway) => {
|
||||||
match gateway.get_external_ip() {
|
match gateway.get_external_ip() {
|
||||||
@@ -425,32 +433,32 @@ fn ipv4_future_use() {
|
|||||||
fn ipv4_usable_public() {
|
fn ipv4_usable_public() {
|
||||||
assert!(!Ipv4Addr::new(0,0,0,0).is_usable_public()); // unspecified
|
assert!(!Ipv4Addr::new(0,0,0,0).is_usable_public()); // unspecified
|
||||||
assert!(Ipv4Addr::new(0,0,0,1).is_usable_public());
|
assert!(Ipv4Addr::new(0,0,0,1).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(9,255,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(9,255,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(10,0,0,0).is_usable_public()); // private intra-network
|
assert!(!Ipv4Addr::new(10,0,0,0).is_usable_public()); // private intra-network
|
||||||
assert!(!Ipv4Addr::new(10,255,255,255).is_usable_public()); // private intra-network
|
assert!(!Ipv4Addr::new(10,255,255,255).is_usable_public()); // private intra-network
|
||||||
assert!(Ipv4Addr::new(11,0,0,0).is_usable_public());
|
assert!(Ipv4Addr::new(11,0,0,0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(100, 63, 255, 255).is_usable_public());
|
assert!(Ipv4Addr::new(100, 63, 255, 255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(100, 64, 0, 0).is_usable_public()); // shared space
|
assert!(!Ipv4Addr::new(100, 64, 0, 0).is_usable_public()); // shared space
|
||||||
assert!(!Ipv4Addr::new(100, 127, 255, 255).is_usable_public()); // shared space
|
assert!(!Ipv4Addr::new(100, 127, 255, 255).is_usable_public()); // shared space
|
||||||
assert!(Ipv4Addr::new(100, 128, 0, 0).is_usable_public());
|
assert!(Ipv4Addr::new(100, 128, 0, 0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(126,255,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(126,255,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(127,0,0,0).is_usable_public()); // loopback
|
assert!(!Ipv4Addr::new(127,0,0,0).is_usable_public()); // loopback
|
||||||
assert!(!Ipv4Addr::new(127,255,255,255).is_usable_public()); // loopback
|
assert!(!Ipv4Addr::new(127,255,255,255).is_usable_public()); // loopback
|
||||||
assert!(Ipv4Addr::new(128,0,0,0).is_usable_public());
|
assert!(Ipv4Addr::new(128,0,0,0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(169,253,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(169,253,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(169,254,0,0).is_usable_public()); // link-local
|
assert!(!Ipv4Addr::new(169,254,0,0).is_usable_public()); // link-local
|
||||||
assert!(!Ipv4Addr::new(169,254,255,255).is_usable_public()); // link-local
|
assert!(!Ipv4Addr::new(169,254,255,255).is_usable_public()); // link-local
|
||||||
assert!(Ipv4Addr::new(169,255,0,0).is_usable_public());
|
assert!(Ipv4Addr::new(169,255,0,0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(172,15,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(172,15,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(172,16,0,0).is_usable_public()); // private intra-network
|
assert!(!Ipv4Addr::new(172,16,0,0).is_usable_public()); // private intra-network
|
||||||
assert!(!Ipv4Addr::new(172,31,255,255).is_usable_public()); // private intra-network
|
assert!(!Ipv4Addr::new(172,31,255,255).is_usable_public()); // private intra-network
|
||||||
assert!(Ipv4Addr::new(172,32,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(172,32,255,255).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(191,255,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(191,255,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(192,0,0,0).is_usable_public()); // special purpose
|
assert!(!Ipv4Addr::new(192,0,0,0).is_usable_public()); // special purpose
|
||||||
assert!(!Ipv4Addr::new(192,0,0,255).is_usable_public()); // special purpose
|
assert!(!Ipv4Addr::new(192,0,0,255).is_usable_public()); // special purpose
|
||||||
@@ -458,19 +466,19 @@ fn ipv4_usable_public() {
|
|||||||
|
|
||||||
assert!(Ipv4Addr::new(192,0,1,255).is_usable_public());
|
assert!(Ipv4Addr::new(192,0,1,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(192,0,2,0).is_usable_public()); // documentation
|
assert!(!Ipv4Addr::new(192,0,2,0).is_usable_public()); // documentation
|
||||||
assert!(!Ipv4Addr::new(192,0,2,255).is_usable_public()); // documentation
|
assert!(!Ipv4Addr::new(192,0,2,255).is_usable_public()); // documentation
|
||||||
assert!(Ipv4Addr::new(192,0,3,0).is_usable_public());
|
assert!(Ipv4Addr::new(192,0,3,0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(192,167,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(192,167,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(192,168,0,0).is_usable_public()); // private intra-network
|
assert!(!Ipv4Addr::new(192,168,0,0).is_usable_public()); // private intra-network
|
||||||
assert!(!Ipv4Addr::new(192,168,255,255).is_usable_public()); // private intra-network
|
assert!(!Ipv4Addr::new(192,168,255,255).is_usable_public()); // private intra-network
|
||||||
assert!(Ipv4Addr::new(192,169,0,0).is_usable_public());
|
assert!(Ipv4Addr::new(192,169,0,0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(198,17,255,255).is_usable_public());
|
assert!(Ipv4Addr::new(198,17,255,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(198,18,0,0).is_usable_public()); // benchmarking
|
assert!(!Ipv4Addr::new(198,18,0,0).is_usable_public()); // benchmarking
|
||||||
assert!(!Ipv4Addr::new(198,19,255,255).is_usable_public()); // benchmarking
|
assert!(!Ipv4Addr::new(198,19,255,255).is_usable_public()); // benchmarking
|
||||||
assert!(Ipv4Addr::new(198,20,0,0).is_usable_public());
|
assert!(Ipv4Addr::new(198,20,0,0).is_usable_public());
|
||||||
|
|
||||||
assert!(Ipv4Addr::new(198,51,99,255).is_usable_public());
|
assert!(Ipv4Addr::new(198,51,99,255).is_usable_public());
|
||||||
assert!(!Ipv4Addr::new(198,51,100,0).is_usable_public()); // documentation
|
assert!(!Ipv4Addr::new(198,51,100,0).is_usable_public()); // documentation
|
||||||
assert!(!Ipv4Addr::new(198,51,100,255).is_usable_public()); // documentation
|
assert!(!Ipv4Addr::new(198,51,100,255).is_usable_public()); // documentation
|
||||||
@@ -485,7 +493,7 @@ fn ipv4_usable_public() {
|
|||||||
assert!(!Ipv4Addr::new(224,0,0,0).is_usable_public()); // multicast
|
assert!(!Ipv4Addr::new(224,0,0,0).is_usable_public()); // multicast
|
||||||
assert!(!Ipv4Addr::new(239, 255, 255, 255).is_usable_public()); // multicast
|
assert!(!Ipv4Addr::new(239, 255, 255, 255).is_usable_public()); // multicast
|
||||||
assert!(!Ipv4Addr::new(240, 0, 0, 0).is_usable_public()); // future use
|
assert!(!Ipv4Addr::new(240, 0, 0, 0).is_usable_public()); // future use
|
||||||
assert!(!Ipv4Addr::new(255, 255, 255, 254).is_usable_public()); // future use
|
assert!(!Ipv4Addr::new(255, 255, 255, 254).is_usable_public()); // future use
|
||||||
assert!(!Ipv4Addr::new(255, 255, 255, 255).is_usable_public()); // limited broadcast
|
assert!(!Ipv4Addr::new(255, 255, 255, 255).is_usable_public()); // limited broadcast
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,12 +503,12 @@ fn ipv4_usable_private() {
|
|||||||
assert!(Ipv4Addr::new(10,0,0,0).is_usable_private()); // private intra-network
|
assert!(Ipv4Addr::new(10,0,0,0).is_usable_private()); // private intra-network
|
||||||
assert!(Ipv4Addr::new(10,255,255,255).is_usable_private()); // private intra-network
|
assert!(Ipv4Addr::new(10,255,255,255).is_usable_private()); // private intra-network
|
||||||
assert!(!Ipv4Addr::new(11,0,0,0).is_usable_private());
|
assert!(!Ipv4Addr::new(11,0,0,0).is_usable_private());
|
||||||
|
|
||||||
assert!(!Ipv4Addr::new(172,15,255,255).is_usable_private());
|
assert!(!Ipv4Addr::new(172,15,255,255).is_usable_private());
|
||||||
assert!(Ipv4Addr::new(172,16,0,0).is_usable_private()); // private intra-network
|
assert!(Ipv4Addr::new(172,16,0,0).is_usable_private()); // private intra-network
|
||||||
assert!(Ipv4Addr::new(172,31,255,255).is_usable_private()); // private intra-network
|
assert!(Ipv4Addr::new(172,31,255,255).is_usable_private()); // private intra-network
|
||||||
assert!(!Ipv4Addr::new(172,32,255,255).is_usable_private());
|
assert!(!Ipv4Addr::new(172,32,255,255).is_usable_private());
|
||||||
|
|
||||||
assert!(!Ipv4Addr::new(192,167,255,255).is_usable_private());
|
assert!(!Ipv4Addr::new(192,167,255,255).is_usable_private());
|
||||||
assert!(Ipv4Addr::new(192,168,0,0).is_usable_private()); // private intra-network
|
assert!(Ipv4Addr::new(192,168,0,0).is_usable_private()); // private intra-network
|
||||||
assert!(Ipv4Addr::new(192,168,255,255).is_usable_private()); // private intra-network
|
assert!(Ipv4Addr::new(192,168,255,255).is_usable_private()); // private intra-network
|
||||||
|
|||||||
@@ -3,22 +3,22 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "parity-version"
|
name = "parity-version"
|
||||||
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
|
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
|
||||||
version = "2.2.6"
|
version = "2.2.8"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
|
# This versions track. Should be changed to `stable` or `beta` when on respective branches.
|
||||||
# Used by auto-updater and for Parity version string.
|
# Used by auto-updater and for Parity version string.
|
||||||
track = "beta"
|
track = "stable"
|
||||||
|
|
||||||
# Network specific settings, used ONLY by auto-updater.
|
# Network specific settings, used ONLY by auto-updater.
|
||||||
# Latest supported fork blocks.
|
# Latest supported fork blocks.
|
||||||
# Indicates a critical release in this track (i.e. consensus issue).
|
# Indicates a critical release in this track (i.e. consensus issue).
|
||||||
[package.metadata.networks]
|
[package.metadata.networks]
|
||||||
foundation = { forkBlock = 4370000, critical = false }
|
foundation = { forkBlock = 7280000, critical = false }
|
||||||
ropsten = { forkBlock = 4230000, critical = false }
|
ropsten = { forkBlock = 4939394, critical = false }
|
||||||
kovan = { forkBlock = 6600000, critical = true }
|
kovan = { forkBlock = 10255201, critical = false }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
parity-bytes = "0.1"
|
parity-bytes = "0.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user