Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
742 changes: 371 additions & 371 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ parity-path = "0.1"
parity-rpc = { path = "rpc" }
parity-runtime = { path = "util/runtime" }
parity-updater = { path = "updater" }
parity-util-mem = { version = "0.2.0", features = ["jemalloc-global"] }
parity-util-mem = { version = "0.2.1", features = ["jemalloc-global"] }
parity-version = { path = "util/version" }
parking_lot = "0.9"
regex = "1.0"
Expand Down Expand Up @@ -136,3 +136,17 @@ members = [
"parity-clib",
]

# todo[dvdplm]: remove before merge
[patch.crates-io]
kvdb = { path = "../parity-common/kvdb" }
kvdb-memorydb = { path = "../parity-common/kvdb-memorydb" }
kvdb-rocksdb = { path = "../parity-common/kvdb-rocksdb" }
parity-util-mem = { path = "../parity-common/parity-util-mem" }
ethereum-types = { path = "../parity-common/ethereum-types" }
primitive-types = { path = "../parity-common/primitive-types" }
rlp = { path = "../parity-common/rlp" }
ethbloom = { path = "../parity-common/ethbloom" }
triehash = { path = "../parity-common/triehash" }
fixed-hash = { path = "../parity-common/fixed-hash" }
trie-db = { path = "../trie/trie-db" }
hash-db = { path = "../trie/hash-db" }
2 changes: 1 addition & 1 deletion ethcore/account-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ log = "0.4"
lru-cache = "0.1.2"
memory-db = "0.15.0"
parity-bytes = "0.1.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
parking_lot = "0.9"
pod = { path = "../pod" }
rlp = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion ethcore/blockchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ common-types = { path = "../types" }
ethcore-db = { path = "../db" }
ethereum-types = "0.8.0"
keccak-hash = "0.4.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
itertools = "0.5"
kvdb = "0.1"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion ethcore/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"
common-types = { path = "../types" }
ethereum-types = "0.8.0"
kvdb = "0.1"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
parking_lot = "0.9"
rlp = "0.4.0"
rlp_derive = { path = "../../util/rlp-derive" }
2 changes: 1 addition & 1 deletion ethcore/engines/validator-set/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ log = "0.4.8"
machine = { path = "../../machine" }
memory-cache = { path = "../../../util/memory-cache" }
parity-bytes = "0.1.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
parking_lot = "0.9"
rlp = "0.4.2"
triehash = { package = "triehash-ethereum", version = "0.2", path = "../../../util/triehash-ethereum" }
Expand Down
5 changes: 2 additions & 3 deletions ethcore/engines/validator-set/src/safe_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,8 @@ fn check_first_proof(machine: &Machine, contract_address: Address, old_header: H
fn decode_first_proof(rlp: &Rlp) -> Result<(Header, Vec<DBValue>), EthcoreError> {
let header = rlp.val_at(0)?;
let state_items = rlp.at(1)?.iter().map(|x| {
let mut val = DBValue::new();
val.append_slice(x.data()?);
Ok(val)
// todo[dvdplm] can avoid copy with `from_buf()` here?
Ok(DBValue::from_slice(x.data()?))
}).collect::<Result<_, EthcoreError>>()?;

Ok((header, state_items))
Expand Down
2 changes: 1 addition & 1 deletion ethcore/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
bit-set = "0.4"
parity-bytes = "0.1"
ethereum-types = "0.8.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
lazy_static = "1.0"
log = "0.4"
vm = { path = "../vm" }
Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ethcore-network = { path = "../../util/network" }
ethcore-miner = { path = "../../miner" }
ethcore-io = { path = "../../util/io" }
hash-db = "0.15.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
vm = { path = "../vm" }
fastmap = { path = "../../util/fastmap" }
failsafe = { version = "0.3.0", default-features = false, features = ["parking_lot_mutex"] }
Expand Down
10 changes: 4 additions & 6 deletions ethcore/light/src/types/request/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1507,9 +1507,8 @@ pub mod execution {
fn decode(rlp: &Rlp) -> Result<Self, DecoderError> {
let mut items = Vec::new();
for raw_item in rlp.iter() {
let mut item = DBValue::new();
item.append_slice(raw_item.data()?);
items.push(item);
// todo[dvdplm] can avoid copy with `from_buf()` here?
items.push(DBValue::from_slice(raw_item.data()?))
}

Ok(Response { items })
Expand Down Expand Up @@ -1854,9 +1853,8 @@ mod tests {
let full_req = Request::Execution(req.clone());
let res = ExecutionResponse {
items: vec![DBValue::new(), {
let mut value = DBValue::new();
value.append_slice(&[1, 1, 1, 2, 3]);
value
// todo[dvdplm] can avoid copy with `from_buf()` here?
DBValue::from_slice(&[1, 1, 1, 2, 3])
}],
};
let full_res = Response::Execution(res.clone());
Expand Down
2 changes: 1 addition & 1 deletion ethcore/private-tx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ethereum-types = "0.8.0"
ethjson = { path = "../../json" }
fetch = { path = "../../util/fetch" }
futures = "0.1"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
hash-db = "0.15.0"
keccak-hash = "0.4.0"
keccak-hasher = { path = "../../util/keccak-hasher" }
Expand Down
2 changes: 1 addition & 1 deletion ethcore/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ macros = { path = "../../util/macros" }
network = { package = "ethcore-network", path = "../../util/network" }
parity-runtime = { path = "../../util/runtime" }
parity-crypto = { version = "0.4.2", features = ["publickey"] }
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
rand = "0.7"
parking_lot = "0.9"
rlp = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion ethcore/trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ evm = { path = "../evm" }
kvdb = "0.1"
log = "0.4"
parity-bytes = "0.1.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
parking_lot = "0.9"
rlp = "0.4.0"
rlp_derive = { path = "../../util/rlp-derive" }
Expand Down
4 changes: 2 additions & 2 deletions ethcore/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
derive_more = "0.15.0"
ethbloom = "0.8.0"
ethbloom = "0.8.1"
ethcore-io = { path = "../../util/io" }
ethereum-types = "0.8.0"
ethjson = { path = "../../json" }
keccak-hash = "0.4.0"
parity-bytes = "0.1"
parity-crypto = { version = "0.4.2", features = ["publickey"] }
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
parity-snappy = "0.1"
patricia-trie-ethereum = { path = "../../util/patricia-trie-ethereum" }
rlp = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion ethcore/verification/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ len-caching-lock = { path = "../../util/len-caching-lock" }
log = "0.4"
num_cpus = "1.2"
parity-bytes = "0.1.0"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
parking_lot = "0.9"
rlp = "0.4.2"
time-utils = { path = "../../util/time-utils" }
Expand Down
2 changes: 1 addition & 1 deletion miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ethabi-contract = "9.0.0"
ethcore-call-contract = { path = "../ethcore/call-contract" }
ethereum-types = "0.8.0"
futures = "0.1"
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
keccak-hash = "0.4.0"
linked-hash-map = "0.5"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion util/blooms-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
ethbloom = "0.8.0"
ethbloom = "0.8.1"
parking_lot = "0.9"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion util/journaldb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2018"
parity-bytes = "0.1"
ethereum-types = "0.8.0"
hash-db = "0.15.0"
malloc_size_of = { version = "0.2", package = "parity-util-mem" }
malloc_size_of = { version = "0.2.1", package = "parity-util-mem" }
keccak-hasher = { path = "../keccak-hasher" }
kvdb = "0.1"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion util/memory-cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ description = "An LRU-cache which operates on memory used"
license = "GPL3"

[dependencies]
parity-util-mem = "0.2.0"
parity-util-mem = "0.2.1"
lru-cache = "0.1"
2 changes: 1 addition & 1 deletion util/migration-rocksdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl Manager {
}

while cur_db.num_columns() > goal_columns {
cur_db.drop_column().map_err(other_io_err)?;
cur_db.remove_last_column().map_err(other_io_err)?;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions util/patricia-trie-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ license = "GPL-3.0"
[dependencies]
trie-db = "0.16.0"
keccak-hasher = { version = "0.1.1", path = "../keccak-hasher" }
hash-db = "0.15.0"
hash-db = "0.15.2"
rlp = "0.4.4"
parity-bytes = "0.1"
ethereum-types = "0.8.0"
elastic-array = "0.10"
smallvec = "1.0.0"

[dev-dependencies]
memory-db = "0.15.0"
Expand Down
22 changes: 10 additions & 12 deletions util/patricia-trie-ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Façade crate for `patricia_trie` for Ethereum specific impls

pub extern crate trie_db as trie; // `pub` because we need to import this crate for the tests in `patricia_trie` and there were issues: https://gist.github.com/dvdplm/869251ee557a1b4bd53adc7c971979aa
extern crate elastic_array;
extern crate smallvec;
extern crate parity_bytes;
extern crate ethereum_types;
extern crate hash_db;
Expand Down Expand Up @@ -59,7 +59,7 @@ impl trie_db::TrieLayout for Layout {
/// extern crate keccak_hasher;
/// extern crate memory_db;
/// extern crate ethereum_types;
/// extern crate elastic_array;
/// extern crate smallvec;
/// extern crate journaldb;
///
/// use trie::*;
Expand All @@ -68,9 +68,8 @@ impl trie_db::TrieLayout for Layout {
/// use memory_db::*;
/// use ethereum_types::H256;
/// use ethtrie::{TrieDB, TrieDBMut};
/// use elastic_array::ElasticArray128;
///
/// type DBValue = ElasticArray128<u8>;
/// type DBValue = smallvec::SmallVec<[u8; 128]>;
///
/// fn main() {
/// let mut memdb = journaldb::new_memory_db();
Expand Down Expand Up @@ -104,18 +103,17 @@ pub type FatDB<'db> = trie::FatDB<'db, Layout>;
/// extern crate keccak_hasher;
/// extern crate memory_db;
/// extern crate ethereum_types;
/// extern crate elastic_array;
/// extern crate smallvec;
/// extern crate journaldb;
///
/// use keccak_hash::KECCAK_NULL_RLP;
/// use ethtrie::{TrieDBMut, trie::TrieMut};
/// use keccak_hasher::KeccakHasher;
/// use memory_db::*;
/// use ethereum_types::H256;
/// use elastic_array::ElasticArray128;
/// use trie::Trie;
///
/// type DBValue = ElasticArray128<u8>;
/// type DBValue = smallvec::SmallVec<[u8; 128]>;
///
/// fn main() {
/// let mut memdb = journaldb::new_memory_db();
Expand Down Expand Up @@ -166,9 +164,9 @@ mod tests {
let t = TrieDB::new(&memdb, &root).unwrap();
assert!(t.contains(b"foo").unwrap());
assert!(t.contains(b"fog").unwrap());
assert_eq!(t.get(b"foo").unwrap().unwrap(), b"bar".to_vec());
assert_eq!(t.get(b"fog").unwrap().unwrap(), b"b".to_vec());
assert_eq!(t.get(b"fot").unwrap().unwrap(), vec![0u8;33]);
assert_eq!(t.get(b"foo").unwrap().unwrap().to_vec(), b"bar".to_vec());
assert_eq!(t.get(b"fog").unwrap().unwrap().to_vec(), b"b".to_vec());
assert_eq!(t.get(b"fot").unwrap().unwrap().to_vec(), vec![0u8;33]);
}

#[test]
Expand All @@ -183,8 +181,8 @@ mod tests {
let t = TrieDB::new(&memdb, &root).unwrap();
assert!(t.contains(b"foo").unwrap());
assert!(t.contains(b"fog").unwrap());
assert_eq!(t.get(b"foo").unwrap().unwrap(), b"b".to_vec());
assert_eq!(t.get(b"fog").unwrap().unwrap(), b"a".to_vec());
assert_eq!(t.get(b"foo").unwrap().unwrap().to_vec(), b"b".to_vec());
assert_eq!(t.get(b"fog").unwrap().unwrap().to_vec(), b"a".to_vec());
}

}
2 changes: 1 addition & 1 deletion util/triehash-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ description = "Trie-root helpers, ethereum style"
license = "GPL-3.0"

[dependencies]
triehash = "0.8.0"
triehash = "0.8.2"
ethereum-types = "0.8.0"
keccak-hasher = { path = "../keccak-hasher" }