Merge pull request #6992 from paritytech/td-bigint

Update ethcore-bigint
This commit is contained in:
Robert Habermeier 2017-11-07 11:24:05 -06:00 committed by GitHub
commit b3795ac0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 43 deletions

76
Cargo.lock generated
View File

@ -3,7 +3,7 @@ name = "wasm"
version = "0.1.0"
dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-logger 1.9.0",
"ethcore-util 1.9.0",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -181,7 +181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "bloomable"
version = "0.1.0"
dependencies = [
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"hash 0.1.0",
]
@ -294,7 +294,7 @@ name = "common-types"
version = "0.1.0"
dependencies = [
"bloomable 0.1.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-util 1.9.0",
"ethjson 0.1.0",
@ -493,7 +493,7 @@ dependencies = [
"common-types 0.1.0",
"crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"ethash 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bloom-journal 0.1.0",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
@ -553,7 +553,7 @@ dependencies = [
[[package]]
name = "ethcore-bigint"
version = "0.1.3"
version = "0.2.1"
dependencies = [
"bigint 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -598,7 +598,7 @@ version = "1.9.0"
dependencies = [
"bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-io 1.9.0",
@ -651,7 +651,7 @@ dependencies = [
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-io 1.9.0",
@ -685,7 +685,7 @@ version = "1.0.0"
dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-logger 1.9.0",
@ -719,7 +719,7 @@ name = "ethcore-stratum"
version = "1.9.0"
dependencies = [
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-devtools 1.9.0",
"ethcore-logger 1.9.0",
"ethcore-util 1.9.0",
@ -741,7 +741,7 @@ dependencies = [
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (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",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-logger 1.9.0",
"hash 0.1.0",
@ -771,7 +771,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",
"ethcore-bigint 0.2.1",
"ethkey 0.2.0",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
"subtle 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -783,7 +783,7 @@ name = "ethjson"
version = "0.1.0"
dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
@ -796,7 +796,7 @@ version = "0.2.0"
dependencies = [
"byteorder 1.1.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",
"ethcore-bigint 0.2.1",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
@ -820,7 +820,7 @@ dependencies = [
name = "ethstore"
version = "0.1.0"
dependencies = [
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcrypto 0.1.0",
"ethkey 0.2.0",
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
@ -859,7 +859,7 @@ dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-io 1.9.0",
@ -888,7 +888,7 @@ name = "evm"
version = "0.1.0"
dependencies = [
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-util 1.9.0",
"evmjit 1.9.0",
"hash 0.1.0",
@ -907,7 +907,7 @@ version = "0.1.0"
dependencies = [
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-util 1.9.0",
"ethjson 0.1.0",
@ -1028,7 +1028,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "hardware-wallet"
version = "1.9.0"
dependencies = [
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"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)",
@ -1044,7 +1044,7 @@ name = "hash"
version = "0.1.0"
dependencies = [
"cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"tiny-keccak 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1054,7 +1054,7 @@ name = "hashdb"
version = "0.1.0"
dependencies = [
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
]
[[package]]
@ -1233,7 +1233,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "journaldb"
version = "0.1.0"
dependencies = [
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-logger 1.9.0",
"hash 0.1.0",
@ -1375,7 +1375,7 @@ name = "kvdb-rocksdb"
version = "0.1.0"
dependencies = [
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"kvdb 0.1.0",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1525,7 +1525,7 @@ version = "0.1.0"
dependencies = [
"bigint 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"hash 0.1.0",
"hashdb 0.1.0",
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1671,7 +1671,7 @@ version = "0.1.0"
dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethabi 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"native-contract-generator 0.1.0",
]
@ -1705,7 +1705,7 @@ name = "node-filter"
version = "1.9.0"
dependencies = [
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-io 1.9.0",
"ethcore-network 1.9.0",
@ -1919,7 +1919,7 @@ dependencies = [
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-io 1.9.0",
@ -1983,7 +1983,7 @@ dependencies = [
"base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-util 1.9.0",
@ -2046,7 +2046,7 @@ name = "parity-hash-fetch"
version = "1.9.0"
dependencies = [
"ethabi 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-util 1.9.0",
"fetch 0.1.0",
@ -2068,7 +2068,7 @@ version = "1.9.0"
dependencies = [
"cid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-util 1.9.0",
"jsonrpc-core 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.8)",
@ -2099,7 +2099,7 @@ dependencies = [
name = "parity-machine"
version = "0.1.0"
dependencies = [
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-util 1.9.0",
]
@ -2120,7 +2120,7 @@ dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"ethash 1.9.0",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-devtools 1.9.0",
"ethcore-io 1.9.0",
@ -2251,7 +2251,7 @@ version = "1.9.0"
dependencies = [
"ethabi 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.9.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-util 1.9.0",
"ethsync 1.9.0",
@ -2281,7 +2281,7 @@ version = "0.1.0"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-network 1.9.0",
"ethcrypto 0.1.0",
"ethkey 0.2.0",
@ -2344,7 +2344,7 @@ name = "patricia_trie"
version = "0.1.0"
dependencies = [
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-logger 1.9.0",
"hash 0.1.0",
@ -2634,7 +2634,7 @@ version = "0.2.0"
dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"elastic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -3259,7 +3259,7 @@ dependencies = [
name = "triehash"
version = "0.1.0"
dependencies = [
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"hash 0.1.0",
"rlp 0.2.0",
]
@ -3362,7 +3362,7 @@ name = "util-error"
version = "0.1.0"
dependencies = [
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"kvdb 0.1.0",
"rlp 0.2.0",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3407,7 +3407,7 @@ version = "0.1.0"
dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"common-types 0.1.0",
"ethcore-bigint 0.1.3",
"ethcore-bigint 0.2.1",
"ethcore-bytes 0.1.0",
"ethcore-util 1.9.0",
"ethjson 0.1.0",

View File

@ -4,7 +4,7 @@ homepage = "http://parity.io"
repository = "https://github.com/paritytech/parity"
license = "MIT/Apache-2.0"
name = "ethcore-bigint"
version = "0.1.3"
version = "0.2.1"
authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]
@ -13,9 +13,10 @@ rustc-hex = "1.0"
rand = "0.3.12"
libc = "0.2"
heapsize = { version = "0.4", optional = true }
plain_hasher = { path = "../plain_hasher" }
plain_hasher = { path = "../plain_hasher", version = "0.1" }
[features]
x64asm_arithmetic=[]
rust_arithmetic=[]
std = ["bigint/std"]
heapsizeof = ["heapsize", "bigint/heapsizeof"]

View File

@ -17,7 +17,7 @@ use rand::{Rand, Rng};
use rand::os::OsRng;
use rustc_hex::{FromHex, FromHexError};
use plain_hasher::PlainHasher;
use bigint::U256;
use uint::U256;
use libc::{c_void, memcmp};
/// Return `s` without the `0x` at the beginning of it, if any.

View File

@ -12,7 +12,6 @@
extern crate rand;
extern crate rustc_hex;
extern crate bigint;
extern crate libc;
extern crate plain_hasher;
@ -20,6 +19,7 @@ extern crate plain_hasher;
#[macro_use]
extern crate heapsize;
pub extern crate bigint as uint;
pub mod hash;
/// A prelude module for re-exporting all the types defined in this crate.
@ -31,6 +31,6 @@ pub mod hash;
/// let y = x + 1.into();
/// ```
pub mod prelude {
pub use ::bigint::*;
pub use ::uint::*;
pub use ::hash::*;
}