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

Commit

Permalink
parity-version pr reopen (#7136)
Browse files Browse the repository at this point in the history
* parity-version module split from util

removed unused util deps and features

trigger buildbot again

only kvdb links rocksdb

snappy linker issues

* rm snappy

* fixed old version imports
  • Loading branch information
debris authored Dec 22, 2017
1 parent 7c24d06 commit d80dd81
Show file tree
Hide file tree
Showing 28 changed files with 74 additions and 96 deletions.
32 changes: 15 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ parity-reactor = { path = "util/reactor" }
parity-rpc = { path = "rpc" }
parity-rpc-client = { path = "rpc_client" }
parity-updater = { path = "updater" }
parity-version = { path = "util/version" }
parity-whisper = { path = "whisper" }
path = { path = "util/path" }
panic_hook = { path = "panic_hook" }
Expand Down Expand Up @@ -98,7 +99,6 @@ test-heavy = ["ethcore/test-heavy"]
evm-debug = ["ethcore/evm-debug"]
evm-debug-tests = ["ethcore/evm-debug-tests"]
slow-blocks = ["ethcore/slow-blocks"]
final = ["ethcore-util/final"]
secretstore = ["ethcore-secretstore"]

[[bin]]
Expand Down
1 change: 1 addition & 0 deletions dapps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ parity-hash-fetch = { path = "../hash-fetch" }
parity-reactor = { path = "../util/reactor" }
parity-ui = { path = "./ui" }
keccak-hash = { path = "../util/hash" }
parity-version = { path = "../util/version" }

[dev-dependencies]
env_logger = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion dapps/src/handlers/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use hyper::{self, mime, header};
use hyper::StatusCode;

use util::version;
use parity_version::version;

use handlers::add_security_headers;
use Embeddable;
Expand Down
1 change: 1 addition & 0 deletions dapps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern crate parity_dapps_glue as parity_dapps;
extern crate parity_hash_fetch as hash_fetch;
extern crate parity_ui;
extern crate keccak_hash as hash;
extern crate parity_version;

#[macro_use]
extern crate futures;
Expand Down
9 changes: 9 additions & 0 deletions ethcore/src/state/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ use std::cell::{RefCell, Cell};

const STORAGE_CACHE_ITEMS: usize = 8192;

/// Boolean type for clean/dirty status.
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub enum Filth {
/// Data has not been changed.
Clean,
/// Data has been changed.
Dirty,
}

/// Single account in the system.
/// Keeps track of changes to the code and storage.
/// The changes are applied in `commit_storage` and `commit_code`
Expand Down
2 changes: 1 addition & 1 deletion parity/cli/usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ macro_rules! usage {
use toml;
use std::{fs, io, process};
use std::io::{Read, Write};
use util::version;
use parity_version::version;
use clap::{Arg, App, SubCommand, AppSettings, ArgMatches as ClapArgMatches, Error as ClapError, ErrorKind as ClapErrorKind};
use helpers::replace_home;
use std::ffi::OsStr;
Expand Down
3 changes: 2 additions & 1 deletion parity/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ use cli::{Args, ArgsError};
use hash::keccak;
use bigint::prelude::U256;
use bigint::hash::H256;
use util::{version_data, Address, version};
use util::Address;
use parity_version::{version_data, version};
use bytes::Bytes;
use ansi_term::Colour;
use ethsync::{NetworkConfiguration, validate_node_url, self};
Expand Down
2 changes: 1 addition & 1 deletion parity/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pub fn default_network_config() -> ::ethsync::NetworkConfiguration {
ip_filter: IpFilter::default(),
reserved_nodes: Vec::new(),
allow_non_reserved: true,
client_version: ::util::version(),
client_version: ::parity_version::version(),
}
}

Expand Down
1 change: 1 addition & 0 deletions parity/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ extern crate parity_local_store as local_store;
extern crate parity_reactor;
extern crate parity_rpc;
extern crate parity_updater as updater;
extern crate parity_version;
extern crate parity_whisper;
extern crate path;
extern crate rpc_cli;
Expand Down
3 changes: 2 additions & 1 deletion parity/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
use std::{str, fs, fmt};
use std::time::Duration;
use bigint::prelude::U256;
use util::{Address, version_data};
use util::Address;
use parity_version::version_data;
use journaldb::Algorithm;
use ethcore::spec::{Spec, SpecParams};
use ethcore::ethereum;
Expand Down
2 changes: 1 addition & 1 deletion parity/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use parity_reactor::EventLoop;
use parity_rpc::{NetworkSettings, informant, is_major_importing};
use updater::{UpdatePolicy, Updater};
use ansi_term::Colour;
use util::version;
use parity_version::version;
use parking_lot::{Condvar, Mutex};
use node_filter::NodeFilter;
use journaldb::Algorithm;
Expand Down
1 change: 1 addition & 0 deletions rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fetch = { path = "../util/fetch" }
node-health = { path = "../dapps/node-health" }
parity-reactor = { path = "../util/reactor" }
parity-updater = { path = "../updater" }
parity-version = { path = "../util/version" }
rlp = { path = "../util/rlp" }
stats = { path = "../util/stats" }
vm = { path = "../ethcore/vm" }
Expand Down
1 change: 1 addition & 0 deletions rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extern crate fetch;
extern crate node_health;
extern crate parity_reactor;
extern crate parity_updater as updater;
extern crate parity_version as version;
extern crate rlp;
extern crate stats;
extern crate keccak_hash as hash;
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/impls/light/parity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use std::sync::Arc;
use std::collections::{BTreeMap, HashSet};

use util::misc::version_data;
use version::version_data;

use crypto::{ecies, DEFAULT_MAC};
use ethkey::{Brain, Generator};
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/impls/parity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::str::FromStr;
use std::collections::{BTreeMap, HashSet};

use util::Address;
use util::misc::version_data;
use version::version_data;

use crypto::{DEFAULT_MAC, ecies};
use ethkey::{Brain, Generator};
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/impls/web3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Web3 rpc implementation.
use hash::keccak;
use jsonrpc_core::Result;
use util::version;
use version::version;
use v1::traits::Web3;
use v1::types::{H256, Bytes};

Expand Down
4 changes: 2 additions & 2 deletions rpc/src/v1/tests/mocked/parity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ fn rpc_parity_chain_id() {

#[test]
fn rpc_parity_default_extra_data() {
use util::misc;
use version::version_data;
use bytes::ToPretty;

let deps = Dependencies::new();
let io = deps.default_client();

let request = r#"{"jsonrpc": "2.0", "method": "parity_defaultExtraData", "params": [], "id": 1}"#;
let response = format!(r#"{{"jsonrpc":"2.0","result":"0x{}","id":1}}"#, misc::version_data().to_hex());
let response = format!(r#"{{"jsonrpc":"2.0","result":"0x{}","id":1}}"#, version_data().to_hex());

assert_eq!(io.handle_request_sync(request), Some(response));
}
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/tests/mocked/web3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

use jsonrpc_core::IoHandler;
use util::version;
use version::version;
use v1::{Web3, Web3Client};

#[test]
Expand Down
1 change: 1 addition & 0 deletions updater/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ futures = "0.1"
parking_lot = "0.4"
parity-hash-fetch = { path = "../hash-fetch" }
parity-reactor = { path = "../util/reactor" }
parity-version = { path = "../util/version" }
path = { path = "../util/path" }
1 change: 1 addition & 0 deletions updater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern crate ethsync;
extern crate futures;
extern crate target_info;
extern crate parity_reactor;
extern crate parity_version as version;
extern crate path;
extern crate semver;

Expand Down
2 changes: 1 addition & 1 deletion updater/src/types/version_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use std::fmt;
use semver::{Version};
use bigint::hash::H160;
use util::misc::raw_package_info;
use version::raw_package_info;
use types::ReleaseTrack;

/// Version information of a particular release.
Expand Down
4 changes: 2 additions & 2 deletions updater/src/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use bigint::hash::{H160, H256};
use util::Address;
use bytes::Bytes;
use parking_lot::Mutex;
use util::misc;
use version;

/// Filter for releases.
#[derive(Debug, Eq, PartialEq, Clone)]
Expand Down Expand Up @@ -115,7 +115,7 @@ fn platform() -> String {
} else if cfg!(target_os = "linux") {
format!("{}-unknown-linux-gnu", Target::arch())
} else {
misc::platform()
version::platform()
}
}

Expand Down
34 changes: 5 additions & 29 deletions util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,15 @@ license = "GPL-3.0"
name = "ethcore-util"
version = "1.9.0"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"

[dependencies]
log = "0.3"
env_logger = "0.4"
rustc-hex = "1.0"
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" }
elastic-array = "0.9"
rlp = { path = "rlp" }
heapsize = "0.4"
keccak-hash = { path = "hash" }
libc = "0.2.7"
target_info = "0.1"
ethcore-bigint = { path = "bigint", features = ["heapsizeof"] }
parking_lot = "0.4"
tiny-keccak= "1.0"
ethcore-logger = { path = "../logger" }
triehash = { path = "triehash" }
hashdb = { path = "hashdb" }
patricia-trie = { path = "patricia_trie" }
ethcore-bytes = { path = "bytes" }
memorydb = { path = "memorydb" }
util-error = { path = "error" }
kvdb = { path = "kvdb" }
journaldb = { path = "journaldb" }

[dev-dependencies]
kvdb-memorydb = { path = "kvdb-memorydb" }

[features]
default = []
final = []

[build-dependencies]
vergen = "0.1"
rustc_version = "0.1.0"
ethcore-bytes = { path = "bytes" }
keccak-hash = { path = "hash" }
log = "0.3"
patricia-trie = { path = "patricia_trie" }
triehash = { path = "triehash" }
23 changes: 0 additions & 23 deletions util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,33 +70,10 @@
//! cargo build --release
//! ```

extern crate rustc_hex;
extern crate env_logger;
extern crate secp256k1;
extern crate elastic_array;
extern crate libc;
extern crate target_info;
extern crate ethcore_bigint as bigint;
extern crate ethcore_bytes as bytes;
extern crate parking_lot;
extern crate tiny_keccak;
extern crate rlp;
extern crate heapsize;
extern crate ethcore_logger;
extern crate keccak_hash as keccak;
extern crate hashdb;
extern crate memorydb;
extern crate patricia_trie as trie;
extern crate kvdb;
extern crate util_error as error;

#[cfg(test)]
extern crate kvdb_memorydb;


pub mod misc;

pub use misc::*;
pub use hashdb::*;
pub use memorydb::MemoryDB;

Expand Down
14 changes: 14 additions & 0 deletions util/version/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "parity-version"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"

[dependencies]
ethcore-bytes = { path = "../bytes" }
rlp = { path = "../rlp" }
target_info = "0.1"

[build-dependencies]
vergen = "0.1"
rustc_version = "0.1.0"
Loading

0 comments on commit d80dd81

Please sign in to comment.