Skip to content

Commit

Permalink
Fetch parity-common crates from crates.io (openethereum#9410)
Browse files Browse the repository at this point in the history
* Fetch `parity-common` crates from crates.io

* Add doc tests from `patricia-trie` to `patricia-trie-ethereum`
Fix/update a few deps

* [ethkey] upgrade ethereum-types

* [whisper] update deps

* [network] deps

* [network-devp2p] deps

* [journaldb] deps

* [fastmap] deps

* [miner] deps and test fixes

* [machine] deps

* [json] deps

* [hw] deps

* [ethash] deps

* [registrar] deps

* Update a few more dependencies with new ethabi-*

* [updater] Update deps

* deps

* [ethcore] Update deps

* Use new parity-snappy and parity-rocksdb crates

* Updated submodules

* Use parity-snappy 0.1

* Use kvdb-rocksdb 0.1.2

* Don't use latest ethereum/tests

* Fix merge conflicts errors

* Remove superseeded comment

* Address grumbles: add newlines, add/remove spaces
  • Loading branch information
dvdplm authored Sep 4, 2018
1 parent 51eac19 commit 72fd1fa
Show file tree
Hide file tree
Showing 91 changed files with 1,533 additions and 3,705 deletions.
2,274 changes: 1,226 additions & 1,048 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fdlimit = "0.1"
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" }
ethcore = { path = "ethcore", features = ["parity"] }
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
parity-bytes = "0.1"
ethcore-io = { path = "util/io" }
ethcore-light = { path = "ethcore/light" }
ethcore-logger = { path = "logger" }
Expand All @@ -43,10 +43,10 @@ ethcore-private-tx = { path = "ethcore/private-tx" }
ethcore-service = { path = "ethcore/service" }
ethcore-sync = { path = "ethcore/sync" }
ethcore-transaction = { path = "ethcore/transaction" }
ethereum-types = "0.3"
ethereum-types = "0.4"
node-filter = { path = "ethcore/node_filter" }
ethkey = { path = "ethkey" }
rlp = { git = "https://github.com/paritytech/parity-common" }
rlp = { version = "0.2.4", features = ["ethereum"] }
rpc-cli = { path = "rpc_cli" }
parity-hash-fetch = { path = "hash-fetch" }
parity-ipfs-api = { path = "ipfs" }
Expand All @@ -57,12 +57,12 @@ parity-rpc-client = { path = "rpc_client" }
parity-updater = { path = "updater" }
parity-version = { path = "util/version" }
parity-whisper = { path = "whisper" }
path = { git = "https://github.com/paritytech/parity-common" }
parity-path = "0.1"
dir = { path = "util/dir" }
panic_hook = { path = "util/panic_hook" }
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
keccak-hash = "0.1"
migration-rocksdb = { path = "util/migration-rocksdb" }
kvdb = "0.1.0"
kvdb = "0.1"
kvdb-rocksdb = "0.1.3"
journaldb = { path = "util/journaldb" }
mem = { path = "util/mem" }
Expand Down Expand Up @@ -130,7 +130,6 @@ members = [
"evmbin",
"miner",
"parity-clib",
"transaction-pool",
"whisper",
"whisper/cli",
"util/triehash-ethereum",
Expand Down
4 changes: 2 additions & 2 deletions ethash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors = ["Parity Technologies <[email protected]>"]
[dependencies]
crunchy = "0.1.0"
either = "1.0.0"
ethereum-types = "0.3"
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
ethereum-types = "0.4"
keccak-hash = "0.1"
log = "0.4"
memmap = "0.6"
parking_lot = "0.6"
Expand Down
32 changes: 16 additions & 16 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ common-types = { path = "types" }
crossbeam = "0.3"
ethash = { path = "../ethash" }
ethcore-bloom-journal = { path = "../util/bloom" }
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
hashdb = { git = "https://github.com/paritytech/parity-common" }
memorydb = { git = "https://github.com/paritytech/parity-common" }
patricia-trie = { git = "https://github.com/paritytech/parity-common" }
parity-bytes = "0.1"
hashdb = "0.2.1"
memorydb = "0.2.1"
patricia-trie = "0.2.1"
patricia-trie-ethereum = { path = "../util/patricia-trie-ethereum" }
parity-crypto = { git = "https://github.com/paritytech/parity-common" }
parity-crypto = "0.1"
error-chain = { version = "0.12", default-features = false }
ethcore-io = { path = "../util/io" }
ethcore-logger = { path = "../logger" }
ethcore-miner = { path = "../miner" }
ethcore-stratum = { path = "./stratum", optional = true }
ethcore-transaction = { path = "./transaction" }
ethereum-types = "0.3"
ethereum-types = "0.4"
memory-cache = { path = "../util/memory_cache" }
ethabi = "5.1"
ethabi-derive = "5.0"
ethabi-contract = "5.0"
ethabi = "5.1.2"
ethabi-derive = "5.1.3"
ethabi-contract = "5.1.1"
ethjson = { path = "../json" }
ethkey = { path = "../ethkey" }
ethstore = { path = "../ethstore" }
Expand All @@ -47,21 +47,21 @@ parity-machine = { path = "../machine" }
parking_lot = "0.6"
rayon = "1.0"
rand = "0.4"
rlp = { git = "https://github.com/paritytech/parity-common" }
rlp = { version = "0.2.4", features = ["ethereum"] }
rlp_compress = { path = "../util/rlp_compress" }
rlp_derive = { path = "../util/rlp_derive" }
kvdb = "0.1.0"
kvdb-memorydb = "0.1.0"
parity-snappy = "0.1.0"
kvdb = "0.1"
kvdb-memorydb = "0.1"
parity-snappy = "0.1"
stop-guard = { path = "../util/stop-guard" }
macros = { path = "../util/macros" }
rustc-hex = "1.0"
stats = { path = "../util/stats" }
trace-time = { path = "../util/trace-time" }
trace-time = "0.1"
using_queue = { path = "../util/using_queue" }
vm = { path = "vm" }
wasm = { path = "wasm" }
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
keccak-hash = "0.1"
triehash-ethereum = { version = "0.2", path = "../util/triehash-ethereum" }
unexpected = { path = "../util/unexpected" }
journaldb = { path = "../util/journaldb" }
Expand All @@ -77,7 +77,7 @@ fake-hardware-wallet = { path = "../util/fake-hardware-wallet" }

[dev-dependencies]
tempdir = "0.3"
trie-standardmap = { git = "https://github.com/paritytech/parity-common" }
trie-standardmap = "0.1"

[features]
parity = ["work-notify", "price-info", "stratum"]
Expand Down
6 changes: 3 additions & 3 deletions ethcore/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ authors = ["Parity Technologies <[email protected]>"]

[dependencies]
bit-set = "0.4"
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
ethereum-types = "0.3"
parity-bytes = "0.1"
ethereum-types = "0.4"
heapsize = "0.4"
lazy_static = "1.0"
log = "0.4"
vm = { path = "../vm" }
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
keccak-hash = "0.1"
parking_lot = "0.6"
memory-cache = { path = "../../util/memory_cache" }

Expand Down
12 changes: 6 additions & 6 deletions ethcore/evm/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ impl<Cost: CostType> Interpreter<Cost> {
TWO_POW_96 => a >> 96,
TWO_POW_224 => a >> 224,
TWO_POW_248 => a >> 248,
_ => a.overflowing_div(b).0,
_ => a / b,
}
} else {
U256::zero()
Expand All @@ -805,7 +805,7 @@ impl<Cost: CostType> Interpreter<Cost> {
let a = self.stack.pop_back();
let b = self.stack.pop_back();
self.stack.push(if !b.is_zero() {
a.overflowing_rem(b).0
a % b
} else {
U256::zero()
});
Expand All @@ -821,7 +821,7 @@ impl<Cost: CostType> Interpreter<Cost> {
} else if a == min && b == !U256::zero() {
min
} else {
let c = a.overflowing_div(b).0;
let c = a / b;
set_sign(c, sign_a ^ sign_b)
});
},
Expand All @@ -832,7 +832,7 @@ impl<Cost: CostType> Interpreter<Cost> {
let b = get_and_reset_sign(ub).0;

self.stack.push(if !b.is_zero() {
let c = a.overflowing_rem(b).0;
let c = a % b;
set_sign(c, sign_a)
} else {
U256::zero()
Expand Down Expand Up @@ -920,7 +920,7 @@ impl<Cost: CostType> Interpreter<Cost> {
// upcast to 512
let a5 = U512::from(a);
let res = a5.overflowing_add(U512::from(b)).0;
let x = res.overflowing_rem(U512::from(c)).0;
let x = res % U512::from(c);
U256::from(x)
} else {
U256::zero()
Expand All @@ -934,7 +934,7 @@ impl<Cost: CostType> Interpreter<Cost> {
self.stack.push(if !c.is_zero() {
let a5 = U512::from(a);
let res = a5.overflowing_mul(U512::from(b)).0;
let x = res.overflowing_rem(U512::from(c)).0;
let x = res % U512::from(c);
U256::from(x)
} else {
U256::zero()
Expand Down
18 changes: 9 additions & 9 deletions ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ authors = ["Parity Technologies <[email protected]>"]
[dependencies]
log = "0.4"
ethcore = { path = ".."}
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
parity-bytes = "0.1"
ethcore-transaction = { path = "../transaction" }
ethereum-types = "0.3"
memorydb = { git = "https://github.com/paritytech/parity-common" }
patricia-trie = { git = "https://github.com/paritytech/parity-common" }
ethereum-types = "0.4"
memorydb = "0.2.1"
patricia-trie = "0.2.1"
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
ethcore-network = { path = "../../util/network" }
ethcore-io = { path = "../../util/io" }
hashdb = { git = "https://github.com/paritytech/parity-common" }
hashdb = "0.2.1"
heapsize = "0.4"
vm = { path = "../vm" }
fastmap = { path = "../../util/fastmap" }
rlp = { git = "https://github.com/paritytech/parity-common" }
rlp = { version = "0.2.4", features = ["ethereum"] }
rlp_derive = { path = "../../util/rlp_derive" }
smallvec = "0.4"
futures = "0.1"
Expand All @@ -32,16 +32,16 @@ serde = "1.0"
serde_derive = "1.0"
parking_lot = "0.6"
stats = { path = "../../util/stats" }
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
keccak-hash = "0.1"
keccak-hasher = { path = "../../util/keccak-hasher" }
triehash-ethereum = { version = "0.2", path = "../../util/triehash-ethereum" }
kvdb = "0.1.0"
kvdb = "0.1"
memory-cache = { path = "../../util/memory_cache" }
error-chain = { version = "0.12", default-features = false }

[dev-dependencies]
ethcore = { path = "..", features = ["test-helpers"] }
kvdb-memorydb = "0.1.0"
kvdb-memorydb = "0.1"
tempdir = "0.3"

[features]
Expand Down
10 changes: 5 additions & 5 deletions ethcore/light/src/transaction_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl AccountTransactions {
}

fn next_nonce(&self) -> U256 {
self.current.last().map(|last| last.nonce + 1.into())
self.current.last().map(|last| last.nonce + 1)
.unwrap_or_else(|| *self.cur_nonce.value())
}

Expand All @@ -113,7 +113,7 @@ impl AccountTransactions {
None => break,
}

next_nonce = next_nonce + 1.into();
next_nonce = next_nonce + 1;
}

promoted
Expand Down Expand Up @@ -196,7 +196,7 @@ impl TransactionQueue {
}
Err(idx) => {
let cur_len = acct_txs.current.len();
let incr_nonce = nonce + 1.into();
let incr_nonce = nonce + 1;

// current is sorted with one tx per nonce,
// so if a tx with given nonce wasn't found that means it is either
Expand All @@ -215,7 +215,7 @@ impl TransactionQueue {
}

(ImportDestination::Current, vec![hash])
} else if idx == cur_len && acct_txs.current.last().map_or(false, |f| f.nonce + 1.into() != nonce) {
} else if idx == cur_len && acct_txs.current.last().map_or(false, |f| f.nonce + 1 != nonce) {
trace!(target: "txqueue", "Queued future transaction for {}, nonce={}", sender, nonce);
let future_nonce = nonce;
acct_txs.future.insert(future_nonce, tx_info);
Expand Down Expand Up @@ -535,7 +535,7 @@ mod tests {
let tx_b: PendingTransaction = Transaction::default().fake_sign(sender).into();
let tx_a: PendingTransaction = {
let mut tx_a = Transaction::default();
tx_a.gas_price = tx_b.gas_price + 1.into();
tx_a.gas_price = tx_b.gas_price + 1;
tx_a.fake_sign(sender).into()
};

Expand Down
10 changes: 5 additions & 5 deletions ethcore/node_filter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ authors = ["Parity Technologies <[email protected]>"]
ethcore = { path = ".."}
ethcore-network = { path = "../../util/network" }
ethcore-network-devp2p = { path = "../../util/network-devp2p" }
ethereum-types = "0.3"
ethereum-types = "0.4"
log = "0.4"
parking_lot = "0.6"
ethabi = "5.1"
ethabi-derive = "5.0"
ethabi-contract = "5.0"
ethabi = "5.1.2"
ethabi-derive = "5.1.3"
ethabi-contract = "5.1.1"
lru-cache = "0.1"

[dev-dependencies]
ethcore = { path = "..", features = ["test-helpers"] }
kvdb-memorydb = "0.1.0"
kvdb-memorydb = "0.1"
ethcore-io = { path = "../../util/io" }
tempdir = "0.3"
20 changes: 10 additions & 10 deletions ethcore/private-tx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ authors = ["Parity Technologies <[email protected]>"]

[dependencies]
error-chain = { version = "0.12", default-features = false }
ethabi = "5.1"
ethabi-contract = "5.0"
ethabi-derive = "5.0"
ethabi = "5.1.2"
ethabi-derive = "5.1.3"
ethabi-contract = "5.1.1"
ethcore = { path = ".." }
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
parity-crypto = { git = "https://github.com/paritytech/parity-common" }
parity-bytes = "0.1"
parity-crypto = "0.1"
ethcore-io = { path = "../../util/io" }
ethcore-logger = { path = "../../logger" }
ethcore-miner = { path = "../../miner" }
ethcore-transaction = { path = "../transaction" }
ethereum-types = "0.3"
ethereum-types = "0.4"
ethjson = { path = "../../json" }
ethkey = { path = "../../ethkey" }
fetch = { path = "../../util/fetch" }
futures = "0.1"
heapsize = "0.4"
keccak-hash = { git = "https://github.com/paritytech/parity-common" }
keccak-hash = "0.1.2"
log = "0.4"
parking_lot = "0.6"
patricia-trie = { git = "https://github.com/paritytech/parity-common" }
patricia-trie = "0.2.1"
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
rand = "0.3"
rlp = { git = "https://github.com/paritytech/parity-common" }
rlp = { version = "0.2.4", features = ["ethereum"] }
rlp_derive = { path = "../../util/rlp_derive" }
rustc-hex = "1.0"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
tiny-keccak = "1.4"
transaction-pool = { path = "../../transaction-pool" }
transaction-pool = "1.13.2"
url = "1"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion ethcore/res/wasm-tests
6 changes: 3 additions & 3 deletions ethcore/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ ethcore = { path = ".." }
ethcore-io = { path = "../../util/io" }
ethcore-private-tx = { path = "../private-tx" }
ethcore-sync = { path = "../sync" }
ethereum-types = "0.3"
kvdb = "0.1.0"
ethereum-types = "0.4"
kvdb = "0.1"
log = "0.4"
stop-guard = { path = "../../util/stop-guard" }
trace-time = { path = "../../util/trace-time" }
trace-time = "0.1"

[dev-dependencies]
ethcore = { path = "..", features = ["test-helpers"] }
Expand Down
4 changes: 2 additions & 2 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ impl Call for Client {
where F: FnMut(U256) -> Result<bool, E>
{
while upper - lower > 1.into() {
let mid = (lower + upper) / 2.into();
let mid = (lower + upper) / 2;
trace!(target: "estimate_gas", "{} .. {} .. {}", lower, mid, upper);
let c = cond(mid)?;
match c {
Expand Down Expand Up @@ -2510,7 +2510,7 @@ mod tests {
block_hash: block_hash,
block_number: block_number,
cumulative_gas_used: gas_used,
gas_used: gas_used - 5.into(),
gas_used: gas_used - 5,
contract_address: None,
logs: vec![LocalizedLogEntry {
entry: logs[0].clone(),
Expand Down
Loading

0 comments on commit 72fd1fa

Please sign in to comment.