diff --git a/Cargo.lock b/Cargo.lock index 3893cb83c1..7ff661015d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4569,7 +4569,6 @@ dependencies = [ "tari_common_types", "tari_comms", "tari_crypto", - "tari_p2p", "tari_utilities", "thiserror", "tokio", @@ -4688,7 +4687,6 @@ dependencies = [ "sha2 0.9.9", "sha3", "structopt", - "tari_common_types", "tari_crypto", "tari_test_utils", "tempfile", @@ -5030,7 +5028,6 @@ dependencies = [ "config", "crossterm 0.17.7", "derivative", - "env_logger", "futures 0.3.24", "hex", "hyper", @@ -5195,8 +5192,6 @@ dependencies = [ "serde", "sha2 0.9.9", "sha3", - "tari_common", - "tari_common_types", "tari_crypto", "tari_utilities", "thiserror", @@ -5279,7 +5274,6 @@ dependencies = [ "chacha20poly1305 0.10.1", "chrono", "clear_on_drop", - "crossbeam-channel", "derivative", "diesel", "diesel_migrations", @@ -5326,7 +5320,6 @@ version = "0.38.0" dependencies = [ "cbindgen 0.24.3", "chrono", - "env_logger", "futures 0.3.24", "itertools 0.10.3", "lazy_static", diff --git a/applications/tari_app_utilities/Cargo.toml b/applications/tari_app_utilities/Cargo.toml index fe29fab1a2..0421f5d865 100644 --- a/applications/tari_app_utilities/Cargo.toml +++ b/applications/tari_app_utilities/Cargo.toml @@ -10,7 +10,6 @@ tari_comms = { path = "../../comms/core" } tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.5" } tari_common = { path = "../../common" } tari_common_types = { path = "../../base_layer/common_types" } -tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] } tari_utilities = { git = "https://github.com/tari-project/tari_utilities.git", tag = "v0.4.5" } clap = { version = "3.2.0", features = ["derive", "env"] } diff --git a/applications/tari_base_node/Cargo.toml b/applications/tari_base_node/Cargo.toml index 3d89d4c8fc..7e3c944bcc 100644 --- a/applications/tari_base_node/Cargo.toml +++ b/applications/tari_base_node/Cargo.toml @@ -16,7 +16,7 @@ tari_common_types = { path = "../../base_layer/common_types" } tari_comms_dht = { path = "../../comms/dht" } tari_core = { path = "../../base_layer/core", default-features = false, features = ["transactions"] } tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.5" } -tari_libtor = { path = "../../infrastructure/libtor" } +tari_libtor = { path = "../../infrastructure/libtor", optional = true } tari_mmr = { path = "../../base_layer/mmr", features = ["native_bitmap"] } tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] } tari_storage = {path="../../infrastructure/storage"} @@ -65,6 +65,6 @@ default = ["metrics"] avx2 = ["tari_core/avx2", "tari_crypto/simd_backend", "tari_p2p/avx2", "tari_comms/avx2", "tari_comms_dht/avx2"] metrics = ["tari_metrics", "tari_comms/metrics"] safe = [] -libtor = ["tari_libtor/libtor"] +libtor = ["tari_libtor"] diff --git a/applications/tari_console_wallet/Cargo.toml b/applications/tari_console_wallet/Cargo.toml index 6cb7a30c5f..fd38f46b9f 100644 --- a/applications/tari_console_wallet/Cargo.toml +++ b/applications/tari_console_wallet/Cargo.toml @@ -13,7 +13,7 @@ tari_app_utilities = { path = "../tari_app_utilities" } tari_comms = { path = "../../comms/core" } tari_comms_dht = { path = "../../comms/dht" } tari_common_types = { path = "../../base_layer/common_types" } -tari_libtor = { path = "../../infrastructure/libtor" } +tari_libtor = { path = "../../infrastructure/libtor", optional = true } tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] } tari_app_grpc = { path = "../tari_app_grpc" } tari_shutdown = { path = "../../infrastructure/shutdown" } @@ -69,5 +69,5 @@ features = ["crossterm"] [features] avx2 = ["tari_core/avx2", "tari_crypto/simd_backend", "tari_wallet/avx2", "tari_comms/avx2", "tari_comms_dht/avx2", "tari_p2p/avx2", "tari_key_manager/avx2"] -libtor = ["tari_libtor/libtor"] +libtor = ["tari_libtor"] diff --git a/applications/tari_merge_mining_proxy/Cargo.toml b/applications/tari_merge_mining_proxy/Cargo.toml index ea22b06b8a..55d4d32478 100644 --- a/applications/tari_merge_mining_proxy/Cargo.toml +++ b/applications/tari_merge_mining_proxy/Cargo.toml @@ -9,7 +9,6 @@ edition = "2018" [features] default = [] -envlog = ["env_logger"] [dependencies] tari_app_grpc = { path = "../tari_app_grpc" } @@ -29,7 +28,6 @@ chrono = { version = "0.4.6", default-features = false } clap = { version = "3.1.1", features = ["derive", "env"] } config = { version = "0.13.0" } derivative = "2.2.0" -env_logger = { version = "0.7.1", optional = true } futures = "0.3.5" hex = "0.4.2" hyper = "0.14.12" diff --git a/base_layer/key_manager/Cargo.toml b/base_layer/key_manager/Cargo.toml index e7702a0a21..a713c66a9f 100644 --- a/base_layer/key_manager/Cargo.toml +++ b/base_layer/key_manager/Cargo.toml @@ -12,7 +12,7 @@ crate-type = ["lib", "cdylib"] # NB: All dependencies must support or be gated for the WASM target. [dependencies] -tari_common_types = { version = "^0.38", path = "../../base_layer/common_types" } +tari_common_types = { version = "^0.38", path = "../../base_layer/common_types", optional = true } tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.5" } tari_utilities = { git = "https://github.com/tari-project/tari_utilities.git", tag = "v0.4.5" } @@ -21,7 +21,7 @@ argon2 = { version = "0.2", features = ["std"] } blake2 = "0.9.1" chacha20 = "0.7.1" clear_on_drop = "=0.2.4" -console_error_panic_hook = "0.1.7" +console_error_panic_hook = { version = "0.1.7", optional = true } crc32fast = "1.2.1" derivative = "2.2.0" digest = "0.9.0" @@ -35,12 +35,12 @@ thiserror = "1.0.26" strum_macros = "0.22" strum = { version = "0.22", features = ["derive"] } wasm-bindgen = { version = "0.2", features = ["serde-serialize", "nightly"], optional = true } -wasm-bindgen-test = "0.3.28" [dev-dependencies] sha2 = "0.9.8" +wasm-bindgen-test = "0.3.28" [features] avx2 = ["tari_crypto/simd_backend"] js = ["getrandom/js", "js-sys"] -wasm = ["wasm-bindgen", "js"] +wasm = ["wasm-bindgen", "js", "tari_common_types"] diff --git a/base_layer/key_manager/src/wasm.rs b/base_layer/key_manager/src/wasm.rs index c9b2a53c03..834896319a 100644 --- a/base_layer/key_manager/src/wasm.rs +++ b/base_layer/key_manager/src/wasm.rs @@ -161,6 +161,7 @@ where T: for<'a> Deserialize<'a> { } } +#[cfg(test)] mod test { use tari_utilities::hex::Hex; use wasm_bindgen_test::*; diff --git a/base_layer/wallet/Cargo.toml b/base_layer/wallet/Cargo.toml index 3435461ecf..702da25e77 100644 --- a/base_layer/wallet/Cargo.toml +++ b/base_layer/wallet/Cargo.toml @@ -34,7 +34,6 @@ blake2 = "0.9.0" sha2 = "0.9.5" chrono = { version = "0.4.19", default-features = false, features = ["serde"] } clear_on_drop = "=0.2.4" -crossbeam-channel = "0.5.4" derivative = "2.2.0" diesel = { version = "1.4.8", features = ["sqlite", "serde_json", "chrono", "64-column-tables"] } diesel_migrations = "1.4.0" diff --git a/base_layer/wallet_ffi/Cargo.toml b/base_layer/wallet_ffi/Cargo.toml index 08529af92e..b253518bef 100644 --- a/base_layer/wallet_ffi/Cargo.toml +++ b/base_layer/wallet_ffi/Cargo.toml @@ -30,7 +30,6 @@ openssl = { version = "0.10.41", features = ["vendored"] } rand = "0.8" thiserror = "1.0.26" tokio = "1.20" -env_logger = "0.7.0" num-traits = "0.2.15" itertools = "0.10.3" diff --git a/base_layer/wallet_ffi/build.rs b/base_layer/wallet_ffi/build.rs index 29e32918c4..2ee7552698 100644 --- a/base_layer/wallet_ffi/build.rs +++ b/base_layer/wallet_ffi/build.rs @@ -25,7 +25,11 @@ fn main() { ]), ..Default::default() }, - autogen_warning: Some("// This file was generated by cargo-bindgen. Please do not edit manually.".to_string()), + autogen_warning: Some( + "// This file was generated by cargo-bindgen. Please do not edit + manually." + .to_string(), + ), style: Style::Tag, cpp_compat: true, export: ExportConfig { diff --git a/common/Cargo.toml b/common/Cargo.toml index fc8b2f4f87..6c763aceb8 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -15,7 +15,7 @@ static-application-info = ["git2"] [dependencies] tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.5" } -tari_common_types = { path = "../base_layer/common_types" } + anyhow = "1.0.53" config = { version = "0.13.0", default_features = false, features = ["toml"] } derivative = "2.2.0" diff --git a/infrastructure/libtor/Cargo.toml b/infrastructure/libtor/Cargo.toml index 57dc45a5c2..649bb379c6 100644 --- a/infrastructure/libtor/Cargo.toml +++ b/infrastructure/libtor/Cargo.toml @@ -7,16 +7,13 @@ license = "BSD-3-Clause" [dependencies] tari_common = { path = "../../common" } tari_p2p = { path = "../../base_layer/p2p" } +tari_shutdown = { version = "^0.38", path = "../shutdown"} derivative = "2.2.0" +libtor = { version = "46.9.0" } log = "0.4.8" log4rs = { version = "1.0.0", default_features = false, features = ["config_parsing", "threshold_filter", "yaml_format"] } multiaddr = { version = "0.14.0" } - -# NB: make sure this crate is not included in any other crate used by wallet_ffi -[target.'cfg(unix)'.dependencies] -tari_shutdown = { version = "^0.38", path = "../shutdown"} -libtor = { version = "46.9.0", optional = true } rand = "0.8" tempfile = "3.1.0" -tor-hash-passwd = "1.0.1" +tor-hash-passwd = "1.0.1" \ No newline at end of file diff --git a/infrastructure/libtor/src/lib.rs b/infrastructure/libtor/src/lib.rs index 3292bf2971..a9bd23fdad 100644 --- a/infrastructure/libtor/src/lib.rs +++ b/infrastructure/libtor/src/lib.rs @@ -20,5 +20,4 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#[cfg(all(unix, feature = "libtor"))] pub mod tor; diff --git a/infrastructure/tari_script/Cargo.toml b/infrastructure/tari_script/Cargo.toml index d0f129310e..51b0cac28f 100644 --- a/infrastructure/tari_script/Cargo.toml +++ b/infrastructure/tari_script/Cargo.toml @@ -11,8 +11,6 @@ readme = "README.md" license = "BSD-3-Clause" [dependencies] -tari_common_types = { path = "../../base_layer/common_types" } -tari_common = {path = "../../common"} tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.5" } tari_utilities = { git = "https://github.com/tari-project/tari_utilities.git", tag = "v0.4.5" } diff --git a/infrastructure/tari_script/src/script_commitment.rs b/infrastructure/tari_script/src/script_commitment.rs index 9a868d7a4b..cfe3ed5e84 100644 --- a/infrastructure/tari_script/src/script_commitment.rs +++ b/infrastructure/tari_script/src/script_commitment.rs @@ -16,10 +16,12 @@ // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. use digest::Digest; -use tari_common_types::types::CommitmentFactory; use tari_crypto::{ commitment::HomomorphicCommitmentFactory, - ristretto::{pedersen::PedersenCommitment, RistrettoSecretKey}, + ristretto::{ + pedersen::{extended_commitment_factory::ExtendedPedersenCommitmentFactory, PedersenCommitment}, + RistrettoSecretKey, + }, }; use tari_utilities::{ByteArray, ByteArrayError}; use thiserror::Error; @@ -115,7 +117,7 @@ impl ScriptCommitment { #[derive(Default)] pub struct ScriptCommitmentFactory { - factory: CommitmentFactory, + factory: ExtendedPedersenCommitmentFactory, } impl ScriptCommitmentFactory {