From 9108a3bb50fb757a35110f0c3d8e8d6331ffb2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 2 Apr 2018 13:12:52 +0200 Subject: [PATCH] Bump ethabi & ethereum-types. (#8258) * Bump ethabi & ethereum-types. * Fix test. * Fix hex encodings. --- Cargo.lock | 132 +++++++++++++------------- Cargo.toml | 2 +- dapps/Cargo.toml | 2 +- dapps/src/tests/helpers/registrar.rs | 2 +- ethcore/Cargo.toml | 2 +- ethcore/evm/Cargo.toml | 2 +- ethcore/light/Cargo.toml | 2 +- ethcore/light/src/net/tests/mod.rs | 2 +- ethcore/node_filter/Cargo.toml | 2 +- ethcore/transaction/Cargo.toml | 2 +- ethcore/types/Cargo.toml | 2 +- ethcore/vm/Cargo.toml | 2 +- ethcore/wasm/Cargo.toml | 2 +- ethcore/wasm/run/Cargo.toml | 2 +- ethcore/wasm/run/src/runner.rs | 10 +- ethcrypto/Cargo.toml | 2 +- ethkey/Cargo.toml | 2 +- ethkey/cli/src/main.rs | 6 +- ethkey/src/secret.rs | 10 +- ethstore/Cargo.toml | 2 +- ethstore/cli/src/main.rs | 8 +- evmbin/Cargo.toml | 2 +- hash-fetch/Cargo.toml | 2 +- hw/Cargo.toml | 2 +- ipfs/Cargo.toml | 2 +- json/Cargo.toml | 2 +- machine/Cargo.toml | 2 +- miner/Cargo.toml | 2 +- rpc/Cargo.toml | 2 +- rpc/src/tests/ws.rs | 4 +- rpc/src/v1/tests/eth.rs | 12 +-- rpc/src/v1/tests/mocked/eth.rs | 30 +++--- rpc/src/v1/tests/mocked/eth_pubsub.rs | 4 +- rpc/src/v1/tests/mocked/parity.rs | 4 +- rpc/src/v1/tests/mocked/parity_set.rs | 2 +- rpc/src/v1/tests/mocked/personal.rs | 22 ++--- rpc/src/v1/tests/mocked/signer.rs | 16 ++-- rpc/src/v1/tests/mocked/signing.rs | 32 +++---- rpc_client/src/client.rs | 2 +- secret_store/Cargo.toml | 2 +- stratum/Cargo.toml | 2 +- sync/Cargo.toml | 2 +- test.sh | 30 +++--- transaction-pool/Cargo.toml | 2 +- updater/Cargo.toml | 2 +- updater/src/updater.rs | 2 +- util/bloomchain/Cargo.toml | 2 +- util/dir/Cargo.toml | 2 +- util/dir/src/lib.rs | 2 +- util/error/Cargo.toml | 2 +- util/hash/Cargo.toml | 2 +- util/hash/src/lib.rs | 2 +- util/hashdb/Cargo.toml | 2 +- util/journaldb/Cargo.toml | 2 +- util/kvdb-rocksdb/Cargo.toml | 2 +- util/memorydb/Cargo.toml | 2 +- util/network-devp2p/Cargo.toml | 2 +- util/network-devp2p/src/host.rs | 2 +- util/network-devp2p/src/node_table.rs | 4 +- util/network/Cargo.toml | 2 +- util/patricia_trie/Cargo.toml | 2 +- util/plain_hasher/Cargo.toml | 2 +- util/rlp/Cargo.toml | 2 +- util/trie-standardmap/Cargo.toml | 2 +- util/triehash/Cargo.toml | 2 +- whisper/Cargo.toml | 2 +- 66 files changed, 220 insertions(+), 206 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b5a273cc..278f4b673 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,7 +154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "bloomchain" version = "0.2.0" dependencies = [ - "ethbloom 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -242,7 +242,7 @@ name = "common-types" version = "0.1.0" dependencies = [ "ethcore-bytes 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.0", @@ -319,7 +319,7 @@ name = "dir" version = "0.1.0" dependencies = [ "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "journaldb 0.1.0", ] @@ -387,11 +387,11 @@ dependencies = [ [[package]] name = "ethabi" -version = "5.1.0" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 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)", "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -409,7 +409,7 @@ name = "ethabi-derive" version = "5.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -431,12 +431,12 @@ dependencies = [ [[package]] name = "ethbloom" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fixed-hash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fixed-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -451,7 +451,7 @@ dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "common-types 0.1.0", "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethash 1.11.0", @@ -462,7 +462,7 @@ dependencies = [ "ethcore-miner 1.11.0", "ethcore-stratum 1.11.0", "ethcore-transaction 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "ethkey 0.3.0", "ethstore 0.2.0", @@ -548,7 +548,7 @@ dependencies = [ "ethcore-io 1.11.0", "ethcore-network 1.11.0", "ethcore-transaction 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.1.1", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -601,12 +601,12 @@ name = "ethcore-miner" version = "1.11.0" dependencies = [ "common-types 0.1.0", - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethash 1.11.0", "ethcore-transaction 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -627,7 +627,7 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-io 1.11.0", "ethcrypto 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "ipnetwork 0.12.7 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.1", @@ -646,7 +646,7 @@ dependencies = [ "ethcore-logger 1.11.0", "ethcore-network 1.11.0", "ethcrypto 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "igd 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipnetwork 0.12.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -674,14 +674,14 @@ name = "ethcore-secretstore" version = "1.0.0" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.11.0", "ethcore-bytes 0.1.0", "ethcore-logger 1.11.0", "ethcrypto 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "ethsync 1.11.0", "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -726,7 +726,7 @@ version = "1.11.0" dependencies = [ "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-logger 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-macros 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-tcp-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", @@ -741,7 +741,7 @@ dependencies = [ name = "ethcore-transaction" version = "0.1.0" dependencies = [ - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "ethkey 0.3.0", "evm 0.1.0", @@ -757,7 +757,7 @@ name = "ethcrypto" version = "0.1.0" dependencies = [ "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -766,16 +766,16 @@ dependencies = [ [[package]] name = "ethereum-types" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ethbloom 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fixed-hash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fixed-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "uint 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "uint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -790,7 +790,7 @@ dependencies = [ name = "ethjson" version = "0.1.0" dependencies = [ - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 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)", "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -804,7 +804,7 @@ dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "edit-distance 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wordlist 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -835,7 +835,7 @@ version = "0.2.0" dependencies = [ "dir 0.1.0", "ethcrypto 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -884,7 +884,7 @@ dependencies = [ "ethcore-network 1.11.0", "ethcore-network-devp2p 1.11.0", "ethcore-transaction 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "ipnetwork 0.12.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -907,7 +907,7 @@ name = "evm" version = "0.1.0" dependencies = [ "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "evmjit 1.11.0", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.0", @@ -927,7 +927,7 @@ dependencies = [ "ethcore 1.11.0", "ethcore-bytes 0.1.0", "ethcore-transaction 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "evm 0.1.0", "panic_hook 0.1.0", @@ -969,7 +969,7 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1067,7 +1067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "hardware-wallet" version = "1.11.0" dependencies = [ - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "hidapi 0.3.1 (git+https://github.com/paritytech/hidapi-rs)", "libusb 0.3.0 (git+https://github.com/paritytech/libusb-rs)", @@ -1083,7 +1083,7 @@ name = "hashdb" version = "0.1.1" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1274,7 +1274,7 @@ version = "0.1.0" dependencies = [ "ethcore-bytes 0.1.0", "ethcore-logger 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.1.1", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.0", @@ -1389,7 +1389,7 @@ name = "keccak-hash" version = "0.1.0" dependencies = [ "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1425,7 +1425,7 @@ name = "kvdb-rocksdb" version = "0.1.0" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1569,7 +1569,7 @@ version = "0.1.1" dependencies = [ "bigint 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.1.1", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.0", @@ -1718,13 +1718,13 @@ dependencies = [ name = "node-filter" version = "1.11.0" dependencies = [ - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.11.0", "ethcore-io 1.11.0", "ethcore-network-devp2p 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1892,7 +1892,7 @@ dependencies = [ "ethcore-service 0.1.0", "ethcore-stratum 1.11.0", "ethcore-transaction 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "ethsync 1.11.0", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1952,7 +1952,7 @@ dependencies = [ "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-bytes 0.1.0", "ethcore-devtools 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "fetch 0.1.0", "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2012,11 +2012,11 @@ dependencies = [ name = "parity-hash-fetch" version = "1.11.0" dependencies = [ - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-bytes 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "fetch 0.1.0", "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2039,7 +2039,7 @@ dependencies = [ "cid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.11.0", "ethcore-bytes 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-http-server 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "multihash 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2068,7 +2068,7 @@ dependencies = [ name = "parity-machine" version = "0.1.0" dependencies = [ - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2096,7 +2096,7 @@ dependencies = [ "ethcore-network 1.11.0", "ethcore-transaction 0.1.0", "ethcrypto 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "ethkey 0.3.0", "ethstore 0.2.0", @@ -2222,12 +2222,12 @@ dependencies = [ name = "parity-updater" version = "1.11.0" dependencies = [ - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.11.0", "ethcore-bytes 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethsync 1.11.0", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parity-hash-fetch 1.11.0", @@ -2268,7 +2268,7 @@ dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-network 1.11.0", "ethcrypto 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", @@ -2330,7 +2330,7 @@ dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-bytes 0.1.0", "ethcore-logger 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.1.1", "keccak-hash 0.1.0", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2386,7 +2386,7 @@ name = "plain_hasher" version = "0.1.0" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2484,7 +2484,7 @@ version = "0.1.0" dependencies = [ "clap 2.29.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-logger 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2623,7 +2623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "registrar" version = "0.0.1" dependencies = [ - "ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2656,7 +2656,7 @@ version = "0.2.1" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 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)", ] @@ -3237,7 +3237,7 @@ name = "transaction-pool" version = "1.11.0" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3263,7 +3263,7 @@ name = "trie-standardmap" version = "0.1.0" dependencies = [ "ethcore-bytes 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.0", "rlp 0.2.1", ] @@ -3273,7 +3273,7 @@ name = "triehash" version = "0.1.0" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.0", "rlp 0.2.1", "trie-standardmap 0.1.0", @@ -3286,7 +3286,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uint" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3393,7 +3393,7 @@ name = "util-error" version = "0.1.0" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0", "rlp 0.2.1", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3434,7 +3434,7 @@ dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "common-types 0.1.0", "ethcore-bytes 0.1.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "keccak-hash 0.1.0", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3453,7 +3453,7 @@ version = "0.1.0" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-logger 1.11.0", - "ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.27.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3622,14 +3622,14 @@ dependencies = [ "checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)" = "" -"checksum ethabi 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d8385a48c8ed984778dcca27efc0de162a191a14ed733a41a07d9b0cfaa999e" +"checksum ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05e33a914b94b763f0a92333e4e5c95c095563f06ef7d6b295b3d3c2cf31e21f" "checksum ethabi-contract 5.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca2263c24359e827348ac99aa1f2e28ba5bab0d6c0b83941fa252de8a9e9c073" "checksum ethabi-derive 5.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "057f76ceb314191b2e7fcd6e2129d75816e80912e73ccc8324baa3b9e259bce3" -"checksum ethbloom 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f240172b976e2421fa5485e45cd45287bbdb56d742aa3a1d77005c49071a8518" -"checksum ethereum-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bad6fb0e4ab648f4d8d8314c340c47f9e805b085b78be1b8da4676534cb419df" +"checksum ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a93a43ce2e9f09071449da36bfa7a1b20b950ee344b6904ff23de493b03b386" +"checksum ethereum-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "53eabbad504e438e20b6559fd070d79b92cb31c02f994c7ecb05e9b2df716013" "checksum ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ac59a21a9ce98e188f3dace9eb67a6c4a3c67ec7fbc7218cb827852679dc002" "checksum fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1ee15a7050e5580b3712877157068ea713b245b080ff302ae2ca973cfcd9baa" -"checksum fixed-hash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21c520ebc46522d519aec9cba2b7115d49cea707d771b772c46bec61aa0daeb8" +"checksum fixed-hash 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "362f32e2fbc5ed45f01a23ca074f936bb3aee4122a66e7118e8c3e965d96104c" "checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" @@ -3819,7 +3819,7 @@ dependencies = [ "checksum transient-hashmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "715254c8f0811be1a79ad3ea5e6fa3c8eddec2b03d7f5ba78cf093e56d79c24f" "checksum trezor-sys 1.0.0 (git+https://github.com/paritytech/trezor-sys)" = "" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum uint 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53a4340c35703f926ec365c6797bb4a7a10bb6b9affe29ca385c9d804401f5e3" +"checksum uint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6477b2716357758c176c36719023e1f9726974d762150e4fc0a9c8c75488c343" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" diff --git a/Cargo.toml b/Cargo.toml index 8ffab0be5..a89708c27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ ethcore-network = { path = "util/network" } ethcore-service = { path = "ethcore/service" } ethcore-stratum = { path = "stratum" } ethcore-transaction = { path = "ethcore/transaction" } -ethereum-types = "0.2" +ethereum-types = "0.3" node-filter = { path = "ethcore/node_filter" } ethkey = { path = "ethkey" } node-health = { path = "dapps/node-health" } diff --git a/dapps/Cargo.toml b/dapps/Cargo.toml index e5b25a203..d63150b0a 100644 --- a/dapps/Cargo.toml +++ b/dapps/Cargo.toml @@ -29,7 +29,7 @@ jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "pa jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } ethcore-bytes = { path = "../util/bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" fetch = { path = "../util/fetch" } node-health = { path = "./node-health" } parity-hash-fetch = { path = "../hash-fetch" } diff --git a/dapps/src/tests/helpers/registrar.rs b/dapps/src/tests/helpers/registrar.rs index 8668d43b1..e770146f5 100644 --- a/dapps/src/tests/helpers/registrar.rs +++ b/dapps/src/tests/helpers/registrar.rs @@ -55,7 +55,7 @@ impl FakeRegistrar { pub fn set_result(&self, hash: H256, result: Result) { self.responses.lock().insert( - (URLHINT.into(), format!("{}{:?}", URLHINT_RESOLVE, hash)), + (URLHINT.into(), format!("{}{:x}", URLHINT_RESOLVE, hash)), result ); } diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 065bbc5cc..2c769fac2 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -24,7 +24,7 @@ ethcore-logger = { path = "../logger" } ethcore-miner = { path = "../miner" } ethcore-stratum = { path = "../stratum" } ethcore-transaction = { path = "./transaction" } -ethereum-types = "0.2" +ethereum-types = "0.3" memory-cache = { path = "../util/memory_cache" } ethabi = "5.1" ethabi-derive = "5.0" diff --git a/ethcore/evm/Cargo.toml b/ethcore/evm/Cargo.toml index 6efc05f4e..898b2a70a 100644 --- a/ethcore/evm/Cargo.toml +++ b/ethcore/evm/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] [dependencies] bit-set = "0.4" -ethereum-types = "0.2" +ethereum-types = "0.3" evmjit = { path = "../../evmjit", optional = true } heapsize = "0.4" lazy_static = "1.0" diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index b8f5d5fb5..9de1ceb9e 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -11,7 +11,7 @@ log = "0.3" ethcore = { path = ".."} ethcore-bytes = { path = "../../util/bytes" } ethcore-transaction = { path = "../transaction" } -ethereum-types = "0.2" +ethereum-types = "0.3" memorydb = { path = "../../util/memorydb" } patricia-trie = { path = "../../util/patricia_trie" } ethcore-network = { path = "../../util/network" } diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 4beb32833..397576ae4 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -405,7 +405,7 @@ fn get_block_receipts() { // by the test client in that case. let block_hashes: Vec = (0..1000) .map(|i| provider.client.block_header(BlockId::Number(i)).unwrap().hash()) - .filter(|hash| format!("{}", hash).starts_with("f")) + .filter(|hash| format!("{}", hash).starts_with("0xf")) .take(10) .collect(); diff --git a/ethcore/node_filter/Cargo.toml b/ethcore/node_filter/Cargo.toml index da1bcc1cf..a726448bd 100644 --- a/ethcore/node_filter/Cargo.toml +++ b/ethcore/node_filter/Cargo.toml @@ -9,7 +9,7 @@ authors = ["Parity Technologies "] [dependencies] ethcore = { path = ".."} ethcore-network-devp2p = { path = "../../util/network-devp2p" } -ethereum-types = "0.2" +ethereum-types = "0.3" log = "0.3" parking_lot = "0.5" ethabi = "5.1" diff --git a/ethcore/transaction/Cargo.toml b/ethcore/transaction/Cargo.toml index 7b45cae47..79e7282c3 100644 --- a/ethcore/transaction/Cargo.toml +++ b/ethcore/transaction/Cargo.toml @@ -12,7 +12,7 @@ heapsize = "0.4" keccak-hash = { path = "../../util/hash" } rlp = { path = "../../util/rlp" } unexpected = { path = "../../util/unexpected" } -ethereum-types = "0.2" +ethereum-types = "0.3" [dev-dependencies] rustc-hex= "1.0" diff --git a/ethcore/types/Cargo.toml b/ethcore/types/Cargo.toml index a14929f47..92cc74551 100644 --- a/ethcore/types/Cargo.toml +++ b/ethcore/types/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Parity Technologies "] rlp = { path = "../../util/rlp" } rlp_derive = { path = "../../util/rlp_derive" } ethcore-bytes = { path = "../../util/bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" ethjson = { path = "../../json" } keccak-hash = { path = "../../util/hash" } heapsize = "0.4" diff --git a/ethcore/vm/Cargo.toml b/ethcore/vm/Cargo.toml index 41ff98d0a..c5d31f58e 100644 --- a/ethcore/vm/Cargo.toml +++ b/ethcore/vm/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Parity Technologies "] [dependencies] byteorder = "1.0" ethcore-bytes = { path = "../../util/bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" patricia-trie = { path = "../../util/patricia_trie" } log = "0.3" common-types = { path = "../types" } diff --git a/ethcore/wasm/Cargo.toml b/ethcore/wasm/Cargo.toml index fc820a67d..10a5134d4 100644 --- a/ethcore/wasm/Cargo.toml +++ b/ethcore/wasm/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] [dependencies] byteorder = "1.0" -ethereum-types = "0.2" +ethereum-types = "0.3" log = "0.3" parity-wasm = "0.27" libc = "0.2" diff --git a/ethcore/wasm/run/Cargo.toml b/ethcore/wasm/run/Cargo.toml index 91cbfb996..514849f2a 100644 --- a/ethcore/wasm/run/Cargo.toml +++ b/ethcore/wasm/run/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Parity Technologies "] serde = "1" serde_json = "1" serde_derive = "1" -ethereum-types = "0.2" +ethereum-types = "0.3" ethjson = { path = "../../../json" } vm = { path = "../../vm" } wasm = { path = "../" } diff --git a/ethcore/wasm/run/src/runner.rs b/ethcore/wasm/run/src/runner.rs index a30efc6f0..5ae0f941a 100644 --- a/ethcore/wasm/run/src/runner.rs +++ b/ethcore/wasm/run/src/runner.rs @@ -79,17 +79,17 @@ impl fmt::Display for Fail { write!( f, "Storage key {} value mismatch, expected {}, got: {}", - key.as_ref().to_vec().to_hex(), - expected.as_ref().to_vec().to_hex(), - actual.as_ref().to_vec().to_hex(), + key.to_vec().to_hex(), + expected.to_vec().to_hex(), + actual.to_vec().to_hex(), ), StorageMismatch { ref key, ref expected, actual: None} => write!( f, "No expected storage value for key {} found, expected {}", - key.as_ref().to_vec().to_hex(), - expected.as_ref().to_vec().to_hex(), + key.to_vec().to_hex(), + expected.to_vec().to_hex(), ), Nonconformity(SpecNonconformity::Address) => diff --git a/ethcrypto/Cargo.toml b/ethcrypto/Cargo.toml index dfa351023..887b44ab4 100644 --- a/ethcrypto/Cargo.toml +++ b/ethcrypto/Cargo.toml @@ -8,7 +8,7 @@ rust-crypto = "0.2.36" tiny-keccak = "1.3" eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1", optional = true } ethkey = { path = "../ethkey", optional = true } -ethereum-types = "0.2" +ethereum-types = "0.3" subtle = "0.5" [features] diff --git a/ethkey/Cargo.toml b/ethkey/Cargo.toml index a3e903271..51052bdca 100644 --- a/ethkey/Cargo.toml +++ b/ethkey/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Parity Technologies "] byteorder = "1.0" edit-distance = "2.0" eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" } -ethereum-types = "0.2" +ethereum-types = "0.3" lazy_static = "1.0" log = "0.3" parity-wordlist = "1.2" diff --git a/ethkey/cli/src/main.rs b/ethkey/cli/src/main.rs index 9298788f0..0dfc8aecd 100644 --- a/ethkey/cli/src/main.rs +++ b/ethkey/cli/src/main.rs @@ -180,9 +180,9 @@ fn display(result: (KeyPair, Option), mode: DisplayMode) -> String { Some(extra_data) => format!("{}\n{}", extra_data, keypair), None => format!("{}", keypair) }, - DisplayMode::Secret => format!("{:?}", keypair.secret()), - DisplayMode::Public => format!("{:?}", keypair.public()), - DisplayMode::Address => format!("{:?}", keypair.address()), + DisplayMode::Secret => format!("{:x}", keypair.secret()), + DisplayMode::Public => format!("{:x}", keypair.public()), + DisplayMode::Address => format!("{:x}", keypair.address()), } } diff --git a/ethkey/src/secret.rs b/ethkey/src/secret.rs index 6e0548264..9b2faee7c 100644 --- a/ethkey/src/secret.rs +++ b/ethkey/src/secret.rs @@ -29,13 +29,19 @@ pub struct Secret { impl ToHex for Secret { fn to_hex(&self) -> String { - self.inner.to_hex() + format!("{:x}", self.inner) + } +} + +impl fmt::LowerHex for Secret { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + self.inner.fmt(fmt) } } impl fmt::Debug for Secret { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt, "{:?}", self.inner) + self.inner.fmt(fmt) } } diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index a504c7f2a..34f61a8f7 100755 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -18,7 +18,7 @@ time = "0.1.34" itertools = "0.5" parking_lot = "0.5" ethcrypto = { path = "../ethcrypto" } -ethereum-types = "0.2" +ethereum-types = "0.3" dir = { path = "../util/dir" } smallvec = "0.4" parity-wordlist = "1.0" diff --git a/ethstore/cli/src/main.rs b/ethstore/cli/src/main.rs index 45f9f6920..8ebb206a0 100644 --- a/ethstore/cli/src/main.rs +++ b/ethstore/cli/src/main.rs @@ -191,7 +191,7 @@ fn open_args_vault_account(store: &EthStore, address: Address, args: &Args) -> R fn format_accounts(accounts: &[Address]) -> String { accounts.iter() .enumerate() - .map(|(i, a)| format!("{:2}: 0x{:?}", i, a)) + .map(|(i, a)| format!("{:2}: 0x{:x}", i, a)) .collect::>() .join("\n") } @@ -220,7 +220,7 @@ fn execute(command: I) -> Result where I: IntoIterator(command: I) -> Result where I: IntoIterator>(); @@ -272,7 +272,7 @@ fn execute(command: I) -> Result where I: IntoIterator"] [dependencies] ethcore = { path = "../ethcore" } ethcore-bytes = { path = "../util/bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } rlp = { path = "../util/rlp" } diff --git a/json/Cargo.toml b/json/Cargo.toml index 6e84e6da3..0668caf8b 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Parity Technologies "] [dependencies] -ethereum-types = "0.2" +ethereum-types = "0.3" rustc-hex = "1.0" serde = "1.0" serde_json = "1.0" diff --git a/machine/Cargo.toml b/machine/Cargo.toml index 037bc55bf..ee56b9de8 100644 --- a/machine/Cargo.toml +++ b/machine/Cargo.toml @@ -5,4 +5,4 @@ description = "Generalization of a state machine for consensus engines" authors = ["Parity Technologies "] [dependencies] -ethereum-types = "0.2" +ethereum-types = "0.3" diff --git a/miner/Cargo.toml b/miner/Cargo.toml index b9f44cd6e..a3464cf7d 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -16,7 +16,7 @@ ethabi-contract = "5.0" ethabi-derive = "5.0" ethash = { path = "../ethash" } ethcore-transaction = { path = "../ethcore/transaction" } -ethereum-types = "0.2" +ethereum-types = "0.3" ethkey = { path = "../ethkey" } futures = "0.1" heapsize = "0.4" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index bb23b2ec3..433f46d13 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -45,7 +45,7 @@ ethcore-light = { path = "../ethcore/light" } ethcore-logger = { path = "../logger" } ethcore-miner = { path = "../miner" } ethcore-transaction = { path = "../ethcore/transaction" } -ethereum-types = "0.2" +ethereum-types = "0.3" ethcrypto = { path = "../ethcrypto" } ethjson = { path = "../json" } diff --git a/rpc/src/tests/ws.rs b/rpc/src/tests/ws.rs index 1db7a91e9..429ff6d3c 100644 --- a/rpc/src/tests/ws.rs +++ b/rpc/src/tests/ws.rs @@ -120,7 +120,7 @@ mod testing { Host: 127.0.0.1:{}\r\n\ Connection: Close\r\n\ Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n\ - Sec-WebSocket-Protocol: {:?}_{}\r\n\ + Sec-WebSocket-Protocol: {:x}_{}\r\n\ Sec-WebSocket-Version: 13\r\n\ \r\n\ {{}} @@ -150,7 +150,7 @@ mod testing { Host: 127.0.0.1:{}\r\n\ Connection: Close\r\n\ Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n\ - Sec-WebSocket-Protocol:{:?}_{}\r\n\ + Sec-WebSocket-Protocol:{:x}_{}\r\n\ Sec-WebSocket-Version: 13\r\n\ \r\n\ {{}} diff --git a/rpc/src/v1/tests/eth.rs b/rpc/src/v1/tests/eth.rs index 84dd64644..bb03808c5 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -337,7 +337,7 @@ fn eth_transaction_count() { let req_before = r#"{ "jsonrpc": "2.0", "method": "eth_getTransactionCount", - "params": [""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", "latest"], + "params": [""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "latest"], "id": 15 }"#; @@ -349,7 +349,7 @@ fn eth_transaction_count() { "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x30000", "gasPrice": "0x1", @@ -365,7 +365,7 @@ fn eth_transaction_count() { let req_after_latest = r#"{ "jsonrpc": "2.0", "method": "eth_getTransactionCount", - "params": [""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", "latest"], + "params": [""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "latest"], "id": 17 }"#; @@ -377,7 +377,7 @@ fn eth_transaction_count() { let req_after_pending = r#"{ "jsonrpc": "2.0", "method": "eth_getTransactionCount", - "params": [""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", "pending"], + "params": [""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "pending"], "id": 18 }"#; @@ -403,7 +403,7 @@ fn verify_transaction_counts(name: String, chain: BlockChain) { "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": [ - ""#.to_owned() + format!("0x{:?}", hash).as_ref() + r#"" + ""#.to_owned() + format!("0x{:x}", hash).as_ref() + r#"" ], "id": "# + format!("{}", *id).as_ref() + r#" }"#; @@ -463,7 +463,7 @@ fn starting_nonce_test() { { "jsonrpc": "2.0", "method": "eth_getTransactionCount", - "params": [""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", "latest"], + "params": [""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "latest"], "id": 15 } "#) diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index e901993bd..99c67286e 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -337,7 +337,7 @@ fn rpc_eth_sign() { "jsonrpc": "2.0", "method": "eth_sign", "params": [ - ""#.to_owned() + &format!("0x{:?}", account) + r#"", + ""#.to_owned() + &format!("0x{:x}", account) + r#"", "0x0cc175b9c0f1b6a831c399e26977266192eb5ffee6ae2fec3ad71c777531578f" ], "id": 1 @@ -349,7 +349,7 @@ fn rpc_eth_sign() { #[test] fn rpc_eth_author() { - let make_res = |addr| r#"{"jsonrpc":"2.0","result":""#.to_owned() + &format!("0x{:?}", addr) + r#"","id":1}"#; + let make_res = |addr| r#"{"jsonrpc":"2.0","result":""#.to_owned() + &format!("0x{:x}", addr) + r#"","id":1}"#; let tester = EthTester::default(); let req = r#"{ @@ -402,7 +402,7 @@ fn rpc_eth_accounts() { // with current policy it should return the account let request = r#"{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","result":[""#.to_owned() + &format!("0x{:?}", address) + r#""],"id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":[""#.to_owned() + &format!("0x{:x}", address) + r#""],"id":1}"#; assert_eq!(tester.io.handle_request_sync(request), Some(response.to_owned())); tester.accounts_provider.set_new_dapps_addresses(Some(vec![1.into()])).unwrap(); @@ -811,7 +811,7 @@ fn rpc_eth_send_transaction() { "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -831,7 +831,7 @@ fn rpc_eth_send_transaction() { let signature = tester.accounts_provider.sign(address, None, t.hash(None)).unwrap(); let t = t.with_signature(signature, None); - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(&request), Some(response)); @@ -848,7 +848,7 @@ fn rpc_eth_send_transaction() { let signature = tester.accounts_provider.sign(address, None, t.hash(None)).unwrap(); let t = t.with_signature(signature, None); - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(&request), Some(response)); } @@ -862,7 +862,7 @@ fn rpc_eth_sign_transaction() { "jsonrpc": "2.0", "method": "eth_signTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -890,12 +890,12 @@ fn rpc_eth_sign_transaction() { r#""blockHash":null,"blockNumber":null,"# + &format!("\"chainId\":{},", t.chain_id().map_or("null".to_owned(), |n| format!("{}", n))) + r#""condition":null,"creates":null,"# + - &format!("\"from\":\"0x{:?}\",", &address) + + &format!("\"from\":\"0x{:x}\",", &address) + r#""gas":"0x76c0","gasPrice":"0x9184e72a000","# + - &format!("\"hash\":\"0x{:?}\",", t.hash()) + + &format!("\"hash\":\"0x{:x}\",", t.hash()) + r#""input":"0x","# + r#""nonce":"0x1","# + - &format!("\"publicKey\":\"0x{:?}\",", t.recover_public().unwrap()) + + &format!("\"publicKey\":\"0x{:x}\",", t.recover_public().unwrap()) + &format!("\"r\":\"0x{:x}\",", U256::from(signature.r())) + &format!("\"raw\":\"0x{}\",", rlp.to_hex()) + &format!("\"s\":\"0x{:x}\",", U256::from(signature.s())) + @@ -918,7 +918,7 @@ fn rpc_eth_send_transaction_with_bad_to() { "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -941,7 +941,7 @@ fn rpc_eth_send_transaction_error() { "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -999,7 +999,7 @@ fn rpc_eth_send_raw_transaction() { "id": 1 }"#; - let res = r#"{"jsonrpc":"2.0","result":""#.to_owned() + &format!("0x{:?}", t.hash()) + r#"","id":1}"#; + let res = r#"{"jsonrpc":"2.0","result":""#.to_owned() + &format!("0x{:x}", t.hash()) + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(&req), Some(res)); } @@ -1150,7 +1150,7 @@ fn rpc_get_work_should_timeout() { // Request without providing timeout. This should work since we're disabling timeout. let request = r#"{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}"#; let work_response = format!( - r#"{{"jsonrpc":"2.0","result":["0x{:?}","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000800000000000000000000000000000000000000000000000000000000000","0x1"],"id":1}}"#, + r#"{{"jsonrpc":"2.0","result":["0x{:x}","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000800000000000000000000000000000000000000000000000000000000000","0x1"],"id":1}}"#, hash, ); assert_eq!(eth_tester.io.handle_request_sync(request), Some(work_response.to_owned())); @@ -1158,7 +1158,7 @@ fn rpc_get_work_should_timeout() { // Request with timeout of 0 seconds. This should work since we're disabling timeout. let request = r#"{"jsonrpc": "2.0", "method": "eth_getWork", "params": [0], "id": 1}"#; let work_response = format!( - r#"{{"jsonrpc":"2.0","result":["0x{:?}","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000800000000000000000000000000000000000000000000000000000000000","0x1"],"id":1}}"#, + r#"{{"jsonrpc":"2.0","result":["0x{:x}","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000800000000000000000000000000000000000000000000000000000000000","0x1"],"id":1}}"#, hash, ); assert_eq!(eth_tester.io.handle_request_sync(request), Some(work_response.to_owned())); diff --git a/rpc/src/v1/tests/mocked/eth_pubsub.rs b/rpc/src/v1/tests/mocked/eth_pubsub.rs index 1a0186c97..15b178d50 100644 --- a/rpc/src/v1/tests/mocked/eth_pubsub.rs +++ b/rpc/src/v1/tests/mocked/eth_pubsub.rs @@ -128,7 +128,7 @@ fn should_subscribe_to_logs() { handler.new_blocks(vec![], vec![], vec![h1], vec![], vec![], vec![], 0); let (res, receiver) = receiver.into_future().wait().unwrap(); let response = r#"{"jsonrpc":"2.0","method":"eth_subscription","params":{"result":{"address":"0x0000000000000000000000000000000000000005","blockHash":"0x3457d2fa2e3dd33c78ac681cf542e429becf718859053448748383af67e23218","blockNumber":"0x1","data":"0x","logIndex":"0x0","topics":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000000"],"transactionHash":""#.to_owned() - + &format!("0x{:?}", tx_hash) + + &format!("0x{:x}", tx_hash) + r#"","transactionIndex":"0x0","transactionLogIndex":"0x0","type":"mined"},"subscription":"0x416d77337e24399d"}}"#; assert_eq!(res, Some(response.into())); @@ -136,7 +136,7 @@ fn should_subscribe_to_logs() { handler.new_blocks(vec![], vec![], vec![], vec![h1], vec![], vec![], 0); let (res, receiver) = receiver.into_future().wait().unwrap(); let response = r#"{"jsonrpc":"2.0","method":"eth_subscription","params":{"result":{"address":"0x0000000000000000000000000000000000000005","blockHash":"0x3457d2fa2e3dd33c78ac681cf542e429becf718859053448748383af67e23218","blockNumber":"0x1","data":"0x","logIndex":"0x0","topics":["0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000000"],"transactionHash":""#.to_owned() - + &format!("0x{:?}", tx_hash) + + &format!("0x{:x}", tx_hash) + r#"","transactionIndex":"0x0","transactionLogIndex":"0x0","type":"removed"},"subscription":"0x416d77337e24399d"}}"#; assert_eq!(res, Some(response.into())); diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 4b75e07fe..332221b08 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -407,7 +407,7 @@ fn rpc_parity_pending_transactions() { fn rpc_parity_encrypt() { let deps = Dependencies::new(); let io = deps.default_client(); - let key = format!("{:?}", Random.generate().unwrap().public()); + let key = format!("{:x}", Random.generate().unwrap().public()); let request = r#"{"jsonrpc": "2.0", "method": "parity_encryptMessage", "params":["0x"#.to_owned() + &key + r#"", "0x01"], "id": 1}"#; assert!(io.handle_request_sync(&request).unwrap().contains("result"), "Should return success."); @@ -461,7 +461,7 @@ fn rpc_parity_next_nonce() { let request = r#"{ "jsonrpc": "2.0", "method": "parity_nextNonce", - "params": [""#.to_owned() + &format!("0x{:?}", address) + r#""], + "params": [""#.to_owned() + &format!("0x{:x}", address) + r#""], "id": 1 }"#; let response1 = r#"{"jsonrpc":"2.0","result":"0x0","id":1}"#; diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index f92841ee8..549811bd5 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -234,7 +234,7 @@ fn rpc_parity_remove_transaction() { let signed = tx.fake_sign(2.into()); let hash = signed.hash(); - let request = r#"{"jsonrpc": "2.0", "method": "parity_removeTransaction", "params":[""#.to_owned() + &format!("0x{:?}", hash) + r#""], "id": 1}"#; + let request = r#"{"jsonrpc": "2.0", "method": "parity_removeTransaction", "params":[""#.to_owned() + &format!("0x{:x}", hash) + r#""], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":{"blockHash":null,"blockNumber":null,"chainId":null,"condition":null,"creates":null,"from":"0x0000000000000000000000000000000000000002","gas":"0x76c0","gasPrice":"0x9184e72a000","hash":"0xa2e0da8a8064e0b9f93e95a53c2db6d01280efb8ac72a708d25487e67dd0f8fc","input":"0x","nonce":"0x1","publicKey":null,"r":"0x1","raw":"0xe9018609184e72a0008276c0940000000000000000000000000000000000000005849184e72a80800101","s":"0x1","standardV":"0x4","to":"0x0000000000000000000000000000000000000005","transactionIndex":null,"v":"0x0","value":"0x9184e72a"},"id":1}"#; miner.pending_transactions.lock().insert(hash, signed); diff --git a/rpc/src/v1/tests/mocked/personal.rs b/rpc/src/v1/tests/mocked/personal.rs index 6dd1da567..502a59058 100644 --- a/rpc/src/v1/tests/mocked/personal.rs +++ b/rpc/src/v1/tests/mocked/personal.rs @@ -77,7 +77,7 @@ fn accounts() { let tester = setup(); let address = tester.accounts.new_account("").unwrap(); let request = r#"{"jsonrpc": "2.0", "method": "personal_listAccounts", "params": [], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","result":[""#.to_owned() + &format!("0x{:?}", address) + r#""],"id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":[""#.to_owned() + &format!("0x{:x}", address) + r#""],"id":1}"#; assert_eq!(tester.io.handle_request_sync(request), Some(response.to_owned())); } @@ -92,7 +92,7 @@ fn new_account() { let accounts = tester.accounts.accounts().unwrap(); assert_eq!(accounts.len(), 1); let address = accounts[0]; - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"","id":1}"#; assert_eq!(res, Some(response)); } @@ -106,7 +106,7 @@ fn invalid_password_test(method: &str) "jsonrpc": "2.0", "method": ""#.to_owned() + method + r#"", "params": [{ - "from": ""# + format!("0x{:?}", address).as_ref() + r#"", + "from": ""# + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -131,7 +131,7 @@ fn sign() { "method": "personal_sign", "params": [ ""#.to_owned() + format!("0x{}", data.to_hex()).as_ref() + r#"", - ""# + format!("0x{:?}", address).as_ref() + r#"", + ""# + format!("0x{:x}", address).as_ref() + r#"", "password123" ], "id": 1 @@ -156,7 +156,7 @@ fn sign_with_invalid_password() { "method": "personal_sign", "params": [ "0x0000000000000000000000000000000000000000000000000000000000000005", - ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "" ], "id": 1 @@ -195,7 +195,7 @@ fn sign_and_send_test(method: &str) { "jsonrpc": "2.0", "method": ""#.to_owned() + method + r#"", "params": [{ - "from": ""# + format!("0x{:?}", address).as_ref() + r#"", + "from": ""# + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -216,7 +216,7 @@ fn sign_and_send_test(method: &str) { let signature = tester.accounts.sign(address, None, t.hash(None)).unwrap(); let t = t.with_signature(signature, None); - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(request.as_ref()), Some(response)); @@ -234,7 +234,7 @@ fn sign_and_send_test(method: &str) { let signature = tester.accounts.sign(address, None, t.hash(None)).unwrap(); let t = t.with_signature(signature, None); - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(request.as_ref()), Some(response)); } @@ -259,7 +259,7 @@ fn ec_recover() { "id": 1 }"#; - let address = format!("0x{:?}", address); + let address = format!("0x{:x}", address); let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + &address + r#"","id":1}"#; assert_eq!(tester.io.handle_request_sync(request.as_ref()), Some(response.into())); @@ -294,7 +294,7 @@ fn should_unlock_not_account_temporarily_if_allow_perm_is_disabled() { "jsonrpc": "2.0", "method": "personal_unlockAccount", "params": [ - ""#.to_owned() + &format!("0x{:?}", address) + r#"", + ""#.to_owned() + &format!("0x{:x}", address) + r#"", "password123", "0x100" ], @@ -315,7 +315,7 @@ fn should_unlock_account_permanently() { "jsonrpc": "2.0", "method": "personal_unlockAccount", "params": [ - ""#.to_owned() + &format!("0x{:?}", address) + r#"", + ""#.to_owned() + &format!("0x{:x}", address) + r#"", "password123", null ], diff --git a/rpc/src/v1/tests/mocked/signer.rs b/rpc/src/v1/tests/mocked/signer.rs index da531a00f..bee28b35e 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -216,7 +216,7 @@ fn should_confirm_transaction_and_dispatch() { "params":["0x1", {"gasPrice":"0x1000","gas":"0x50505"}, "test"], "id":1 }"#; - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; // then assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); @@ -261,11 +261,11 @@ fn should_alter_the_sender_and_nonce() { "jsonrpc":"2.0", "method":"signer_confirmRequest", "params":["0x1", {"sender":""#.to_owned() - + &format!("0x{:?}", address) + + &format!("0x{:x}", address) + r#"","gasPrice":"0x1000","gas":"0x50505"}, "test"], "id":1 }"#; - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + &format!("0x{:?}", t.hash()) + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + &format!("0x{:x}", t.hash()) + r#"","id":1}"#; // then assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); @@ -312,7 +312,7 @@ fn should_confirm_transaction_with_token() { "id":1 }"#; let response = r#"{"jsonrpc":"2.0","result":{"result":""#.to_owned() + - format!("0x{:?}", t.hash()).as_ref() + + format!("0x{:x}", t.hash()).as_ref() + r#"","token":""#; // then @@ -361,7 +361,7 @@ fn should_confirm_transaction_with_rlp() { "params":["0x1", "0x"#.to_owned() + &rlp.to_hex() + r#""], "id":1 }"#; - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; // then assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); @@ -460,12 +460,12 @@ fn should_confirm_sign_transaction_with_rlp() { r#""blockHash":null,"blockNumber":null,"# + &format!("\"chainId\":{},", t.chain_id().map_or("null".to_owned(), |n| format!("{}", n))) + r#""condition":null,"creates":null,"# + - &format!("\"from\":\"0x{:?}\",", &address) + + &format!("\"from\":\"0x{:x}\",", &address) + r#""gas":"0x989680","gasPrice":"0x1000","# + - &format!("\"hash\":\"0x{:?}\",", t.hash()) + + &format!("\"hash\":\"0x{:x}\",", t.hash()) + r#""input":"0x","# + r#""nonce":"0x0","# + - &format!("\"publicKey\":\"0x{:?}\",", t.public_key().unwrap()) + + &format!("\"publicKey\":\"0x{:x}\",", t.public_key().unwrap()) + &format!("\"r\":\"0x{:x}\",", U256::from(signature.r())) + &format!("\"raw\":\"0x{}\",", rlp.to_hex()) + &format!("\"s\":\"0x{:x}\",", U256::from(signature.s())) + diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 5bf5119ec..11e1ac44d 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -95,7 +95,7 @@ fn should_add_sign_to_queue() { "jsonrpc": "2.0", "method": "eth_sign", "params": [ - ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "0x0000000000000000000000000000000000000000000000000000000000000005" ], "id": 1 @@ -132,7 +132,7 @@ fn should_post_sign_to_queue() { "jsonrpc": "2.0", "method": "parity_postSign", "params": [ - ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "0x0000000000000000000000000000000000000000000000000000000000000005" ], "id": 1 @@ -153,7 +153,7 @@ fn should_check_status_of_request() { "jsonrpc": "2.0", "method": "parity_postSign", "params": [ - ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "0x0000000000000000000000000000000000000000000000000000000000000005" ], "id": 1 @@ -182,7 +182,7 @@ fn should_check_status_of_request_when_its_resolved() { "jsonrpc": "2.0", "method": "parity_postSign", "params": [ - ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "0x0000000000000000000000000000000000000000000000000000000000000005" ], "id": 1 @@ -219,7 +219,7 @@ fn should_sign_if_account_is_unlocked() { "jsonrpc": "2.0", "method": "eth_sign", "params": [ - ""#.to_owned() + format!("0x{:?}", acc).as_ref() + r#"", + ""#.to_owned() + format!("0x{:x}", acc).as_ref() + r#"", ""# + format!("0x{}", data.to_hex()).as_ref() + r#"" ], "id": 1 @@ -241,7 +241,7 @@ fn should_add_transaction_to_queue() { "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -282,7 +282,7 @@ fn should_add_sign_transaction_to_the_queue() { "jsonrpc": "2.0", "method": "eth_signTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", address).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", address).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -311,12 +311,12 @@ fn should_add_sign_transaction_to_the_queue() { r#""blockHash":null,"blockNumber":null,"# + &format!("\"chainId\":{},", t.chain_id().map_or("null".to_owned(), |n| format!("{}", n))) + r#""condition":null,"creates":null,"# + - &format!("\"from\":\"0x{:?}\",", &address) + + &format!("\"from\":\"0x{:x}\",", &address) + r#""gas":"0x76c0","gasPrice":"0x9184e72a000","# + - &format!("\"hash\":\"0x{:?}\",", t.hash()) + + &format!("\"hash\":\"0x{:x}\",", t.hash()) + r#""input":"0x","# + r#""nonce":"0x1","# + - &format!("\"publicKey\":\"0x{:?}\",", t.public_key().unwrap()) + + &format!("\"publicKey\":\"0x{:x}\",", t.public_key().unwrap()) + &format!("\"r\":\"0x{:x}\",", U256::from(signature.r())) + &format!("\"raw\":\"0x{}\",", rlp.to_hex()) + &format!("\"s\":\"0x{:x}\",", U256::from(signature.s())) + @@ -370,7 +370,7 @@ fn should_dispatch_transaction_if_account_is_unlock() { "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ - "from": ""#.to_owned() + format!("0x{:?}", acc).as_ref() + r#"", + "from": ""#.to_owned() + format!("0x{:x}", acc).as_ref() + r#"", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", @@ -378,7 +378,7 @@ fn should_dispatch_transaction_if_account_is_unlock() { }], "id": 1 }"#; - let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:?}", t.hash()).as_ref() + r#"","id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":""#.to_owned() + format!("0x{:x}", t.hash()).as_ref() + r#"","id":1}"#; // then assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); @@ -395,7 +395,7 @@ fn should_decrypt_message_if_account_is_unlocked() { // First encrypt message - let request = format!("{}0x{:?}{}", + let request = format!("{}0x{:x}{}", r#"{"jsonrpc": "2.0", "method": "parity_encryptMessage", "params":[""#, public, r#"", "0x01020304"], "id": 1}"# @@ -403,7 +403,7 @@ fn should_decrypt_message_if_account_is_unlocked() { let encrypted: Success = serde_json::from_str(&tester.io.handle_request_sync(&request).unwrap()).unwrap(); // then call decrypt - let request = format!("{}{:?}{}{}{}", + let request = format!("{}{:x}{}{}{}", r#"{"jsonrpc": "2.0", "method": "parity_decryptMessage", "params":["0x"#, address, r#"","#, @@ -428,7 +428,7 @@ fn should_add_decryption_to_the_queue() { let request = r#"{ "jsonrpc": "2.0", "method": "parity_decryptMessage", - "params": ["0x"#.to_owned() + &format!("{:?}", acc.address()) + r#"", + "params": ["0x"#.to_owned() + &format!("{:x}", acc.address()) + r#"", "0x012345"], "id": 1 }"#; @@ -459,7 +459,7 @@ fn should_compose_transaction() { let tester = eth_signing(); let acc = Random.generate().unwrap(); assert_eq!(tester.signer.requests().len(), 0); - let from = format!("{:?}", acc.address()); + let from = format!("{:x}", acc.address()); // when let request = r#"{ diff --git a/rpc_client/src/client.rs b/rpc_client/src/client.rs index 8f330629b..17a8d9d72 100644 --- a/rpc_client/src/client.rs +++ b/rpc_client/src/client.rs @@ -74,7 +74,7 @@ impl Handler for RpcHandler { })?; let secs = timestamp.as_secs(); let hashed = keccak(format!("{}:{}", self.auth_code, secs)); - let proto = format!("{:?}_{}", hashed, secs); + let proto = format!("{:x}_{}", hashed, secs); r.add_protocol(&proto); Ok(r) }, diff --git a/secret_store/Cargo.toml b/secret_store/Cargo.toml index 10b690b6d..3b60a3c6c 100644 --- a/secret_store/Cargo.toml +++ b/secret_store/Cargo.toml @@ -24,7 +24,7 @@ tokio-proto = "0.1" url = "1.0" ethcore = { path = "../ethcore" } ethcore-bytes = { path = "../util/bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" ethsync = { path = "../sync" } kvdb = { path = "../util/kvdb" } kvdb-rocksdb = { path = "../util/kvdb-rocksdb" } diff --git a/stratum/Cargo.toml b/stratum/Cargo.toml index 0faed6186..5f66cfd49 100644 --- a/stratum/Cargo.toml +++ b/stratum/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Parity Technologies "] [dependencies] ethcore-logger = { path = "../logger" } -ethereum-types = "0.2" +ethereum-types = "0.3" keccak-hash = { path = "../util/hash" } jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } jsonrpc-macros = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } diff --git a/sync/Cargo.toml b/sync/Cargo.toml index e82dd710d..1c1bd467b 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -15,7 +15,7 @@ ethcore-io = { path = "../util/io" } ethcore-light = { path = "../ethcore/light" } ethcore-transaction = { path = "../ethcore/transaction" } ethcore = { path = "../ethcore" } -ethereum-types = "0.2" +ethereum-types = "0.3" plain_hasher = { path = "../util/plain_hasher" } rlp = { path = "../util/rlp" } keccak-hash = { path = "../util/hash" } diff --git a/test.sh b/test.sh index ada9525cb..7e9800188 100755 --- a/test.sh +++ b/test.sh @@ -3,27 +3,33 @@ FEATURES="json-tests" OPTIONS="--release" +VALIDATE=1 case $1 in - --no-json) + --no-json) FEATURES="ipc" shift # past argument=value ;; - --no-release) - OPTIONS="" - shift - ;; - --no-run) - OPTIONS="--no-run" - shift - ;; - *) - # unknown option + --no-release) + OPTIONS="" + shift + ;; + --no-validate) + VALIDATE=0 + shift + ;; + --no-run) + OPTIONS="--no-run" + shift + ;; + *) + # unknown option ;; esac set -e +if [ "$VALIDATE" -eq "1" ]; then # Validate --no-default-features build echo "________Validate build________" cargo check --no-default-features @@ -31,6 +37,8 @@ cargo check --no-default-features # Validate chainspecs echo "________Validate chainspecs________" ./scripts/validate_chainspecs.sh +fi + # Running test's echo "________Running Parity Full Test Suite________" diff --git a/transaction-pool/Cargo.toml b/transaction-pool/Cargo.toml index 49bf2db64..b9db0f6d2 100644 --- a/transaction-pool/Cargo.toml +++ b/transaction-pool/Cargo.toml @@ -9,4 +9,4 @@ authors = ["Parity Technologies "] error-chain = "0.11" log = "0.3" smallvec = "0.4" -ethereum-types = "0.2" +ethereum-types = "0.3" diff --git a/updater/Cargo.toml b/updater/Cargo.toml index 0621fbc67..29fba27ff 100644 --- a/updater/Cargo.toml +++ b/updater/Cargo.toml @@ -15,7 +15,7 @@ semver = "0.6" ethcore = { path = "../ethcore" } ethsync = { path = "../sync" } ethcore-bytes = { path = "../util/bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" parking_lot = "0.5" parity-hash-fetch = { path = "../hash-fetch" } parity-version = { path = "../util/version" } diff --git a/updater/src/updater.rs b/updater/src/updater.rs index ba7a42c87..914516bb4 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -249,7 +249,7 @@ impl Updater { } fn update_file_name(v: &VersionInfo) -> String { - format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash) + format!("parity-{}.{}.{}-{:x}", v.version.major, v.version.minor, v.version.patch, v.hash) } fn updates_path(&self, name: &str) -> PathBuf { diff --git a/util/bloomchain/Cargo.toml b/util/bloomchain/Cargo.toml index a9bd8432c..6bcf6a9b1 100644 --- a/util/bloomchain/Cargo.toml +++ b/util/bloomchain/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" keywords = ["ethereum", "ethcore", "bloom", "chain", "filter"] [dependencies] -ethbloom = "0.4" +ethbloom = "0.5" [dev-dependencies] rustc-hex = "1.0" diff --git a/util/dir/Cargo.toml b/util/dir/Cargo.toml index c82a0347c..5963833a7 100644 --- a/util/dir/Cargo.toml +++ b/util/dir/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" authors = ["Parity Technologies "] [dependencies] -ethereum-types = "0.2" +ethereum-types = "0.3" journaldb = { path = "../journaldb" } app_dirs = "1.2.1" diff --git a/util/dir/src/lib.rs b/util/dir/src/lib.rs index 39175d000..765572b42 100644 --- a/util/dir/src/lib.rs +++ b/util/dir/src/lib.rs @@ -156,7 +156,7 @@ impl DatabaseDirectories { /// Base DB directory for the given fork. // TODO: remove in 1.7 pub fn legacy_fork_path(&self) -> PathBuf { - Path::new(&self.legacy_path).join(format!("{:?}{}", H64::from(self.genesis_hash), self.fork_name.as_ref().map(|f| format!("-{}", f)).unwrap_or_default())) + Path::new(&self.legacy_path).join(format!("{:x}{}", H64::from(self.genesis_hash), self.fork_name.as_ref().map(|f| format!("-{}", f)).unwrap_or_default())) } /// Spec root directory for the given fork. diff --git a/util/error/Cargo.toml b/util/error/Cargo.toml index ffbd8e4a7..d9da3e5c5 100644 --- a/util/error/Cargo.toml +++ b/util/error/Cargo.toml @@ -6,6 +6,6 @@ authors = ["Parity Technologies "] [dependencies] rlp = { path = "../rlp" } kvdb = { path = "../kvdb" } -ethereum-types = "0.2" +ethereum-types = "0.3" error-chain = { version = "0.11", default-features = false } rustc-hex = "1.0" diff --git a/util/hash/Cargo.toml b/util/hash/Cargo.toml index c7fee36e0..da91cd733 100644 --- a/util/hash/Cargo.toml +++ b/util/hash/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Parity Technologies "] build = "build.rs" [dependencies] -ethereum-types = "0.2" +ethereum-types = "0.3" tiny-keccak = "1.3" [build-dependencies] diff --git a/util/hash/src/lib.rs b/util/hash/src/lib.rs index 0982c11da..d00396501 100644 --- a/util/hash/src/lib.rs +++ b/util/hash/src/lib.rs @@ -105,6 +105,6 @@ mod tests { let hash = keccak_buffer(&mut file).unwrap(); // then - assert_eq!(format!("{:?}", hash), "68371d7e884c168ae2022c82bd837d51837718a7f7dfb7aa3f753074a35e1d87"); + assert_eq!(format!("{:x}", hash), "68371d7e884c168ae2022c82bd837d51837718a7f7dfb7aa3f753074a35e1d87"); } } diff --git a/util/hashdb/Cargo.toml b/util/hashdb/Cargo.toml index e6250fb56..d4e055f9f 100644 --- a/util/hashdb/Cargo.toml +++ b/util/hashdb/Cargo.toml @@ -7,4 +7,4 @@ license = "GPL-3.0" [dependencies] elastic-array = "0.10" -ethereum-types = "0.2" +ethereum-types = "0.3" diff --git a/util/journaldb/Cargo.toml b/util/journaldb/Cargo.toml index d3d4708f0..dea70bd6a 100644 --- a/util/journaldb/Cargo.toml +++ b/util/journaldb/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL3" [dependencies] ethcore-bytes = { path = "../bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" hashdb = { path = "../hashdb" } heapsize = "0.4" kvdb = { path = "../kvdb" } diff --git a/util/kvdb-rocksdb/Cargo.toml b/util/kvdb-rocksdb/Cargo.toml index 89a2f6403..07016b68a 100644 --- a/util/kvdb-rocksdb/Cargo.toml +++ b/util/kvdb-rocksdb/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] [dependencies] elastic-array = "0.10" -ethereum-types = "0.2" +ethereum-types = "0.3" kvdb = { path = "../kvdb" } log = "0.3" num_cpus = "1.0" diff --git a/util/memorydb/Cargo.toml b/util/memorydb/Cargo.toml index e5feabe5f..da8322781 100644 --- a/util/memorydb/Cargo.toml +++ b/util/memorydb/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0" bigint = "4.0" elastic-array = "0.10" heapsize = "0.4" -ethereum-types = "0.2" +ethereum-types = "0.3" keccak-hash = { version = "0.1.0", path = "../hash" } hashdb = { version = "0.1.1", path = "../hashdb" } plain_hasher = { path = "../plain_hasher" } diff --git a/util/network-devp2p/Cargo.toml b/util/network-devp2p/Cargo.toml index 7d86ce7a0..466ff9516 100644 --- a/util/network-devp2p/Cargo.toml +++ b/util/network-devp2p/Cargo.toml @@ -22,7 +22,7 @@ rustc-hex = "1.0" ethcore-io = { path = "../io" } ethcore-bytes = { path = "../bytes" } ethcore-network = { path = "../network" } -ethereum-types = "0.2" +ethereum-types = "0.3" ethkey = { path = "../../ethkey" } ethcrypto = { path = "../../ethcrypto" } rlp = { path = "../rlp" } diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index 51990b6f5..7056c67f6 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -1099,7 +1099,7 @@ fn save_key(path: &Path, key: &Secret) { if let Err(e) = restrict_permissions_owner(path, true, false) { warn!(target: "network", "Failed to modify permissions of the file ({})", e); } - if let Err(e) = file.write(&key.hex().into_bytes()) { + if let Err(e) = file.write(&key.hex().into_bytes()[2..]) { warn!("Error writing key file: {:?}", e); } } diff --git a/util/network-devp2p/src/node_table.rs b/util/network-devp2p/src/node_table.rs index 6be9ae12e..470bf5cde 100644 --- a/util/network-devp2p/src/node_table.rs +++ b/util/network-devp2p/src/node_table.rs @@ -169,9 +169,9 @@ impl Node { impl Display for Node { fn fmt(&self, f: &mut Formatter) -> fmt::Result { if self.endpoint.udp_port != self.endpoint.address.port() { - write!(f, "enode://{}@{}+{}", self.id.hex(), self.endpoint.address, self.endpoint.udp_port)?; + write!(f, "enode://{:x}@{}+{}", self.id, self.endpoint.address, self.endpoint.udp_port)?; } else { - write!(f, "enode://{}@{}", self.id.hex(), self.endpoint.address)?; + write!(f, "enode://{:x}@{}", self.id, self.endpoint.address)?; } Ok(()) } diff --git a/util/network/Cargo.toml b/util/network/Cargo.toml index 7f9b30400..7d3d48b5a 100644 --- a/util/network/Cargo.toml +++ b/util/network/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Parity Technologies "] [dependencies] ethcore-io = { path = "../io" } -ethereum-types = "0.2" +ethereum-types = "0.3" ethkey = { path = "../../ethkey" } ethcrypto = { path = "../../ethcrypto" } rlp = { path = "../rlp" } diff --git a/util/patricia_trie/Cargo.toml b/util/patricia_trie/Cargo.toml index 318db6b99..48b06b214 100644 --- a/util/patricia_trie/Cargo.toml +++ b/util/patricia_trie/Cargo.toml @@ -10,7 +10,7 @@ elastic-array = "0.10" log = "0.3" rand = "0.4" ethcore-bytes = { version = "0.1.0", path = "../bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" keccak-hash = { version = "0.1.0", path = "../hash" } hashdb = { version = "0.1.1", path = "../hashdb" } rlp = { version = "0.2.1", path = "../rlp" } diff --git a/util/plain_hasher/Cargo.toml b/util/plain_hasher/Cargo.toml index d79ea4c5e..d909f8f9d 100644 --- a/util/plain_hasher/Cargo.toml +++ b/util/plain_hasher/Cargo.toml @@ -9,4 +9,4 @@ homepage = "https://github.com/paritytech/plain_hasher" [dependencies] crunchy = "0.1.6" -ethereum-types = "0.2" +ethereum-types = "0.3" diff --git a/util/rlp/Cargo.toml b/util/rlp/Cargo.toml index ecb3b3931..3bde7206f 100644 --- a/util/rlp/Cargo.toml +++ b/util/rlp/Cargo.toml @@ -8,6 +8,6 @@ authors = ["Parity Technologies "] [dependencies] elastic-array = "0.10" -ethereum-types = "0.2" +ethereum-types = "0.3" rustc-hex = "1.0" byteorder = "1.0" diff --git a/util/trie-standardmap/Cargo.toml b/util/trie-standardmap/Cargo.toml index caa915c54..1177f3075 100644 --- a/util/trie-standardmap/Cargo.toml +++ b/util/trie-standardmap/Cargo.toml @@ -6,6 +6,6 @@ description = "Standard test map for profiling tries" [dependencies] ethcore-bytes = { path = "../bytes" } -ethereum-types = "0.2" +ethereum-types = "0.3" keccak-hash = { path = "../hash" } rlp = { path = "../rlp" } diff --git a/util/triehash/Cargo.toml b/util/triehash/Cargo.toml index 52af5911d..ee42b9d82 100644 --- a/util/triehash/Cargo.toml +++ b/util/triehash/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0" [dependencies] elastic-array = "0.10" rlp = { version = "0.2.1", path = "../rlp" } -ethereum-types = "0.2" +ethereum-types = "0.3" keccak-hash = { version = "0.1", path = "../hash" } [dev-dependencies] diff --git a/whisper/Cargo.toml b/whisper/Cargo.toml index 35d15fa76..b972bf5cf 100644 --- a/whisper/Cargo.toml +++ b/whisper/Cargo.toml @@ -7,7 +7,7 @@ description = "Whisper Protocol implementation for Parity" [dependencies] bitflags = "0.9" byteorder = "1.0.0" -ethereum-types = "0.2" +ethereum-types = "0.3" ethcore-network = { path = "../util/network" } ethcrypto = { path = "../ethcrypto" } ethkey = { path = "../ethkey" }