From e1fef5c73295aa070846ac4bef93a4afea6b441a Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Wed, 24 May 2017 13:31:33 +0300 Subject: [PATCH] Update dependencies and bigint api (#5685) * update to latest bigint * bump elastic array and deps * fix rlp tests * also update all smallvec deps * fix doc test * reduce parking in attempt to fix CI bug * fix from/into electum bug * remove duplicate imports --- Cargo.lock | 56 +++++++++---------- ethcore/light/Cargo.toml | 2 +- ethcore/light/src/net/load_timer.rs | 2 +- ethcore/native_contracts/generator/src/lib.rs | 2 +- ethcore/src/action_params.rs | 2 +- ethcore/src/block.rs | 2 +- ethcore/src/builtin.rs | 2 +- ethcore/src/client/client.rs | 2 +- ethcore/src/engines/tendermint/params.rs | 2 +- ethcore/src/evm/evm.rs | 8 +-- ethcore/src/evm/factory.rs | 2 +- ethcore/src/evm/interpreter/memory.rs | 2 +- ethcore/src/executive.rs | 2 +- ethcore/src/miner/banning_queue.rs | 4 +- ethcore/src/miner/miner.rs | 2 +- .../src/miner/service_transaction_checker.rs | 2 +- ethcore/src/miner/transaction_queue.rs | 4 +- ethcore/src/snapshot/mod.rs | 2 +- ethcore/src/spec/genesis.rs | 2 +- ethcore/src/types/account_diff.rs | 2 +- ethcore/src/types/transaction.rs | 2 +- ethcrypto/Cargo.toml | 2 +- ethkey/Cargo.toml | 2 +- ethkey/src/extended.rs | 2 +- ethstore/Cargo.toml | 4 +- evmbin/benches/mod.rs | 2 +- evmbin/src/main.rs | 2 +- hw/Cargo.toml | 2 +- hw/src/ledger.rs | 2 +- hw/src/lib.rs | 2 +- json/src/uint.rs | 2 +- parity/blockchain.rs | 2 +- parity/configuration.rs | 2 +- parity/helpers.rs | 2 +- parity/informant.rs | 2 +- rpc/src/v1/helpers/dispatch.rs | 2 +- rpc/src/v1/helpers/light_fetch.rs | 2 +- rpc/src/v1/impls/light/eth.rs | 2 +- rpc/src/v1/impls/personal.rs | 2 +- rpc/src/v1/tests/eth.rs | 2 +- rpc/src/v1/tests/helpers/miner_service.rs | 2 +- rpc/src/v1/tests/mocked/eth.rs | 2 +- rpc/src/v1/tests/mocked/personal.rs | 2 +- rpc/src/v1/tests/mocked/signer.rs | 2 +- rpc/src/v1/tests/mocked/signing.rs | 5 +- rpc/src/v1/types/trace.rs | 1 - rpc/src/v1/types/uint.rs | 2 +- rpc_cli/Cargo.toml | 2 +- rpc_cli/src/lib.rs | 2 +- scripts/contractABI.js | 1 - sync/Cargo.toml | 4 +- sync/src/chain.rs | 2 +- updater/src/operations.rs | 2 +- util/Cargo.toml | 6 +- util/benches/bigint.rs | 2 +- util/bigint/Cargo.toml | 4 +- util/bigint/src/hash.rs | 2 +- util/rlp/Cargo.toml | 4 +- util/rlp/benches/rlp.rs | 2 +- util/rlp/src/impls.rs | 2 +- 60 files changed, 96 insertions(+), 101 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b63349f77..88edf74e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,11 +69,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bigint" -version = "1.0.5" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -317,10 +317,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "elastic-array" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -416,10 +416,9 @@ dependencies = [ [[package]] name = "ethcore-bigint" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bigint 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bigint 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -529,7 +528,7 @@ dependencies = [ "rlp 0.2.0", "serde 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -636,14 +635,14 @@ version = "1.7.0" dependencies = [ "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "elastic-array 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "elastic-array 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.6 (git+https://github.com/paritytech/rust-secp256k1)", - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-bigint 0.1.3", "ethcore-bloom-journal 0.1.0", "ethcore-devtools 1.7.0", "ethcore-logger 1.7.0", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -670,7 +669,7 @@ name = "ethcrypto" version = "0.1.0" dependencies = [ "eth-secp256k1 0.5.6 (git+https://github.com/paritytech/rust-secp256k1)", - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-bigint 0.1.3", "ethkey 0.2.0", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -695,7 +694,7 @@ dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.6 (git+https://github.com/paritytech/rust-secp256k1)", - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-bigint 0.1.3", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -708,7 +707,7 @@ name = "ethstore" version = "0.1.0" dependencies = [ "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-bigint 0.1.3", "ethcrypto 0.1.0", "ethkey 0.2.0", "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -722,7 +721,7 @@ dependencies = [ "serde 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -744,13 +743,13 @@ dependencies = [ "ethcore-network 1.7.0", "ethcore-util 1.7.0", "ethkey 0.2.0", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.0", "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -864,7 +863,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "hardware-wallet" version = "1.7.0" dependencies = [ - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-bigint 0.1.3", "ethkey 0.2.0", "hidapi 0.3.1 (git+https://github.com/paritytech/hidapi-rs)", "libusb 0.3.0 (git+https://github.com/paritytech/libusb-rs)", @@ -875,7 +874,7 @@ dependencies = [ [[package]] name = "heapsize" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2092,8 +2091,8 @@ name = "rlp" version = "0.2.0" dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "elastic-array 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "elastic-array 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-bigint 0.1.3", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2154,7 +2153,7 @@ dependencies = [ name = "rpc-cli" version = "1.4.0" dependencies = [ - "ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bigint 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-util 1.7.0", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rpc 1.7.0", @@ -2386,10 +2385,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2863,7 +2862,7 @@ dependencies = [ "checksum aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfdf7355d9db158df68f976ed030ab0f6578af811f5a7bb6dcf221ec24e0e0" "checksum base-x 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f59103b47307f76e03bef1633aec7fa9e29bfb5aa6daf5a334f94233c71f6c1" "checksum base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9605ba46d61df0410d8ac686b0007add8172eba90e8e909c347856fe794d8c" -"checksum bigint 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5d1b3ef6756498df0e2c6bb67c065f4154d0ecd721eb5b3c3f865c8012b9fd74" +"checksum bigint 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d493e6869ed11b135750f4a4f44d574a52bf8f67e656cdc15b4085316c2098b6" "checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e" "checksum bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e6e1e6fb1c9e3d6fcdec57216a74eaa03e41f52a22f13a16438251d8e88b89da" "checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c" @@ -2895,11 +2894,10 @@ dependencies = [ "checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8" "checksum dtoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5edd69c67b2f8e0911629b7e6b8a34cb3956613cd7c6e6414966dee349c2db4f" "checksum either 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2b503c86dad62aaf414ecf2b8c527439abedb3f8d812537f0b12bfd6f32a91" -"checksum elastic-array 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71a64decd4b8cd06654a4e643c45cb558ad554abbffd82a7e16e34f45f51b605" +"checksum elastic-array 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "561b1b1bb58e6d9212b75a28cca442f8a87cceb35cb1b6d6f39f5df5346a9160" "checksum env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e3856f1697098606fc6cb97a93de88ca3f3bc35bb878c725920e6e82ecf05e83" "checksum eth-secp256k1 0.5.6 (git+https://github.com/paritytech/rust-secp256k1)" = "" "checksum ethabi 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63df67d0af5e3cb906b667ca1a6e00baffbed87d0d8f5f78468a1f5eb3a66345" -"checksum ethcore-bigint 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5d237300af825a8d78f4c0dc835b0eab76a207e9df4aa088d91e162a173e0ca0" "checksum fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1ee15a7050e5580b3712877157068ea713b245b080ff302ae2ca973cfcd9baa" "checksum flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "3eeb481e957304178d2e782f2da1257f1434dfecbae883bafb61ada2a9fea3bb" "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" @@ -2910,7 +2908,7 @@ dependencies = [ "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum globset 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90d069fe6beb9be359ef505650b3f73228c5591a3c4b1f32be2f4f44459ffa3a" "checksum hamming 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65043da274378d68241eb9a8f8f8aa54e349136f7b8e12f63e3ef44043cc30e1" -"checksum heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "abb306abb8d398e053cfb1b3e7b72c2f580be048b85745c52652954f8ad1439c" +"checksum heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4c7593b1522161003928c959c20a2ca421c68e940d63d75573316a009e48a6d4" "checksum heck 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f807d2f64cc044a6bcf250ff23e59be0deec7a16612c014f962a06fa7e020f9" "checksum hidapi 0.3.1 (git+https://github.com/paritytech/hidapi-rs)" = "" "checksum httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46534074dbb80b070d60a5cb8ecadd8963a00a438ae1a95268850a7ef73b67ae" @@ -3045,7 +3043,7 @@ dependencies = [ "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fcc8d19212aacecf95e4a7a2179b26f7aeb9732a915cf01f05b0d3e044865410" "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" -"checksum smallvec 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dca03f2f42500a9ef8ac0d16183dff8bed40e3dcf98f9d4147928548d5c4236e" +"checksum smallvec 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e40af10aafe98b4d8294ae8388d8a5cd0707c65d364872efe72d063ec44bee0" "checksum spmc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "93bdab61c1a413e591c4d17388ffa859eaff2df27f1e13a5ec8b716700605adf" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index 1f8d48ac0..ab45eedbe 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -20,7 +20,7 @@ ethcore-ipc = { path = "../../ipc/rpc", optional = true } ethcore-devtools = { path = "../../devtools" } rlp = { path = "../../util/rlp" } time = "0.1" -smallvec = "0.3.1" +smallvec = "0.4" futures = "0.1" rand = "0.3" itertools = "0.5" diff --git a/ethcore/light/src/net/load_timer.rs b/ethcore/light/src/net/load_timer.rs index 190747d40..9c6afc7cc 100644 --- a/ethcore/light/src/net/load_timer.rs +++ b/ethcore/light/src/net/load_timer.rs @@ -32,7 +32,7 @@ use request::{CompleteRequest, Kind}; use bincode; use time; -use util::{Uint, RwLock, Mutex}; +use util::{RwLock, Mutex}; /// Number of time periods samples should be kept for. pub const MOVING_SAMPLE_SIZE: usize = 256; diff --git a/ethcore/native_contracts/generator/src/lib.rs b/ethcore/native_contracts/generator/src/lib.rs index 41d5319bc..540d2ec2b 100644 --- a/ethcore/native_contracts/generator/src/lib.rs +++ b/ethcore/native_contracts/generator/src/lib.rs @@ -48,7 +48,7 @@ pub fn generate_module(struct_name: &str, abi: &str) -> Result { use byteorder::{{BigEndian, ByteOrder}}; use futures::{{future, Future, IntoFuture, BoxFuture}}; use ethabi::{{Contract, Interface, Token, Event}}; -use util::{{self, Uint}}; +use util; /// Generated Rust bindings to an Ethereum contract. #[derive(Clone, Debug)] diff --git a/ethcore/src/action_params.rs b/ethcore/src/action_params.rs index ef9c00523..9ff86418e 100644 --- a/ethcore/src/action_params.rs +++ b/ethcore/src/action_params.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see . //! Evm input params. -use util::{Address, Bytes, Uint, U256}; +use util::{Address, Bytes, U256}; use util::hash::{H256}; use util::sha3::{Hashable, SHA3_EMPTY}; use ethjson; diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index a983b229a..e19a7e27b 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -21,7 +21,7 @@ use std::sync::Arc; use std::collections::HashSet; use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError}; -use util::{Bytes, Address, Uint, Hashable, U256, H256, ordered_trie_root, SHA3_NULL_RLP}; +use util::{Bytes, Address, Hashable, U256, H256, ordered_trie_root, SHA3_NULL_RLP}; use util::error::{Mismatch, OutOfBounds}; use basic_types::{LogBloom, Seal}; diff --git a/ethcore/src/builtin.rs b/ethcore/src/builtin.rs index 12d4d9ac1..d567701d3 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -23,7 +23,7 @@ use crypto::ripemd160::Ripemd160 as Ripemd160Digest; use crypto::digest::Digest; use num::{BigUint, Zero, One}; -use util::{U256, H256, Uint, Hashable, BytesRef}; +use util::{U256, H256, Hashable, BytesRef}; use ethkey::{Signature, recover as ec_recover}; use ethjson; diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index f48d94cff..5c43cee35 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -25,7 +25,7 @@ use time::precise_time_ns; // util use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock, MutexGuard, Hashable}; use util::{journaldb, DBValue, TrieFactory, Trie}; -use util::{U256, H256, Address, H2048, Uint}; +use util::{U256, H256, Address, H2048}; use util::trie::TrieSpec; use util::kvdb::*; diff --git a/ethcore/src/engines/tendermint/params.rs b/ethcore/src/engines/tendermint/params.rs index 34c743c49..16b47a0fb 100644 --- a/ethcore/src/engines/tendermint/params.rs +++ b/ethcore/src/engines/tendermint/params.rs @@ -17,7 +17,7 @@ //! Tendermint specific parameters. use ethjson; -use util::{U256, Uint, Address}; +use util::{U256, Address}; use time::Duration; use super::super::validator_set::{ValidatorSet, new_validator_set}; use super::super::transition::Timeouts; diff --git a/ethcore/src/evm/evm.rs b/ethcore/src/evm/evm.rs index e03ded071..06be23ea5 100644 --- a/ethcore/src/evm/evm.rs +++ b/ethcore/src/evm/evm.rs @@ -17,7 +17,7 @@ //! Evm interface. use std::{ops, cmp, fmt}; -use util::{U128, U256, U512, Uint, trie}; +use util::{U128, U256, U512, trie}; use action_params::ActionParams; use evm::Ext; use builtin; @@ -181,11 +181,11 @@ impl CostType for U256 { } fn overflow_add(self, other: Self) -> (Self, bool) { - Uint::overflowing_add(self, other) + self.overflowing_add(other) } fn overflow_mul(self, other: Self) -> (Self, bool) { - Uint::overflowing_mul(self, other) + self.overflowing_mul(other) } fn overflow_mul_shr(self, other: Self, shr: usize) -> (Self, bool) { @@ -250,7 +250,7 @@ pub trait Evm { #[cfg(test)] mod tests { - use util::{U256, Uint}; + use util::U256; use super::CostType; #[test] diff --git a/ethcore/src/evm/factory.rs b/ethcore/src/evm/factory.rs index 8efb67cbd..fc16b1955 100644 --- a/ethcore/src/evm/factory.rs +++ b/ethcore/src/evm/factory.rs @@ -20,7 +20,7 @@ use std::fmt; use std::sync::Arc; use evm::Evm; -use util::{U256, Uint}; +use util::U256; use super::interpreter::SharedCache; #[derive(Debug, PartialEq, Clone)] diff --git a/ethcore/src/evm/interpreter/memory.rs b/ethcore/src/evm/interpreter/memory.rs index 8a738f2f1..39c0d8025 100644 --- a/ethcore/src/evm/interpreter/memory.rs +++ b/ethcore/src/evm/interpreter/memory.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use util::{U256, Uint}; +use util::U256; pub trait Memory { /// Retrieve current size of the memory diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index 33f7f59d5..dd7abc6b5 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -561,7 +561,7 @@ mod tests { use std::sync::Arc; use ethkey::{Generator, Random}; use super::*; - use util::{H256, U256, U512, Address, Uint, FromHex, FromStr}; + use util::{H256, U256, U512, Address, FromHex, FromStr}; use util::bytes::BytesRef; use action_params::{ActionParams, ActionValue}; use env_info::EnvInfo; diff --git a/ethcore/src/miner/banning_queue.rs b/ethcore/src/miner/banning_queue.rs index a77008ba6..20b46d760 100644 --- a/ethcore/src/miner/banning_queue.rs +++ b/ethcore/src/miner/banning_queue.rs @@ -24,7 +24,7 @@ use transient_hashmap::TransientHashMap; use miner::{TransactionQueue, TransactionQueueDetailsProvider, TransactionImportResult, TransactionOrigin}; use miner::transaction_queue::QueuingInstant; use error::{Error, TransactionError}; -use util::{Uint, U256, H256, Address, Hashable}; +use util::{U256, H256, Address, Hashable}; type Count = u16; @@ -215,7 +215,7 @@ mod tests { use error::{Error, TransactionError}; use client::TransactionImportResult; use miner::{TransactionQueue, TransactionOrigin}; - use util::{Uint, U256, Address, FromHex, Hashable}; + use util::{U256, Address, FromHex, Hashable}; use miner::transaction_queue::test::DummyTransactionDetailsProvider; fn queue() -> BanningTransactionQueue { diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 38e97f683..101f26244 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1261,7 +1261,7 @@ mod tests { use super::super::{MinerService, PrioritizationStrategy}; use super::*; use block::IsBlock; - use util::{U256, Uint, FromHex}; + use util::{U256, FromHex}; use ethkey::{Generator, Random}; use client::{BlockChainClient, TestBlockChainClient, EachBlockWith, TransactionImportResult}; use header::BlockNumber; diff --git a/ethcore/src/miner/service_transaction_checker.rs b/ethcore/src/miner/service_transaction_checker.rs index a0a75647f..d21643772 100644 --- a/ethcore/src/miner/service_transaction_checker.rs +++ b/ethcore/src/miner/service_transaction_checker.rs @@ -20,7 +20,7 @@ use types::ids::BlockId; use futures::{future, Future}; use native_contracts::ServiceTransactionChecker as Contract; -use util::{U256, Uint, Mutex}; +use util::{U256, Mutex}; const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker"; diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index 4ae10bece..03a2d37ad 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -29,7 +29,7 @@ //! extern crate ethkey; //! extern crate rustc_serialize; //! -//! use util::{Uint, U256, Address}; +//! use util::{U256, Address}; //! use ethkey::{Random, Generator}; //! use ethcore::miner::{TransactionQueue, RemovalReason, TransactionQueueDetailsProvider, AccountDetails, TransactionOrigin}; //! use ethcore::transaction::*; @@ -105,7 +105,7 @@ use std::cmp::Ordering; use std::cmp; use std::collections::{HashSet, HashMap, BTreeSet, BTreeMap}; use linked_hash_map::LinkedHashMap; -use util::{Address, H256, Uint, U256}; +use util::{Address, H256, U256}; use util::table::Table; use transaction::*; use error::{Error, TransactionError}; diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 36c50f227..21317b551 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -29,7 +29,7 @@ use engines::Engine; use header::Header; use ids::BlockId; -use util::{Bytes, Hashable, HashDB, DBValue, snappy, U256, Uint}; +use util::{Bytes, Hashable, HashDB, DBValue, snappy, U256}; use util::Mutex; use util::hash::{H256}; use util::journaldb::{self, Algorithm, JournalDB}; diff --git a/ethcore/src/spec/genesis.rs b/ethcore/src/spec/genesis.rs index bf5ec46c1..b7db9aa90 100644 --- a/ethcore/src/spec/genesis.rs +++ b/ethcore/src/spec/genesis.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use util::{Address, H256, Uint, U256}; +use util::{Address, H256, U256}; use util::sha3::SHA3_NULL_RLP; use ethjson; use super::seal::Seal; diff --git a/ethcore/src/types/account_diff.rs b/ethcore/src/types/account_diff.rs index fe41af8ee..4ed0f5ee9 100644 --- a/ethcore/src/types/account_diff.rs +++ b/ethcore/src/types/account_diff.rs @@ -19,7 +19,7 @@ use std::cmp::*; use std::fmt; use std::collections::BTreeMap; -use util::{U256, H256, Uint, Bytes}; +use util::{U256, H256, Bytes}; use ipc::binary::BinaryConvertable; #[derive(Debug, PartialEq, Eq, Clone)] diff --git a/ethcore/src/types/transaction.rs b/ethcore/src/types/transaction.rs index 2b17cee25..547be3136 100644 --- a/ethcore/src/types/transaction.rs +++ b/ethcore/src/types/transaction.rs @@ -19,7 +19,7 @@ use std::ops::Deref; use rlp::*; use util::sha3::Hashable; -use util::{H256, Address, U256, Bytes, HeapSizeOf, Uint}; +use util::{H256, Address, U256, Bytes, HeapSizeOf}; use ethkey::{Signature, Secret, Public, recover, public_to_address, Error as EthkeyError}; use error::*; use evm::Schedule; diff --git a/ethcrypto/Cargo.toml b/ethcrypto/Cargo.toml index 97fee67c6..84f905804 100644 --- a/ethcrypto/Cargo.toml +++ b/ethcrypto/Cargo.toml @@ -8,5 +8,5 @@ rust-crypto = "0.2.36" tiny-keccak = "1.0" eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" } ethkey = { path = "../ethkey" } -ethcore-bigint = "0.1.2" +ethcore-bigint = { path = "../util/bigint" } diff --git a/ethkey/Cargo.toml b/ethkey/Cargo.toml index 6c54804f4..8254e194a 100644 --- a/ethkey/Cargo.toml +++ b/ethkey/Cargo.toml @@ -10,7 +10,7 @@ tiny-keccak = "1.0" eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" } rustc-serialize = "0.3" docopt = { version = "0.7", optional = true } -ethcore-bigint = "0.1.2" +ethcore-bigint = { path = "../util/bigint" } rust-crypto = "0.2" byteorder = "1.0" diff --git a/ethkey/src/extended.rs b/ethkey/src/extended.rs index 7df6fde1c..45ed0547f 100644 --- a/ethkey/src/extended.rs +++ b/ethkey/src/extended.rs @@ -212,7 +212,7 @@ mod derivation { use rcrypto::mac::Mac; use rcrypto::sha2::Sha512; use bigint::hash::{H512, H256}; - use bigint::prelude::{U256, U512, Uint}; + use bigint::prelude::{U256, U512}; use secp256k1::key::{SecretKey, PublicKey}; use SECP256K1; use keccak; diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index 174a9e3dc..4c6ece5f5 100755 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -19,8 +19,8 @@ time = "0.1.34" itertools = "0.5" parking_lot = "0.4" ethcrypto = { path = "../ethcrypto" } -ethcore-bigint = "0.1.2" -smallvec = "0.3.1" +ethcore-bigint = { path = "../util/bigint" } +smallvec = "0.4" parity-wordlist = "1.0" tempdir = "0.3" diff --git a/evmbin/benches/mod.rs b/evmbin/benches/mod.rs index 5f21d2ebc..7ddc50681 100644 --- a/evmbin/benches/mod.rs +++ b/evmbin/benches/mod.rs @@ -32,7 +32,7 @@ use self::test::{Bencher, black_box}; use evm::run_vm; use ethcore::action_params::ActionParams; -use ethcore_util::{U256, Uint}; +use ethcore_util::U256; use rustc_serialize::hex::FromHex; #[bench] diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 02513eebd..505eae86e 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -30,7 +30,7 @@ use std::time::{Instant, Duration}; use std::fmt; use std::str::FromStr; use docopt::Docopt; -use util::{U256, FromHex, Uint, Bytes}; +use util::{U256, FromHex, Bytes}; use ethcore::evm::{self, Factory, VMType, Finalize}; use ethcore::action_params::ActionParams; diff --git a/hw/Cargo.toml b/hw/Cargo.toml index cd0124379..ca236d130 100644 --- a/hw/Cargo.toml +++ b/hw/Cargo.toml @@ -12,7 +12,7 @@ parking_lot = "0.4" hidapi = { git = "https://github.com/paritytech/hidapi-rs" } libusb = { git = "https://github.com/paritytech/libusb-rs" } ethkey = { path = "../ethkey" } -ethcore-bigint = "0.1.2" +ethcore-bigint = { path = "../util/bigint" } [dev-dependencies] rustc-serialize = "0.3" diff --git a/hw/src/ledger.rs b/hw/src/ledger.rs index bc449e251..2f209afa5 100644 --- a/hw/src/ledger.rs +++ b/hw/src/ledger.rs @@ -24,7 +24,7 @@ use std::str::FromStr; use std::time::Duration; use super::WalletInfo; use ethkey::{Address, Signature}; -use ethcore_bigint::hash::H256; +use bigint::hash::H256; const LEDGER_VID: u16 = 0x2c97; const LEDGER_PIDS: [u16; 2] = [0x0000, 0x0001]; // Nano S and Blue diff --git a/hw/src/lib.rs b/hw/src/lib.rs index c364fd015..a35607305 100644 --- a/hw/src/lib.rs +++ b/hw/src/lib.rs @@ -20,7 +20,7 @@ extern crate parking_lot; extern crate hidapi; extern crate libusb; extern crate ethkey; -extern crate ethcore_bigint; +extern crate ethcore_bigint as bigint; #[macro_use] extern crate log; #[cfg(test)] extern crate rustc_serialize; diff --git a/json/src/uint.rs b/json/src/uint.rs index 6b206b380..d408b76dc 100644 --- a/json/src/uint.rs +++ b/json/src/uint.rs @@ -20,7 +20,7 @@ use std::fmt; use std::str::FromStr; use serde::{Deserialize, Deserializer}; use serde::de::{Error, Visitor}; -use util::{U256, Uint as U}; +use util::U256; /// Lenient uint json deserialization for test json files. #[derive(Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)] diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 757f303dd..84af882ca 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -22,7 +22,7 @@ use std::thread::sleep; use std::sync::Arc; use rustc_serialize::hex::FromHex; use io::{PanicHandler, ForwardPanic}; -use util::{ToPretty, Uint, U256, H256, Address, Hashable}; +use util::{ToPretty, U256, H256, Address, Hashable}; use rlp::PayloadInfo; use ethcore::service::ClientService; use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockImportError, BlockChainClient, BlockId}; diff --git a/parity/configuration.rs b/parity/configuration.rs index ad1353d09..6ac7e3e99 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -21,7 +21,7 @@ use std::path::{Path, PathBuf}; use std::collections::BTreeMap; use std::cmp::max; use cli::{Args, ArgsError}; -use util::{Hashable, H256, U256, Uint, Bytes, version_data, Address}; +use util::{Hashable, H256, U256, Bytes, version_data, Address}; use util::journaldb::Algorithm; use util::Colour; use ethsync::{NetworkConfiguration, is_valid_node_url, AllowIP}; diff --git a/parity/helpers.rs b/parity/helpers.rs index 449d8f569..31129f18b 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -18,7 +18,7 @@ use std::{io, env}; use std::io::{Write, BufReader, BufRead}; use std::time::Duration; use std::fs::File; -use util::{clean_0x, U256, Uint, Address, CompactionProfile}; +use util::{clean_0x, U256, Address, CompactionProfile}; use util::journaldb::Algorithm; use ethcore::client::{Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; use ethcore::miner::{PendingSet, GasLimit, PrioritizationStrategy}; diff --git a/parity/informant.rs b/parity/informant.rs index 6b21eefc0..1f309848c 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -24,7 +24,7 @@ use std::time::{Instant, Duration}; use io::{TimerToken, IoContext, IoHandler}; use isatty::{stdout_isatty}; use ethsync::{SyncProvider, ManageNetwork}; -use util::{Uint, RwLock, Mutex, H256, Colour, Bytes}; +use util::{RwLock, Mutex, H256, Colour, Bytes}; use ethcore::client::*; use ethcore::service::ClientIoMessage; use ethcore::snapshot::service::Service as SnapshotService; diff --git a/rpc/src/v1/helpers/dispatch.rs b/rpc/src/v1/helpers/dispatch.rs index efd118967..31223c77e 100644 --- a/rpc/src/v1/helpers/dispatch.rs +++ b/rpc/src/v1/helpers/dispatch.rs @@ -26,7 +26,7 @@ use light::client::LightChainClient; use light::on_demand::{request, OnDemand}; use light::TransactionQueue as LightTransactionQueue; use rlp; -use util::{Address, H520, H256, U256, Uint, Bytes, Mutex, RwLock}; +use util::{Address, H520, H256, U256, Bytes, Mutex, RwLock}; use util::sha3::Hashable; use stats::Corpus; diff --git a/rpc/src/v1/helpers/light_fetch.rs b/rpc/src/v1/helpers/light_fetch.rs index 8bcd5115a..6f8e29171 100644 --- a/rpc/src/v1/helpers/light_fetch.rs +++ b/rpc/src/v1/helpers/light_fetch.rs @@ -35,7 +35,7 @@ use light::on_demand::{request, OnDemand, HeaderRef, Request as OnDemandRequest, use light::request::Field; use ethsync::LightSync; -use util::{Address, Mutex, Uint, U256}; +use util::{Address, Mutex, U256}; use v1::helpers::{CallRequest as CallRequestHelper, errors, dispatch}; use v1::types::{BlockNumber, CallRequest}; diff --git a/rpc/src/v1/impls/light/eth.rs b/rpc/src/v1/impls/light/eth.rs index fc61b0605..ca1157206 100644 --- a/rpc/src/v1/impls/light/eth.rs +++ b/rpc/src/v1/impls/light/eth.rs @@ -39,7 +39,7 @@ use ethcore::transaction::{Action, SignedTransaction, Transaction as EthTransact use ethsync::LightSync; use rlp::UntrustedRlp; use util::sha3::{SHA3_NULL_RLP, SHA3_EMPTY_LIST_RLP}; -use util::{RwLock, Mutex, Uint, U256}; +use util::{RwLock, Mutex, U256}; use futures::{future, Future, BoxFuture, IntoFuture}; use futures::sync::oneshot; diff --git a/rpc/src/v1/impls/personal.rs b/rpc/src/v1/impls/personal.rs index 6e2be5ecc..84c29399c 100644 --- a/rpc/src/v1/impls/personal.rs +++ b/rpc/src/v1/impls/personal.rs @@ -20,7 +20,7 @@ use std::sync::{Arc, Weak}; use ethcore::account_provider::AccountProvider; use ethcore::transaction::PendingTransaction; -use util::{Address, U128, Uint, ToPretty}; +use util::{Address, U128, ToPretty}; use futures::{future, Future, BoxFuture}; use jsonrpc_core::Error; diff --git a/rpc/src/v1/tests/eth.rs b/rpc/src/v1/tests/eth.rs index c2093a51b..cf5bdd88b 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -28,7 +28,7 @@ use ethcore::miner::{MinerOptions, Banning, GasPricer, MinerService, ExternalMin use ethcore::account_provider::AccountProvider; use ethjson::blockchain::BlockChain; use io::IoChannel; -use util::{U256, H256, Uint, Address, Hashable}; +use util::{U256, H256, Address, Hashable}; use jsonrpc_core::IoHandler; use v1::impls::{EthClient, SigningUnsafeClient}; diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index 4cdfbbd8c..1bf14da7c 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -17,7 +17,7 @@ //! Test implementation of miner service. use std::collections::hash_map::Entry; -use util::{Address, H256, Bytes, U256, Uint}; +use util::{Address, H256, Bytes, U256}; use util::standard::*; use ethcore::error::{Error, CallError}; use ethcore::client::{MiningBlockChainClient, Executed, CallAnalytics}; diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index c446b1874..3cb0626a1 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -22,7 +22,7 @@ use rustc_serialize::hex::{FromHex, ToHex}; use time::get_time; use rlp; -use util::{Uint, U256, Address, H256, Mutex}; +use util::{U256, Address, H256, Mutex}; use ethkey::Secret; use ethcore::account_provider::AccountProvider; use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId}; diff --git a/rpc/src/v1/tests/mocked/personal.rs b/rpc/src/v1/tests/mocked/personal.rs index 6618ea61c..8508eaacf 100644 --- a/rpc/src/v1/tests/mocked/personal.rs +++ b/rpc/src/v1/tests/mocked/personal.rs @@ -21,7 +21,7 @@ use ethcore::account_provider::AccountProvider; use ethcore::client::TestBlockChainClient; use ethcore::transaction::{Action, Transaction}; use jsonrpc_core::IoHandler; -use util::{U256, Uint, Address}; +use util::{U256, Address}; use v1::{PersonalClient, Personal, Metadata}; use v1::helpers::dispatch::FullDispatcher; diff --git a/rpc/src/v1/tests/mocked/signer.rs b/rpc/src/v1/tests/mocked/signer.rs index e2e54b2e3..90efe12e1 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -16,7 +16,7 @@ use std::sync::Arc; use std::str::FromStr; -use util::{U256, Uint, Address, ToPretty}; +use util::{U256, Address, ToPretty}; use ethcore::account_provider::AccountProvider; use ethcore::client::TestBlockChainClient; diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 3e1f67154..b3322da46 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -28,7 +28,7 @@ use v1::types::ConfirmationResponse; use v1::tests::helpers::TestMinerService; use v1::tests::mocked::parity; -use util::{Address, Uint, U256, ToPretty}; +use util::{Address, U256, ToPretty}; use ethkey::Secret; use ethcore::account_provider::AccountProvider; use ethcore::client::TestBlockChainClient; @@ -420,7 +420,6 @@ fn should_add_decryption_to_the_queue() { }"#; let response = r#"{"jsonrpc":"2.0","result":"0x0102","id":1}"#; - // then let promise = tester.io.handle_request(&request); @@ -432,7 +431,7 @@ fn should_add_decryption_to_the_queue() { signer.request_confirmed(1.into(), Ok(ConfirmationResponse::Decrypt(vec![0x1, 0x2].into()))); break } - ::std::thread::sleep(Duration::from_millis(100)) + ::std::thread::sleep(Duration::from_millis(10)) }); // check response: will deadlock if unsuccessful. diff --git a/rpc/src/v1/types/trace.rs b/rpc/src/v1/types/trace.rs index f4f7de5e7..f91100421 100644 --- a/rpc/src/v1/types/trace.rs +++ b/rpc/src/v1/types/trace.rs @@ -23,7 +23,6 @@ use ethcore::state_diff; use ethcore::account_diff; use ethcore::executed; use ethcore::client::Executed; -use util::Uint; use v1::types::{Bytes, H160, H256, U256}; #[derive(Debug, Serialize)] diff --git a/rpc/src/v1/types/uint.rs b/rpc/src/v1/types/uint.rs index e61f0ab41..58e2bad4f 100644 --- a/rpc/src/v1/types/uint.rs +++ b/rpc/src/v1/types/uint.rs @@ -17,7 +17,7 @@ use std::str::FromStr; use std::fmt; use serde; -use util::{U256 as EthU256, U128 as EthU128, Uint}; +use util::{U256 as EthU256, U128 as EthU128}; macro_rules! impl_uint { ($name: ident, $other: ident, $size: expr) => { diff --git a/rpc_cli/Cargo.toml b/rpc_cli/Cargo.toml index 77fee345b..e8776f637 100644 --- a/rpc_cli/Cargo.toml +++ b/rpc_cli/Cargo.toml @@ -9,7 +9,7 @@ version = "1.4.0" [dependencies] futures = "0.1" rpassword = "0.3.0" -ethcore-bigint = "0.1.2" +bigint = "2.0" parity-rpc = { path = "../rpc" } parity-rpc-client = { path = "../rpc_client" } ethcore-util = { path = "../util" } diff --git a/rpc_cli/src/lib.rs b/rpc_cli/src/lib.rs index 23aa06f15..14bb5c706 100644 --- a/rpc_cli/src/lib.rs +++ b/rpc_cli/src/lib.rs @@ -2,7 +2,7 @@ extern crate futures; extern crate rpassword; extern crate ethcore_util as util; -extern crate ethcore_bigint as bigint; +extern crate bigint; extern crate parity_rpc as rpc; extern crate parity_rpc_client as client; diff --git a/scripts/contractABI.js b/scripts/contractABI.js index 98081123a..4b9e489a9 100644 --- a/scripts/contractABI.js +++ b/scripts/contractABI.js @@ -32,7 +32,6 @@ use std::string::String; use std::result::Result; use std::fmt; use {util, ethabi}; -use util::Uint; ${convertContract(name, json, prefs)} `; diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 3869b9885..a4fe665e1 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -23,10 +23,10 @@ log = "0.3" env_logger = "0.4" time = "0.1.34" rand = "0.3.13" -heapsize = "0.3" +heapsize = "0.4" ethcore-ipc = { path = "../ipc/rpc" } semver = "0.6" -smallvec = { version = "0.3", features = ["heapsizeof"] } +smallvec = { version = "0.4", features = ["heapsizeof"] } ethcore-ipc-nano = { path = "../ipc/nano" } ethcore-devtools = { path = "../devtools" } ethkey = { path = "../ethkey" } diff --git a/sync/src/chain.rs b/sync/src/chain.rs index f0f98d3dd..edf6f13d2 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -2194,7 +2194,7 @@ mod tests { use network::PeerId; use tests::helpers::*; use tests::snapshot::TestSnapshotService; - use util::{Uint, U256, Address, RwLock}; + use util::{U256, Address, RwLock}; use util::sha3::Hashable; use util::hash::H256; use util::bytes::Bytes; diff --git a/updater/src/operations.rs b/updater/src/operations.rs index 71112d3e7..d94459bef 100644 --- a/updater/src/operations.rs +++ b/updater/src/operations.rs @@ -4,7 +4,7 @@ use std::string::String; use std::result::Result; use std::fmt; use ethabi; -use util::{self, Uint}; +use util; pub struct Operations { contract: ethabi::Contract, diff --git a/util/Cargo.toml b/util/Cargo.toml index c5c585f83..5d5f5ab55 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -16,9 +16,9 @@ time = "0.1.34" rocksdb = { git = "https://github.com/paritytech/rust-rocksdb" } eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" } rust-crypto = "0.2.34" -elastic-array = "0.7.0" +elastic-array = "0.8" rlp = { path = "rlp" } -heapsize = { version = "0.3", features = ["unstable"] } +heapsize = "0.4" itertools = "0.5" sha3 = { path = "sha3" } clippy = { version = "0.0.103", optional = true} @@ -26,7 +26,7 @@ ethcore-devtools = { path = "../devtools" } libc = "0.2.7" vergen = "0.1" target_info = "0.1" -ethcore-bigint = "0.1.2" +ethcore-bigint = { path = "bigint" } parking_lot = "0.4" using_queue = { path = "using_queue" } table = { path = "table" } diff --git a/util/benches/bigint.rs b/util/benches/bigint.rs index 9966d7a92..59377c511 100644 --- a/util/benches/bigint.rs +++ b/util/benches/bigint.rs @@ -27,7 +27,7 @@ extern crate test; extern crate ethcore_util; use test::{Bencher, black_box}; -use ethcore_util::{U256, U512, Uint, U128}; +use ethcore_util::{U256, U512, U128}; #[bench] fn u256_add(b: &mut Bencher) { diff --git a/util/bigint/Cargo.toml b/util/bigint/Cargo.toml index 1a5f029d0..c1225f72c 100644 --- a/util/bigint/Cargo.toml +++ b/util/bigint/Cargo.toml @@ -8,9 +8,9 @@ version = "0.1.3" authors = ["Parity Technologies "] [dependencies] -bigint = "1.0.4" +bigint = "2.0" rustc-serialize = "0.3" -heapsize = "0.3" +heapsize = "0.4" rand = "0.3.12" libc = "0.2" diff --git a/util/bigint/src/hash.rs b/util/bigint/src/hash.rs index 95d48bf8d..942ffc6fb 100644 --- a/util/bigint/src/hash.rs +++ b/util/bigint/src/hash.rs @@ -17,7 +17,7 @@ use std::str::FromStr; use rand::Rng; use rand::os::OsRng; use rustc_serialize::hex::{FromHex, FromHexError}; -use bigint::{Uint, U256}; +use bigint::U256; use libc::{c_void, memcmp}; /// Return `s` without the `0x` at the beginning of it, if any. diff --git a/util/rlp/Cargo.toml b/util/rlp/Cargo.toml index 31e077fe4..6ba4aafcd 100644 --- a/util/rlp/Cargo.toml +++ b/util/rlp/Cargo.toml @@ -7,8 +7,8 @@ version = "0.2.0" authors = ["Parity Technologies "] [dependencies] -elastic-array = "0.7.0" -ethcore-bigint = "0.1.3" +elastic-array = "0.8" +ethcore-bigint = { path = "../bigint" } lazy_static = "0.2" rustc-serialize = "0.3" byteorder = "1.0" diff --git a/util/rlp/benches/rlp.rs b/util/rlp/benches/rlp.rs index 6aeabaf5d..927b48583 100644 --- a/util/rlp/benches/rlp.rs +++ b/util/rlp/benches/rlp.rs @@ -15,7 +15,7 @@ #![feature(test)] extern crate test; -extern crate ethcore_bigint as bigint; +extern crate bigint; extern crate rlp; use test::Bencher; diff --git a/util/rlp/src/impls.rs b/util/rlp/src/impls.rs index 8c6a244b2..bc3caa495 100644 --- a/util/rlp/src/impls.rs +++ b/util/rlp/src/impls.rs @@ -8,7 +8,7 @@ use std::{cmp, mem, str}; use byteorder::{ByteOrder, BigEndian}; -use bigint::prelude::{Uint, U128, U256, H64, H128, H160, H256, H512, H520, H2048}; +use bigint::prelude::{U128, U256, H64, H128, H160, H256, H512, H520, H2048}; use traits::{Encodable, Decodable}; use stream::RlpStream; use {UntrustedRlp, DecoderError};