Skip to content

Commit

Permalink
Merge pull request #963 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
Merge dev to mm2.1
  • Loading branch information
artemii235 committed Jun 7, 2021
2 parents 419f36e + a839d2f commit 572f7a1
Show file tree
Hide file tree
Showing 131 changed files with 23,806 additions and 1,472 deletions.
942 changes: 873 additions & 69 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 18 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ version = "0.1.0"
edition = "2018"
default-run = "mm2"

# Deprecated
[features]
# Deprecated
native = []
zhtlc = ["coins/zhtlc"]

[[bin]]
name = "mm2"
Expand Down Expand Up @@ -48,10 +49,10 @@ async-std = { version = "1.5", features = ["unstable"] }
async-trait = "0.1"
atomic = "0.4"
bigdecimal = { version = "0.1", features = ["serde"] }
bitcrypto = { git = "https://github.com/artemii235/parity-bitcoin.git" }
bitcrypto = { path = "mm2src/mm2_bitcoin/crypto" }
blake2 = "0.9.1"
bytes = "0.4"
chain = { git = "https://github.com/artemii235/parity-bitcoin.git" }
chain = { path = "mm2src/mm2_bitcoin/chain" }
coins = { path = "mm2src/coins" }
common = { path = "mm2src/common" }
crc = "1.8"
Expand All @@ -64,9 +65,6 @@ enum-primitive-derive = "0.1"
fomat-macros = "0.2"
futures01 = { version = "0.1", package = "futures" }
futures-cpupool = "0.1"
# NB: tokio-timer 2+ is targeted at "Tokio runtime" and heavy load (spawns several timer threads there),
# whereas futures-timer works with any reactor and spawns one global timer thread (fits out load better).
futures-timer = "0.1"
futures = { version = "0.3.1", package = "futures", features = ["compat", "async-await"] }
gstuff = { version = "0.6", features = ["nightly"] }
hash256-std-hasher = "0.15.2"
Expand All @@ -75,34 +73,34 @@ hex = "0.3.2"
hex-literal = "0.3.1"
http = "0.2"
itertools = "0.9"
keys = { git = "https://github.com/artemii235/parity-bitcoin.git" }
keys = { path = "mm2src/mm2_bitcoin/keys" }
lazy_static = "1.3"
libc = "0.2"
metrics = "0.12"
mm2-libp2p = { path = "mm2src/mm2_libp2p" }
num-rational = { version = "0.2", features = ["serde", "bigint", "bigint-std"] }
num-traits = "0.2"
rpc = { git = "https://github.com/artemii235/parity-bitcoin.git" }
rpc = { path = "mm2src/mm2_bitcoin/rpc" }
parking_lot = { version = "0.11", features = ["nightly"] }
parity-util-mem = "0.7"
# AP: portfolio RPCs are not documented and not used as of now
# so the crate is disabled to speed up the entire removal of C code
# portfolio = { path = "mm2src/portfolio" }
primitives = { git = "https://github.com/artemii235/parity-bitcoin.git" }
primitives = { path = "mm2src/mm2_bitcoin/primitives" }
rand = { version = "0.7", features = ["std", "small_rng"] }
rmp-serde = "0.14.3"
# TODO: Reduce the size of regex by disabling the features we don't use.
# cf. https://github.com/rust-lang/regex/issues/583
regex = "1"
script = { git = "https://github.com/artemii235/parity-bitcoin.git" }
script = { path = "mm2src/mm2_bitcoin/script" }
serde = "1.0"
serde_bencode = "0.2"
serde_json = { version = "1.0", features = ["preserve_order"] }
serde_derive = "1.0"
ser_error = { path = "mm2src/derives/ser_error" }
ser_error_derive = { path = "mm2src/derives/ser_error_derive" }
serialization = { git = "https://github.com/artemii235/parity-bitcoin.git" }
serialization_derive = { git = "https://github.com/artemii235/parity-bitcoin.git" }
serialization = { path = "mm2src/mm2_bitcoin/serialization" }
serialization_derive = { path = "mm2src/mm2_bitcoin/serialization_derive" }
sp-trie = "2.0.0"
sql-builder = "3.1.1"

Expand Down Expand Up @@ -143,6 +141,14 @@ regex = "1"
members = [
"mm2src/coins",
"mm2src/floodsub",
"mm2src/mm2_bitcoin/crypto",
"mm2src/mm2_bitcoin/chain",
"mm2src/mm2_bitcoin/keys",
"mm2src/mm2_bitcoin/rpc",
"mm2src/mm2_bitcoin/primitives",
"mm2src/mm2_bitcoin/script",
"mm2src/mm2_bitcoin/serialization",
"mm2src/mm2_bitcoin/serialization_derive",
"mm2src/mm2_libp2p",
"mm2src/gossipsub",
"mm2src/derives/ser_error",
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-build-stage-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
ALICE_PASSPHRASE: $(${{ parameters.alice_passphrase }})
ALICE_USERPASS: $(${{ parameters.alice_userpass }})
RUST_LOG: debug
condition: or( eq( variables['Build.Reason'], 'PullRequest' ), eq( variables['Build.SourceBranchName'], 'mm2.1' ) )
condition: or( eq( variables['Build.Reason'], 'PullRequest' ), eq( variables['Build.SourceBranchName'], 'mm2.1' ), eq( variables['Build.SourceBranchName'], 'dev' ) )
- bash: |
cargo clippy -- -D warnings
displayName: 'Check Clippy warnings'
Expand Down
20 changes: 0 additions & 20 deletions js/defined-in-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,6 @@
export function host_ensure_dir_is_writable(ptr, len) {
}

// fn host_electrum_connect(ptr: *const c_char, len: i32) -> i32;
export function host_electrum_connect(ptr, len) {
return 0;
}

// fn host_electrum_is_connected(ri: i32) -> i32;
export function host_electrum_is_connected(ri) {
return 0;
}

// fn host_electrum_request(ri: i32, ptr: *const c_char, len: i32) -> i32;
export function host_electrum_request(ri, ptr, len) {
return 0;
}

// fn host_electrum_reply(ri: i32, id: i32, rbuf: *mut c_char, rcap: i32) -> i32;
export function host_electrum_reply(ri, id, rbuf, rcap) {
return 0;
}

// pub fn host_env(name: *const c_char, nameˡ: i32, rbuf: *mut c_char, rcap: i32) -> i32;
export function host_env(name, name2, rbuf, rcap) {
return 0;
Expand Down
30 changes: 20 additions & 10 deletions mm2src/coins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ name = "coins"
version = "0.1.0"
edition = "2018"

[features]
zhtlc = ["zcash_client_backend", "zcash_primitives", "zcash_proofs"]

[lib]
name = "coins"
path = "lp_coins.rs"
doctest = false

[dependencies]
async-std = { version = "1.5", features = ["unstable"] }
async-trait = "0.1"
base64 = "0.10.0"
bigdecimal = { version = "0.1.0", features = ["serde"] }
bitcrypto = { git = "https://github.com/artemii235/parity-bitcoin.git" }
bitcoin-cash-slp = "0.3.1"
bitcrypto = { path = "../mm2_bitcoin/crypto" }
byteorder = "1.3"
bytes = "0.4"
chain = { git = "https://github.com/artemii235/parity-bitcoin.git" }
cfg-if = "1.0"
chain = { path = "../mm2_bitcoin/chain" }
common = { path = "../common" }
derive_more = "0.99"
ethabi = { git = "https://github.com/artemii235/ethabi" }
Expand All @@ -28,30 +34,31 @@ fomat-macros = "0.2"
futures01 = { version = "0.1", package = "futures" }
# using select macro requires the crate to be named futures, compilation failed with futures03 name
futures = { version = "0.3", package = "futures", features = ["compat", "async-await"] }
futures-timer = "0.1"
gstuff = { version = "0.6", features = ["nightly"] }
hex = "0.3.2"
http = "0.2"
itertools = "0.9"
jsonrpc-core = "8.0.1"
keys = { git = "https://github.com/artemii235/parity-bitcoin.git" }
keys = { path = "../mm2_bitcoin/keys" }
lazy_static = "1.3"
libc = "0.2"
libsecp256k1 = "0.3.5"
metrics = "0.12"
mocktopus = "0.7.0"
num-traits = "0.2"
primitives = { git = "https://github.com/artemii235/parity-bitcoin.git" }
primitives = { path = "../mm2_bitcoin/primitives" }
rand = { version = "0.7", features = ["std", "small_rng"] }
rlp = { git = "https://github.com/artemii235/parity-common" }
rpc = { git = "https://github.com/artemii235/parity-bitcoin.git" }
script = { git = "https://github.com/artemii235/parity-bitcoin.git" }
rpc = { path = "../mm2_bitcoin/rpc" }
script = { path = "../mm2_bitcoin/script" }
secp256k1_bindings = { version = "0.20", package = "secp256k1" }
ser_error = { path = "../derives/ser_error" }
ser_error_derive = { path = "../derives/ser_error_derive" }
serde = "1.0"
serde_derive = "1.0"
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
serialization = { git = "https://github.com/artemii235/parity-bitcoin.git" }
ser_error = { path = "../derives/ser_error" }
ser_error_derive = { path = "../derives/ser_error_derive" }
serialization = { path = "../mm2_bitcoin/serialization" }
serialization_derive = { path = "../mm2_bitcoin/serialization_derive" }
sha2 = "0.8"
sha3 = "0.8"
# One of web3 dependencies is the old `tokio-uds 0.1.7` which fails cross-compiling to ARM.
Expand All @@ -73,3 +80,6 @@ rustls = { version = "0.18", features = ["dangerous_configuration"] }
tokio = { version = "0.2" }
tokio-rustls = { version = "0.14.1" }
webpki-roots = { version = "0.19.0" }
zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.git", optional = true }
zcash_primitives = { features = ["transparent-inputs"], git = "https://github.com/KomodoPlatform/librustzcash.git", optional = true }
zcash_proofs = { features = ["bundled-prover"], git = "https://github.com/KomodoPlatform/librustzcash.git", optional = true }
Loading

0 comments on commit 572f7a1

Please sign in to comment.