Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Use parity-ethereum rev 02c54d42398f to fix build
  • Loading branch information
dvdplm committed Sep 4, 2018
commit d87097ecced63e789b91bd409cca6e782b41a9c6
135 changes: 67 additions & 68 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions substrate/client/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ authors = ["Parity Technologies <[email protected]>"]
[dependencies]
parking_lot = "0.4"
log = "0.3"
kvdb = { git = "https://github.com/paritytech/parity.git" }
kvdb-rocksdb = { git = "https://github.com/paritytech/parity.git" }
kvdb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
kvdb-rocksdb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
ethereum-types = "0.3"
hashdb = { git = "https://github.com/paritytech/parity.git" }
patricia-trie = { git = "https://github.com/paritytech/parity.git" }
memorydb = { git = "https://github.com/paritytech/parity.git" }
hashdb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
patricia-trie = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
memorydb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
substrate-primitives = { path = "../../../substrate/primitives" }
substrate-runtime-primitives = { path = "../../../substrate/runtime/primitives" }
substrate-client = { path = "../../../substrate/client" }
Expand All @@ -22,4 +22,4 @@ substrate-executor = { path = "../../../substrate/executor" }
substrate-state-db = { path = "../../../substrate/state-db" }

[dev-dependencies]
kvdb-memorydb = { git = "https://github.com/paritytech/parity.git" }
kvdb-memorydb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
7 changes: 4 additions & 3 deletions substrate/client/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ mod utils;

use std::sync::Arc;
use std::path::PathBuf;
use std::io;

use codec::{Decode, Encode};
use kvdb::{KeyValueDB, DBTransaction};
Expand Down Expand Up @@ -112,7 +113,7 @@ struct PendingBlock<Block: BlockT> {
struct StateMetaDb<'a>(&'a KeyValueDB);

impl<'a> state_db::MetaDb for StateMetaDb<'a> {
type Error = kvdb::Error;
type Error = io::Error;

fn get_meta(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error> {
self.0.get(columns::STATE_META, key).map(|r| r.map(|v| v.to_vec()))
Expand Down Expand Up @@ -257,7 +258,7 @@ impl<Block: BlockT> state_machine::Storage for StorageDb<Block> {
}

impl<Block: BlockT> state_db::HashDb for StorageDb<Block> {
type Error = kvdb::Error;
type Error = io::Error;
type Hash = H256;

fn get(&self, key: &H256) -> Result<Option<Vec<u8>>, Self::Error> {
Expand Down Expand Up @@ -293,7 +294,7 @@ impl<Block: BlockT> Backend<Block> {

fn from_kvdb(db: Arc<KeyValueDB>, pruning: PruningMode, finalization_window: u64) -> Result<Self, client::error::Error> {
let blockchain = BlockchainDb::new(db.clone())?;
let map_e = |e: state_db::Error<kvdb::Error>| ::client::error::Error::from(format!("State database error: {:?}", e));
let map_e = |e: state_db::Error<io::Error>| ::client::error::Error::from(format!("State database error: {:?}", e));
let state_db: StateDb<Block::Hash, H256> = StateDb::new(pruning, &StateMetaDb(&*db)).map_err(map_e)?;
let storage_db = StorageDb {
db,
Expand Down
11 changes: 4 additions & 7 deletions substrate/client/db/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
//! full and light storages.

use std::sync::Arc;
use std::io;

use kvdb::{self, KeyValueDB, DBTransaction};
use kvdb::{KeyValueDB, DBTransaction};
use kvdb_rocksdb::{Database, DatabaseConfig};

use client;
Expand Down Expand Up @@ -70,13 +71,9 @@ pub fn number_to_db_key<N>(n: N) -> BlockKey where N: As<u64> {
}

/// Maps database error to client error
pub fn db_err(err: kvdb::Error) -> client::error::Error {
pub fn db_err(err: io::Error) -> client::error::Error {
use std::error::Error;
match err.kind() {
&kvdb::ErrorKind::Io(ref err) => client::error::ErrorKind::Backend(err.description().into()).into(),
&kvdb::ErrorKind::Msg(ref m) => client::error::ErrorKind::Backend(m.clone()).into(),
_ => client::error::ErrorKind::Backend("Unknown backend error".into()).into(),
}
client::error::ErrorKind::Backend(err.description().into()).into()
}

/// Open RocksDB database.
Expand Down
2 changes: 1 addition & 1 deletion substrate/keystore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]

[dependencies]
ethcore-crypto = { git = "https://github.com/paritytech/parity.git", default_features = false }
ethcore-crypto = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" , default_features = false }
ed25519 = { path = "../ed25519" }
error-chain = "0.12"
hex = "0.3"
Expand Down
8 changes: 4 additions & 4 deletions substrate/network-libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ error-chain = { version = "0.12", default-features = false }
fnv = "1.0"
futures = "0.1"
libp2p = { git = "https://github.com/libp2p/rust-libp2p", rev = "02576eecf140a06134519ed9438d061d99bb2e69", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] }
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
ethkey = { git = "https://github.com/paritytech/parity.git" }
ethcore-io = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
ethkey = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
ethereum-types = "0.3"
parking_lot = "0.5"
libc = "0.2"
Expand All @@ -30,5 +30,5 @@ unsigned-varint = { version = "0.2", features = ["codec"] }
[dev-dependencies]
assert_matches = "1.2"
parity-bytes = { git = "https://github.com/paritytech/parity-common.git" }
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
ethcore-logger = { git = "https://github.com/paritytech/parity.git" }
ethcore-io = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
ethcore-logger = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
2 changes: 1 addition & 1 deletion substrate/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ error-chain = "0.12"
bitflags = "1.0"
futures = "0.1.17"
linked-hash-map = "0.5"
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
ethcore-io = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
ed25519 = { path = "../../substrate/ed25519" }
substrate-primitives = { path = "../../substrate/primitives" }
substrate-client = { path = "../../substrate/client" }
Expand Down
6 changes: 3 additions & 3 deletions substrate/state-machine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ triehash = "0.1"

substrate-primitives = { path = "../primitives", version = "0.1.0" }

hashdb = { git = "https://github.com/paritytech/parity.git" }
memorydb = { git = "https://github.com/paritytech/parity.git" }
patricia-trie = { git = "https://github.com/paritytech/parity.git" }
hashdb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
memorydb = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }
patricia-trie = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" }