Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fetch parity-common crates from crates.io #9410

Merged
merged 28 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7cfd13
Fetch `parity-common` crates from crates.io
dvdplm Aug 24, 2018
1cfb1ac
Add doc tests from `patricia-trie` to `patricia-trie-ethereum`
dvdplm Aug 24, 2018
e581603
[ethkey] upgrade ethereum-types
dvdplm Aug 28, 2018
5f4503d
[whisper] update deps
dvdplm Aug 28, 2018
683472d
[network] deps
dvdplm Aug 28, 2018
dcee52f
[network-devp2p] deps
dvdplm Aug 28, 2018
f1e2aed
[journaldb] deps
dvdplm Aug 28, 2018
a6782cb
[fastmap] deps
dvdplm Aug 28, 2018
d7c276e
[miner] deps and test fixes
dvdplm Aug 28, 2018
77967b1
[machine] deps
dvdplm Aug 28, 2018
e43f580
[json] deps
dvdplm Aug 28, 2018
d329db2
[hw] deps
dvdplm Aug 28, 2018
02c9999
[ethash] deps
dvdplm Aug 28, 2018
7fbc9a3
[registrar] deps
dvdplm Aug 28, 2018
442fb56
Update a few more dependencies with new ethabi-*
dvdplm Aug 28, 2018
6ce1e66
[updater] Update deps
dvdplm Aug 28, 2018
37c3528
deps
dvdplm Aug 28, 2018
78b3b32
[ethcore] Update deps
dvdplm Aug 29, 2018
e678b0b
Use new parity-snappy and parity-rocksdb crates
dvdplm Aug 29, 2018
8354d5f
Merge branch 'master' into dp/chore/fetch-dependencies-from-crates
dvdplm Aug 30, 2018
b0acc34
Updated submodules
dvdplm Aug 30, 2018
51d405b
Use parity-snappy 0.1
dvdplm Aug 30, 2018
dd305a0
Use kvdb-rocksdb 0.1.2
dvdplm Aug 30, 2018
1c53be0
Don't use latest ethereum/tests
dvdplm Aug 30, 2018
df88d32
Merge branch 'master' into dp/chore/fetch-dependencies-from-crates
dvdplm Sep 4, 2018
14ed092
Fix merge conflicts errors
dvdplm Sep 4, 2018
cade563
Remove superseeded comment
dvdplm Sep 4, 2018
bedc7fd
Address grumbles: add newlines, add/remove spaces
dvdplm Sep 4, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <admin@parity.io>"]
[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 <admin@parity.io>"]

[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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a / b?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it changed?

Copy link
Collaborator

@sorpaas sorpaas Sep 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvdplm Please change all those cases back. Div panics on default but we need overflowing behavior here, otherwise it breaks consensus.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these methods were removed when going from bigint to uint, which makes sense since for unsigned integers div and rem should never overflow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also had the same question though so it's better if @dvdplm confirms.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah right. I think it's this: paritytech/parity-common#32

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, that's the PR. I think the reason they were there to begin with was an attempt to fulfill a trait that is no longer in rust (removed ~1.13?).

}
} 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 <admin@parity.io>"]
[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 <admin@parity.io>"]
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 <admin@parity.io>"]

[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