diff --git a/Cargo.lock b/Cargo.lock index c96971897e..00b7fa4f98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2582,15 +2582,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.8", -] - [[package]] name = "hashbrown" version = "0.12.1" @@ -3565,7 +3556,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "lru 0.10.1", + "lru", "quick-protobuf", "quick-protobuf-codec", "smallvec", @@ -3947,15 +3938,6 @@ dependencies = [ "value-bag", ] -[[package]] -name = "lru" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" -dependencies = [ - "hashbrown 0.11.2", -] - [[package]] name = "lru" version = "0.10.1" @@ -4389,7 +4371,6 @@ dependencies = [ "mm2_test_helpers", "mocktopus", "num-traits", - "parity-util-mem", "parking_lot", "primitive-types", "primitives", @@ -4983,14 +4964,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if 1.0.0", - "ethereum-types", "hashbrown 0.12.1", "impl-trait-for-tuples", - "lru 0.7.5", "parity-util-mem-derive", - "parking_lot", "primitive-types", - "smallvec", "winapi", ] diff --git a/Cargo.toml b/Cargo.toml index 635857471e..97e471daea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -139,7 +139,6 @@ mocktopus = "0.8.0" nom = "6.1.2" num-bigint = { version = "0.4", features = ["serde", "std"] } num-rational = { version = "0.4", features = ["serde"] } -parity-util-mem = "0.11" num-traits = "0.2" pairing_api = { git = "https://github.com/komodoplatform/walletconnectrust", tag = "k-0.1.3" } parking_lot = { version = "0.12.0", default-features = false } diff --git a/LEGAL/THIRDPARTY-LICENSES b/LEGAL/THIRDPARTY-LICENSES index 96ae454e1f..fa1af2ddac 100755 --- a/LEGAL/THIRDPARTY-LICENSES +++ b/LEGAL/THIRDPARTY-LICENSES @@ -6,7 +6,7 @@ Apache-2.0 AND BSD-2-Clause OR MIT (2): crossbeam-channel, crossbeam-queue Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT (2): wasi, wasi Apache-2.0 OR BSL-1.0 (1): ryu Apache-2.0 OR ISC OR MIT (4): ct-logs, hyper-rustls, rustls, sct -Apache-2.0 OR MIT (343): addr2line, aead, aes, aes-gcm, ahash, ahash, ahash, ahash, anyhow, arc-swap, arrayvec, arrayvec, arrayvec, async-std, async-task, async-trait, atomic, atomic-shim, autocfg, autocfg, backtrace, base64, base64, base64, base64, bigdecimal, bimap, bitflags, blake2, block-buffer, block-buffer, block-padding, blocking, bs58, bumpalo, byte-tools, cache-padded, cc, cfg-if, cfg-if, chacha20, chacha20poly1305, chrono, cipher, concurrent-queue, console_error_panic_hook, const-random, const-random-macro, cpufeatures, cpuid-bool, crc, crc32fast, crossbeam, crossbeam-deque, crossbeam-epoch, crossbeam-utils, crypto-mac, crypto-mac, ctr, debug_stub_derive, derivative, digest, digest, dirs, dtoa, ed25519, either, enum-as-inner, env_logger, error-chain, ethabi, ethbloom, ethereum-types, fake-simd, fallible-iterator, fallible-streaming-iterator, fastrand, findshlibs, fixed-hash, fixedbitset, flate2, fnv, futures, futures, futures-channel, futures-core, futures-cpupool, futures-executor, futures-io, futures-macro, futures-rustls, futures-sink, futures-task, futures-timer, futures-util, getrandom, getrandom, ghash, gimli, gloo-timers, groestl, hashbrown, hashbrown, hashbrown, hashbrown, hashlink, hdrhistogram, hdrhistogram, heck, hermit-abi, hex, hex, hex-literal, hmac, hmac, http, http, httparse, httpdate, humantime, humantime, idna, idna, impl-codec, impl-rlp, impl-serde, impl-trait-for-tuples, indexmap, iovec, ipconfig, ipnet, itertools, itertools, itertools, itoa, js-sys, kv-log-macro, lazy_static, libc, libz-sys, linked-hash-map, lock_api, lock_api, lock_api, log, log, log-mdc, log4rs, lru-cache, match_cfg, maybe-uninit, miow, multimap, nodrop, nohash-hasher, ntapi, num, num-bigint, num-bigint, num-complex, num-derive, num-integer, num-iter, num-rational, num-rational, num-traits, num-traits, num_cpus, object, once_cell, opaque-debug, opaque-debug, parity-send-wrapper, parity-util-mem, parking, parking_lot, parking_lot, parking_lot, parking_lot, parking_lot_core, parking_lot_core, parking_lot_core, parking_lot_core, paste, percent-encoding, percent-encoding, pest, petgraph, pin-project, pin-project, pin-project-internal, pin-project-internal, pin-project-lite, pin-project-lite, pin-utils, pkg-config, poly1305, polyval, ppv-lite86, primitive-types, proc-macro-crate, proc-macro-crate, proc-macro-error, proc-macro-error-attr, proc-macro-hack, proc-macro-nested, proc-macro2, quick-error, quicksink, quote, quote, rand, rand, rand, rand, rand, rand_chacha, rand_chacha, rand_chacha, rand_core, rand_core, rand_core, rand_core, rand_hc, rand_hc, rand_hc, rand_isaac, rand_jitter, rand_os, rand_pcg, rand_pcg, rand_xorshift, rand_xoshiro, ref-cast, ref-cast-impl, regex, regex-syntax, remove_dir_all, resolv-conf, ripemd160, ripemd160, rlp, rlp, rust-argon2, rustc-demangle, rustc-hex, rustc-hex, rustc_version, rustc_version, scoped-tls, scopeguard, scopeguard, secrecy, semver, semver, semver-parser, semver-parser, send_wrapper, send_wrapper, serde, serde_bytes, serde_bytes, serde_derive, serde_json, serde_repr, serde_yaml, sha-1, sha-1, sha2, sha2, sha3, signal-hook, signal-hook-mio, signal-hook-registry, signature, siphasher, smallvec, smallvec, smol, snow, socket2, socket2, soketto, stable_deref_trait, static_assertions, syn, syn, synom, tc_cli_client, tc_coblox_bitcoincore, tc_core, tc_dynamodb_local, tc_elasticmq, tc_generic, tc_parity_parity, tc_postgres, tc_redis, tc_trufflesuite_ganachecli, tempfile, testcontainers, thiserror, thiserror-impl, thread-id, time, tokio-rustls, tokio-timer, toml, traitobject, trust-dns-proto, trust-dns-resolver, typenum, ucd-trie, uint, uint, unicode-bidi, unicode-normalization, unicode-segmentation, unicode-xid, unicode-xid, universal-hash, url, url, uuid, vcpkg, version_check, waker-fn, wasm-bindgen, wasm-bindgen-backend, wasm-bindgen-futures, wasm-bindgen-macro, wasm-bindgen-macro-support, wasm-bindgen-shared, wasm-bindgen-test, wasm-bindgen-test-macro, web-sys, widestring, winapi, winapi-i686-pc-windows-gnu, winapi-x86_64-pc-windows-gnu, yaml-rust, yamux, zeroize, zeroize_derive +Apache-2.0 OR MIT (343): addr2line, aead, aes, aes-gcm, ahash, ahash, ahash, ahash, anyhow, arc-swap, arrayvec, arrayvec, arrayvec, async-std, async-task, async-trait, atomic, atomic-shim, autocfg, autocfg, backtrace, base64, base64, base64, base64, bigdecimal, bimap, bitflags, blake2, block-buffer, block-buffer, block-padding, blocking, bs58, bumpalo, byte-tools, cache-padded, cc, cfg-if, cfg-if, chacha20, chacha20poly1305, chrono, cipher, concurrent-queue, console_error_panic_hook, const-random, const-random-macro, cpufeatures, cpuid-bool, crc, crc32fast, crossbeam, crossbeam-deque, crossbeam-epoch, crossbeam-utils, crypto-mac, crypto-mac, ctr, debug_stub_derive, derivative, digest, digest, dirs, dtoa, ed25519, either, enum-as-inner, env_logger, error-chain, ethabi, ethbloom, ethereum-types, fake-simd, fallible-iterator, fallible-streaming-iterator, fastrand, findshlibs, fixed-hash, fixedbitset, flate2, fnv, futures, futures, futures-channel, futures-core, futures-cpupool, futures-executor, futures-io, futures-macro, futures-rustls, futures-sink, futures-task, futures-timer, futures-util, getrandom, getrandom, ghash, gimli, gloo-timers, groestl, hashbrown, hashbrown, hashbrown, hashbrown, hashlink, hdrhistogram, hdrhistogram, heck, hermit-abi, hex, hex, hex-literal, hmac, hmac, http, http, httparse, httpdate, humantime, humantime, idna, idna, impl-codec, impl-rlp, impl-serde, impl-trait-for-tuples, indexmap, iovec, ipconfig, ipnet, itertools, itertools, itertools, itoa, js-sys, kv-log-macro, lazy_static, libc, libz-sys, linked-hash-map, lock_api, lock_api, lock_api, log, log, log-mdc, log4rs, lru-cache, match_cfg, maybe-uninit, miow, multimap, nodrop, nohash-hasher, ntapi, num, num-bigint, num-bigint, num-complex, num-derive, num-integer, num-iter, num-rational, num-rational, num-traits, num-traits, num_cpus, object, once_cell, opaque-debug, opaque-debug, parity-send-wrapper, parking, parking_lot, parking_lot, parking_lot, parking_lot, parking_lot_core, parking_lot_core, parking_lot_core, parking_lot_core, paste, percent-encoding, percent-encoding, pest, petgraph, pin-project, pin-project, pin-project-internal, pin-project-internal, pin-project-lite, pin-project-lite, pin-utils, pkg-config, poly1305, polyval, ppv-lite86, primitive-types, proc-macro-crate, proc-macro-crate, proc-macro-error, proc-macro-error-attr, proc-macro-hack, proc-macro-nested, proc-macro2, quick-error, quicksink, quote, quote, rand, rand, rand, rand, rand, rand_chacha, rand_chacha, rand_chacha, rand_core, rand_core, rand_core, rand_core, rand_hc, rand_hc, rand_hc, rand_isaac, rand_jitter, rand_os, rand_pcg, rand_pcg, rand_xorshift, rand_xoshiro, ref-cast, ref-cast-impl, regex, regex-syntax, remove_dir_all, resolv-conf, ripemd160, ripemd160, rlp, rlp, rust-argon2, rustc-demangle, rustc-hex, rustc-hex, rustc_version, rustc_version, scoped-tls, scopeguard, scopeguard, secrecy, semver, semver, semver-parser, semver-parser, send_wrapper, send_wrapper, serde, serde_bytes, serde_bytes, serde_derive, serde_json, serde_repr, serde_yaml, sha-1, sha-1, sha2, sha2, sha3, signal-hook, signal-hook-mio, signal-hook-registry, signature, siphasher, smallvec, smallvec, smol, snow, socket2, socket2, soketto, stable_deref_trait, static_assertions, syn, syn, synom, tc_cli_client, tc_coblox_bitcoincore, tc_core, tc_dynamodb_local, tc_elasticmq, tc_generic, tc_parity_parity, tc_postgres, tc_redis, tc_trufflesuite_ganachecli, tempfile, testcontainers, thiserror, thiserror-impl, thread-id, time, tokio-rustls, tokio-timer, toml, traitobject, trust-dns-proto, trust-dns-resolver, typenum, ucd-trie, uint, uint, unicode-bidi, unicode-normalization, unicode-segmentation, unicode-xid, unicode-xid, universal-hash, url, url, uuid, vcpkg, version_check, waker-fn, wasm-bindgen, wasm-bindgen-backend, wasm-bindgen-futures, wasm-bindgen-macro, wasm-bindgen-macro-support, wasm-bindgen-shared, wasm-bindgen-test, wasm-bindgen-test-macro, web-sys, widestring, winapi, winapi-i686-pc-windows-gnu, winapi-x86_64-pc-windows-gnu, yaml-rust, yamux, zeroize, zeroize_derive Apache-2.0 OR MIT OR Zlib (2): tinyvec, tinyvec_macros BSD-2-Clause (4): Inflector, arrayref, cloudabi, cloudabi BSD-2-Clause OR MIT (1): asn1_der @@ -16,7 +16,7 @@ BlueOak-1.0.0 (2): minicbor, minicbor-derive CC0-1.0 (6): constant_time_eq, keccak, secp256k1, secp256k1-sys, tiny-keccak, tiny-keccak GPL-3.0 (10): keccak-hash, bitcrypto, chain, keys, primitives, rpc, script, serialization, serialization_derive, unexpected ISC (2): rdrand, untrusted -MIT (117): asynchronous-codec, atomicdex-gossipsub, atty, base58, bech32, bitcoin-cash, bitcoin-cash-base, bitcoin-cash-script-macro, bitcoin-cash-slp, bitvec, blake2b_simd, build_const, byte-slice-cast, bytes, bytes, bytes, crossterm, crossterm_winapi, crunchy, crunchy, cuckoofilter, cuckoofilter, data-encoding, derive_more, enum-primitive-derive, ethbloom, ethereum-types, ethereum-types-serialize, fixed-hash, fomat-macros, fomat-macros, funty, futures_codec, generic-array, generic-array, gstuff, h2, hostname, http-body, http-body, hyper, jsonrpc-core, libp2p, libp2p-core, libp2p-dns, libp2p-floodsub, libp2p-floodsub, libp2p-mplex, libp2p-noise, libp2p-ping, libp2p-plaintext, libp2p-request-response, libp2p-swarm, libp2p-swarm-derive, libp2p-tcp, libp2p-wasm-ext, libp2p-websocket, libp2p-yamux, libsqlite3-sys, lru, lru, matches, memoffset, metrics, metrics-core, metrics-observer-prometheus, metrics-runtime, metrics-util, miniz_oxide, miniz_oxide, mio, mocktopus, mocktopus_macros, multiaddr, multihash, multihash-derive, multistream-select, ordered-float, owning_ref, parity-util-mem-derive, quanta, radium, redox_syscall, redox_users, rmp, rmp-serde, rusqlite, rust-ini, rw-stream-sink, serde-value, serde_bencode, slab, slab, spin, sql-builder, synstructure, tap, tokio, tokio-buf, tokio-macros, tokio-util, toolchain_find, tower-service, tracing, tracing-core, try-lock, typemap, unsafe-any, unsigned-varint, unsigned-varint, void, want, wasm-timer, web3, which, winreg, wyz +MIT (117): asynchronous-codec, atomicdex-gossipsub, atty, base58, bech32, bitcoin-cash, bitcoin-cash-base, bitcoin-cash-script-macro, bitcoin-cash-slp, bitvec, blake2b_simd, build_const, byte-slice-cast, bytes, bytes, bytes, crossterm, crossterm_winapi, crunchy, crunchy, cuckoofilter, cuckoofilter, data-encoding, derive_more, enum-primitive-derive, ethbloom, ethereum-types, ethereum-types-serialize, fixed-hash, fomat-macros, fomat-macros, funty, futures_codec, generic-array, generic-array, gstuff, h2, hostname, http-body, http-body, hyper, jsonrpc-core, libp2p, libp2p-core, libp2p-dns, libp2p-floodsub, libp2p-floodsub, libp2p-mplex, libp2p-noise, libp2p-ping, libp2p-plaintext, libp2p-request-response, libp2p-swarm, libp2p-swarm-derive, libp2p-tcp, libp2p-wasm-ext, libp2p-websocket, libp2p-yamux, libsqlite3-sys, lru, lru, matches, memoffset, metrics, metrics-core, metrics-observer-prometheus, metrics-runtime, metrics-util, miniz_oxide, miniz_oxide, mio, mocktopus, mocktopus_macros, multiaddr, multihash, multihash-derive, multistream-select, ordered-float, owning_ref, quanta, radium, redox_syscall, redox_users, rmp, rmp-serde, rusqlite, rust-ini, rw-stream-sink, serde-value, serde_bencode, slab, slab, spin, sql-builder, synstructure, tap, tokio, tokio-buf, tokio-macros, tokio-util, toolchain_find, tower-service, tracing, tracing-core, try-lock, typemap, unsafe-any, unsigned-varint, unsigned-varint, void, want, wasm-timer, web3, which, winreg, wyz MIT OR Unlicense (9): aho-corasick, byteorder, byteorder, memchr, quickcheck, same-file, termcolor, walkdir, winapi-util MPL-2.0 (3): webpki-roots, webpki-roots, wepoll-sys-stjepang MPL-2.0+ (3): bitmaps, im, sized-chunks diff --git a/mm2src/mm2_main/Cargo.toml b/mm2src/mm2_main/Cargo.toml index 0c360d60da..c28dc9714c 100644 --- a/mm2src/mm2_main/Cargo.toml +++ b/mm2src/mm2_main/Cargo.toml @@ -82,7 +82,6 @@ mm2_rpc = { path = "../mm2_rpc", features = ["rpc_facilities"] } mm2_state_machine = { path = "../mm2_state_machine" } trading_api = { path = "../trading_api" } num-traits.workspace = true -parity-util-mem.workspace = true parking_lot = { workspace = true } primitives = { path = "../mm2_bitcoin/primitives" } primitive-types.workspace = true diff --git a/mm2src/mm2_main/src/lp_ordermatch.rs b/mm2src/mm2_main/src/lp_ordermatch.rs index c441c7baee..70e407c232 100644 --- a/mm2src/mm2_main/src/lp_ordermatch.rs +++ b/mm2src/mm2_main/src/lp_ordermatch.rs @@ -2620,17 +2620,8 @@ fn order_pair_root_mut<'a>(state: &'a mut HashMap, state.entry(pair.to_owned()).or_insert_with(Default::default) } -/// `parity_util_mem::malloc_size` crushes for some reason on wasm32 -#[cfg(target_arch = "wasm32")] -fn collect_orderbook_metrics(_ctx: &MmArc, _orderbook: &Orderbook) {} - -#[cfg(not(target_arch = "wasm32"))] fn collect_orderbook_metrics(ctx: &MmArc, orderbook: &Orderbook) { - use parity_util_mem::malloc_size; - - let memory_db_size = malloc_size(&orderbook.memory_db); mm_gauge!(ctx.metrics, "orderbook.len", orderbook.order_set.len() as f64); - mm_gauge!(ctx.metrics, "orderbook.memory_db", memory_db_size as f64); } struct Orderbook {